/* Phone controller layout */
body { height: 100dvh; }
#app { height: 100%; }
a { color: var(--accent); }

.page { height: 100%; padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.page.center { display: flex; flex-direction: column; justify-content: center; gap: 18px; overflow-y: auto; }
.page.scroll { overflow-y: auto; display: flex; flex-direction: column; gap: 14px; height: auto; flex: 1; min-height: 0; width: 100%; }
.center-text { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.card { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-head h2 { margin: 0; font-size: 18px; }
.brand { display: flex; align-items: center; gap: 12px; justify-content: center; }
.brand h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.brand-mark { font-size: 34px; }
.btn.big { min-height: 58px; font-size: 18px; }
.note.small { font-size: 13px; }
.warn-text { color: #fcd34d; }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); justify-content: center; padding: 6px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv:last-child { border-bottom: 0; }

.lobby-shell, .game-shell { height: 100%; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: rgba(7, 11, 20, .85); position: relative; z-index: 20; }
.room-pill { font-weight: 700; letter-spacing: .18em; padding: 4px 10px; border-radius: 10px; background: rgba(0, 229, 255, .1); border: 1px solid rgba(0, 229, 255, .35); color: var(--o); }
.grow { flex: 1; }
.me { display: flex; align-items: center; gap: 6px; font-weight: 600; max-width: 45vw; }
.me .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .av { font-size: 20px; }

.player-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.game-cards { display: flex; flex-direction: column; gap: 8px; }
.game-card { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(30, 41, 59, .5); }
.game-card.on { border-color: var(--accent); background: rgba(0, 229, 255, .08); }
.game-card .gi { font-size: 28px; }
.game-card small { display: block; color: var(--muted); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(2, 6, 23, .6); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; gap: 10px; background: var(--panel-solid); }
.sheet-title { font-weight: 700; font-size: 17px; margin-bottom: 4px; }

.game-body { position: relative; flex: 1; min-height: 0; overflow: hidden; }
