/* Lobby-only presentation. Runtime IDs, data attributes and row fitting stay in app.js. */
.trade-url-form { display: grid; gap: 12px; }
.trade-url-form p { line-height: 1.6; }
.trade-url-form .dialog-actions { margin-top: 8px; }
.lobby-page {
  --bg: #edf2f0;
  --surface: #ffffff;
  --surface-2: #f3f6f4;
  --text: #253b34;
  --muted: #5c7068;
  --line: #d4ded9;
  --accent: #117b72;
  --lime: #c6ee70;
  --lime-text: #283919;
  --teal-wash: #e4f2ed;
  --row-hover: #f7fbf9;
  --thumb-bg: #eaf0ec;
  --row-avatar: 50px;
  --row-columns: 210px minmax(0, 1fr) 126px 216px;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 "Segoe UI", Arial, sans-serif;
}
[data-theme=dark] .lobby-page {
  --bg: #151a18;
  --surface: #202724;
  --surface-2: #262f2b;
  --text: #edf4ef;
  --muted: #afbeb5;
  --line: #3b4841;
  --accent: #79d7c7;
  --teal-wash: #263d34;
  --row-hover: #2a3530;
  --thumb-bg: #303c35;
}
.lobby-page *, .lobby-page *::before, .lobby-page *::after { letter-spacing: 0; }
.lobby-page :is(button, a, input, select) { -webkit-tap-highlight-color: transparent; }
.lobby-page :is(button, a, input, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lobby-page .lucide { width: 20px; height: 20px; stroke-width: 1.8; }
.lobby-page .button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.lobby-page .button:hover { background: var(--teal-wash); border-color: var(--accent); }
.lobby-page .button.primary { background: #117b72; color: #fff; border-color: #117b72; }
.lobby-page .button.primary:hover { background: #0c665f; border-color: #0c665f; }
.lobby-page .icon-button { width: 40px; height: 40px; min-height: 40px; color: var(--muted); border-radius: 4px; }
.lobby-page .icon-button:hover { color: var(--accent); background: var(--teal-wash); }
.lobby-page .text-button { min-height: 36px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lobby-page .text-button:hover { color: var(--accent); }
.lobby-page :is(input, select) { background: var(--surface); color: var(--text); border-color: var(--line); border-radius: 4px; }
.lobby-page :is(input, select)::placeholder { color: var(--muted); opacity: 1; }
.lobby-page .test-strip {
  height: auto;
  min-height: 34px;
  padding: 6px 24px;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
  background: var(--teal-wash);
  color: var(--text);
  border-color: var(--line);
}
.lobby-page .test-label { font-size: 10px; white-space: nowrap; color: var(--accent); border-color: var(--accent); padding: 2px 6px; }
.lobby-page .test-domain { font-size: 11px; color: var(--muted); }
.lobby-page .topbar { height: 80px; padding: 0 24px; gap: 30px; background: var(--surface); border-color: var(--line); }
.lobby-page .brand { min-width: 242px; gap: 12px; font-size: 30px; font-weight: 800; color: var(--text); }
.lobby-page .brand img { width: 42px; height: 42px; filter: none; }
.lobby-page .brand-number { color: var(--accent); font-weight: 800; }
[data-theme=dark] .lobby-page .brand-number { color: var(--lime); }
.lobby-page .brand-stack { gap: 6px; }
.lobby-page .brand-stack small { font-size: 10px; color: var(--muted); }
.lobby-page .top-nav > * { font-size: 14px; padding: 0 24px; border-color: var(--line); gap: 10px; color: var(--muted); }
.lobby-page .top-nav > .active { background: var(--teal-wash); color: var(--accent); box-shadow: inset 0 -3px var(--accent); }
.lobby-page .top-nav .lucide { width: 22px; height: 22px; color: var(--accent); }
.lobby-page .header-actions { gap: 14px; min-width: 0; }
.lobby-page .connection { font-size: 12px; color: var(--muted); }
.lobby-page .live-dot { width: 7px; height: 7px; background: var(--accent); }
.lobby-page .connection.offline .live-dot { background: #be864b; }
.lobby-page #account { min-width: 0; }
.lobby-page .profile-trigger { min-height: 46px; background: var(--surface-2); border-color: var(--line); font-size: 13px; }
.lobby-page .profile-trigger .avatar { width: 34px; height: 34px; }
.lobby-page .profile-menu { width: 236px; max-width: calc(100dvw - 24px); }
.lobby-page .profile-menu > [role=menuitem] { min-height: 44px; font-size: 13px; }
.lobby-page .profile-menu > [role=menuitem]:hover { background: var(--teal-wash); }
.lobby-page .app-layout { display: grid; grid-template-columns: minmax(0, 1fr) 304px; padding: 0; gap: 0; flex: 1 0 auto; align-items: start; }
.lobby-page #main { padding: 24px; }
.lobby-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; min-height: 36px; }
.lobby-heading h1 { font-size: 26px; line-height: 1.2; font-weight: 750; color: var(--text); }
.lobby-heading p { font-size: 12px; color: var(--muted); margin-top: 5px; }
.lobby-heading .text-button { gap: 8px; }
.lobby-heading .lucide { width: 18px; height: 18px; color: var(--accent); }
.lobby-page .summaries { display: flex; align-items: center; gap: 20px; padding: 14px 0; margin: 0 0 16px; border-block: 1px solid var(--line); }
.lobby-page .summary-band { border: 0; background: transparent; padding: 0; min-height: 0; flex: 1.15; }
.lobby-page .summary-band:nth-child(2) { flex: 1; border-left: 1px solid var(--line); padding-left: 20px; }
.lobby-page .summary-values, .lobby-page .user-summary { grid-template-columns: 1.3fr .7fr 1fr; text-align: left; gap: 16px; }
.lobby-page .user-summary { grid-template-columns: 1fr .65fr 1.2fr; }
.lobby-page .summary-values strong { display: flex; align-items: center; gap: 5px; font-size: 24px; font-weight: 750; line-height: 1.3; color: var(--text); }
.lobby-page .summary-values > div > span { margin-top: 5px; font-size: 11px; line-height: 1.45; text-transform: none; color: var(--muted); }
.lobby-page .value-mark { width: 19px; height: 19px; flex: none; }
.lobby-page #stat-open { color: var(--accent); }
.lobby-page #create-trigger { flex: none; min-width: 142px; min-height: 46px; margin: 0; }
.lobby-page .toolbar { min-height: 46px; gap: 16px; margin-bottom: 10px; }
.lobby-page .segmented { gap: 4px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; }
.lobby-page .segmented button { font-size: 13px; min-height: 38px; padding: 8px 14px; border-radius: 3px; color: var(--muted); }
.lobby-page .segmented button.active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px #18362a12; }
.lobby-page .segmented button:hover { background: var(--teal-wash); }
.lobby-page .segmented button span { font-size: 11px; margin-left: 6px; background: var(--teal-wash); color: var(--accent); padding: 2px 5px; border-radius: 3px; font-variant-numeric: tabular-nums; }
.lobby-page .sort-control { gap: 9px; color: var(--muted); }
.lobby-page .sort-control .lucide { display: block; width: 18px; height: 18px; }
.lobby-page .sort-control select { min-height: 42px; font-size: 12px; max-width: 150px; padding: 8px 10px; background: var(--surface); border-color: var(--line); }
.lobby-page .board-labels, .lobby-page .game-main { grid-template-columns: var(--row-columns); gap: 14px; padding-inline: 14px; }
.lobby-page .board-labels { font-size: 11px; background: transparent; border: 0; min-height: 32px; padding-block: 8px; color: var(--muted); }
.lobby-page .board-labels > span:last-child { text-align: right; }
.lobby-page .games-list { gap: 8px; }
.lobby-page .game { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.lobby-page .game:nth-child(even) { background: var(--surface); }
.lobby-page .game:hover { background: var(--row-hover); }
.lobby-page .game.open { border-left: 3px solid var(--accent); }
.lobby-page .game-main { min-height: 114px; padding-block: 12px; }
.lobby-page .players { max-width: none; gap: 8px; }
.lobby-page .player { max-width: 88px; gap: 4px; }
.lobby-page .avatar { width: 50px; height: 50px; font-size: 16px; border-width: 2px; border-color: #829b8d; background: #dee9e0; color: #314a3b; }
.lobby-page .avatar.black { background: #303c35; color: #f0f6ef; border-color: #91a89a; }
.lobby-page .avatar.white { background: #f5f9f4; color: #314a3b; border-color: #9cae9c; }
.lobby-page .avatar.empty { border: 2px dashed var(--line); color: var(--accent); background: var(--surface-2); }
.lobby-page .avatar.winner { outline-color: #b89646; }
.lobby-page .player-name { max-width: 88px; font-size: 12px; color: var(--text); line-height: 1.35; }
.lobby-page .player-note { font-size: 10px; line-height: 1.3; color: var(--muted); }
.lobby-page .versus { font-size: 10px; color: var(--muted); }
.lobby-page .test-player-tag { font-size: 9px; line-height: 1.4; padding: 1px 4px; }
.lobby-page .games-list .player { position: relative; }
.lobby-page .games-list .player .avatar { margin-bottom: 5px; }
.lobby-page .games-list .player .test-player-tag { position: absolute; top: calc(var(--row-avatar) - 10px); z-index: 1; }
.lobby-page .games-list .item-stack { gap: 8px; max-height: none; flex-wrap: nowrap; min-width: 0; overflow: hidden; align-self: center; }
.lobby-page .skin-thumb { position: relative; display: flex; flex-direction: column; justify-content: center; width: 86px; height: 86px; flex: 0 0 86px; background: var(--thumb-bg); border: 1px solid var(--line); border-bottom: 2px solid #8da993; border-radius: 4px; overflow: hidden; }
.lobby-page .skin-thumb img { width: 80px; height: 66px; object-fit: contain; }
.lobby-page .skin-thumb.more { font-size: 17px; color: var(--muted); background: transparent; border-style: dashed; border-bottom-width: 1px; }
/* Ready for a literal renderer price label; do not extract or fabricate values in CSS. */
.lobby-page .skin-price { display: block; width: 100%; padding: 1px 3px 3px; font-size: 12px; line-height: 16px; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.lobby-page .skin-thumb:has(.skin-price) img { height: 62px; }
.lobby-page .game-pot { min-width: 0; text-align: left; }
.lobby-page .pot-value { display: flex; align-items: center; gap: 4px; font-size: 23px; line-height: 1.3; color: var(--text); font-weight: 750; }
.lobby-page .pot-value .value-mark { width: 18px; height: 18px; }
.lobby-page .pot-label { font-size: 10px; color: var(--muted); margin-top: 4px; }
.lobby-page .game-action { min-width: 0; align-items: flex-end; justify-content: center; gap: 6px; }
.lobby-page .game-action .button { min-height: 42px; font-size: 13px; min-width: 112px; padding: 9px 12px; }
.lobby-page .game-action .text-button { font-size: 11px; min-height: 28px; }
.lobby-page .game-action .button.primary { background: var(--lime); border-color: var(--lime); color: var(--lime-text); }
.lobby-page .game-action .button.primary:hover { background: #b5df58; border-color: #b5df58; }
.lobby-page .game-bottom { min-height: 34px; gap: 8px 14px; padding: 4px 14px; background: var(--surface-2); border-color: var(--line); color: var(--muted); font-size: 11px; line-height: 1.45; flex-wrap: wrap; }
.lobby-page .game-bottom .text-button { min-height: 26px; max-width: 55%; font-size: 11px; white-space: normal; text-align: right; line-height: 1.45; }
.lobby-page .game-bottom .lucide { width: 15px; height: 15px; }
.lobby-page .round-status { min-width: 0; overflow-wrap: anywhere; }
.lobby-page .game.finished .game-bottom { background: var(--teal-wash); }
.lobby-page .game.finished .pot-value { color: var(--accent); }
/* Use the existing delegated View action beside Join without duplicating its hook. */
.lobby-page .game:has(.game-action [data-join]) .game-action { padding-right: 96px; }
.lobby-page .game:has(.game-action [data-join]) .game-bottom > .text-button {
  position: absolute;
  right: 14px;
  top: calc((100% - 76px) / 2);
  width: 86px;
  max-width: none;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.lobby-page .game:has(.game-action [data-join]) .game-bottom > .text-button .lucide { display: none; }
.lobby-page .game:has(.game-action [data-join]) .game-bottom > .text-button:hover { border-color: var(--accent); color: var(--accent); background: var(--teal-wash); }
.lobby-page .round-clock { min-width: 94px; min-height: 26px; font-size: 11px; }
.lobby-page .lobby-footnote { padding: 12px 0; font-size: 12px; }
.lobby-page .lobby-footnote .text-button { font-size: 12px; }
.lobby-page :is(.loading-state, .empty-state) { color: var(--muted); font-size: 14px; }
.lobby-page .empty-state { padding: 64px 16px; border-block: 1px solid var(--line); }
.lobby-page .empty-state h2 { font-size: 22px; color: var(--text); }
.lobby-page .empty-state p { font-size: 13px; }
.lobby-page .community-panel { position: sticky; top: 0; height: 100dvh; min-width: 0; padding: 0; border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.lobby-page .chat-section { display: flex; flex-direction: column; min-height: 330px; flex: 1 0 330px; }
.lobby-page .chat-heading { margin: 0; min-height: 68px; padding: 14px 14px 12px; gap: 7px; flex-wrap: wrap; border-bottom: 1px solid var(--line); color: var(--muted); }
.lobby-page .chat-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text); font-weight: 750; }
.lobby-page .chat-heading h2 .lucide { color: var(--accent); }
.lobby-page .chat-heading .chat-presence { gap: 4px; font-size: 11px; margin-left: auto; }
.lobby-page .chat-heading .icon-button { width: 28px; height: 32px; min-height: 32px; }
.lobby-page .chat-heading .icon-button .lucide { width: 17px; height: 17px; }
.lobby-page .chat-box { display: flex; flex-direction: column; flex: 1; min-height: 0; background: transparent; border: 0; }
.lobby-page .chat-messages { flex: 1 1 0; height: auto; min-height: 180px; padding: 6px 16px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.lobby-page .chat-message { font-size: 13px; padding: 12px 0; line-height: 1.55; border-color: var(--line); }
.lobby-page .chat-message strong { color: var(--accent); max-width: calc(100% - 42px); display: inline-block; overflow-wrap: anywhere; }
.lobby-page .chat-message time { color: var(--muted); font-size: 10px; line-height: 2; }
.lobby-page .chat-message p { color: var(--text); margin-top: 4px; }
.lobby-page .chat-empty { color: var(--muted); font-size: 13px; padding: 36px 10px; }
.lobby-page #chat-form { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.lobby-page #chat-input { min-height: 42px; font-size: 12px; background: var(--surface-2); border-color: var(--line); padding: 9px 10px; }
.lobby-page #chat-send { width: 42px; height: 42px; min-height: 42px; padding: 0; background: #117b72; border-color: #117b72; }
.lobby-page .recent-panel { flex: 0 0 auto; background: transparent; border: 0; border-top: 1px solid var(--line); margin: 0; }
.lobby-page .recent-panel h2 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; text-align: left; padding: 16px; color: var(--text); border: 0; }
.lobby-page .recent-panel h2 .lucide { width: 17px; height: 17px; color: var(--muted); }
.lobby-page .recent-results { max-height: 224px; overflow-y: auto; scrollbar-width: thin; }
.lobby-page .result-entry { padding: 10px 16px; gap: 10px; background: transparent; border-color: var(--line); }
.lobby-page .result-entry:hover { background: var(--teal-wash); }
.lobby-page .result-entry > span:nth-child(2) { min-width: 0; }
.lobby-page .result-entry strong { font-size: 12px; max-width: 148px; color: var(--text); }
.lobby-page .result-entry small { font-size: 10px; color: var(--muted); }
.lobby-page .result-value { font-size: 14px; color: var(--accent); font-weight: 700; white-space: nowrap; }
.lobby-page .activity-empty { color: var(--muted); font-size: 12px; padding: 18px 12px 24px; }
.lobby-page .mazalito { flex: none; padding: 16px; margin: 0; border: 0; border-top: 1px solid var(--line); }
.lobby-page .mazalito-prize img { width: 64px; height: 64px; }
.lobby-page .mazalito :is(.mazalito-note, .mazalito-disclosure) { font-size: 11px; }
.lobby-page .footer { background: var(--surface); border-top: 1px solid var(--line); padding: 16px 24px; gap: 12px 20px; color: var(--muted); font-size: 11px; }
.lobby-page .footer-brand { color: var(--text); font-size: 20px; }
.lobby-page .footer-brand span { color: var(--accent); }
.lobby-page .footer .text-button { color: var(--muted); font-size: 11px; }
.lobby-page .footer > div { gap: 18px; flex-wrap: wrap; }
.lobby-page .dialog { background: var(--surface); border-color: var(--line); color: var(--text); border-radius: 6px; padding: 24px; }
.lobby-page .dialog-heading h2 { font-size: 24px; color: var(--text); }
.lobby-page .dialog :is(label, .eyebrow) { color: var(--muted); }
.lobby-page .dialog .eyebrow { font-size: 11px; }
.lobby-page .dialog p { font-size: 13px; }
.lobby-page .inventory-controls { flex-wrap: wrap; }
.lobby-page .inventory-note { font-size: 12px; }
.lobby-page .inventory-item { background: var(--surface-2); border-color: var(--line); }
.lobby-page .inventory-item img { height: 90px; width: 112px; }
.lobby-page .inventory-item strong { font-size: 12px; color: var(--text); }
.lobby-page .inventory-item span { font-size: 15px; color: var(--accent); }
.lobby-page .inventory-item.selected { background: var(--teal-wash); border-color: var(--accent); }
.lobby-page .detail-match .player { max-width: 145px; }
.lobby-page .detail-match .avatar { width: 64px; height: 64px; }
.lobby-page .detail-match .player-name { max-width: 140px; }
.lobby-page .coin-stage { height: 280px; margin: 0 -24px; border: 0; border-radius: 0; background: transparent; }
.lobby-page .coin-stage canvas { width: 100%; height: 100%; max-width: none; }
.lobby-page .detail-items .item-stack { max-height: none; flex-wrap: wrap; gap: 8px; }
.lobby-page .detail-summary { border-color: var(--line); }
.lobby-page .detail-summary strong { color: var(--text); }
.lobby-page .selection-summary { gap: 12px; }
.lobby-page .selection-summary strong { font-size: 24px; }
.lobby-page .selection-summary span { font-size: 12px; line-height: 1.5; }
.lobby-page .selection-warning { font-size: 12px; overflow-wrap: anywhere; }
.lobby-page .dialog-actions { flex-wrap: wrap; }
.lobby-page .dialog-actions .button { white-space: normal; }

@media (min-width: 1700px) {
  .lobby-page { --row-columns: 228px minmax(0, 1fr) 156px 224px; --row-avatar: 54px; }
  .lobby-page .app-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .lobby-page #main { padding: 28px; }
  .lobby-page .game-main, .lobby-page .board-labels { gap: 20px; padding-inline: 18px; }
  .lobby-page .players { gap: 12px; }
  .lobby-page .player { max-width: 96px; }
  .lobby-page .player-name { max-width: 96px; }
  .lobby-page .avatar { width: 54px; height: 54px; }
  .lobby-page .pot-value { font-size: 26px; }
  .lobby-page .game:has(.game-action [data-join]) .game-bottom > .text-button { right: 18px; }
}
@media (max-width: 1399px) and (min-width: 1081px) {
  .lobby-page { --row-columns: 190px minmax(0, 1fr) 116px 208px; }
  .lobby-page .app-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .lobby-page #main { padding: 20px; }
  .lobby-page .summaries { gap: 14px; }
  .lobby-page .summary-band:nth-child(2) { padding-left: 14px; }
  .lobby-page .summary-values { gap: 10px; }
  .lobby-page .summary-values strong { font-size: 21px; }
  .lobby-page .summary-values > div > span { font-size: 10px; }
  .lobby-page #create-trigger { min-width: 126px; padding-inline: 12px; }
  .lobby-page .game-main, .lobby-page .board-labels { gap: 12px; }
  .lobby-page .player { max-width: 79px; }
  .lobby-page .player-name { max-width: 79px; }
  .lobby-page .pot-value { font-size: 21px; }
  .lobby-page .chat-heading h2 { font-size: 14px; gap: 6px; }
  .lobby-page .chat-heading { padding-inline: 12px; }
  .lobby-page .chat-heading .chat-presence { font-size: 10px; }
}
@media (max-width: 1080px) {
  .lobby-page { --row-columns: 190px minmax(0, 1fr) 112px 208px; }
  .lobby-page .app-layout { grid-template-columns: minmax(0, 1fr); }
  .lobby-page #main { padding: 20px; }
  .lobby-page .community-panel { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr); overflow: visible; }
  .lobby-page .chat-section { height: 420px; min-height: 0; }
  .lobby-page .recent-panel { border-top: 0; border-left: 1px solid var(--line); }
  .lobby-page .recent-results { max-height: 344px; }
  .lobby-page .mazalito { grid-column: 1 / -1; }
  .lobby-page .topbar { gap: 16px; }
  .lobby-page .brand { min-width: 224px; font-size: 28px; }
  .lobby-page .summary-values strong { font-size: 21px; }
  .lobby-page .summaries { gap: 16px; }
  .lobby-page .summary-band:nth-child(2) { padding-left: 16px; }
  .lobby-page .summary-values { gap: 10px; }
}
@media (max-width: 760px) {
  .lobby-page { --row-columns: minmax(0, 1fr) 132px; --row-avatar: 46px; font-size: 14px; }
  .lobby-page .test-strip { padding: 7px 12px; gap: 8px; font-size: 11px; align-items: flex-start; }
  .lobby-page .test-label { font-size: 9px; margin-top: 1px; }
  .lobby-page .test-domain { display: none; }
  .lobby-page .topbar { height: auto; min-height: 76px; padding: 12px; gap: 8px; flex-wrap: nowrap; align-items: center; }
  .lobby-page .brand { min-width: 0; height: auto; flex: 1 1 auto; gap: 8px; font-size: 24px; }
  .lobby-page .brand img { width: 34px; height: 34px; }
  .lobby-page .brand-stack { gap: 5px; }
  .lobby-page .brand-stack small { font-size: 9px; }
  .lobby-page .header-actions { gap: 6px; flex: none; }
  .lobby-page .header-actions .theme-toggle { display: grid; width: 36px; min-width: 36px; height: 40px; }
  .lobby-page .header-actions .button { font-size: 12px; min-height: 40px; padding: 8px 10px; }
  .lobby-page .header-actions .button .lucide { display: none; }
  .lobby-page .profile-trigger { max-width: 140px; padding: 4px 6px; min-height: 42px; gap: 6px; }
  .lobby-page .profile-name { max-width: 64px; }
  .lobby-page .profile-trigger .avatar { width: 30px; height: 30px; }
  .lobby-page .profile-trigger > .lucide { width: 12px; height: 12px; }
  .lobby-page .profile-menu { right: 0; }
  .lobby-page #main { padding: 20px 12px 12px; }
  .lobby-heading { margin-bottom: 12px; gap: 8px; min-height: 44px; }
  .lobby-heading h1 { font-size: 24px; }
  .lobby-heading p { font-size: 12px; }
  .lobby-heading .text-button { display: none; }
  .lobby-heading .lucide { width: 16px; height: 16px; }
  .lobby-page .summaries { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 0; margin-bottom: 14px; }
  .lobby-page .summary-band { padding: 0; }
  .lobby-page .summary-band:nth-child(2) { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
  .lobby-page .summary-values, .lobby-page .user-summary { grid-template-columns: 1.3fr .8fr 1fr; gap: 10px; }
  .lobby-page .summary-values strong { font-size: 22px; gap: 4px; }
  .lobby-page .summary-values > div > span { font-size: 10px; margin-top: 4px; }
  .lobby-page .value-mark { width: 17px; height: 17px; }
  .lobby-page #create-trigger { position: absolute; top: -56px; right: 0; width: 142px; min-width: 0; min-height: 44px; }
  .lobby-page .toolbar { gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
  .lobby-page .segmented { flex: 1 0 100%; }
  .lobby-page .segmented button { flex: 1; padding: 8px 10px; min-height: 40px; font-size: 13px; }
  .lobby-page .sort-control { margin-left: auto; gap: 8px; }
  .lobby-page .sort-control select { min-height: 38px; max-width: 150px; font-size: 12px; }
  .lobby-page .sort-control .lucide { width: 18px; height: 18px; }
  .lobby-page .board-labels { padding: 8px 10px; min-height: 34px; grid-template-columns: 1fr 132px; font-size: 10px; }
  .lobby-page .board-labels > span:nth-child(2), .lobby-page .board-labels > span:last-child { display: none; }
  .lobby-page .board-labels > span:nth-child(3) { text-align: right; }
  .lobby-page .games-list { gap: 10px; }
  .lobby-page .game-main { grid-template-columns: minmax(0, 1fr) 132px; grid-template-rows: auto auto auto; gap: 12px 8px; padding: 14px 10px 12px; min-height: 0; }
  .lobby-page .players { grid-column: 1; grid-row: 1; max-width: 200px; gap: 4px; }
  .lobby-page .player { max-width: 78px; }
  .lobby-page .avatar { width: 46px; height: 46px; font-size: 15px; }
  .lobby-page .player-name { max-width: 78px; font-size: 11px; }
  .lobby-page .player-note { font-size: 9px; }
  .lobby-page .versus { font-size: 9px; }
  .lobby-page .test-player-tag { font-size: 8px; padding: 1px 3px; }
  .lobby-page .game-pot { grid-column: 2; grid-row: 1; text-align: right; }
  .lobby-page .pot-value { font-size: 22px; justify-content: flex-end; gap: 3px; }
  .lobby-page .pot-value .value-mark { width: 16px; height: 16px; }
  .lobby-page .pot-label { font-size: 9px; }
  .lobby-page .games-list .item-stack { grid-column: 1 / -1; grid-row: 2; gap: 7px; max-height: none; }
  .lobby-page .skin-thumb { width: 76px; height: 78px; flex-basis: 76px; }
  .lobby-page .skin-thumb img { width: 70px; height: 64px; }
  .lobby-page .skin-thumb:has(.skin-price) img { height: 54px; }
  .lobby-page .skin-price { font-size: 12px; }
  .lobby-page .skin-thumb.more { font-size: 16px; }
  .lobby-page .game-action { grid-column: 1 / -1; grid-row: 3; align-items: stretch; min-height: 42px; }
  .lobby-page .game-action .button { font-size: 13px; min-height: 42px; width: 100%; }
  .lobby-page .game:has(.game-action [data-join]) .game-action { padding-right: calc(50% + 4px); }
  .lobby-page .game:has(.game-action [data-join]) .game-bottom > .text-button { top: auto; bottom: 48px; right: 10px; width: calc(50% - 15px); min-height: 42px; font-size: 13px; }
  .lobby-page .game-bottom { padding: 6px 10px; min-height: 36px; font-size: 10px; gap: 5px 8px; }
  .lobby-page .game-bottom .text-button { max-width: 100%; font-size: 10px; min-height: 24px; }
  .lobby-page .round-clock { min-width: 86px; font-size: 10px; }
  .lobby-page .game:has(.game-action [data-join]) .game-bottom { min-height: 36px; }
  .lobby-page .community-panel { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
  .lobby-page .chat-section { flex: none; height: 440px; }
  .lobby-page .chat-heading { min-height: 64px; padding: 12px 16px; }
  .lobby-page .chat-heading h2 { font-size: 15px; }
  .lobby-page .chat-heading .chat-presence { font-size: 11px; }
  .lobby-page .chat-messages { height: auto; min-height: 180px; }
  .lobby-page .recent-panel { border-left: 0; border-top: 1px solid var(--line); }
  .lobby-page .recent-results { max-height: 240px; }
  .lobby-page .result-entry strong { max-width: 200px; }
  .lobby-page .footer { padding: 18px 12px; font-size: 11px; gap: 10px 16px; }
  .lobby-page .footer > span { flex-basis: 100%; }
  .lobby-page .footer > div { gap: 4px 16px; }
  .lobby-page .footer .text-button { min-height: 32px; font-size: 11px; }
  .lobby-page .dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 20px 14px; }
  .lobby-page .dialog-heading h2 { font-size: 22px; }
  .lobby-page .dialog-heading .icon-button { margin: -5px -2px 0 0; }
  .lobby-page .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 34dvh; }
  .lobby-page .inventory-item { min-height: 160px; padding: 8px; }
  .lobby-page .inventory-item img { height: 78px; width: 100px; }
  .lobby-page .inventory-item strong { font-size: 11px; }
  .lobby-page .side-select { gap: 8px; }
  .lobby-page .side-select button { min-width: 0; padding: 8px 10px; font-size: 12px; }
  .lobby-page .selection-summary strong { font-size: 22px; }
  .lobby-page .selection-summary span { font-size: 11px; }
  .lobby-page .dialog-actions { gap: 8px; }
  .lobby-page .dialog-actions .button { padding: 9px 10px; font-size: 12px; }
  .lobby-page .detail-match { gap: 24px; }
  .lobby-page .detail-match .player { max-width: 120px; }
  .lobby-page .detail-match .player-name { max-width: 120px; font-size: 12px; }
  .lobby-page .detail-match .avatar { width: 56px; height: 56px; }
  .lobby-page .coin-stage { height: 230px; margin-inline: -14px; }
  .lobby-page .detail-footer { gap: 8px; }
}
@media (max-width: 360px) {
  .lobby-page { --row-avatar: 42px; }
  .lobby-page .topbar .brand { font-size: 20px; gap: 5px; }
  .lobby-page .topbar .brand img { width: 28px; height: 28px; }
  .lobby-page .brand-stack small { font-size: 8px; }
  .lobby-page .header-actions { gap: 3px; }
  .lobby-page .header-actions .theme-toggle { width: 32px; min-width: 32px; }
  .lobby-page .profile-name { max-width: 34px; }
  .lobby-page .profile-trigger { gap: 4px; }
  .lobby-page .profile-trigger .avatar { width: 26px; height: 26px; }
  .lobby-page .summary-values strong { font-size: 20px; }
  .lobby-page .summary-values { gap: 8px; }
  .lobby-page .game-main { grid-template-columns: minmax(0, 1fr) 112px; }
  .lobby-page .players { gap: 3px; }
  .lobby-page .player { max-width: 65px; }
  .lobby-page .player-name { max-width: 65px; }
  .lobby-page .avatar { width: 42px; height: 42px; }
  .lobby-page .player-note { font-size: 8px; }
  .lobby-page .pot-value { font-size: 20px; }
}
