* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #020617; color: #e2e8f0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; min-height: 100vh; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
.container { max-width: 900px; margin: 0 auto; padding: 16px;padding-top: 48px; }
h1 { font-size: 48px; font-weight: 900; letter-spacing: 6px; text-align: center; margin: 20px 0 8px; }
h2 { color: #a78bfa; font-size: 20px; margin-bottom: 12px; }
.subtitle { color: #94a3b8; text-align: center; margin-bottom: 24px; font-size: 14px; }
.screen { display: none; }
.screen.active { display: block; }
.btn { padding: 14px 24px; border: none; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%; margin-bottom: 8px; color: #fff; transition: opacity .15s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; will-change: opacity; }
.btn:hover { opacity: .85; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn-amber { background: #f59e0b; color: #000; }
.btn-green { background: #16a34a; }
.btn-blue { background: #2563eb; }
.btn-purple { background: #7c3aed; }
.btn-red { background: #dc2626; }
.btn-pink { background: #ec4899; }
.btn-cyan { background: #0891b2; }
.btn-emerald { background: #059669; }
.btn-indigo { background: #4f46e5; }
.btn-outline { background: transparent; border: 1px solid #475569; color: #94a3b8; }
.btn-sm { padding: 10px 16px; font-size: 14px; }

/* Toggle switch */
.toggle-switch { width: 48px; height: 26px; background: #475569; border-radius: 13px; cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0; }
.toggle-switch .toggle-knob { width: 22px; height: 22px; background: #fff; border-radius: 50%; position: absolute; top: 2px; left: 2px; transition: transform .2s; }
.toggle-switch.active { background: #3b82f6; }
.toggle-switch.active .toggle-knob { transform: translateX(22px); }
.btn-half { width: 48%; display: inline-block; }
input { background: #0f172a; border: 2px solid #334155; border-radius: 12px; padding: 14px 20px; font-size: 20px; color: #e2e8f0; text-align: center; width: 100%; margin-bottom: 12px; }
input::placeholder { color: #475569; }
.code-display { font-size: 42px; font-weight: 900; color: #fbbf24; letter-spacing: 8px; text-align: center; background: #0f172a; padding: 16px; border-radius: 16px; border: 1px solid #1e293b; margin-bottom: 16px; }
.card-box { display: inline-block; width: 90px; height: 120px; border-radius: 10px; border: 2px solid #7c3aed; text-align: center; font-weight: 800; font-size: 11px; margin: 4px; color: #fff; vertical-align: top; overflow: hidden; position: relative; background-size: cover; background-position: center; }
.card-box .card-label { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.85)); padding: 6px 4px 4px; font-size: 11px; font-weight: 700; text-align: center; }
.card-revealed { opacity: .5; border-color: #475569; }
.card-revealed .card-label { background: rgba(0,0,0,.6); }
.card-revealed::after { content: '💀'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 28px; z-index: 2; filter: drop-shadow(0 0 4px rgba(0,0,0,.8)); }
.card-hidden { background-image: url('/textures/card-back.svg'); border-color: #581c87; }
.player-card { background: #0f172a; border: 2px solid #1e293b; border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.player-card.mine { border-color: #a855f7; background: #1a0a2e; }
.player-card.current { border-color: #3b82f6; }
.player-card.dead { opacity: .4; }
.player-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.player-name { font-weight: 700; font-size: 16px; }
.badge { display: inline-block; background: #7c3aed; color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; margin-left: 6px; }
.coins { color: #fbbf24; font-weight: 800; font-size: 18px; }
.panel { border-radius: 16px; padding: 16px; margin-top: 16px; border: 2px solid; }
.panel-block { background: #1a1a2e; border-color: #f59e0b; }
.panel-challenge { background: #1a0a2e; border-color: #ef4444; }
.panel-targeted { background: #2d0a0a; border-color: #ef4444; }
.panel-action { background: #0f172a; border-color: #7c3aed; }
.panel-exchange { background: #1e1b4b; border-color: #7c3aed; }
.action-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.action-grid .btn { width: calc(50% - 4px); text-align: left; padding: 12px; }
.action-label { font-size: 14px; }
.action-desc { font-size: 11px; opacity: .7; margin-top: 2px; }
.section-title { color: #94a3b8; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin: 12px 0 8px; }
.log-entry { padding: 4px 0; font-size: 13px; color: #cbd5e1; border-bottom: 1px solid #1e293b; }
.log-turn { color: #64748b; font-size: 11px; font-weight: 700; background: #1e293b; display: inline-block; padding: 2px 8px; border-radius: 6px; margin: 8px 0 4px; }
.waiting { background: #0f172a; border: 1px solid #1e293b; border-radius: 12px; padding: 16px; text-align: center; color: #94a3b8; margin-top: 16px; font-style: italic; }
.header-bar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #1e293b; margin-bottom: 16px; }
.phase-text { color: #94a3b8; font-size: 12px; text-transform: capitalize; }

/* Voice chat buttons */
.voice-mic-btn, .voice-speaker-btn { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #334155; background: #1e293b; color: #94a3b8; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: all .2s; flex-shrink: 0; }
.voice-mic-btn:hover, .voice-speaker-btn:hover { border-color: #64748b; background: #334155; }
.voice-mic-btn.active { background: #dc2626; border-color: #dc2626; color: #fff; box-shadow: 0 0 8px rgba(220,38,38,.5); }
.voice-speaker-btn.active { border-color: #3b82f6; color: #3b82f6; }
.voice-speaker-btn:not(.active) { color: #64748b; }
.victory { text-align: center; padding: 40px 20px; }
.victory h2 { color: #fbbf24; font-size: 40px; margin-bottom: 8px; }
.flex-row { display: flex; gap: 8px; }
.flex-row > * { flex: 1; }
.card-select { cursor: pointer; transition: transform .15s; }
.card-select:hover { transform: scale(1.05); }
.card-select.selected { border-color: #22c55e !important; box-shadow: 0 0 12px rgba(34,197,94,.4); }
.error { color: #ef4444; text-align: center; margin: 8px 0; }
.player-list-item { display: flex; justify-content: space-between; align-items: center; background: #0f172a; padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; border: 1px solid #1e293b; }
.variant-row { display: flex; gap: 12px; margin-bottom: 16px; }
.variant-btn { flex: 1; padding: 14px; border-radius: 12px; border: 2px solid #334155; background: transparent; color: #64748b; font-weight: 700; font-size: 16px; cursor: pointer; text-align: center; }
.variant-btn.active-std { border-color: #6366f1; background: #1e1b4b; color: #fff; }
.variant-btn.active-inq { border-color: #10b981; background: #052e16; color: #fff; }
.tab-rules { padding: 8px 16px; border-radius: 8px; background: #3a8bed; color: #fff; cursor: pointer; font-weight: 600; font-size: 13px; border: none; margin-left: auto; }
.tab-rules:hover { background: #2775d4; }
.tab-exit { padding: 8px 16px; border-radius: 8px; background: #dc2626; color: #fff; cursor: pointer; font-weight: 600; font-size: 13px; border: none; }
.tab-exit:hover { background: #b91c1c; }
.rules-overlay { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.85); z-index:1000; overflow-y:auto; padding:24px 16px; }
.rules-overlay.active { display:block; }
.rules-content { max-width:600px; margin:0 auto; background:#0f172a; border:2px solid #7c3aed; border-radius:16px; padding:24px; }
.rules-content h2 { color:#a78bfa; margin-bottom:16px; }
.rules-content h3 { color:#f59e0b; margin:14px 0 6px; font-size:15px; }
.rules-content p, .rules-content li { color:#cbd5e1; font-size:13px; line-height:1.6; }
.rules-content ul { padding-left:18px; margin-bottom:8px; }
.rules-close { position:sticky; top:0; text-align:right; }
.rules-close button { background:#7c3aed; color:#fff; border:none; padding:8px 20px; border-radius:8px; font-weight:700; cursor:pointer; font-size:14px; }
.profile-bar { display:flex; align-items:center; justify-content:space-between; background:#0f172a; border:1px solid #1e293b; border-radius:12px; padding:12px 16px; margin-bottom:20px; }
.profile-bar .profile-name { color:#e2e8f0; font-weight:700; font-size:16px; }
.profile-bar .profile-label { color:#64748b; font-size:12px; }
.profile-bar .profile-edit { background:transparent; border:1px solid #475569; color:#94a3b8; padding:6px 14px; border-radius:8px; cursor:pointer; font-size:13px; font-weight:600; }
.profile-bar .profile-edit:hover { border-color:#7c3aed; color:#a78bfa; }
.name-popup-overlay { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.85); z-index:1001; align-items:center; justify-content:center; padding:24px; }
.name-popup-overlay.active { display:flex; }
.name-popup { background:#0f172a; border:2px solid #7c3aed; border-radius:16px; padding:28px; max-width:400px; width:100%; text-align:center; }
.name-popup h2 { color:#a78bfa; margin-bottom:8px; }
.name-popup p { color:#94a3b8; font-size:13px; margin-bottom:16px; }
.spectate-banner { background: #1e293b; border: 1px solid #f59e0b; border-radius: 10px; padding: 10px 16px; text-align: center; color: #fbbf24; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
#log-panel { max-height: 300px; overflow-y: auto; }
.tab-bar { display: flex; gap: 4px; margin-bottom: 12px; }
.tab { padding: 8px 16px; border-radius: 8px; background: #1e293b; color: #94a3b8; cursor: pointer; font-weight: 600; font-size: 13px; border: none; }
.tab.active { background: #7c3aed; color: #fff; }
.tab.chat-unread { animation: chat-pulse 1s infinite; }
@keyframes chat-pulse { 0%,100% { background: #1e293b; } 50% { background: #7c3aed55; } }

/* Chat */
.chat-panel { display:flex; flex-direction:column; height:calc(100vh - 200px); height:calc(100dvh - 200px); min-height:190px; overflow:hidden; border:1px solid var(--home-border); border-radius:18px; background:var(--home-bg); color:var(--home-ink); }
.chat-messages { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:clamp(10px, 3vw, 22px); text-align:left; background-image:radial-gradient(var(--home-border) .8px, transparent .8px); background-size:14px 14px; }
.chat-messages:empty { display:grid; place-items:center; }
.chat-messages:empty::before { content:"No messages yet. Say hello!"; padding:8px 14px; border-radius:20px; color:var(--home-muted); background:var(--home-surface); font-size:13px; }
.chat-row { display:flex; align-items:flex-start; gap:8px; }
.chat-row + .chat-row { margin-top:14px; }
.chat-row.outgoing { flex-direction:row-reverse; }
.chat-face { display:grid; place-items:center; flex:0 0 34px; height:34px; border:1px solid var(--home-border); border-radius:50%; background:var(--home-surface); font-size:15px; font-weight:800; }
.chat-bubble { min-width:0; max-width:min(78%, 38rem); padding:9px 13px; border:1px solid var(--home-border); border-radius:3px 15px 15px; background:var(--home-surface); box-shadow:0 2px 6px #101f3010; }
.outgoing .chat-bubble { border-radius:15px 3px 15px 15px; background:color-mix(in srgb, var(--home-surface) 86%, var(--home-accent)); }
.chat-meta { display:flex; align-items:baseline; gap:3px 7px; flex-wrap:wrap; line-height:1.3; }
.chat-meta strong { color:var(--home-green); font-size:12px; overflow-wrap:anywhere; }
.chat-meta small, .chat-meta time { color:var(--home-muted); font-size:11px; }
.chat-meta time { margin-left:auto; }
.chat-copy { margin-top:4px; font-size:15px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-input-row { display:flex; align-items:center; gap:8px; padding:10px; flex-shrink:0; border-top:1px solid var(--home-border); background:var(--home-surface); }
.chat-input-row input { flex:1; min-width:0; width:auto; height:44px; margin:0; font:inherit; font-size:16px; text-align:left; padding:10px 14px; border:1px solid var(--home-border); border-radius:14px; background:var(--home-bg); color:var(--home-ink); }
.chat-input-row input::placeholder { color:var(--home-muted); }
.chat-input-row :focus-visible { outline:2px solid var(--home-green); outline-offset:2px; }
.chat-input-row button.btn { width:auto; height:44px; padding:0 18px; margin:0; flex-shrink:0; border:0; border-radius:14px; background:var(--home-accent); color:#203824; }

/* Chat Toast */
.chat-toast { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 999; background: #1e293b; border: 1px solid #475569; border-radius: 10px; padding: 8px 16px; max-width: 90%; font-size: 13px; box-shadow: 0 4px 20px rgba(0,0,0,.5); opacity: 0; transition: opacity .3s; pointer-events: none; }
.chat-toast.show { opacity: 1; }
.chat-toast-name { font-weight: 700; color: #a78bfa; margin-right: 6px; }
.chat-toast-text { color: #e2e8f0; }
.conn-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: #dc2626; color: #fff; text-align: center; padding: 10px 16px; font-size: 14px; font-weight: 700; display: none; }
.conn-banner.show { display: block; }

/* Game List */
.home-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 24px; }
.home-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.home-brand img { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 8px; }
.home-brand h1 { margin: 0; color: #e2e8f0; font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: 0; text-align: left; }
.home-account { display: flex; align-items: center; flex-shrink: 0; gap: 10px; }
.home-online { display: grid; gap: 2px; min-width: 32px; text-align: center; }
.home-online strong { color: #e2e8f0; font-size: 15px; }
.home-online span { color: #94a3b8; font-size: 10px; }
.home-profile-button { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid #64748b; border-radius: 50%; background: #1e293b; color: #e2e8f0; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.home-profile-button:hover { background: #334155; }
.home-profile-button:focus-visible { outline: 2px solid #fbbf24; outline-offset: 3px; }
@media (max-width: 360px) {
	.home-brand { gap: 6px; }
	.home-brand h1 { font-size: 17px; }
	.home-account { gap: 6px; }
}
.game-settings-dialog { width: min(360px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 20px; overflow-y: auto; border: 1px solid #dce2ea; border-radius: 8px; background: #fff; color: #293548; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.game-settings-dialog::backdrop { background: rgba(2,6,23,.65); }
.game-settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.game-settings-heading h2 { margin: 0; color: #293548; font-size: 20px; }
.game-settings-close { width: 32px; height: 32px; border: none; border-radius: 6px; background: #f1f3f8; color: #46546a; font-size: 24px; cursor: pointer; }
.game-settings-code-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #e1e6ee; }
.game-settings-code-row div { display: grid; gap: 4px; }
.game-settings-code-row span { color: #748094; font-size: 12px; }
.game-settings-code-row strong { color: #3546a0; font-size: 22px; }
.game-settings-code-row button { padding: 8px 12px; border: 1px solid #dce2ea; border-radius: 6px; background: #f8f9fb; color: #3546a0; cursor: pointer; }
.game-settings-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-bottom: 1px solid #e1e6ee; font-size: 14px; cursor: pointer; }
.game-settings-row input { width: 20px; height: 20px; margin: 0; padding: 0; accent-color: #3546a0; cursor: pointer; }
.game-settings-command { display: block; width: 100%; min-height: 44px; margin-top: 12px; padding: 10px 14px; border: 1px solid #dce2ea; border-radius: 6px; background: #f1f3f8; color: #3546a0; font: inherit; font-weight: 700; cursor: pointer; }
.game-settings-exit { border-color: #f0c7ca; background: #fff2f2; color: #b4232f; }
.game-settings-status { margin-top: 10px; color: #748094; font-size: 12px; }
.game-settings-open { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid #475569; border-radius: 50%; background: #334155; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.game-settings-open:hover { background: #475569; }
.game-settings-open:focus-visible { outline: 2px solid #fbbf24; outline-offset: 3px; }
#screen-game .tab-bar > .tab { flex: 1 1 0; min-width: 0; padding: 8px 6px; }
.lobby-visibility { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.room-public-switch { display: flex; align-items: center; gap: 10px; color: #cbd5e1; font-size: 13px; cursor: pointer; }
.room-public-switch input { appearance: none; position: relative; width: 42px; height: 24px; flex: 0 0 42px; margin: 0; padding: 0; border: 1px solid #64748b; border-radius: 12px; background: #334155; cursor: pointer; }
.room-public-switch input::before { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.room-public-switch input:checked { border-color: #22c55e; background: #15803d; }
.room-public-switch input:checked::before { transform: translateX(18px); }
.room-public-switch input:focus-visible { outline: 2px solid #fbbf24; outline-offset: 3px; }
.room-public-switch input:disabled { opacity: .55; cursor: default; }
.available-rooms { margin-top: 24px; border-top: 1px solid #334155; padding-top: 12px; }
.available-rooms-list { display: grid; gap: 8px; }
.available-room { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #334155; border-radius: 8px; background: #0f172a; color: #e2e8f0; font: inherit; cursor: pointer; text-align: left; }
.available-room:hover, .available-room:focus-visible { border-color: #3b82f6; background: #152139; }
.available-room-name { display: grid; gap: 3px; min-width: 0; font-size: 14px; font-weight: 700; }
.available-room-variant { color: #94a3b8; font-size: 11px; font-weight: 400; }
.available-room-count { flex-shrink: 0; color: #94a3b8; font-size: 12px; }
.available-rooms-status { color: #94a3b8; font-size: 13px; padding: 8px 0; }
.game-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 16px 8px 8px; border-top: 1px solid #1e293b; color: #64748b; font-size: 12px; text-align: center; }
.site-footer a { color: #94a3b8; text-decoration: none; }
.site-footer a:hover { color: #e2e8f0; text-decoration: underline; }
.game-card { position: relative; display: flex; min-width: 0; min-height: 146px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; padding: 14px 12px; border-radius: 10px; border: 2px solid #1e293b; background: #0f172a; cursor: pointer; transition: border-color .2s, transform .2s, background-color .2s; }
.game-card:hover { border-color: #475569; transform: translateY(-1px); }
.game-card-icon { display: grid; place-items: center; width: 42px; height: 42px; font-size: 32px; text-align: center; flex-shrink: 0; }
.game-card-info { min-width: 0; width: 100%; padding-right: 4px; }
.game-card-title { overflow-wrap: anywhere; font-weight: 800; font-size: 15px; line-height: 1.2; }
.game-card-desc { color: #94a3b8; font-size: 11px; line-height: 1.35; margin-top: 4px; }
.game-card-arrow { position: absolute; top: 10px; right: 10px; color: #475569; font-size: 18px; }
.game-card-coup { border-color: #7c3aed33; }
.game-card-coup:hover { border-color: #a855f7; background: #1a0a2e; }
.game-card-coup .game-card-title { color: #4f46e5; }
.game-card-poker { border-color: #b4590033; }
.game-card-poker:hover { border-color: #f59e0b; background: #1e1400; }
.game-card-poker .game-card-title { color: #f59e0b; }
.game-card-ludo { border-color: #16a34a33; }
.game-card-ludo:hover { border-color: #22c55e; background: #071a0e; }
.game-card-ludo .game-card-title { color: #22c55e; }
.game-card-nq { border-color: #7c3aed33; }
.game-card-nq:hover { border-color: #a78bfa; background: #150a2e; }
.game-card-nq .game-card-title { color: #a78bfa; }
.game-card-commune { border-color: #3b82f633; }
.game-card-commune:hover { border-color: #3b82f6; background: #0a1a3d; }
.game-card-commune .game-card-title { color: #3b82f6; }
.game-card-tn { border-color: #22c55e33; }
.game-card-tn:hover { border-color: #22c55e; background: #0a2e1a; }
.game-card-tn .game-card-title { color: #22c55e; }
.game-card-hearts { border-color: #dc262633; }
.game-card-hearts:hover { border-color: #dc2626; background: #2e0a0a; }
.game-card-hearts .game-card-title { color: #dc2626; }
.game-card-uno { border-color: #ef334033; }
.game-card-uno:hover { border-color: #ef3340; background: #201216; }
.game-card-uno .game-card-title { color: #ef3340; }
.game-card-uno-mark { position: relative; width: 52px; height: 40px; overflow: hidden; border: 2px solid #fff; border-radius: 9px; background: conic-gradient(from -35deg, #ef3340 0 25%, #e3c922 25% 50%, #139451 50% 75%, #245bc5 75% 100%); box-shadow: 0 2px 6px rgba(0,0,0,.35); transform: rotate(-7deg); }
.game-card-uno-mark::before { content: ''; position: absolute; inset: 4px 3px; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; background: #20232a; }
.game-card-uno-mark span { position: absolute; z-index: 1; top: 50%; left: 50%; color: #fff; font-size: 12px; font-style: italic; font-weight: 1000; line-height: 1; text-shadow: 1px 1px 0 #e22d35; transform: translate(-50%, -50%) rotate(-7deg); }

@media (min-width: 600px) {
	.game-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
	.game-card { min-height: 158px; padding: 16px 14px; }
	.game-card-title { font-size: 16px; }
	.game-card-desc { font-size: 12px; }
}

@media (min-width: 1024px) {
	.game-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.player-avatar-badge { display:inline-grid; place-items:center; vertical-align:middle; width:1.75em; height:1.75em; margin-inline-end:.4em; border-radius:50%; font-size:.95em; font-weight:750; line-height:1; background:#e2e8de; color:#263b32; }
.avatar-picker { margin:16px 0; padding:0; border:0; text-align:left; }
.avatar-picker legend { margin-bottom:8px; font-size:14px; font-weight:700; }
#avatar-options { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; }
#avatar-options label { position:relative; cursor:pointer; }
#avatar-options input { position:absolute; width:1px; height:1px; padding:0; margin:0; opacity:0; }
#avatar-options span { display:grid; justify-items:center; gap:4px; padding:6px 0; font-size:10px; text-transform:capitalize; border:2px solid transparent; border-radius:8px; background:var(--home-soft); color:var(--home-ink); }
#avatar-options b { font-size:20px; line-height:1.3; }
#avatar-options input:checked + span { border-color:var(--home-green); }
#avatar-options input:focus-visible + span { outline:2px solid var(--home-green); outline-offset:1px; }
#name-popup-overlay .name-popup { max-height:90dvh; overflow-y:auto; }
