.invitation-toasts {
    position: fixed;
    z-index: 1200;
    top: 22px;
    right: 22px;
    width: min(360px, calc(100vw - 32px));
    display: grid;
    gap: 12px;
    max-height: calc(100dvh - 44px);
    overflow-y: auto;
    padding: 4px 6px 12px;
    pointer-events: none;
}
.invitation-toasts[hidden] { display: none; }
.invitation-toast {
    pointer-events: auto;
    overflow: hidden;
    border: 1px solid #d9bd94;
    border-top: 3px solid #77976b;
    border-radius: 18px;
    background: #fffaf0;
    opacity: 1;
    color: #694e34;
    box-shadow: 0 14px 42px #48352229, 0 4px 0 #e8ddc7;
    animation: social-invite-arrive .3s ease-out both;
}
.invitation-toast__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 16px 0;
}
.invitation-toast__heading > div { min-width: 0; flex: 1; }
.invitation-toast__heading small { display: block; font-size: .58rem; font-weight: 800; letter-spacing: .16em; color: #98764f; margin-bottom: 4px; }
.invitation-toast__heading strong { display: block; overflow-wrap: anywhere; font-size: .95rem; }
.social-invite-avatar { width: 44px; height: 44px; flex: 0 0 44px; position: relative; border-radius: 13px; display: grid; place-items: center; background: #efe4cc; color: #9c633a; border: 1px solid #d3b68c; overflow: hidden; font-weight: 800; }
.social-invite-avatar img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.invitation-toast__dismiss { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; font: inherit; font-size: 1.3rem; line-height: 1; color: #92693f; background: #f5ead7; border: 1px solid #dfc5a1; border-radius: 50%; cursor: pointer; padding: 0; align-self: flex-start; }
.invitation-toast > p { margin: 12px 16px; font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; }
.invitation-toast__actions { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 14px; gap: 12px; }
.invitation-toast__actions button { border: 1px solid #a2542d; border-radius: 9px; background: #b86232; color: #fffaf0; font: inherit; font-weight: 700; padding: 9px 17px; cursor: pointer; box-shadow: 0 3px 0 #974722; }
.invitation-toast__actions button:hover { background: #a5542b; }
.invitation-toast__actions button:disabled { opacity: .65; cursor: wait; }
.invitation-toast__actions > span { color: #7e7559; font-size: .78rem; font-variant-numeric: tabular-nums; }
.invitation-toast .invitation-toast__error { color: #9d4d36; font-size: .78rem; }
.invitation-toast__track { height: 5px; background: #e8e3d0; overflow: hidden; }
.invitation-toast__track i, .lobby-friends-cooldown i { display: block; width: 100%; height: 100%; background: #7a9566; transform: scaleX(var(--invite-progress, 1)); transform-origin: left; transition: transform .1s linear; }
.invitation-toast--friendship { border-top-color: #4d8c91; }
.invitation-toast--friendship .invitation-toast__heading small { color: #477f84; }
.invitation-toast--friendship .invitation-toast__track i { background: #4d8c91; }
.invitation-toast--success { border-color: #b8c9a5; border-top-color: #6b8b5c; background: #f7faef; }
.invitation-toast--success .invitation-toast__heading small { color: #607c51; }
.invitation-toast__actions .invitation-toast__confirmed { font-size: .82rem; font-weight: 700; color: #557547; }
.lobby-friends-dialog { width: min(620px, calc(100vw - 28px)); max-height: min(780px, calc(100dvh - 40px)); padding: 28px; color: #694e34; background: #fffaf0; border: 1px solid #d3b38b; border-radius: 24px; box-shadow: 0 24px 80px #3e2c3654, 0 5px 0 #dfceb2; overflow-y: auto; }
.lobby-friends-dialog::backdrop { background: #45372480; backdrop-filter: blur(4px); }
.lobby-friends-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.lobby-friends-dialog > header p { margin: 0 0 8px; font-size: .64rem; letter-spacing: .16em; font-weight: 800; color: #b56736; }
.lobby-friends-dialog h2 { margin: 0; font-size: clamp(1.4rem, 4vw, 1.9rem); }
.lobby-friends-dialog > header button { border: 1px solid #d8bb96; border-radius: 50%; width: 34px; height: 34px; flex: 0 0 34px; font: inherit; font-size: 1.4rem; color: #9d693d; background: #f5ead8; padding: 0; cursor: pointer; }
.lobby-friends-intro { font-size: .9rem; line-height: 1.65; color: #8b7052; margin: 16px 0 20px; }
.lobby-friends-search { display: grid; gap: 7px; font-size: .8rem; font-weight: 700; }
.lobby-friends-search input { box-sizing: border-box; width: 100%; border: 1px solid #d8c09d; background: #fffdf8; border-radius: 11px; padding: 12px 14px; font: inherit; color: #694e34; font-weight: 400; }
.lobby-friends-status { min-height: 1.3em; font-size: .82rem; line-height: 1.55; color: #84704f; }
.lobby-friends-cooldown { font-size: .72rem; color: #5b734c; margin-top: 7px; }
.lobby-friends-cooldown > div { margin-top: 5px; height: 3px; background: #dbe3ca; border-radius: 4px; overflow: hidden; }
.lobby-friends-list { display: grid; gap: 9px; max-height: min(400px, 42dvh); overflow-y: auto; padding: 2px; }
.lobby-friend-row { display: flex; align-items: center; gap: 11px; padding: 12px; background: #f9f4e8; border: 1px solid #e2d1b5; border-radius: 13px; }
.lobby-friend-row > div { flex: 1; min-width: 0; }
.lobby-friend-row strong { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.lobby-friend-row small { display: block; font-size: .72rem; margin-top: 5px; color: #887754; }
.lobby-friend-row button { background: #eef2e5; border: 1px solid #a6b88d; border-radius: 8px; padding: 10px 12px; color: #587047; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.lobby-friend-row button:hover:not(:disabled) { background: #e0e9d1; }
.lobby-friend-row button:disabled { opacity: .58; cursor: default; }
.lobby-friends-empty { text-align: center; padding: 24px; border: 1px dashed #d9c5a5; border-radius: 13px; color: #8c7756; }
.lobby-friends-empty > span { font-size: 1.8rem; color: #b58c50; }
.lobby-friends-empty > p { font-size: .85rem; line-height: 1.5; }
.lobby-friends-dialog > footer { margin-top: 20px; padding-top: 14px; border-top: 1px dashed #d8c19b; color: #95815f; font-size: .73rem; display: flex; justify-content: space-between; }
.lobby-invite-friends { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #b7c49e; background: #edf1e3; border-radius: 10px; padding: 10px 14px; color: #5a724c; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 700; }
.lobby-invite-friends:hover:not(:disabled) { background: #e0e8d0; }
.lobby-invite-friends:disabled { opacity: .55; cursor: default; }
.lobby-invite-friends[hidden] { display: none; }
.lobby-gathering-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.invitation-toast button:focus-visible, .lobby-friends-dialog button:focus-visible, .lobby-friends-dialog input:focus-visible, .lobby-invite-friends:focus-visible { outline: 3px solid #789665; outline-offset: 3px; }
@keyframes social-invite-arrive { from { transform: translateY(-16px) scale(.97); } to { transform: none; } }
@media (max-width: 480px) { .invitation-toasts { top: 12px; right: 10px; } .lobby-friends-dialog { padding: 20px 16px; } .lobby-friend-row { gap: 8px; padding: 10px; } .lobby-friend-row button { padding: 9px; } }
@media (prefers-reduced-motion: reduce) { .invitation-toast { animation: none; } .invitation-toast__track i, .lobby-friends-cooldown i { transition: none; } }
