*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --page-bg: #e5e5e5;
    --ink: #333;
    --muted: #73777a;
    --line: #8b9093;
    --accent: #7a7f82;
    --glow: rgba(104, 110, 113, 0.22);
    --mono: 'VT323', monospace;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--page-bg);
    color: var(--ink);
    font-family: var(--mono);
    -webkit-font-smoothing: none;
}

body {
    min-height: 100vh;
}

button, input {
    font: inherit;
}

.moderation-shell {
    width: min(100% - 40px, 1040px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0 24px;
}

.page-header,
.queue-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 15px;
    letter-spacing: 1px;
}

h1, h2, p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 34px;
    font-weight: normal;
    line-height: 1;
}

h2 {
    margin-bottom: 0;
    font-size: 26px;
    font-weight: normal;
}

button {
    min-height: 38px;
    padding: 5px 12px;
    border: 1px solid var(--accent);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 0 12px var(--glow);
}

button:hover:not(:disabled) {
    background: var(--accent);
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.primary-button {
    background: var(--accent);
}

.sign-in-panel {
    width: min(100%, 380px);
    margin: 56px auto 0;
    padding: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 0 24px var(--glow);
}

.sign-in-panel h2 {
    margin-bottom: 20px;
}

#signInForm {
    display: grid;
    gap: 8px;
}

#signInForm label {
    margin-top: 6px;
    color: var(--muted);
    font-size: 15px;
}

#signInForm input {
    width: 100%;
    min-height: 42px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.44);
    color: var(--ink);
}

#signInForm .primary-button {
    margin-top: 10px;
}

.status {
    min-height: 20px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 15px;
}

#queuePanel {
    margin-top: 32px;
}

.queue-header {
    align-items: center;
}

#queueTitle span {
    display: inline-block;
    min-width: 24px;
    margin-left: 5px;
    color: var(--muted);
    font-size: 18px;
    text-align: center;
}

.message-list {
    margin: 12px 0 0;
    padding: 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.message-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 8px;
    border-bottom: 1px solid rgba(104, 110, 113, 0.34);
}

.message-content {
    min-width: 0;
}

.message-body {
    margin: 0 0 5px;
    font-size: 21px;
    line-height: 1.15;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.message-row time {
    color: var(--muted);
    font-size: 14px;
}

.message-actions {
    display: flex;
    flex: none;
    gap: 7px;
}

.page-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 10px;
    border-top: 1px solid rgba(104, 110, 113, 0.38);
    color: var(--muted);
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 600px) {
    .moderation-shell {
        width: calc(100% - 28px);
        padding-top: 18px;
    }

    .page-header {
        align-items: start;
    }

    h1 {
        max-width: 250px;
        font-size: 28px;
        overflow-wrap: anywhere;
    }

    .sign-in-panel {
        margin-top: 32px;
    }

    .message-row {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .message-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .page-footer {
        flex-direction: column;
        gap: 3px;
    }
}
