:root {
  --ink: #243e34;
  --muted: #576959;
  --line: #d3d7c8;
  --paper: #f7f7ed;
  --green: #245442;
  --panel: #fffef6;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  color: var(--ink);
  font:
    15px/1.45 'Avenir Next',
    Avenir,
    system-ui,
    sans-serif;
  background: var(--paper);
  scroll-behavior: smooth;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
  color: inherit;
}
button,
summary {
  cursor: pointer;
}
a {
  color: var(--green);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
canvas:focus-visible,
summary:focus-visible {
  outline: 3px solid #ab531f;
  outline-offset: 2px;
  z-index: 3;
}
.shell {
  width: min(1504px, 100%);
  padding-inline: clamp(16px, 3.5vw, 64px);
  margin: auto;
}
.top {
  background: #213f34;
  color: #eff2de;
  border-bottom: 3px solid #abbb8e;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 54px;
}
.top a {
  text-decoration: none;
  color: #f3f3df;
  font-size: 13px;
  font-weight: 600;
}
.top a:hover {
  text-decoration: underline;
}
.top .brand {
  font-size: 19px;
  letter-spacing: -0.7px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 740;
}
.mark {
  color: #f5d87d;
  font-size: 25px;
  line-height: 1;
  text-shadow:
    0 4px #a1bb8e,
    0 8px #668d73;
  transform: translateY(-4px);
}
.navrule {
  width: 1px;
  height: 19px;
  background: #587063;
}
.intro {
  padding: 35px 0 29px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.intro h1,
h2,
h3 {
  font-family: 'Baskervville', Georgia, 'Times New Roman', serif;
  font-weight: 500;
}
.intro h1 {
  font-size: clamp(43px, 5vw, 78px);
  line-height: 0.99;
  letter-spacing: -0.055em;
  margin: 0 0 12px;
  color: #1d3d2e;
}
.intro p {
  margin: 0;
  color: #516052;
  font-size: clamp(14px, 1.12vw, 17px);
}
.intro .count-line {
  margin-top: 8px;
  color: #1d3d2e;
  font-size: clamp(13px, 1vw, 15px);
  font-variant-numeric: tabular-nums;
}
.intro .count-line:empty { display: none; }
.join {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: #f2cb6a;
  border: 1px solid #846f38;
  border-radius: 5px;
  padding: 11px 16px;
  color: #293828;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px #c4ac69;
}
.cta:hover {
  background: #ffda7c;
}
.cta span {
  font-size: 18px;
}
.join small {
  font-size: 11px;
  color: var(--muted);
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(245px, 24%);
  gap: 18px;
}
.card,
.directory {
  border: 1px solid #bcc5b4;
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 18px;
  min-height: 54px;
}
.card h2,
.section-head h2 {
  font-size: 25px;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.045em;
}
.mapicon {
  font: 21px var(--mono);
  color: #52765b;
  vertical-align: 1px;
  margin-right: 3px;
}
.metrics,
.legend,
.camera output,
.count,
.detail-top > span,
#directory-count,
.compass b {
  font: 11px var(--mono);
  letter-spacing: 0.025em;
}
.metrics {
  display: flex;
  gap: 13px;
  align-items: center;
  color: #526250;
}
.placed:before {
  content: '';
  display: inline-block;
  background: #698856;
  border-radius: 50%;
  height: 7px;
  width: 7px;
  margin-right: 5px;
}
.viewport {
  height: clamp(390px, 34vw, 540px);
  background: #a8d2c6;
  position: relative;
  overflow: hidden;
  border-block: 1px solid #b1c4b6;
}
.viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
.viewport canvas:active {
  cursor: grabbing;
}
.compass {
  position: absolute;
  top: 14px;
  left: 17px;
  display: grid;
  justify-items: center;
  color: #315d51;
  pointer-events: none;
}
.compass i {
  width: 19px;
  height: 20px;
  background: linear-gradient(90deg, #517969 50%, #f1f2d8 50%);
  clip-path: polygon(50% 0, 88% 100%, 50% 72%, 12% 100%);
  transform: rotate(-35deg);
}
.sky,
.camera,
.map-tip,
.map-state {
  background: #fcfbecef;
  border: 1px solid #92ac97;
  border-radius: 5px;
  box-shadow: 0 2px 5px #31544516;
}
.sky {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  font: 11px var(--mono);
  display: flex;
  gap: 6px;
  align-items: center;
}
.sky > span:first-child {
  font-size: 16px;
  color: #986418;
}
.camera {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
}
.camera button,
.detail-top button {
  border: 0;
  background: transparent;
  min-width: 34px;
  height: 31px;
  font-size: 19px;
}
.camera button:hover,
.detail-top button:hover {
  background: #dfe9d6;
}
.camera button:last-child {
  border-left: 1px solid var(--line);
  font-size: 21px;
}
.camera output {
  min-width: 36px;
  text-align: center;
}
.map-tip,
.map-state {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 9px;
  font-size: 12px;
  pointer-events: none;
  max-width: 60%;
}
.map-state {
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  bottom: auto;
}
.map-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px 15px;
  color: var(--muted);
  font-size: 11px;
}
.legend {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: #507551;
}
.legend i + i,
.legend i:not(:first-child) {
  margin-left: 8px;
}
.legend i:nth-child(2) {
  background: #c2d394;
  border: 1px solid #8ca46c;
}
.legend i:nth-child(3) {
  background: #bf7755;
}
.districts {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.count,
#directory-count {
  background: #edf0e1;
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 5px;
}
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 13px 10px;
  background: #f6f7ef;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 22px;
}
.search input {
  background: transparent;
  border: none;
  font-size: 13px;
  width: 100%;
  height: 29px;
}
.district-list,
.feed,
#lot-list,
.pieces {
  list-style: none;
  margin: 0;
  padding: 0;
}
.district-list {
  overflow-y: auto;
  scrollbar-width: thin;
  flex: 1;
  height: 0;
  border-top: 1px solid var(--line);
}
.district-list button {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #e5e7d9;
}
.district-list button:hover,
.district-list button:focus-visible {
  background: #edf1df;
}
.district-list button:after {
  content: '›';
  color: #788a74;
  font-size: 21px;
  margin-left: auto;
}
.emblem {
  width: 38px;
  height: 38px;
  flex: none;
  image-rendering: pixelated;
}
.district-list strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
}
.district-list small,
.pieces small,
.feed small {
  font: 10px var(--mono);
  color: #5b695b;
  display: block;
  margin-top: 4px;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: 29px;
}
.section-head span {
  font-size: 12px;
  color: var(--muted);
}
.arrivals {
  margin: 26px 0 22px;
}
.feed {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 4);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 5px;
  scroll-snap-type: x proximity;
}
.feed li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  scroll-snap-align: start;
}
.feed a,
.pieces a {
  display: block;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.35;
  color: var(--ink);
}
.feed a:hover,
.pieces a:hover {
  text-decoration: underline;
}
.feed .source {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 10px var(--mono);
  color: var(--muted);
  margin-bottom: 8px;
}
.source:before {
  content: '◆';
  color: #a76d3b;
}
.directory {
  margin-bottom: 32px;
  padding: 12px 16px;
}
.directory summary {
  font-weight: 600;
}
.directory ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 7px;
  padding: 14px 0 !important;
  font-size: 13px;
}
#directory-count {
  font-size: 10px;
  margin-left: 6px;
}
footer {
  border-top: 1px solid var(--line);
  padding-block: 17px;
  display: flex;
  justify-content: space-between;
  color: #586958;
  font-size: 12px;
}
footer a {
  text-decoration: none;
}
dialog {
  border: 1px solid #8a9c85;
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  padding: 18px 22px 22px;
  width: min(470px, calc(100% - 24px));
  max-height: 88dvh;
  box-shadow: 0 20px 70px #17372950;
}
dialog::backdrop {
  background: #1a342d75;
}
.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-top button {
  border: 1px solid var(--line);
  border-radius: 4px;
}
.detail-top > span {
  letter-spacing: 0.1em;
}
dialog h2 {
  font-size: 36px;
  line-height: 1.08;
  margin: 10px 0;
}
dialog h3 {
  font-size: 21px;
  margin: 14px 0 5px;
}
dialog p {
  margin: 10px 0;
  color: #526351;
}
.detail-art {
  width: 100%;
  height: 204px;
  border-radius: 6px;
  display: block;
  background: #dfe9d4;
}
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.detail-actions button,
.detail-actions a {
  font-size: 13px;
  background: #f2f4e7;
  color: var(--ink);
  border: 1px solid #b7c4ac;
  border-radius: 5px;
  padding: 7px 11px;
  text-decoration: none;
}
.detail-actions a:last-child {
  background: #f1d183;
}
.pieces li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.sr,
.skip:not(:focus) {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
}
.skip:focus {
  position: absolute;
  top: 4px;
  left: 8px;
  z-index: 10;
  background: white;
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 215px;
    gap: 10px;
  }
  .intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .join {
    flex-direction: row;
    align-items: center;
  }
  .top nav {
    gap: 21px;
  }
  .feed {
    grid-auto-columns: calc((100% - 24px) / 3);
  }
}
@media (max-width: 640px) {
  .top nav {
    height: 45px;
    gap: 15px;
  }
  .top a {
    font-size: 11px;
  }
  .top .brand {
    font-size: 16px;
  }
  .navrule {
    display: none;
  }
  .intro {
    padding: 23px 0 19px;
    gap: 13px;
  }
  .intro h1 {
    margin: 0 0 7px;
    font-size: 46px;
  }
  .intro p {
    line-height: 1.4;
  }
  .join {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .cta {
    padding: 7px 12px;
    font-size: 13px;
  }
  .join small {
    font-size: 10px;
  }
  .layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .card-head {
    min-height: 43px;
    padding: 9px 12px;
  }
  .card h2 {
    font-size: 22px;
  }
  .metrics {
    font-size: 10px;
    gap: 9px;
  }
  .viewport {
    height: 326px;
  }
  .camera {
    right: 8px;
    bottom: 8px;
  }
  .camera button {
    height: 32px;
    min-width: 32px;
  }
  .map-foot {
    padding: 9px 10px;
    font-size: 10px;
  }
  .legend {
    font-size: 10px;
  }
  .map-tip {
    bottom: 49px;
    max-width: 85%;
  }
  .district-list {
    max-height: 185px;
    height: 185px;
    flex: auto;
  }
  .district-list button {
    padding: 7px 12px;
  }
  .search {
    margin: 0 10px 8px;
  }
  .feed {
    grid-auto-columns: 77%;
  }
  .section-head {
    gap: 9px;
  }
  .section-head h2 {
    font-size: 26px;
  }
  .arrivals {
    margin: 19px 0 15px;
  }
  .emblem {
    width: 34px;
    height: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}

@media (min-width: 641px) {
  .districts {
    contain: size;
  }
  .district-list {
    min-height: 0;
  }
}
.plot-shelf {
  margin: 20px 0;
}
.plot-shelf ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.plot-shelf li {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel);
}
.plot-shelf a {
  display: flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  gap: 14px;
}
.plot-shelf canvas {
  width: 36%;
  height: 90px;
  background: #dbe5ce;
}
.plot-shelf a:hover {
  background: #edf1e4;
}
.plot-shelf strong {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 500;
}
.plot-shelf span {
  display: block;
  font: 11px var(--mono);
  color: var(--muted);
  margin-top: 4px;
}
@media (max-width: 640px) {
  .plot-shelf ul {
    gap: 7px;
  }
  .plot-shelf a {
    display: block;
  }
  .plot-shelf canvas {
    width: 100%;
    height: 79px;
  }
  .plot-shelf a div {
    padding: 3px 8px 9px;
  }
  .plot-shelf span {
    font-size: 10px;
  }
  .plot-shelf strong {
    font-size: 17px;
  }
}

[hidden] {
  display: none !important;
}
.map-card .card-head {
  background: #fcfbf2;
  border-bottom: 1px solid #cbd1ba;
}
.mode-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font:
    600 13px/1.4 system-ui,
    sans-serif;
  text-decoration: none;
  color: #244836;
  background: #edf0de;
  border: 1px solid #acba9d;
  border-radius: 5px;
}
.mode-button span {
  font-size: 17px;
  line-height: 1;
}
.mode-button:hover {
  background: #dfe8cb;
}
.map-foot {
  background: #f1f3e6;
}
.happening {
  border-top: 1px solid #d1d7c4;
  padding: 14px 18px 16px;
}
.happening h3,
.film-head h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}
.signal {
  width: 9px;
  height: 9px;
  border-radius: 100%;
  background: #517456;
  box-shadow: 0 0 0 4px #e3e9d7;
  margin-inline: 3px;
}
#now-list {
  list-style: none;
  display: flex;
  align-items: stretch;
  overflow: auto;
  scrollbar-width: thin;
  gap: 12px;
  margin: 10px 0 0;
  padding: 0 0 3px;
}
#now-list li {
  flex: none;
  max-width: min(280px, 90%);
  border-left: 2px solid #a0b293;
  padding: 1px 13px 1px 10px;
}
#now-list li[data-state='claimed'] {
  border-color: #b97537;
}
#now-list li[data-state='checking'] {
  border-color: #507e8c;
}
#now-list a {
  font:
    650 13px/1.4 system-ui,
    sans-serif;
  text-decoration: none;
}
#now-list a:hover {
  text-decoration: underline;
}
#now-list small {
  display: block;
  color: var(--muted);
  font: 11px/1.6 var(--mono);
}
.transport {
  background: #213f34;
  color: #fbf6db;
  padding: 14px 18px;
}
.film-head,
.film-buttons,
.film-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.film-head h3 {
  color: #fff8df;
}
#replay-count,
.film-caption,
.transport button {
  font: 12px/1.4 var(--mono);
}
.film-caption {
  margin-block: 5px;
  color: #e0e6c9;
  flex-wrap: wrap;
}
#scrub {
  display: block;
  width: 100%;
  height: 24px;
  margin: 0 0 4px;
  accent-color: #efd07c;
  cursor: pointer;
}
.transport button {
  border: 1px solid #769079;
  padding: 6px 12px;
  background: transparent;
  border-radius: 4px;
  color: #f2f3e1;
}
.transport button[aria-pressed='true'],
.transport #play {
  background: #e9eccc;
  color: #233d31;
}
.speeds {
  display: flex;
  gap: 4px;
}
@media (max-width: 640px) {
  .happening,
  .transport {
    padding: 12px;
  }
  .viewport {
    height: 285px;
  }
  #map-help {
    display: none;
  }
  .mode-button {
    padding: 5px 8px;
    font-size: 12px;
  }
  .metrics {
    gap: 7px;
  }
  .film-caption {
    font-size: 10px;
  }
}
