:root {
  color-scheme: dark;
  font-family: "Segoe UI", sans-serif;
  background: #12161c;
  color: #e7ecf2;
}
body { margin: 0; padding: 16px 20px 32px; }
header { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
h1 { margin: 0 0 4px; font-size: 22px; }
.lead, .note { color: #b7c0cc; font-size: 13px; line-height: 1.4; }
.panel { background: #1b222c; border: 1px solid #2c3644; border-radius: 10px; padding: 12px; margin-top: 12px; }
#filters { display: grid; grid-template-columns: 1.4fr repeat(6, auto); gap: 10px; align-items: end; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #b7c0cc; }
input, select, button { background: #0f141b; color: #e7ecf2; border: 1px solid #3a4656; border-radius: 6px; padding: 7px 8px; font: inherit; }
button { cursor: pointer; }
button:hover { border-color: #d6b25e; }
.guild-list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow: auto; }
.guild-list button { text-align: left; }
.guild-list button.active { border-color: #d6b25e; color: #f3e2b0; }
.guild-list small { display: block; color: #8ea0b5; font-size: 11px; }
.chosen { grid-column: 1 / -1; margin: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; }
.table-wrap { overflow: auto; max-height: calc(100vh - 280px); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 6px 8px; border-bottom: 1px solid #2c3644; vertical-align: top; text-align: left; }
td { white-space: pre-line; }
th { position: sticky; top: 0; background: #243140; }
tr { cursor: pointer; }
tr:hover { background: #243041; }
.copy { margin-left: 6px; padding: 2px 6px; }
.occ-owned { color: #f0a3a3; }
.occ-vacant { color: #9ddeaf; }
.occ-unknown { color: #e6d39a; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
canvas { width: 100%; height: auto; background: #0c1016; image-rendering: pixelated; border-radius: 8px; cursor: crosshair; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; font-size: 12px; color: #b7c0cc; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; }
.c2 { background: #65a30d; } .c3 { background: #d6b25e; } .c4 { background: #ea580c; }
.c5 { background: #3f8f5a; } .c6 { background: #7c3aed; } .cg { background: #f5d76e; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; }
.card { white-space: pre-wrap; font-size: 13px; line-height: 1.45; }
.bar { height: 8px; background: #0f141b; border-radius: 99px; overflow: hidden; min-width: 180px; }
.bar span { display: block; height: 100%; background: #d6b25e; }
#progress { min-width: 220px; font-size: 13px; }
.tabs { display: flex; gap: 8px; margin-top: 12px; }
.tabs button.active { border-color: #d6b25e; color: #f3e2b0; }
#tab-route[hidden], #tab-search[hidden] { display: none; }
.route-form, .paths { display: grid; grid-template-columns: repeat(7, auto); gap: 10px; align-items: end; }
.paths { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.route-box { background: #121820; border: 1px solid #2c3644; border-radius: 8px; padding: 10px; }
.route-box h2 { margin: 0 0 8px; font-size: 16px; }
.route-list { max-height: 280px; overflow: auto; font-size: 13px; line-height: 1.45; }
.mark { color: #f5d76e; }
.tenth { background: #f5d76e; color: #1a1408; border-radius: 3px; }
.tenth.mark { color: #1a1408; }
@media (max-width: 1100px) {
  #filters, .layout, .route-form, .paths { grid-template-columns: 1fr; }
}
