/* Games sheets share the System surfaces, spacing and account treatment. */
.sols-games-sheet {
    width: min(100%, 580px);
    height: min(740px, 91dvh);
    padding: 10px 20px max(18px, env(safe-area-inset-bottom));
    background: var(--ui-card, #1f1a25);
    color: var(--ui-text, #f0e7f4);
    border-color: var(--ui-border, #514655);
    box-shadow: 0 20px 80px #0005;
}
.sols-games-sheet [hidden] { display: none !important; }
.sols-games-sheet header { display: flex; gap: 8px; margin: 10px 0 18px; flex: none; }
.sols-games-sheet header h2 { flex: 1; text-align: left; font-size: 22px; letter-spacing: -.5px; }
.sols-games-sheet header > span:empty { display: none; }
.sols-games-sheet .sheet-icon { display: grid; place-items: center; flex: none; }
.sols-games-sheet .sheet-body { gap: 14px; overscroll-behavior: contain; }
.sols-games-sheet .sheet-footer:empty { display: none; }
.sols-games-sheet p { margin: 0; }
.sols-games-sheet button { touch-action: manipulation; }
.sols-games-sheet .game-ui-icon { display: flex; width: 24px; height: 24px; flex: none; }
.game-sheet-intro { color: var(--ui-muted, #bcb3c6); font-size: 14px; }
.game-create-sheet { height: min(630px, 91dvh); }
.sols-games-sheet .sheet-footer { flex: none; }
.game-mode-sheet { height: auto; min-height: 330px; }
.sols-games-sheet .game-mode-card {
    display: flex; align-items: center; gap: 16px; width: 100%; padding: 20px 16px;
    border-radius: 20px; text-align: left; background: var(--ui-control, #302936);
    border: 1px solid var(--ui-border, #514655);
}
.game-mode-card > .game-ui-icon { width: 36px; height: 36px; color: var(--ui-accent, #d6b8f3); }
.game-mode-copy { display: grid; gap: 5px; flex: 1; min-width: 0; }
.game-mode-copy strong { font-size: 18px; }
.game-mode-copy > span { font-size: 13px; line-height: 1.45; color: var(--ui-muted, #bcb3c6); }
.game-mode-arrow { font-size: 26px; color: var(--ui-accent, #d6b8f3); }
.game-account { display: flex; align-items: center; min-width: 0; gap: 10px; }
.game-account-avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 16px; font-weight: 700; position: relative; overflow: hidden; }
.game-account-copy { min-width: 0; display: grid; gap: 3px; }
.game-account-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; font-size: 14px; }
.game-account-address { color: var(--ui-muted, #bcb3c6); font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lobby-row { background: var(--ui-control, #302936); border-radius: 20px; padding: 14px; }
.lobby-row-top { align-items: flex-start; }
.lobby-meta { white-space: normal; font-size: 12px; text-align: right; max-width: 92px; }
.lobby-row-bottom { gap: 12px; margin-top: 12px; }
.lobby-row-bottom > span { overflow-wrap: anywhere; }
.lobby-action { border: 1px solid var(--ui-border, #514655); background: var(--ui-selected, #51415e); border-radius: 16px; padding: 9px 17px; flex: none; }
.create-label { display: grid; gap: 8px; margin: 0; text-transform: none; letter-spacing: 0; font-size: 13px; }
.create-stake { display: grid; gap: 10px; }
.create-toggle { display: flex; }
.sols-games-sheet .create-seg { flex: 1; min-height: 42px; }
.create-amount { flex-wrap: nowrap; gap: 10px; }
.create-amount .create-input { flex: 1; min-width: 0; max-width: none; text-align: right; font-weight: 600; }
.create-amount > span { flex: none; }
.create-outcomes { gap: 0; padding: 8px 14px; border: 1px solid var(--ui-border, #514655); border-radius: 16px; background: var(--ui-control, #302936); }
.create-outcome { padding: 8px 0; }
.create-outcome + .create-outcome { border-top: 1px solid var(--ui-border, #514655); }
.create-outcome strong { text-align: right; font-size: 13px; overflow-wrap: anywhere; }
.game-details { border-top: 1px solid var(--ui-border, #514655); padding-top: 12px; font-size: 13px; }
.game-details summary { cursor: pointer; padding: 6px 0; color: var(--ui-muted, #bcb3c6); }
.game-details p { margin-top: 10px; line-height: 1.6; }
.sols-games-sheet .board-tabs { gap: 4px; flex: none; }
.sols-games-sheet .board-sections { border-bottom: 1px solid var(--ui-border, #514655); gap: 12px; }
.sols-games-sheet .board-sections .board-tab { padding: 8px 0 12px; min-width: 0; border: 0; border-radius: 0; background: none; color: var(--ui-muted, #bcb3c6); }
.sols-games-sheet .board-sections .board-tab[aria-pressed=true] { color: var(--ui-accent, #d6b8f3); box-shadow: inset 0 -2px var(--ui-accent, #d6b8f3); }
.board-periods { padding: 4px; border-radius: 25px; background: var(--ui-control, #302936); }
.sols-games-sheet .board-periods .board-tab { border-color: transparent; background: none; min-height: 34px; padding: 6px; }
.sols-games-sheet .board-periods .board-tab[aria-pressed=true] { background: var(--ui-selected, #51415e); border-color: transparent; }
.board-panel { display: grid; gap: 12px; }
.board-pool { position: relative; display: grid; gap: 5px; padding: 20px; border-radius: 22px; border: 1px solid var(--ui-border, #514655); background: radial-gradient(ellipse at top right, var(--ui-selected, #51415e), transparent 90%), var(--ui-control, #302936); }
.board-eyebrow { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ui-muted, #bcb3c6); }
.board-pool-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; font-size: 34px; font-weight: 700; letter-spacing: -1px; overflow-wrap: anywhere; }
.board-pool-value > span { color: var(--ui-accent, #d6b8f3); font-size: 14px; font-weight: 600; letter-spacing: .3px; }
.board-countdown { font-size: 12px; color: var(--ui-accent, #d6b8f3); }
.board-qualification { text-align: center; font-size: 11px; color: var(--ui-muted, #bcb3c6); }
.board-list-labels { display: grid; grid-template-columns: 1fr 36px 82px; gap: 8px; padding: 0 10px; font-size: 10px; color: var(--ui-muted, #bcb3c6); }
.board-list-labels > :nth-child(n+2) { text-align: right; }
.board-rows { gap: 6px; }
.board-player { grid-template-columns: 22px minmax(0, 1fr) 30px 80px; gap: 8px; padding: 12px 10px; min-height: 66px; background: var(--ui-control, #302936); border: 1px solid transparent; border-radius: 17px; }
.board-player .board-rank { min-width: 0; text-align: center; font-size: 13px; }
.board-player .board-num { text-align: right; font-size: 15px; }
.board-player .board-prize { display: grid; text-align: right; white-space: normal; font-size: 13px; overflow-wrap: anywhere; }
.board-prize small { font-size: 9px; color: var(--ui-muted, #bcb3c6); }
.board-top-1 { border-color: var(--ui-accent, #d6b8f3); background: var(--ui-selected, #51415e); }
.board-top-1 .board-rank, .board-top-2 .board-rank, .board-top-3 .board-rank { font-weight: 700; color: var(--ui-accent, #d6b8f3); }
.board-player.mine { outline: none; border-color: var(--ui-accent, #d6b8f3); }
.board-mine { padding: 12px; border-radius: 14px; background: var(--ui-control, #302936); font-size: 12px; }
.board-footnote { font-size: 10px; color: var(--ui-muted, #bcb3c6); line-height: 1.5; }
.game-empty { padding: 30px 16px; text-align: center; color: var(--ui-muted, #bcb3c6); font-size: 14px; }
.board-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.board-stat { display: grid; gap: 5px; padding: 18px; background: var(--ui-control, #302936); border-radius: 18px; }
.board-stat strong { font-size: 25px; overflow-wrap: anywhere; }
.board-stat span { font-size: 12px; color: var(--ui-muted, #bcb3c6); }
.board-stats .board-row { grid-template-columns: minmax(0, 1fr) auto; margin-top: 8px; }
.board-prizes .board-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; }
/* Every game flow rises from the same edge, retaining its library context. */
.sols-games-sheet { max-width:100vw; inset: auto 0 0; margin: 0 auto; border-radius: 28px 28px 0 0; max-height: calc(100dvh - 32px); }
.sols-games-sheet::backdrop { background: #080a12a8; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sols-games-sheet[open] { animation: game-sheet-rise 220ms cubic-bezier(.2,.8,.2,1); }
.game-mode-sheet { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.game-mode-sheet .sheet-body { padding-bottom: 4px; }
.game-mode-sheet .game-mode-card { min-height: 96px; transition: border-color 150ms, background 150ms; }
.game-mode-sheet .game-mode-card:hover { border-color: var(--ui-accent, #d6b8f3); }
.game-hosts-sheet { height: min(650px, 84dvh); }
@keyframes game-sheet-rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .sols-games-sheet[open] { animation: none; } }
@media (max-width: 359px) {
    .sols-games-sheet { padding-left: 12px; padding-right: 12px; }
    .board-player { grid-template-columns: 18px minmax(0, 1fr) 24px 64px; gap: 5px; padding: 10px 7px; }
    .game-account { gap: 7px; }
    .game-account-avatar { width: 30px; height: 30px; font-size: 13px; }
    .game-account-name { font-size: 12px; }
    .board-list-labels { grid-template-columns: 1fr 24px 64px; }
}
