.account-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px;
    color: #d8b4fe;
    font:
        0.8rem/1.5 Arial,
        sans-serif;
}

.game-container .account-bar {
    margin-bottom: 12px;
    padding: 0;
    justify-content: space-between;
}

.account-trigger,
.account-close {
    border: 1px solid #674780;
    border-radius: 8px;
    background: #281d39;
    color: white;
    padding: 10px 14px;
    cursor: pointer;
    font: inherit;
}

.account-button.is-signed-in {
    font-size: 0.9rem;
    overflow-wrap: anywhere;
    max-width: 12ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-dialog {
    width: min(460px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 24px;
    border: 2px solid #8f4fc0;
    border-radius: 16px;
    color: #f5f0ff;
    background: #141021;
    font:
        1rem/1.5 Arial,
        sans-serif;
}

.account-dialog::backdrop {
    background: #050713cc;
}

body:has(.account-dialog[open]) {
    overflow: hidden;
}

.account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.account-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.account-dialog label {
    display: block;
    margin: 16px 0 6px;
    font-weight: bold;
}

.account-dialog input,
.account-dialog select {
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    border: 1px solid #674780;
    border-radius: 8px;
    background: #090d1c;
    color: white;
    font: inherit;
}

.account-dialog small {
    color: #bcaccd;
}

.account-primary {
    width: 100%;
    margin-top: 20px;
    padding: 12px 16px;
    border: 0;
    border-radius: 8px;
    background: #a66ed2;
    color: #110b1b;
    font:
        bold 1rem Arial,
        sans-serif;
    cursor: pointer;
}

.account-dialog button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.account-feedback {
    min-height: 1.5em;
    color: #fde68a;
}

.account-dialog :focus-visible,
.account-trigger:focus-visible,
.account-button:focus-visible {
    outline: 3px solid #fde68a;
    outline-offset: 3px;
}

.account-dialog [hidden],
.account-bar [hidden] {
    display: none;
}

#playAsGuest {
    margin-top: 20px;
}
