/* Base page layout, form controls, and shared card styling used before feature and theme overrides. */
:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    color: var(--text, #ebe8e1);
    background: var(--page, #121619);
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at top left, #263332 0, transparent 55%);
}
.shell {
    max-width: 1120px;
    min-width: 760px;
    margin: 0 auto;
    padding: 64px 36px;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
h1 {
    font-family: Georgia, serif;
    font-weight: 400;
    font-size: 44px;
    margin: 12px 0;
}
h2 {
    font-size: 23px;
    font-weight: 500;
    margin: 12px 0 22px;
}
h3 {
    font-size: 17px;
    font-weight: 500;
}
p {
    color: var(--muted, #aeb7b5);
    line-height: 1.7;
}
.eyebrow {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--muted, #b7c9bc);
}
.card {
    border: 1px solid var(--border, #3a4444);
    border-radius: 18px;
    background: var(--surface, #1a2023);
    box-shadow: 0 24px 80px #0003;
}
.campaign-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    min-height: 540px;
}
.library,
.actions {
    padding: 36px;
}
.actions {
    background: var(--surface, #20292b);
    border-left: 1px solid var(--border, #3a4444);
    border-radius: 0 18px 18px 0;
}
form + h3,
.actions form + form {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--border, #414c4b);
}
label {
    display: block;
    font-size: 13px;
    color: var(--muted, #c3cbc7);
    margin: 16px 0 8px;
}
input {
    width: 100%;
    padding: 13px;
    background: var(--page, #141b1d);
    border: 1px solid var(--border, #495452);
    border-radius: 7px;
    color: var(--text, #fff);
    font: inherit;
}
button {
    background: var(--accent, #bed2b9);
    color: var(--accent-ink, #18251c);
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 12px 18px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
}
button:hover {
    filter: brightness(1.1);
}
button.secondary {
    background: transparent;
    color: var(--text, #d3dfd1);
    border-color: var(--border, #59695c);
}
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent, #d0e8c5);
    outline-offset: 3px;
}
.actions button {
    width: 100%;
}
.empty {
    text-align: center;
    padding: 52px 12px;
}
.dice {
    font-size: 64px;
    color: var(--muted, #9bac98);
}
.campaign-list {
    padding: 0;
    list-style: none;
}
.campaign-list li {
    padding: 16px 0;
    border-bottom: 1px solid var(--border, #3a4444);
}
.campaign-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.badge {
    border: 1px solid var(--border, #52644f);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--muted, #c5d8bd);
}
code {
    display: block;
    user-select: all;
    overflow-wrap: anywhere;
    font-size: 12px;
    margin-top: 8px;
    color: var(--muted, #d0d9cc);
}
.notice {
    padding: 14px 18px;
    background: #263c33;
    border: 1px solid #4d6b54;
    border-radius: 8px;
}
.error {
    background: #402c2c;
    border-color: #845454;
    color: #f1cccc;
}
.login {
    max-width: 510px;
    margin: 12vh auto;
    padding: 44px;
}
.login h1 {
    font-size: 40px;
}
.login button {
    width: 100%;
}
.campaign-heading a {
    color: var(--text, #d3dfd1);
    text-decoration: none;
}
.campaign-heading a:hover {
    text-decoration: underline;
}
.campaign-heading a:focus-visible {
    outline: 2px solid var(--accent, #d0e8c5);
    outline-offset: 4px;
}

/* Reserve the measured banner height so fixed controls and the last page content remain reachable. */
body {
    padding-bottom: var(--beta-height, 120px);
}
html {
    scroll-padding-bottom: calc(var(--beta-height, 120px) + 16px);
}
.beta-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface, #1a2023);
    color: var(--text, #ebe8e1);
    border-top: 1px solid var(--border, #3a4444);
    font-size: 13px;
}
.beta-banner button {
    flex-shrink: 0;
    margin: 0;
}
body .theme-control {
    bottom: calc(var(--beta-height, 120px) + 16px);
}
#bug-report-dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: 85dvh;
    overflow: auto;
    padding: 24px;
    border: 1px solid var(--border, #3a4444);
    border-radius: 16px;
    background: var(--surface, #1a2023);
    color: var(--text, #ebe8e1);
}
#bug-report-dialog::backdrop {
    background: #000a;
}
.bug-report-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.bug-report-heading h2,
.bug-report-heading button {
    margin: 0;
}
#bug-report-form label {
    display: block;
    margin-top: 16px;
}
#bug-report-form input,
#bug-report-form textarea {
    width: 100%;
}
@media (max-width: 600px) {
    .beta-banner {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }
}
