.command-pages {
  --desk-frame: url('/art/hud-brass-frame.png');
  --desk-enamel: url('/art/hud-enamel.png');
  --desk-line: #95805980;
  --muted: #bfcbc0;
  --mint: #c8ddce;
  min-height: 100vh;
  isolation: isolate;
  background: #101b1e;
  color: #f1ecdc;
}
.command-pages::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, #0b171a38, #0c17196b),
    url('/art/fog-of-war-backdrop.webp?v=3') center / cover no-repeat;
}
.command-pages :is(.topbar, .panel, .game-dialog, .front-cover, .desk-heading) {
  border: 1px solid #8c7551;
  border-image: var(--desk-frame) 10% / 17px stretch;
  background: var(--desk-enamel) center / 470px #1b2a24;
  box-shadow: 0 5px 19px #050b0aa3, inset 0 0 22px #0a120d78;
}
.command-pages :is(.front-form, .front-brief, .front-shell .community-links, .lobby-grid .panel, .social-panel) {
  background: linear-gradient(145deg, #203029ee, #14221deb);
}
.command-pages .topbar {
  width: min(1440px, calc(100% - 32px));
  height: auto;
  min-height: 54px;
  margin: 9px auto 0;
  padding: 6px 12px;
  gap: 8px 14px;
}
.command-pages .topbar .brand { color: #f3e1ba; }
.command-pages .topbar .social-nav a { color: #d5e0d1; }
.command-pages .topbar :is(.social-nav a:hover, .social-nav a[aria-current="page"], .profile-link:hover) { color: #ffdfa3; background: #3c3e2b; }
.command-pages :is(.primary, .secondary, .queue-filters a, .topright .textbutton) {
  border-image: var(--desk-frame) 10% / 8px stretch;
  border-radius: 2px;
}
.command-pages .primary {
  background: linear-gradient(#f4d798f5, #c79552f0), var(--desk-enamel) center / 300px #644e2a;
  color: #261c0e;
}
.command-pages .primary:hover:not(:disabled) {
  background: linear-gradient(#ffe7adf5, #dfae65f0), var(--desk-enamel) center / 300px #644e2a;
}
.command-pages :is(.secondary, .queue-filters a, .topright .textbutton) {
  background: linear-gradient(#07131000, #07131066), var(--desk-enamel) center / 300px #26362a;
  color: #efe0b9;
}
.command-pages :is(.secondary, .queue-filters a, .topright .textbutton):hover:not(:disabled),
.command-pages .queue-filters a[aria-current='page'] {
  background: linear-gradient(#846a3d83, #47351cc2), var(--desk-enamel) center / 300px #26362a;
  color: #fff0c9;
}
.command-pages :is(input:not([type='hidden']), select, textarea) {
  border-color: #8c805d;
  background: #14201c;
  color: #f1ecdc;
}
.command-pages :is(input, select, textarea):focus { border-color: #e2b66c; }
.create-game-dialog textarea {
  display: block; width: 100%; margin-top: 7px; padding: 9px 11px; resize: vertical;
  border: 1px solid #8c805d; border-radius: 3px; font: inherit;
}
.create-game-dialog { width: min(1000px, calc(100% - 24px)); }
.create-game-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(275px, 350px); gap: 20px; align-items: start; }
.create-game-main { min-width: 0; }
.create-game-map { display: grid; gap: 10px; min-width: 0; }
.create-game-map > label { margin: 0; }
.create-game-seating { display: grid; gap: 9px; margin-top: 10px; }
.create-game-seating > label, .create-game-seating > .campaign-rule { margin: 0; }
.create-map-preview { padding: 15px; border: 1px solid var(--desk-line); background: #12211dcc; }
.create-map-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 12px; }
.create-map-heading .secondary { min-height: 30px; padding: 4px 9px; font-size: .75rem; }
.create-map-preview h3 { margin: 0 0 12px; color: #f0dfae; }
.create-map-heading h3 { margin: 0; }
.create-map-preview p { margin-bottom: 0; color: var(--muted); font-size: .87rem; line-height: 1.45; }
.create-map-thumb { aspect-ratio: 16 / 11; border: 1px solid #8c805d; background: #0a1718; overflow: hidden; margin-bottom: 12px; }
.create-map-preview .create-map-thumb { margin-bottom: 0; }
.create-map-code-row { display: flex; gap: 6px; margin-top: 6px; }
.create-map-code-row input { min-width: 0; flex: 1; margin: 0; }
.create-map-code-row button { flex: none; min-height: 42px; padding: 5px 9px; }
.create-map-thumb img { width: 100%; height: 100%; object-fit: contain; filter: brightness(1.2) saturate(1.08); }
.create-map-generated { display: grid; place-items: center; width: 100%; height: 100%; color: #e6d6aa; background: radial-gradient(circle at 50% 40%, #294237, #101d1a 70%); font: 700 .85rem var(--display); }
.create-map-thumb [hidden] { display: none !important; }
.create-map-generated::after { content: attr(data-message); }
.playmode-help { width: 24px; height: 24px; padding: 0; margin-left: 5px; border: 1px solid #d5b574; border-radius: 50%; background: #25392d; color: #ffe6b4; font-weight: 800; }
.create-game-dialog .playmode-help { display: inline-grid; place-items: center; width: 24px; min-width: 24px; height: 24px; vertical-align: middle; }
@media (max-width: 720px) { .create-game-form { grid-template-columns: 1fr; } .create-game-map { grid-row: 1; } }
.command-pages label { color: #eee0b9; }
.command-pages :is(.panel, .game-dialog) h2 { color: #f0dfae; }
.command-pages .game-dialog::backdrop { background: #07130fce; }

.command-pages .front-shell {
  width: min(1440px, calc(100% - 32px));
  grid-template: 'cover forms' auto 'brief forms' 1fr / minmax(0, 1fr) minmax(330px, 390px);
  align-items: start;
  gap: 13px 16px;
  padding: 17px 0 36px;
}
.front-cover { grid-area: cover; padding: 8px; min-width: 0; }
.front-cover .auth-title img { border-bottom: 0; }
.front-cover .auth-pitch {
  padding: 12px clamp(12px, 2.4vw, 24px);
  border-top: 1px solid var(--desk-line);
}
.front-cover .auth-pitch p { font-size: .9rem; }
.command-pages .front-brief {
  grid-area: brief;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 15px;
}
.front-brief > div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.front-brief img, .front-form h2 img { object-fit: contain; filter: drop-shadow(0 2px 3px #090f0c); }
.front-brief h2 { margin: 0 0 3px; font-size: .95rem; }
.front-brief p { margin: 0; color: #c7d4c9; font-size: .8rem; line-height: 1.38; }
.front-shell .auth-forms { grid-area: forms; gap: 13px; }
.community-links h2 { margin: 0 0 6px; }
.community-links p { margin: 0 0 12px; color: #c7d4c9; font-size: .88rem; }
.community-link-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.community-link-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; text-align: center; }
.front-shell .community-links { padding: 15px 20px; }
.command-pages .front-form { padding: 17px 20px; }
.front-form h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 13px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--desk-line);
  font-size: 1.15rem;
}

.dashboard-page .lobby {
  width: min(1440px, calc(100% - 32px));
  padding: 15px 0 38px;
}
.command-pages .desk-heading {
  display: flex;
  min-height: 132px;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 15px;
  padding: 17px clamp(16px, 3vw, 32px);
  background: linear-gradient(100deg, #101f1bf2, #20342bcb);
}
.desk-heading h1 { margin: 0 0 10px; color: #f5eddb; font: 800 clamp(1.85rem, 4vw, 3.2rem)/1 var(--display); }
.desk-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.desk-links a { color: #e1d2ad; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
.desk-links a:hover { color: #ffe3a9; }
.desk-heading button { flex-shrink: 0; }
.desk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.dashboard-page .lobby-grid { grid-template-columns: minmax(0, 1fr) minmax(220px, 290px); gap: 14px; }
.dashboard-page :is(.lobby-boards, .lobby-side) { gap: 14px; }
.dashboard-page .lobby .panel { min-width: 0; padding: 15px; }
.dashboard-page .section-head { align-items: center; flex-wrap: wrap; margin-bottom: 9px; }
.dashboard-page .section-head h2, .dashboard-page .lobby-side h2 { margin: 0; font-size: 1.14rem; }
.dashboard-page .lobby-side h2 { margin-bottom: 9px; }
.dashboard-page :is(.queue-filters, .simple-pages) a { display: inline-flex; align-items: center; min-height: 32px; font-size: .8rem; }
.dashboard-list-size { display: flex; align-items: center; gap: 6px; }
.dashboard-list-size label { margin: 0; font-size: .8rem; }
.dashboard-list-size select { width: auto; margin: 0; padding: 5px 7px; }
.dashboard-list-size button { width: auto; min-height: 32px; padding: 5px 8px; }
.dashboard-pagination {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 8px 12px; margin-top: 12px;
}
.page-range { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.dashboard-pagination .simple-pages { align-items: center; gap: 5px; margin: 0; }
.dashboard-pagination .simple-pages a { min-width: 32px; justify-content: center; }
.page-current, .page-ellipsis { min-width: 24px; text-align: center; font-size: .8rem; }
.page-current {
  display: inline-grid; place-items: center; min-width: 32px; min-height: 32px;
  background: #d7b77b; color: #241b12; font-weight: 750; border-radius: 2px;
}
.dashboard-page .match-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid #8b805a74;
  border-radius: 2px;
  background: #14221ed9;
}
.dashboard-page .match-entry + .match-entry { margin-top: 5px; }
.dashboard-page .match-entry:has(.match-ready) {
  border-left: 3px solid #e3b871;
  background: #2e3527;
}
.dashboard-page .match-card {
  min-width: 0;
  gap: 10px;
  padding: 8px 9px;
  grid-column: 1;
  grid-row: 1;
  border-left: 0;
}
.dashboard-page .match-card:hover { background: #3a513880; }
.dashboard-page .match-card:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.dashboard-page .match-main { min-width: 0; gap: 3px; }
.dashboard-page .match-main strong { color: #f4e9cb; font-size: 1rem; }
.dashboard-page .match-main span { overflow-wrap: anywhere; }
.dashboard-page .match-main .opponent-sign-in { color: #d0d8c9; }
.dashboard-page .match-icon { background: url('/art/operations-chart.png') 67% 46% / 200px; }
.dashboard-page .match-status.ready {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dashboard-page .match-status.ready::before {
  content: '';
  width: 5px; height: 5px; flex: 0 0 auto; transform: rotate(45deg);
  background: #f3db91;
}
.dashboard-page .match-status.active { background: #263d34; color: #cde0d3; }
.dashboard-page .match-invite:not(.match-archive) { grid-column: 1 / -1; padding: 6px 9px; border-top: 1px solid #9b895443; }
.dashboard-page .match-archive { grid-area: 1 / 2; align-self: center; padding: 4px 7px 4px 0; }
.dashboard-page .empty { padding: 23px 10px; border: 1px dashed var(--desk-line); color: #c7d4c9; background: #14221c96; }
.dashboard-page .empty p { margin: 5px 0 0; font-size: .86rem; }
.dashboard-page .open-game { border-color: var(--desk-line); }
.dashboard-page .open-game-title strong { color: #f0e3bf; }
.dashboard-page .create-game-dialog .seat-picker { border-color: var(--desk-line); }

.social-page { width: min(1150px, calc(100% - 32px)); padding: 15px 0 38px; }
.inbox-page { max-width: 850px; }
.command-pages .social-heading { min-height: 86px; }
.social-heading h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.social-heading .secondary, .thread-pages a { display: inline-flex; align-items: center; }
.social-panel h2 { margin-bottom: 11px; }
.social-panel .social-person strong { color: #f4e9cb; }
.inbox-row {
  padding: 9px 10px; margin-block-start: 5px;
  border: 1px solid var(--desk-line); border-radius: 2px; background: #15241e;
}
.inbox-row[data-unread] { border-inline-start: 3px solid #e3b871; background: #303728; }
.inbox-row:is(:hover, :focus-visible) { background: #354736; }
.thread-identity { display: flex; gap: 11px; align-items: center; min-width: 0; }
.thread-identity .commander-avatar { flex: none; border-color: #b39861; }
.thread-log { padding: 10px; border: 1px solid var(--desk-line); border-radius: 3px; background: #0e1d18b3; }
.message-meta strong { color: #f2dbac; }
.message-compose textarea:focus-visible { outline: 2px solid #ffdda0; outline-offset: 2px; }

.command-pages:has(> .site-footer) { display: flex; flex-direction: column; }
.command-pages:has(> .site-footer) > main { margin-block: 0; }
.site-footer {
  width: min(1440px, calc(100% - 32px)); margin: auto auto 12px; padding: 12px 18px;
}
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.site-footer a, .footer-content a { color: #ffdda6; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover, .footer-content a:hover { color: #fff3cc; }
.account-page { width: min(1100px, calc(100% - 32px)); padding: 15px 0 38px; }
.account-page > .backlink { display: inline-block; color: #ffdda6; margin-bottom: 10px; }
.command-pages .account-heading { min-height: 90px; }
.account-heading h1 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.account-heading :is(.queue-filters, .secondary) { margin: 0; }
.account-heading .secondary, .admin-page a:is(.primary, .secondary) { display: inline-flex; align-items: center; }
.account-credentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 20px; }
.account-credentials.setup-password { grid-template-columns: minmax(0, 490px); }
.account-page :is(.footer-content.panel, .admin-panel, .account-credentials > .panel) { padding: 18px; }
.account-page :is(.profile-fields, .avatar-picker, .commander-card, .footer-content.panel, .admin-panel, .account-credentials > .panel) {
  background: linear-gradient(145deg, #203029ee, #14221deb);
}
.footer-content { line-height: 1.6; overflow-wrap: anywhere; }
.footer-content > :first-child { margin-top: 0; }
.footer-content > :last-child { margin-bottom: 0; }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-list li { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; border-top: 1px solid var(--desk-line); padding: 9px 0; }
.admin-list img { flex: none; }
.admin-identity { flex: 1 1 12ch; display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.admin-identity span, .admin-list li > span:not(.admin-identity), .admin-password p { color: var(--muted); font-size: .86rem; }
.admin-password { border: 1px solid var(--desk-line); margin: 0 0 16px; padding: 12px; }
.admin-password legend { padding: 0 6px; color: #f0dfae; font-weight: 700; }
.admin-password p { margin: 0 0 12px; }
.rich-editor { margin-bottom: 15px; }
.rich-editor label { margin-bottom: 8px; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.rich-toolbar button { min-height: 35px; padding: 6px 9px; }
.rich-surface, .rich-source { display: block; width: 100%; min-height: 230px; padding: 13px; border: 1px solid #8c805d; background: #14201c; }
.rich-surface:focus-visible { outline: 2px solid #ffdda0; outline-offset: 2px; }
.rich-editor [hidden] { display: none; }
@media (max-width: 720px) {
  .account-page, .site-footer { width: calc(100% - 18px); }
  .account-page .desk-heading { align-items: flex-start; flex-direction: column; }
  .account-credentials { grid-template-columns: 1fr; }
}

.campaign-lobby { width: min(1050px, calc(100% - 32px)); padding: 15px 0 42px; }
.campaign-lobby > .backlink { display: inline-block; margin-bottom: 10px; color: #ffdda6; }
.campaign-lobby .desk-heading p { margin: 0 0 6px; }
.campaign-lobby .desk-heading h1 { overflow-wrap: anywhere; }
.campaign-lobby .desk-heading > div { min-width: 0; }
.campaign-lobby-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 325px); gap: 14px; }
.campaign-lobby-layout > :is(div, aside) { display: grid; align-content: start; min-width: 0; gap: 14px; }
.campaign-lobby-layout .panel { padding: 16px; background: linear-gradient(145deg, #203029ee, #14221deb); }
.campaign-lobby-layout .panel :last-child { margin-bottom: 0; }
.campaign-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.campaign-rules dl { display: grid; gap: 8px; margin: 0; }
.campaign-rules dl > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 7px; }
.campaign-rules dt { color: #f0dfae; font-weight: 650; }
.campaign-rules dd { margin: 0; color: #e0e9e0; }
.campaign-roster ol { margin: 0; padding: 0; list-style: none; }
.campaign-roster li {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 9px;
  padding: 7px 0; border-top: 1px solid var(--desk-line);
}
.campaign-roster .commander-avatar, .lobby-seat-vacant { box-shadow: 0 0 0 1px var(--seat-color); }
.lobby-seat-vacant { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #14221c; }
.lobby-seat-name { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.lobby-seat-name a { color: #ffdda6; text-decoration: underline; text-underline-offset: 2px; }
.lobby-seat-name small, .lobby-seat-actions small { color: #c6d4c8; }
.lobby-ready { width: fit-content; padding: 2px 7px; border: 1px solid #8d6853; color: #e4b8a9; font: 700 .68rem var(--mono); }
.lobby-ready.is-ready { border-color: #6c9f72; color: #c1e9bf; }
.lobby-seat-actions :is(button, a) { display: inline-flex; align-items: center; min-height: 33px; padding: 6px 8px; font-size: .84rem; }
.lobby-edit summary { color: #f0dfae; font: 700 1.1rem var(--display); cursor: pointer; }
.lobby-edit p { color: #d1d9ca; }
.lobby-edit form { display: grid; gap: 11px; }
.lobby-edit form > label, .lobby-edit .seat-picker label { display: grid; gap: 5px; margin: 0; }
.lobby-edit textarea { width: 100%; padding: 9px 11px; resize: vertical; border: 1px solid #8c805d; border-radius: 3px; background: #14201c; color: #f1ecdc; font: inherit; }
.lobby-edit .lobby-check { display: flex; align-items: center; gap: 8px; }
.lobby-edit .lobby-check input { width: auto; }
.campaign-join form + form { margin-top: 8px; }
.campaign-share-actions { margin-bottom: 9px; }
.campaign-share p { color: #dfe8dd; font-size: .88rem; margin: 7px 0; }
@media (max-width: 680px) {
  .campaign-lobby { width: calc(100% - 20px); }
  .campaign-lobby-layout { display: flex; flex-direction: column; }
  .campaign-lobby-layout > aside { order: -1; }
  .campaign-lobby .desk-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 920px) {
  .command-pages .front-shell { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); }
  .front-brief > div { grid-template-columns: 1fr; gap: 4px; }
  .command-pages .front-brief { gap: 9px; }
  .dashboard-page .lobby-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-page .lobby-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .command-pages .front-shell { grid-template: 'cover' auto 'forms' auto 'brief' auto / minmax(0, 1fr); }
  .command-pages .front-shell, .dashboard-page .lobby, .command-pages .topbar, .social-page { width: calc(100% - 18px); }
  .command-pages .front-form { padding: 13px; }
  .command-pages .desk-heading { min-height: 105px; }
  .command-pages .social-heading { min-height: 86px; }
  .dashboard-page .match-entry { grid-template-columns: minmax(0, 1fr); }
  .dashboard-page .match-archive { grid-area: auto; padding: 0 8px 7px; }
  .dashboard-page .match-invite:not(.match-archive) { padding-bottom: 4px; }
}
@media (max-width: 450px) {
  .command-pages .topbar { flex-wrap: wrap; }
  .command-pages .topright { min-width: 0; }
  .command-pages .desk-heading { align-items: start; flex-direction: column; }
  .dashboard-page .lobby-side { grid-template-columns: minmax(0, 1fr); }
  .dashboard-page .match-card { flex-wrap: wrap; }
  .dashboard-page .match-main { flex-basis: calc(100% - 64px); }
  .dashboard-page .match-turn { margin-left: auto; }
  .command-pages .front-brief { grid-template-columns: 1fr; }
  .front-brief > div { grid-template-columns: 44px minmax(0, 1fr); }
}

/* Map library and editor */
.map-library-page, .map-editor-page {
  width: min(1380px, calc(100% - 32px));
  padding: 15px 0 38px;
}
.map-library-page { max-width: 1200px; }
.map-editor-page { width: min(1800px, calc(100% - 24px)); max-width: none; }
.command-pages .map-editor-heading { min-height: 0; padding: 12px clamp(14px, 2vw, 24px); }
.map-editor-heading h1 { margin-bottom: 4px; font-size: clamp(1.45rem, 3vw, 2.25rem); overflow-wrap: anywhere; }
.map-library-page .desk-heading p, .map-editor-page .desk-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.map-library-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(21rem, 37%, 26rem);
  align-items: start;
  gap: 1rem;
}
.map-editor-layout { position: relative; }
.command-pages :is(.map-library-page, .map-editor-page) .panel {
  min-width: 0;
  padding: clamp(16px, 2vw, 24px);
  background: linear-gradient(145deg, #203029f5, #14221df2);
}
:is(.map-library-page, .map-editor-page) .panel h2 {
  margin: 0 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--desk-line);
  font-size: 1.2rem;
}
.map-library-list, .map-editor-fields { display: grid; gap: .85rem; }
.map-library-list { gap: .45rem; margin: 0; padding: 0; list-style: none; }
.map-library-list li, .map-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.map-library-list li {
  justify-content: space-between;
  padding: .75rem .8rem;
  border: 1px solid #b8955a40;
  border-radius: 4px;
  background: #101d18;
}
.map-library-details { flex: 1 1 13rem; min-width: 0; overflow-wrap: anywhere; }
.map-library-list small { display: block; margin-top: .25rem; color: var(--muted); }
.map-library-details p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: .4rem 0 0;
  color: var(--muted);
  font-size: .85rem;
}
.map-library-tabs { margin-bottom: 1rem; }
.map-thumbnail { object-fit: contain; border: 1px solid var(--desk-line); border-radius: 3px; background: #101d18; }
.map-details { max-width: 660px; margin-top: 16px; }
.map-public-preview { display: flex; align-items: start; flex-wrap: wrap; gap: 1rem; }
.map-public-preview .map-thumbnail { max-width: 100%; height: auto; aspect-ratio: 16 / 11; }
.map-public-preview p { flex: 1 1 18rem; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.map-library-empty {
  display: grid;
  align-content: center;
  min-height: 10rem;
  padding: 1.25rem;
  border: 1px solid #b8955a40;
  border-radius: 4px;
  background: #101d18;
  text-align: center;
}
.map-library-empty p { max-width: 34ch; margin: .2rem auto; }
.map-library-empty p + p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.map-generation-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.command-pages .map-editor-page .map-editor-board { padding: 7px 7px 10px; }
.map-editor-viewport {
  position: relative;
  height: clamp(390px, calc(100dvh - 210px), 980px);
  overflow: hidden;
  background: #0d161c;
}
#editorLocation, .editor-minimap {
  position: absolute;
  left: 10px;
  margin: 0;
  border: 1px solid var(--desk-line);
  border-radius: 3px;
  background: #102019f2;
  box-shadow: 0 3px 10px #080f0cb0;
}
#editorLocation {
  top: 10px;
  max-width: calc(100% - 20px);
  padding: .45rem .65rem;
  color: #f1e6cb;
  font-size: .86rem;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.editor-minimap { bottom: 10px; padding: .4rem .5rem; }
.editor-minimap summary { cursor: pointer; color: #f0dfae; font-size: .83rem; font-weight: 750; }
.map-editor-board #editorMinimap { width: auto; height: auto; margin-top: .4rem; cursor: pointer; }
.map-editor-board canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.map-editor-board canvas.is-dragging { cursor: grabbing; }
.map-editor-board canvas:focus-visible { outline: 2px solid #e2c78f; outline-offset: -3px; }
.command-pages .map-editor-page .map-editor-palette {
  position: absolute;
  top: 18px;
  right: 18px;
  width: min(18rem, calc(100% - 36px));
  padding: 12px 15px;
}
.map-editor-palette summary { cursor: pointer; color: #f0dfae; font-weight: 750; }
.map-editor-palette[open] summary { border-bottom: 1px solid var(--desk-line); padding-bottom: 9px; margin-bottom: 12px; }
.map-editor-palette #editorStatus { margin: 0; color: var(--muted); font-size: .88rem; }
.map-editor-palette[open] #editorStatus:not(:empty) { margin-top: .75rem; }
.map-editor-palette:not([open]) #editorStatus { display: none; }
.map-editor-fields label { display: grid; gap: .35rem; margin: 0; }
.map-editor-fields :is(input, select, textarea) { min-width: 0; margin: 0; }
.map-editor-fields textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #8c805d;
  border-radius: 3px;
  font: inherit;
  resize: vertical;
}
.map-editor-fields > p { margin: 0; color: var(--muted); line-height: 1.5; }
.map-editor-page .map-editor-fields h2 { margin-bottom: 0; }
.map-editor-fields [hidden] { display: none; }
.map-editor-fields .map-checkbox { display: flex; align-items: center; gap: .6rem; min-height: 29px; }
.map-checkbox input { width: 1rem; height: 1rem; flex: 0 0 auto; accent-color: #e8c47f; }
.map-library-page .map-editor-fields > .primary { margin-top: .15rem; }
.map-editor-navigation { margin: .65rem .5rem 0; }
.map-editor-navigation button { min-height: 38px; padding: 7px 11px; }
.map-editor-navigation output { min-width: 3ch; font-size: .85rem; }
.map-editor-navigation label { display: flex; align-items: center; gap: .35rem; margin: 0; }
.map-editor-navigation input { width: 5rem; margin: 0; }
.map-editor-readout { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; margin: .55rem .5rem 0; }
.map-editor-readout p { margin: 0; font-size: .84rem; }
.map-editor-readout p:last-child { color: var(--muted); }
@media (max-width: 850px) {
  .map-library-layout { grid-template-columns: 1fr; }
  .map-editor-viewport { height: clamp(320px, 62dvh, 650px); }
  .command-pages .map-editor-page .map-editor-palette { position: static; width: auto; margin-top: 12px; }
}
@media (max-width: 450px) {
  .map-library-page, .map-editor-page { width: calc(100% - 18px); }
}
.admin-mail-status { display: grid; gap: .35rem; padding: 1rem; margin: 1rem 0 1.4rem; border: 1px solid #9b7845; background: rgba(8, 26, 24, .8); color: #efe2bc; }
.admin-mail-status span { color: #c0cbbd; font-size: .9rem; overflow-wrap: anywhere; }
.admin-mail-option { display: flex !important; align-items: flex-start; gap: .7rem; padding: .7rem .2rem; border-bottom: 1px solid rgba(204, 174, 112, .22); }
.admin-mail-option input[type=checkbox] { flex: 0 0 auto; width: auto; margin: .25rem 0 0; }
.admin-mail-option span { display: grid; gap: .2rem; margin: 0; color: #f4e7c9; font-size: 1rem; }
.admin-mail-option small { color: #b8c5b8; font-size: .85rem; }
.mail-preference-choice { display: flex !important; align-items: center; gap: .5rem; margin: .4rem 0 .4rem 1.3rem !important; color: #e6e9da; }
.mail-preference-choice input[type=checkbox] { width: auto; margin: 0; }
