.auth-page {
    display: grid;
    place-items: center;
    min-height: calc(100vh - var(--nav-height));
    padding: clamp(24px, 6vw, 72px) clamp(16px, 4vw, 40px);
}

.auth-sheet {
    position: relative;
    width: min(480px, 100%);
    padding: clamp(24px, 5vw, 44px);
    border: 1px solid var(--line);
    background: var(--panel);
}

.auth-sheet::before,
.auth-sheet::after {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    pointer-events: none;
}

.auth-sheet::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--amber);
    border-left: 2px solid var(--amber);
}

.auth-sheet::after {
    right: -1px;
    bottom: -1px;
    border-right: 2px solid var(--amber);
    border-bottom: 2px solid var(--amber);
}

.account-form {
    display: grid;
    gap: 18px;
    width: 100%;
}

.account-form h2 {
    margin: 0 0 4px;
    font: 700 1.5rem/1.2 var(--font-display);
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    font-size: 0.92rem;
    font-weight: 600;
}

.account-form input {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    background-color: var(--ink);
    font-size: 1rem;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 76px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    padding: 6px 10px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--measure);
    font: 600 0.75rem/1 var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: var(--measure-tint);
}

.password-rules {
    display: grid;
    gap: 4px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.85rem;
}

.password-rules li::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border: 1px solid currentColor;
    vertical-align: 1px;
}

.password-rules li.is-met {
    color: var(--success);
}

.password-rules li.is-met::before {
    background: currentColor;
}

.field-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.form-message {
    margin: 0;
    color: var(--danger);
    font-size: 0.92rem;
}

.field-note:empty,
.form-message:empty {
    margin-top: -18px;
}

.field-note:empty {
    margin-top: -7px;
}

.form-message:not(:empty) {
    padding: 10px 12px;
    border: 1px solid rgba(240, 160, 160, 0.35);
    border-left: 3px solid var(--danger);
    background: rgba(240, 160, 160, 0.06);
}

.account-form .btn {
    width: 100%;
    margin-top: 4px;
}

/* Reserve space while Google's button loads. */
.g_id_signin {
    justify-self: center;
    min-height: 44px;
}

/* A thin line on each side of the word "or". */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--muted);
    font: 600 0.75rem/1 var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--line);
}

.auth-switch {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

.auth-switch a {
    color: var(--amber);
    font-weight: 600;
    text-underline-offset: 4px;
}

.auth-switch a:hover {
    color: var(--amber-bright);
}
