:root {
    color-scheme: dark;
    --bg: #0d1020;
    --panel: #161a30;
    --line: #2b3050;
    --text: #e9ecff;
    --muted: #9aa2c8;
    --accent: #ffc857;
    --ok: #7be0a5;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font:
        16px / 1.5 system-ui,
        sans-serif;
}
a {
    color: var(--accent);
}
h1 {
    margin: 0 0 8px;
    font-size: 26px;
}
button,
input {
    font: inherit;
}

.top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
}
.brand {
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
    text-decoration: none;
}
.tabs {
    display: flex;
    gap: 4px;
    flex: 1;
}
.tabs button {
    padding: 6px 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    cursor: pointer;
}
.tabs button[aria-current="page"] {
    background: var(--panel);
    color: var(--text);
}
.session {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.button {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
}
.button:hover:not(:disabled) {
    border-color: var(--accent);
}
.button:disabled {
    opacity: 0.55;
    cursor: progress;
}
.button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #1b1630;
    font-weight: 600;
}

.notice {
    margin: 12px 20px 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}
.notice.error {
    border-color: #ff7a7a;
}

.view {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.view[hidden] {
    display: none;
}
.lead {
    color: var(--muted);
    max-width: 60ch;
}
.hint,
.fine {
    color: var(--muted);
    font-size: 14px;
}

.tower {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 16px;
}
#stage {
    width: 100%;
    height: 560px;
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: grab;
    touch-action: none;
}
.panel {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    align-self: start;
}
.panel h2 {
    margin: 4px 0;
    font-size: 22px;
}
.panel .floor {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}
.panel .row {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}
.panel .row .button {
    flex: 1;
}
.roster {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
    padding: 0;
    list-style: none;
}
.roster li,
.chip {
    padding: 2px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    color: var(--muted);
}

.field {
    display: block;
    margin: 12px 0;
    color: var(--muted);
    font-size: 14px;
}
.field input,
fieldset input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
}
fieldset {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}
fieldset input + input {
    margin-top: 8px;
}
legend {
    color: var(--muted);
    font-size: 14px;
    padding: 0 6px;
}
.rent {
    max-width: 520px;
}

.directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding: 0;
    list-style: none;
}
.directory button {
    width: 100%;
    height: 100%;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.directory button:hover {
    border-color: var(--accent);
}
.directory strong {
    display: block;
    font-size: 18px;
}
.directory .meta {
    color: var(--accent);
    font-size: 13px;
}
.directory p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.office {
    width: min(720px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    color: var(--text);
}
.office::backdrop {
    background: rgba(5, 6, 14, 0.72);
}
.office .inner {
    padding: 20px;
}
.office header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}
.office h2 {
    margin: 0;
    font-size: 26px;
}
.jobs {
    display: grid;
    gap: 12px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.job {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}
.job h3 {
    margin: 6px 0;
    font-size: 17px;
}
.job p {
    margin: 0 0 10px;
    color: var(--muted);
}
.decision {
    padding-top: 10px;
    border-top: 1px dashed var(--line);
}
.decision .options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.decision .button[aria-pressed="true"] {
    border-color: var(--ok);
    color: var(--ok);
}
.tally {
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
}

.foot {
    padding: 12px 20px 28px;
    color: var(--muted);
    font-size: 14px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 860px) {
    .tower {
        grid-template-columns: 1fr;
    }
    #stage {
        height: 380px;
    }
}
