:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #66716b;
  --line: #ded7ca;
  --paper: #f8f5ef;
  --panel: #fffdf8;
  --accent: #286856;
  --accent-strong: #174c42;
  --copper: #bb7650;
  --sky: #7da7b4;
  --gold: #dfb75c;
  --danger: #a24444;
  --shadow: 0 24px 70px rgba(42, 38, 29, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #ebe6dc;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(125, 167, 180, 0.22), transparent 28%),
    linear-gradient(225deg, rgba(187, 118, 80, 0.18), transparent 30%),
    var(--paper);
}

button,
input,
select {
  font: inherit;
  min-width: 0;
}

button,
select {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(280px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(23, 33, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 12px 36px rgba(38, 32, 24, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  color: #fffaf1;
  font-weight: 900;
  background: linear-gradient(145deg, var(--accent-strong), var(--accent), var(--copper));
}

.brand strong,
.brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.search {
  display: grid;
  grid-template-columns: 1fr 44px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 15px;
  color: var(--ink);
  background: transparent;
}

.search button {
  display: grid;
  width: 44px;
  min-height: 42px;
  place-items: center;
  border: 0;
  color: #fff;
  background: var(--accent);
}

.button-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.top-actions,
.listing-price-row,
.results-toolbar,
.summary-strip,
.panel-heading {
  display: flex;
  align-items: center;
}

.top-actions {
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.music-player {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 42px minmax(0, 1fr) 42px 42px minmax(110px, 160px);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.84);
}

.music-icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  color: var(--accent-strong);
  background: #eee8dd;
}

.music-icon-button:first-child {
  color: #fff;
  background: var(--accent-strong);
}

.music-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.music-meta span,
.music-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-meta span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.music-meta strong {
  font-size: 0.92rem;
}

.music-volume {
  min-width: 0;
}

.music-volume input {
  width: 100%;
  accent-color: var(--accent);
}

.ghost-button,
.primary-button,
.link-button {
  border: 0;
  border-radius: var(--radius);
  white-space: nowrap;
}

.ghost-button {
  padding: 11px 15px;
  color: var(--ink);
  background: #eee8dd;
}

.primary-button {
  padding: 11px 16px;
  color: #fff;
  background: var(--accent-strong);
  box-shadow: 0 10px 28px rgba(23, 76, 66, 0.24);
}

.link-button {
  padding: 6px 0;
  color: var(--accent-strong);
  background: transparent;
  font-weight: 700;
}

.top-actions a.ghost-button,
.top-actions a.primary-button {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(520px, 1fr) minmax(380px, 520px);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.layout > * {
  min-width: 0;
}

.filters,
.results,
.detail-panel {
  border: 1px solid rgba(23, 33, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.filters,
.detail-panel {
  position: sticky;
  top: 92px;
}

.filters {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.panel-heading {
  justify-content: space-between;
  gap: 12px;
  font-weight: 850;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.sort-control span,
.chips legend,
.eyebrow {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.field select,
.sort-control select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
}

.field input[type="range"] {
  accent-color: var(--accent);
}

#bedsValue {
  justify-self: start;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: #e6f0eb;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  border: 0;
}

.chips legend {
  width: 100%;
  margin-bottom: 2px;
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.chip span {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
}

.chip input:checked + span {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.market-card {
  padding: 16px;
  border-radius: var(--radius);
  color: #fff8ea;
  background:
    linear-gradient(145deg, rgba(23, 76, 66, 0.96), rgba(40, 104, 86, 0.88)),
    var(--accent-strong);
}

.market-card strong {
  display: block;
  margin-top: 6px;
  font-size: 2rem;
}

.market-card p {
  margin: 8px 0 0;
  color: rgba(255, 248, 234, 0.78);
  line-height: 1.45;
}

.results {
  min-width: 0;
  padding: 18px;
}

.results-toolbar {
  justify-content: space-between;
  gap: 16px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 2vw, 2.4rem);
  line-height: 1.02;
}

.sort-control {
  display: grid;
  min-width: 190px;
  gap: 6px;
}

.summary-strip {
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.summary-strip span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
}

.summary-strip strong {
  color: var(--ink);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.atlas-section {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf2;
}

.stock-market-section {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(23, 33, 29, 0.12);
  border-radius: var(--radius);
  background: #f7fbf7;
}

.market-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.market-header h2 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

.market-status {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 190px;
}

.market-status span {
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.market-status strong {
  font-size: 1.15rem;
}

.market-status small {
  color: var(--muted);
}

.market-countries,
.market-index-grid,
.market-board-grid {
  display: grid;
  gap: 10px;
}

.market-countries {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.market-countries article,
.market-index-grid article,
.market-panel,
.market-detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.market-countries article {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.market-countries span {
  justify-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  background: #f0ece3;
}

.market-countries article.is-open span {
  color: #fff;
  background: var(--accent);
}

.market-countries strong,
.market-countries small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-countries small {
  color: var(--muted);
}

.market-index-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.market-index-grid article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  padding: 12px;
}

.market-index-grid .eyebrow,
.market-index-grid small {
  grid-column: 1 / -1;
}

.market-index-grid strong {
  font-size: 1.28rem;
}

.market-index-grid em,
.quote-change,
.is-up,
.is-down,
.is-flat {
  font-style: normal;
  font-weight: 900;
}

.is-up {
  color: #1f6f43;
}

.is-down {
  color: var(--danger);
}

.is-flat {
  color: var(--muted);
}

.market-index-grid small {
  color: var(--muted);
}

.market-board-grid {
  grid-template-columns: 1fr;
}

.market-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  min-width: 0;
}

.equity-board,
.bond-board {
  display: grid;
  gap: 7px;
}

.market-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(96px, auto) minmax(82px, auto);
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  background: #fffdf8;
}

.market-row.is-selected,
.market-row:hover {
  border-color: rgba(40, 104, 86, 0.5);
  background: #edf5f1;
}

.ticker {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: var(--radius);
  color: #fffaf1;
  font-size: 0.78rem;
  font-weight: 900;
  background: linear-gradient(145deg, var(--accent-strong), var(--copper));
}

.market-row strong,
.market-row small,
.quote-price,
.quote-change {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-row small {
  display: block;
  color: var(--muted);
}

.quote-price,
.quote-change {
  text-align: right;
}

.market-detail-head {
  background:
    linear-gradient(145deg, rgba(23, 33, 29, 0.98), rgba(40, 104, 86, 0.9)),
    var(--accent-strong);
}

.market-detail-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.market-detail-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.48;
}

.market-fact-grid {
  display: grid;
  grid-template-columns: minmax(105px, 0.55fr) minmax(0, 1.45fr);
  gap: 8px 12px;
  align-items: start;
}

.market-fact-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.market-fact-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.market-app-shell {
  max-width: 2000px;
  margin: 0 auto;
}

.market-page-topbar {
  grid-template-columns: minmax(220px, 330px) minmax(220px, 1fr) auto;
}

.market-page-status {
  display: grid;
  gap: 2px;
  min-width: 0;
  justify-items: center;
}

.market-page-status strong,
.market-page-status small {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-page-status small {
  color: var(--muted);
}

.lumenfield-page-shell {
  max-width: 2400px;
  margin: 0 auto;
}

.lumenfield-page-topbar {
  grid-template-columns: minmax(220px, 330px) minmax(340px, 1fr) auto;
}

.lumenfield-page-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(620px, 1fr) minmax(340px, 440px);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.lumenfield-page-layout > * {
  min-width: 0;
}

.lumenfield-map-sidebar,
.lumenfield-map-stage,
.lumenfield-listing-detail {
  border: 1px solid rgba(23, 33, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.lumenfield-map-sidebar,
.lumenfield-listing-detail {
  position: sticky;
  top: 92px;
}

.lumenfield-map-sidebar {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.lumenfield-map-sidebar h1 {
  margin-bottom: 6px;
}

.lumenfield-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lumenfield-stat-grid article {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.lumenfield-stat-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.1rem;
}

.lumenfield-area-list,
.lumenfield-page-listings {
  display: grid;
  gap: 8px;
}

.lumenfield-area-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  background: #fff;
}

.lumenfield-area-list button.is-active,
.lumenfield-area-list button:hover,
.lumenfield-page-listings button.is-active,
.lumenfield-page-listings button:hover {
  border-color: rgba(40, 104, 86, 0.55);
  background: #edf5f1;
}

.lumenfield-area-list strong,
.lumenfield-area-list small,
.lumenfield-page-listings strong,
.lumenfield-page-listings small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lumenfield-area-list small,
.lumenfield-page-listings small {
  color: var(--muted);
}

.lumenfield-area-list em {
  color: var(--accent-strong);
  font-style: normal;
  font-weight: 900;
}

.lumenfield-page-listings {
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}

.lumenfield-page-listings button {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  background: #fff;
}

.lumenfield-page-listings img {
  width: 70px;
  height: 54px;
  border-radius: var(--radius);
  object-fit: cover;
}

.lumenfield-page-listings strong {
  color: #a24444;
}

.lumenfield-map-stage {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.lumenfield-stage-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.lumenfield-stage-toolbar h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
}

.lumenfield-full-map-shell {
  aspect-ratio: 10 / 7;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 29, 0.16);
  border-radius: var(--radius);
  background: #dce9d5;
}

.lumenfield-full-map {
  min-height: 0;
  height: 100%;
}

.lumenfield-map-ground.full {
  fill: url("#lumenfieldFullTerrain");
}

.lumenfield-river.full {
  stroke-width: 3.1;
}

.lumenfield-creek,
.lumenfield-contour {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lumenfield-creek {
  stroke: rgba(121, 181, 200, 0.64);
  stroke-width: 1.15;
}

.lumenfield-contour {
  stroke: rgba(126, 137, 101, 0.25);
  stroke-width: 0.65;
}

.lumenfield-road.minor {
  stroke: rgba(255, 253, 248, 0.72);
  stroke-width: 0.38;
}

.lumenfield-road-label {
  fill: #59625c;
  font-size: 2.1px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 253, 248, 0.86);
  stroke-linejoin: round;
  stroke-width: 0.72;
}

.lumenfield-area.is-muted {
  opacity: 0.32;
}

.lumenfield-area.is-focus {
  stroke: var(--accent-strong);
  stroke-width: 0.95;
}

.lumenfield-area[data-area-id] {
  cursor: pointer;
  outline: none;
}

.lumenfield-area[data-area-id]:hover {
  stroke: var(--accent-strong);
  stroke-width: 0.9;
}

.lumenfield-area-label.full text {
  font-size: 2.35px;
}

.lumenfield-area-label.full text + text {
  font-size: 1.55px;
}

.lumenfield-listing-pin.full {
  filter: url("#mapPinShadow");
}

.lumenfield-listing-pin.full circle,
.lumenfield-listing-pin.full rect {
  stroke-width: 0.32;
}

.lumenfield-listing-pin.full text {
  font-size: 1.95px;
}

.lumenfield-listing-pin.is-selected circle,
.lumenfield-listing-pin.is-selected rect {
  fill: var(--accent-strong);
}

.lumenfield-listing-detail {
  overflow: hidden;
}

.sunthread-town-map {
  display: block;
  width: 100%;
  min-height: 0;
  height: 100%;
  background: #dce9d5;
}

.sunthread-ground {
  fill: url("#sunthreadTerrain");
}

.sunthread-ridge,
.sunthread-creek {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sunthread-ridge {
  stroke: rgba(126, 137, 101, 0.26);
  stroke-width: 1.1;
}

.sunthread-creek {
  stroke: rgba(121, 181, 200, 0.82);
  stroke-width: 2.05;
}

.sunthread-neighborhood {
  stroke: rgba(23, 33, 29, 0.36);
  stroke-dasharray: 2.2 1.3;
  stroke-width: 0.7;
}

.sunthread-neighborhood.residential {
  fill: rgba(219, 231, 226, 0.72);
}

.sunthread-neighborhood.mixed,
.sunthread-neighborhood.dense {
  fill: rgba(223, 218, 201, 0.74);
}

.sunthread-neighborhood.upper {
  fill: rgba(231, 216, 178, 0.74);
}

.sunthread-neighborhood.rural {
  fill: rgba(218, 229, 190, 0.74);
}

.sunthread-road {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sunthread-road-casing {
  fill: none;
  stroke: rgba(23, 33, 29, 0.18);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sunthread-road-casing.highway {
  stroke-width: 4.25;
}

.sunthread-road-casing.arterial {
  stroke-width: 3.25;
}

.sunthread-road-casing.collector {
  stroke-width: 2.2;
}

.sunthread-road-casing.street {
  stroke-width: 1.25;
}

.sunthread-road-casing.access,
.sunthread-road-casing.local {
  stroke-width: 0.8;
}

.sunthread-road.highway {
  stroke: #5f86a0;
  stroke-width: 3.2;
}

.sunthread-road.arterial {
  stroke: #fffdf8;
  stroke-width: 2.3;
}

.sunthread-road.collector {
  stroke: rgba(255, 253, 248, 0.94);
  stroke-width: 1.55;
}

.sunthread-road.street {
  stroke: rgba(255, 253, 248, 0.84);
  stroke-width: 0.9;
}

.sunthread-road.local {
  stroke: rgba(255, 253, 248, 0.68);
  stroke-width: 0.42;
}

.sunthread-road.access {
  stroke: rgba(255, 253, 248, 0.88);
  stroke-width: 0.62;
}

.sunthread-intersection {
  fill: #fffdf8;
  stroke: rgba(23, 33, 29, 0.28);
  stroke-width: 0.22;
}

.sunthread-home-dot {
  fill: #9d3b48;
  stroke: #fff;
  stroke-width: 0.16;
  opacity: 0.7;
}

.sunthread-home-dot.upper {
  fill: #bb7650;
}

.sunthread-home-dot.dense {
  fill: #8d3944;
  opacity: 0.8;
}

.sunthread-home-dot.rural {
  fill: #8d7d55;
}

.sunthread-label {
  pointer-events: none;
}

.sunthread-label text {
  fill: #1b2824;
  font-size: 3.15px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 253, 248, 0.9);
  stroke-linejoin: round;
  stroke-width: 1.05;
  text-anchor: middle;
}

.sunthread-label text + text {
  fill: var(--muted);
  font-size: 2px;
  font-weight: 800;
  stroke-width: 0.78;
}

.sunthread-landmark rect {
  fill: var(--accent-strong);
  stroke: #fff;
  stroke-width: 0.32;
}

.sunthread-landmark.bank rect {
  fill: var(--gold);
}

.sunthread-landmark.food rect {
  fill: var(--copper);
}

.sunthread-landmark.defense rect {
  fill: #7a3434;
}

.sunthread-landmark.news rect {
  fill: #3d4f76;
}

.sunthread-landmark.school rect {
  fill: #5d7c99;
}

.sunthread-landmark.clinic rect {
  fill: #66895f;
}

.sunthread-landmark.is-venue {
  cursor: pointer;
  outline: none;
}

.sunthread-landmark.is-venue rect {
  stroke-width: 0.55;
}

.sunthread-landmark.is-venue:hover rect,
.sunthread-landmark.is-venue:focus rect,
.sunthread-landmark.is-selected rect {
  fill: #0f5a50;
  stroke: #fff4c2;
  stroke-width: 0.72;
}

.sunthread-landmark text {
  fill: #fff;
  font-size: 2.2px;
  font-weight: 900;
  pointer-events: none;
  text-anchor: middle;
}

.sunthread-road-name {
  fill: #59625c;
  font-size: 2.4px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 253, 248, 0.9);
  stroke-linejoin: round;
  stroke-width: 0.78;
}

.sunthread-town-pin {
  filter: url("#mapPinShadow");
}

.venue-stage-hero {
  position: relative;
  overflow: hidden;
  background: #dfe8d0;
}

.venue-open-3d {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 253, 248, 0.52);
  border-radius: 999px;
  color: #fffdf8;
  font-weight: 900;
  background: rgba(18, 63, 58, 0.92);
  box-shadow: 0 10px 24px rgba(23, 33, 29, 0.25);
}

.venue-open-3d:hover,
.venue-open-3d:focus {
  background: #0f5a50;
}

.nechimos-stage {
  display: block;
  width: 100%;
  height: 330px;
  background: #dfe8d0;
}

.venue-detail-body {
  gap: 14px;
}

.venue-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.venue-stat-grid div,
.venue-menu-callout {
  min-width: 0;
  padding: 10px;
  border-radius: var(--radius);
  background: #f0ece3;
}

.venue-stat-grid dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.venue-stat-grid dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 900;
}

.venue-menu-callout {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(174, 131, 57, 0.24);
  background: #fbf1d4;
}

.venue-menu-callout strong,
.venue-menu-callout small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.venue-menu-callout strong {
  font-size: 1.05rem;
}

.venue-menu-callout small {
  color: var(--muted);
}

body.has-venue-modal {
  overflow: hidden;
}

.venue-3d-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  color: #fffdf8;
  background: #101713;
}

.venue-3d-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 253, 248, 0.14);
  background: rgba(16, 23, 19, 0.96);
}

.venue-3d-header h2 {
  margin: 2px 0 0;
  color: #fffdf8;
}

.venue-3d-close {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 253, 248, 0.22);
  border-radius: var(--radius);
  color: #fffdf8;
  font-weight: 900;
  background: rgba(255, 253, 248, 0.12);
}

.venue-3d-close:hover,
.venue-3d-close:focus {
  background: rgba(255, 253, 248, 0.22);
}

.venue-3d-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  min-height: 0;
}

.venue-3d-scene {
  min-width: 0;
  min-height: 0;
  background: #dfe8d0;
}

.venue-3d-scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  cursor: grab;
}

.venue-3d-scene canvas:active {
  cursor: grabbing;
}

.venue-3d-info {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border-left: 1px solid rgba(255, 253, 248, 0.14);
  background: #17211d;
}

.venue-3d-info strong {
  font-size: 1.05rem;
  line-height: 1.35;
}

.venue-3d-info dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.venue-3d-info dl div {
  padding: 10px;
  border: 1px solid rgba(255, 253, 248, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.08);
}

.venue-3d-info dt {
  color: rgba(255, 253, 248, 0.68);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.venue-3d-info dd {
  margin: 3px 0 0;
  color: #fffdf8;
  font-size: 1.25rem;
  font-weight: 900;
}

.market-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 520px);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.market-page-layout > * {
  min-width: 0;
}

.market-page-overview,
.market-live-board {
  grid-column: 1;
}

.market-watch-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.market-page-overview,
.market-live-board,
.market-watch-card {
  border: 1px solid rgba(23, 33, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.market-page-overview,
.market-live-board {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.market-page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.market-page-title h1 {
  margin-bottom: 0;
}

.market-page-badge {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.market-page-badge span {
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.market-page-badge strong {
  font-size: 1.3rem;
}

.market-pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.market-pulse-grid article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.market-pulse-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.2rem;
}

.market-toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eee8dd;
}

.segmented-control button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
}

.segmented-control button.is-active {
  color: #fff;
  background: var(--accent-strong);
}

.market-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
}

.live-board-header,
.market-live-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1.25fr) minmax(150px, 0.7fr) 92px;
  gap: 10px;
  align-items: center;
}

.live-board-header {
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.live-board {
  display: grid;
  gap: 8px;
}

.market-live-row {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  background: #fff;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.market-live-row:hover,
.market-live-row.is-selected {
  border-color: rgba(40, 104, 86, 0.52);
  background: #edf5f1;
}

.market-live-row:hover {
  transform: translateY(-1px);
}

.market-live-name,
.market-live-price {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.market-live-name strong,
.market-live-name small,
.market-live-price strong,
.market-live-price small,
.market-live-move {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-live-name small,
.market-live-price small {
  color: var(--muted);
}

.market-live-move {
  justify-self: end;
  font-weight: 900;
}

.market-watch-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.market-watch-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.instrument-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.instrument-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.instrument-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instrument-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.instrument-price strong {
  font-size: 1.75rem;
}

.instrument-price span {
  font-weight: 900;
}

.market-sparkline {
  display: block;
  width: 100%;
  height: 140px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6faf6;
}

.market-sparkline line {
  stroke: rgba(23, 33, 29, 0.16);
  stroke-width: 1;
}

.market-sparkline polyline {
  fill: none;
  stroke: var(--accent-strong);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.saved-tape-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 3px;
}

.saved-tape-list article {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.saved-tape-list span,
.saved-tape-list small {
  color: var(--muted);
  font-size: 0.78rem;
}

.saved-tape-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atlas-header,
.atlas-layout,
.institution-grid,
.official-grid,
.coordinate-grid {
  display: grid;
  gap: 12px;
}

.atlas-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.atlas-header h2 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

.atlas-pulse {
  display: grid;
  min-width: 220px;
  gap: 2px;
  justify-items: end;
}

.atlas-pulse strong {
  font-size: 1.1rem;
}

.atlas-pulse small {
  color: var(--muted);
}

.atlas-layout {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.map-card {
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(125, 167, 180, 0.2), transparent 45%),
    #edf1e9;
}

#listoriyaMap {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 440px;
}

.country-ocean {
  fill: #cce3ea;
}

.country-land {
  fill: url("#landGradient");
  stroke: rgba(23, 33, 29, 0.2);
  stroke-width: 0.55;
}

.country-beachline {
  fill: none;
  stroke: #ead38b;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
  opacity: 0.92;
}

.country-route {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 0.58;
}

.state-dot {
  cursor: pointer;
  outline: none;
}

.state-dot circle {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 0.65;
  transition: fill 160ms ease, transform 160ms ease;
}

.state-dot:hover circle,
.state-dot:focus circle,
.state-dot.is-selected circle {
  fill: var(--danger);
  transform: scale(1.28);
}

.country-landmark {
  cursor: pointer;
  outline: none;
}

.country-landmark path {
  fill: var(--gold);
  stroke: #fff;
  stroke-width: 0.55;
  transition: fill 160ms ease, transform 160ms ease;
}

.country-landmark.high path,
.country-landmark.severe path {
  fill: var(--danger);
}

.country-landmark.beach:not(.high):not(.severe) path {
  fill: var(--sky);
}

.country-landmark:hover path,
.country-landmark:focus path {
  transform: scale(1.25);
}

.atlas-side {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.institution-grid,
.official-grid,
.coordinate-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.institution-grid article,
.official-grid article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.institution-grid strong,
.official-grid strong {
  line-height: 1.2;
}

.institution-grid small {
  color: var(--muted);
}

.bank-stack {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.bank-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.state-list {
  display: grid;
  gap: 8px;
  max-height: 270px;
  overflow: auto;
  padding-right: 4px;
}

.state-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  background: #fff;
}

.state-row strong,
.state-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-row small {
  color: var(--muted);
}

.state-row em {
  color: var(--accent-strong);
  font-style: normal;
  font-weight: 850;
}

.state-row.is-active {
  border-color: rgba(40, 104, 86, 0.52);
  background: #e8f1ed;
}

.listing-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 29, 0.1);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 42px rgba(36, 32, 24, 0.1);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.listing-card:hover,
.listing-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(40, 104, 86, 0.42);
  box-shadow: 0 24px 50px rgba(31, 48, 42, 0.16);
}

.listing-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #ded7ca;
}

.favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(23, 33, 29, 0.55);
  backdrop-filter: blur(8px);
}

.favorite.is-saved {
  color: #fff4f4;
  background: var(--danger);
}

.listing-content {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.listing-price-row {
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-size: 1.28rem;
}

.status {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 850;
  background: #e6f0eb;
}

.listing-card h2 {
  margin-bottom: 0;
  font-size: 1.02rem;
  line-height: 1.2;
}

.address {
  margin-bottom: 0;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 2px 0;
}

.stats div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border-radius: var(--radius);
  background: #f2eee6;
}

.stats dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stats dd {
  margin: 0;
  font-weight: 850;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.photo-strip figure {
  display: grid;
  gap: 0;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.photo-strip img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #ded7ca;
}

.photo-strip figcaption {
  display: grid;
  gap: 2px;
  padding: 8px;
}

.photo-strip strong,
.photo-strip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-strip span {
  color: var(--muted);
  font-size: 0.76rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  background: #eaf1ef;
}

.detail-panel {
  overflow: hidden;
}

.state-detail-head {
  display: grid;
  gap: 4px;
  padding: 18px;
  color: #fff8ea;
  background:
    linear-gradient(145deg, rgba(23, 76, 66, 0.98), rgba(40, 104, 86, 0.88)),
    var(--accent-strong);
}

.state-detail-head h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
  line-height: 1.08;
}

.state-detail-head p {
  margin-bottom: 0;
  color: rgba(255, 248, 234, 0.76);
}

.detail-hero {
  position: relative;
}

.detail-hero img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  background: #ded7ca;
}

.listing-gallery {
  position: relative;
  display: grid;
  overflow: hidden;
  background: #f2eee6;
}

.listing-gallery-main {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: #ded7ca;
}

.listing-gallery-main img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.listing-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 68px;
  border: 0;
  border-radius: 999px;
  color: #fffdf8;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  background: rgba(23, 33, 29, 0.68);
  box-shadow: 0 16px 34px rgba(23, 33, 29, 0.28);
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.listing-gallery-nav:hover,
.listing-gallery-nav:focus {
  background: rgba(22, 81, 67, 0.9);
}

.listing-gallery-nav.prev {
  left: 14px;
}

.listing-gallery-nav.next {
  right: 14px;
}

.listing-gallery-expand {
  position: absolute;
  top: 54px;
  left: 14px;
  z-index: 4;
  padding: 8px 11px;
  border: 0;
  border-radius: 999px;
  color: #fffdf8;
  font-weight: 900;
  background: rgba(23, 33, 29, 0.72);
  box-shadow: 0 12px 24px rgba(23, 33, 29, 0.24);
  backdrop-filter: blur(10px);
}

.listing-gallery-expand:hover,
.listing-gallery-expand:focus {
  background: rgba(22, 81, 67, 0.92);
}

.listing-gallery-main figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  gap: 1px;
  max-width: calc(100% - 28px);
  padding: 9px 10px;
  border-radius: var(--radius);
  color: #fffdf8;
  background: rgba(23, 33, 29, 0.68);
  backdrop-filter: blur(10px);
}

.listing-gallery-main figcaption strong,
.listing-gallery-main figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-gallery-main figcaption span {
  color: rgba(255, 253, 248, 0.78);
  font-size: 0.78rem;
}

.listing-gallery-main em {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fffdf8;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
  background: rgba(23, 33, 29, 0.68);
  backdrop-filter: blur(10px);
}

.listing-gallery-thumbs {
  display: grid;
  grid-auto-columns: 86px;
  grid-auto-flow: column;
  gap: 8px;
  overflow-x: auto;
  padding: 9px;
}

.listing-gallery-thumbs button {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  background: rgba(255, 253, 248, 0.72);
}

.listing-gallery-thumbs button:hover,
.listing-gallery-thumbs button:focus,
.listing-gallery-thumbs button.is-active {
  border-color: rgba(40, 104, 86, 0.55);
  background: #fffdf8;
}

.listing-gallery-thumbs img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 5px;
  object-fit: cover;
  background: #ded7ca;
}

.listing-gallery-thumbs span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 850;
}

.listing-gallery-controls {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 253, 248, 0.8);
}

.listing-gallery-controls button {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 48px;
  border: 1px solid rgba(42, 70, 62, 0.18);
  border-radius: var(--radius);
  color: #fffdf8;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  background: var(--accent-strong);
}

.listing-gallery-controls button:hover,
.listing-gallery-controls button:focus {
  background: #2d7a65;
}

.listing-gallery-controls span {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: center;
}

.listing-gallery-controls strong,
.listing-gallery-controls small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-gallery-controls strong {
  color: var(--ink);
  font-weight: 950;
}

.listing-gallery-controls small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.listing-gallery .detail-badge {
  top: 14px;
  bottom: auto;
}

.listing-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: minmax(46px, 7vw) minmax(0, 1fr) minmax(46px, 7vw);
  align-items: center;
  gap: 16px;
  padding: 26px;
  background: rgba(12, 18, 16, 0.94);
}

.lumenfield-listing-detail.is-gallery-expanded {
  position: relative;
  z-index: 10001;
}

.listing-lightbox figure {
  display: grid;
  min-width: 0;
  max-height: calc(100vh - 52px);
  margin: 0;
  gap: 12px;
}

.listing-lightbox img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 120px);
  border-radius: var(--radius);
  object-fit: contain;
  background: #111815;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
}

.listing-lightbox figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fffdf8;
  font-weight: 900;
}

.listing-lightbox figcaption span {
  color: rgba(255, 253, 248, 0.72);
  font-size: 0.92rem;
}

.listing-lightbox-close,
.listing-lightbox-nav {
  display: grid;
  place-items: center;
  border: 0;
  color: #fffdf8;
  font-weight: 950;
  line-height: 1;
  background: rgba(255, 253, 248, 0.14);
  backdrop-filter: blur(10px);
}

.listing-lightbox-close:hover,
.listing-lightbox-close:focus,
.listing-lightbox-nav:hover,
.listing-lightbox-nav:focus {
  background: rgba(45, 122, 101, 0.92);
}

.listing-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  font-size: 2rem;
}

.listing-lightbox-nav {
  width: 100%;
  min-width: 44px;
  height: min(28vh, 180px);
  border-radius: 999px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.detail-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
  background: rgba(23, 33, 29, 0.68);
  backdrop-filter: blur(10px);
}

.detail-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.detail-title {
  display: grid;
  gap: 6px;
}

.detail-title h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  line-height: 1.08;
}

.detail-title p,
.description {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.detail-price {
  font-size: 1.7rem;
  font-weight: 900;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini-map {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent 47%, rgba(255,255,255,0.68) 48%, rgba(255,255,255,0.68) 52%, transparent 53%),
    linear-gradient(0deg, transparent 43%, rgba(255,255,255,0.7) 44%, rgba(255,255,255,0.7) 49%, transparent 50%),
    linear-gradient(135deg, #c7d9d1, #eadbc1 52%, #bed4dc);
}

.map-block {
  display: grid;
  gap: 10px;
}

.generated-city-map {
  display: block;
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #dce6dd;
}

.lumenfield-map-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbf4;
}

.lumenfield-map-shell {
  overflow: hidden;
  border: 1px solid rgba(23, 33, 29, 0.16);
  border-radius: var(--radius);
  background: #dce9d5;
}

.lumenfield-regional-map {
  display: block;
  width: 100%;
  min-height: 360px;
}

.lumenfield-map-ground {
  fill: url("#lumenfieldTerrain");
}

.lumenfield-river {
  fill: none;
  stroke: #79b5c8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.4;
}

.lumenfield-park {
  fill: rgba(85, 146, 93, 0.24);
  stroke: rgba(62, 116, 75, 0.24);
  stroke-width: 0.45;
}

.lumenfield-area {
  stroke: rgba(23, 33, 29, 0.36);
  stroke-dasharray: 1.8 1.2;
  stroke-width: 0.55;
}

.lumenfield-area.city {
  fill: rgba(219, 231, 226, 0.74);
}

.lumenfield-area.town {
  fill: rgba(239, 225, 192, 0.66);
}

.lumenfield-road {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lumenfield-road.highway {
  stroke: #6f92aa;
  stroke-width: 2.55;
}

.lumenfield-road.arterial {
  stroke: #fffdf8;
  stroke-width: 1.65;
}

.lumenfield-road.street {
  stroke: rgba(255, 253, 248, 0.86);
  stroke-width: 0.82;
}

.lumenfield-house-dot {
  fill: #9d3b48;
  stroke: #fff;
  stroke-width: 0.2;
  opacity: 0.78;
}

.lumenfield-house-dot.town {
  fill: #bb7650;
}

.lumenfield-area-label {
  pointer-events: none;
}

.lumenfield-area-label text {
  fill: #1b2824;
  font-size: 2.7px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 253, 248, 0.9);
  stroke-linejoin: round;
  stroke-width: 0.95;
  text-anchor: middle;
}

.lumenfield-area-label text + text {
  fill: var(--muted);
  font-size: 2.05px;
  font-weight: 800;
  stroke-width: 0.72;
}

.lumenfield-listing-pin {
  cursor: pointer;
  filter: url("#mapPinShadow");
  outline: none;
}

.lumenfield-listing-pin circle,
.lumenfield-listing-pin rect {
  fill: #a24444;
  stroke: #fff;
  stroke-width: 0.42;
  transition: fill 160ms ease, transform 160ms ease;
}

.lumenfield-listing-pin text {
  fill: #fff;
  font-size: 2.18px;
  font-weight: 900;
  pointer-events: none;
}

.lumenfield-listing-pin:hover circle,
.lumenfield-listing-pin:focus circle,
.lumenfield-listing-pin:hover rect,
.lumenfield-listing-pin:focus rect {
  fill: var(--accent-strong);
}

.lumenfield-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.lumenfield-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lumenfield-map-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.lumenfield-map-legend .city {
  border: 1px dashed rgba(23, 33, 29, 0.48);
  background: #dbe7e2;
}

.lumenfield-map-legend .town {
  border: 1px dashed rgba(23, 33, 29, 0.4);
  background: #efe1c0;
}

.lumenfield-map-legend .listing {
  background: #a24444;
}

.lumenfield-map-legend .home {
  background: #bb7650;
}

.lumenfield-region-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lumenfield-region-grid article {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.lumenfield-region-grid strong,
.lumenfield-region-grid small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lumenfield-region-grid small {
  color: var(--muted);
}

.lumenfield-listing-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.lumenfield-listing-rail button {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  background: #fff;
}

.lumenfield-listing-rail button:hover,
.lumenfield-listing-rail button:focus {
  border-color: rgba(40, 104, 86, 0.5);
  background: #edf5f1;
}

.lumenfield-listing-rail strong,
.lumenfield-listing-rail span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lumenfield-listing-rail strong {
  color: #a24444;
}

.city-ground {
  fill: #dfe9df;
}

.city-parcel {
  stroke: rgba(23, 33, 29, 0.16);
  stroke-width: 0.25;
}

.city-parcel.high {
  fill: #e9d7af;
}

.city-parcel.mixed {
  fill: #cbd9d2;
}

.city-parcel.low {
  fill: #d6d0c3;
}

.city-road {
  fill: none;
  stroke: #fffdf8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.city-road.arterial {
  stroke-width: 2.4;
}

.city-road.collector {
  stroke-width: 1.55;
}

.city-road.street {
  stroke-width: 0.9;
}

.city-marker circle {
  stroke: #fff;
  stroke-width: 0.8;
}

.city-marker.owner circle {
  fill: var(--accent-strong);
}

.city-marker.advisor circle {
  fill: var(--sky);
}

.city-marker.bank circle {
  fill: var(--gold);
}

.city-marker.food circle {
  fill: #f7f0df;
  stroke: #7d4c2f;
  stroke-width: 0.72;
}

.city-marker.food.top circle {
  fill: var(--copper);
  stroke: #fff;
}

.city-marker.food text {
  fill: #17211d;
  font-size: 3px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.city-marker.food.top text {
  fill: #fffaf1;
}

.city-marker.news rect {
  fill: #3d4f76;
  stroke: #fff;
  stroke-width: 0.7;
}

.city-marker.news text {
  fill: #fff;
  font-size: 3.3px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.city-marker.resource rect {
  fill: #516a38;
  stroke: #fff;
  stroke-width: 0.7;
}

.city-marker.resource text {
  fill: #fff;
  font-size: 2.5px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.city-marker.hood-defense rect {
  fill: #2f5f67;
  stroke: #fff;
  stroke-width: 0.7;
}

.city-marker.task-force rect {
  fill: #7a3434;
  stroke: #fff;
  stroke-width: 0.7;
}

.city-marker.hood-defense text,
.city-marker.task-force text {
  fill: #fff;
  font-size: 3.2px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.city-marker.monster-zone circle {
  fill: #231c1b;
  stroke: #f0c36b;
  stroke-width: 0.85;
}

.city-marker.monster-zone text {
  fill: #fff;
  font-size: 2.45px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.city-marker.landmark path {
  fill: var(--gold);
  stroke: #fff;
  stroke-width: 0.7;
}

.city-marker.landmark.high path,
.city-marker.landmark.severe path {
  fill: var(--danger);
}

.city-marker.landmark.beach:not(.high):not(.severe) path {
  fill: var(--sky);
}

.city-marker.landmark text {
  fill: #fff;
  font-size: 2.35px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.city-marker.magic circle {
  fill: #7c5ab6;
}

.city-marker.core circle,
.city-marker.treasury circle {
  fill: var(--danger);
}

.city-marker.listing circle {
  fill: #101716;
}

.coordinate-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.coordinate-grid span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: var(--radius);
  color: var(--muted);
  background: #f2eee6;
}

.coordinate-grid strong {
  color: var(--ink);
}

.coordinate-list,
.city-pop-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.coordinate-list strong,
.city-pop-list strong {
  color: var(--ink);
}

.coordinate-list span,
.city-pop-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.city-tabs button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
}

.city-tabs button.is-active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.city-tabs button.is-town {
  border-style: dashed;
}

.food-logo-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.food-logo-row span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffaf2;
}

.food-logo-row em {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  color: #fffaf1;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
  background: linear-gradient(145deg, var(--copper), var(--accent-strong));
}

.food-logo-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.food-chain-list {
  display: grid;
  grid-template-columns: 42px minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px 10px;
  align-items: center;
}

.food-chain-list span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  color: #fffaf1;
  font-size: 0.72rem;
  font-weight: 900;
  background: var(--copper);
}

.food-chain-list span.challenger {
  color: var(--ink);
  background: #f1e7d8;
}

.food-chain-list strong,
.food-chain-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.food-chain-list small {
  color: var(--muted);
}

.landmark-callout {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff8ed;
}

.landmark-callout img {
  width: 100%;
  height: 100%;
  min-height: 102px;
  border-radius: var(--radius);
  object-fit: cover;
}

.landmark-callout div {
  display: grid;
  gap: 5px;
  align-content: center;
  min-width: 0;
}

.landmark-callout strong {
  font-size: 1.02rem;
}

.landmark-callout p,
.landmark-callout small {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.landmark-callout small {
  font-size: 0.78rem;
}

.landmark-list,
.landmark-mini-list {
  display: grid;
  gap: 8px;
}

.landmark-list article,
.landmark-mini-list article {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.beach-list article {
  background:
    linear-gradient(135deg, rgba(125, 167, 180, 0.14), transparent 42%),
    #fff;
}

.landmark-list img,
.landmark-mini-list img {
  width: 74px;
  height: 58px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #ded7ca;
}

.landmark-list div,
.landmark-mini-list div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.landmark-list strong,
.landmark-list small,
.landmark-mini-list strong,
.landmark-mini-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landmark-list small,
.landmark-mini-list small {
  color: var(--muted);
}

.news-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8fb;
}

.news-card > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 900;
  background: #3d4f76;
}

.news-card strong,
.news-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-card small {
  color: var(--muted);
}

.resource-list {
  display: grid;
  grid-template-columns: 42px minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 8px 10px;
  align-items: center;
}

.resource-list span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  background: #516a38;
}

.resource-list strong,
.resource-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-list small {
  color: var(--muted);
}

.resource-list.compact {
  grid-template-columns: 42px minmax(0, 0.9fr) minmax(0, 1.1fr);
  padding-bottom: 4px;
}

.monster-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.monster-summary article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff8f0;
}

.monster-summary strong {
  font-size: 1.2rem;
}

.monster-list,
.defense-list {
  display: grid;
  grid-template-columns: 42px minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px 10px;
  align-items: center;
}

.monster-list span,
.defense-list span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.monster-list span {
  background: #231c1b;
}

.defense-list span {
  background: #2f5f67;
}

.defense-list span:first-child {
  background: #7a3434;
}

.monster-list strong,
.monster-list small,
.defense-list strong,
.defense-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monster-list small,
.defense-list small {
  color: var(--muted);
}

.monster-list.compact {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding-bottom: 4px;
}

.compact-heading {
  margin-top: 8px;
}

.mini-map::before,
.mini-map::after {
  position: absolute;
  content: "";
  border-radius: 999px;
}

.mini-map::before {
  inset: 24px auto auto 38px;
  width: 70px;
  height: 70px;
  background: rgba(40, 104, 86, 0.2);
}

.mini-map::after {
  right: 34%;
  bottom: 30%;
  width: 20px;
  height: 20px;
  border: 5px solid #fff;
  background: var(--danger);
  box-shadow: 0 8px 18px rgba(23, 33, 29, 0.24);
}

.price-history {
  display: grid;
  gap: 12px;
}

.history-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.history-item:first-child {
  border-top: 0;
}

.history-date,
.history-event {
  color: var(--muted);
  font-size: 0.86rem;
}

.history-price {
  font-weight: 850;
}

.empty-state {
  padding: 48px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.sunthread-editor-shell {
  max-width: 2000px;
  margin: 0 auto;
}

.sunthread-editor-topbar {
  grid-template-columns: minmax(220px, 330px) minmax(240px, 1fr) auto;
}

.sunthread-editor-status {
  display: grid;
  gap: 2px;
  min-width: 0;
  justify-items: center;
}

.sunthread-editor-status strong,
.sunthread-editor-status small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sunthread-editor-status strong {
  color: var(--accent-strong);
  font-size: 1rem;
}

.sunthread-editor-status small {
  color: var(--muted);
  font-weight: 800;
}

.sunthread-editor-layout {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) minmax(320px, 380px);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.sunthread-stage-panel,
.sunthread-editor-panel section {
  min-width: 0;
  border: 1px solid rgba(23, 33, 29, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.sunthread-stage-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.sunthread-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.segmented-control,
.sunthread-camera-tools,
.sunthread-object-tools,
.sunthread-object-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented-control {
  padding: 4px;
  border: 1px solid rgba(23, 33, 29, 0.12);
  border-radius: var(--radius);
  background: #f0ece3;
}

.segmented-control button,
.sunthread-camera-tools button,
.sunthread-object-tools button,
.sunthread-object-actions button {
  min-height: 36px;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 900;
  background: #eee8dd;
}

.segmented-control button {
  padding: 0 12px;
}

.segmented-control button.is-active {
  color: #fffaf1;
  background: var(--accent-strong);
}

.sunthread-camera-tools button,
.sunthread-object-tools button,
.sunthread-object-actions button {
  padding: 0 10px;
}

.sunthread-stage-frame {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 29, 0.18);
  border-radius: var(--radius);
  background: #8cb4c7;
}

.sunthread-3d-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 720px;
  image-rendering: pixelated;
}

.sunthread-stage-hud {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}

.sunthread-stage-hud span {
  max-width: min(360px, calc(100vw - 48px));
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid rgba(255, 241, 203, 0.58);
  border-radius: var(--radius);
  color: #fffaf1;
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(23, 33, 29, 0.64);
}

.sunthread-editor-panel {
  display: grid;
  gap: 14px;
}

.sunthread-editor-panel section {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.sunthread-object-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sunthread-object-tools button {
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sunthread-object-list {
  width: 100%;
  min-height: 254px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
}

.sunthread-object-list option {
  padding: 7px 8px;
}

.sunthread-inspector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sunthread-inspector label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sunthread-inspector label:first-child,
.sunthread-inspector label:nth-child(3) {
  grid-column: 1 / -1;
}

.sunthread-inspector input,
.sunthread-inspector select,
.sunthread-map-json {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
}

.sunthread-inspector input,
.sunthread-inspector select {
  min-height: 38px;
  padding: 0 10px;
}

.sunthread-inspector input[type="color"] {
  padding: 4px;
}

.sunthread-object-actions .danger-action {
  color: #fffaf1;
  background: var(--danger);
}

.sunthread-map-json {
  min-height: 170px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  resize: vertical;
}

.portal-link-stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.portal-link-stack a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(103, 86, 52, 0.18);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 250, 241, 0.74);
  font-weight: 900;
  text-decoration: none;
}

.portal-link-stack a::after {
  content: ">";
  color: var(--accent);
}

.realm-page-shell {
  max-width: 1480px;
}

.realm-topbar {
  align-items: center;
}

.realm-page-layout {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.realm-hero,
.realm-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.9);
  box-shadow: var(--shadow);
}

.realm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 22px;
}

.realm-hero h1 {
  margin: 3px 0 8px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.95;
}

.realm-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.realm-hero-badge {
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 13px;
  border: 1px solid rgba(7, 114, 133, 0.24);
  border-radius: var(--radius);
  color: #f8fffb;
  background: linear-gradient(180deg, #0c6a72, #173d56);
}

.realm-hero-badge span,
.realm-hero-badge strong {
  display: block;
}

.realm-hero-badge span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.realm-hero-badge strong {
  font-size: 1.7rem;
}

.bestiary-hero .realm-hero-badge {
  border-color: rgba(139, 58, 45, 0.28);
  background: linear-gradient(180deg, #8b3a2d, #2f4237);
}

.realm-hero.with-media {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 380px) auto;
  align-items: stretch;
}

.realm-visual-row,
.realm-gallery-grid {
  display: grid;
  gap: 12px;
}

.realm-visual-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(210px, 0.7fr);
}

.realm-gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.picture-slot-stack {
  display: grid;
  gap: 12px;
}

.picture-slot {
  position: relative;
  display: grid;
  min-height: 170px;
  overflow: hidden;
  border: 1px solid rgba(103, 86, 52, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.98), rgba(220, 234, 229, 0.88) 54%, rgba(222, 188, 132, 0.58)),
    #fffaf1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.picture-slot-wide {
  min-height: 276px;
}

.hero-picture-slot {
  min-height: 100%;
}

.picture-slot img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picture-slot.is-empty img {
  visibility: hidden;
}

.picture-slot::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 0;
  border: 1px dashed rgba(103, 86, 52, 0.26);
  border-radius: 6px;
}

.picture-slot-fallback {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
  align-content: end;
  min-height: 100%;
  padding: 14px;
  color: #fffaf1;
  background: linear-gradient(180deg, rgba(23, 33, 29, 0.02), rgba(23, 33, 29, 0.72));
}

.picture-slot.is-empty .picture-slot-fallback {
  align-content: center;
  color: var(--ink);
  background: transparent;
}

.picture-slot-fallback span {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.picture-slot-fallback strong {
  display: block;
  min-width: 0;
  font-size: 1.05rem;
  line-height: 1.15;
}

.realm-stat-grid,
.channel-grid,
.response-grid,
.bestiary-grid,
.news-station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.realm-stat-grid article,
.channel-grid article,
.response-grid article,
.news-station-grid article,
.bestiary-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(103, 86, 52, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.realm-stat-grid strong {
  font-size: 1.45rem;
}

.realm-stat-grid small,
.channel-grid small,
.news-station-grid small,
.bestiary-card small {
  color: var(--muted);
}

.realm-section {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.daily-news-section {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  align-items: stretch;
}

.daily-news-section .panel-heading {
  grid-column: 1 / -1;
}

.daily-lead-story,
.daily-brief-grid article {
  min-width: 0;
  border: 1px solid rgba(103, 86, 52, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
}

.daily-lead-story {
  display: grid;
  gap: 10px;
  align-content: end;
  padding: 18px;
  color: #fffaf1;
  background:
    linear-gradient(180deg, rgba(12, 106, 114, 0.26), rgba(23, 61, 86, 0.92)),
    linear-gradient(135deg, #0c6a72, #173d56);
}

.daily-lead-story h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.6rem);
  line-height: 1;
}

.daily-lead-story p,
.daily-lead-story small {
  margin: 0;
  color: rgba(255, 250, 241, 0.82);
  line-height: 1.5;
}

.daily-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.daily-brief-grid article {
  display: grid;
  gap: 7px;
  padding: 13px;
}

.daily-brief-grid span {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.daily-brief-grid strong {
  line-height: 1.18;
}

.daily-brief-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.daily-brief-grid .daily-celestial-brief {
  border-color: rgba(109, 74, 142, 0.2);
  background: linear-gradient(180deg, rgba(244, 238, 255, 0.92), rgba(255, 255, 255, 0.82));
}

.bank-page-shell {
  max-width: 1500px;
}

.bank-hero .realm-hero-badge {
  background: linear-gradient(180deg, #1e6f7c, #173d56);
}

.bank-wallet-grid,
.bank-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.bank-wallet-card,
.bank-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(103, 86, 52, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.bank-wallet-card.is-primary {
  color: #fffaf1;
  background: linear-gradient(180deg, #0c6a72, #173d56);
}

.bank-wallet-card span,
.bank-card dt {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bank-wallet-card.is-primary span {
  color: #ffe08b;
}

.bank-wallet-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.45rem, 4vw, 2.5rem);
}

.bank-wallet-card small,
.bank-card small,
.bank-card dd {
  color: var(--muted);
}

.bank-wallet-card.is-primary small {
  color: rgba(255, 250, 241, 0.78);
}

.bank-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
}

.bank-card > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.bank-card strong {
  font-size: 1.02rem;
}

.bank-rank,
.bond-card .ticker {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 6px;
  color: #fffaf1;
  background: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 900;
}

.magic-bank-card .bank-rank {
  background: #6d4a8e;
}

.bond-card .ticker {
  background: #7b5730;
}

.bank-card dl {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin: 0;
}

.bank-card dl div {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
}

.bank-card dt,
.bank-card dd {
  margin: 0;
}

.regional-bank-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.regional-bank-list span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(103, 86, 52, 0.16);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 900;
}

.channel-grid span,
.response-grid span,
.station-code,
.bestiary-card-head span,
.event-card time,
.pressure-list > article > span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  color: #fffaf1;
  background: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.event-list,
.pressure-list {
  display: grid;
  gap: 9px;
}

.event-card,
.pressure-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(103, 86, 52, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.event-card {
  grid-template-columns: auto minmax(0, 1fr);
}

.event-card strong,
.pressure-list strong,
.bestiary-card strong {
  display: block;
  min-width: 0;
}

.event-card small,
.pressure-list small {
  color: var(--muted);
}

.pressure-list em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.bestiary-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.bestiary-card p,
.channel-grid p,
.response-grid p,
.news-station-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.threat-severe {
  border-color: rgba(139, 58, 45, 0.34);
}

.threat-high {
  border-color: rgba(179, 104, 35, 0.34);
}

.threat-moderate {
  border-color: rgba(39, 117, 93, 0.28);
}

.threat-severe time,
.threat-severe > span,
.threat-severe .bestiary-card-head span {
  background: #8b3a2d;
}

.threat-high time,
.threat-high > span,
.threat-high .bestiary-card-head span {
  background: #a76527;
}

.threat-moderate time,
.threat-moderate > span,
.threat-moderate .bestiary-card-head span {
  background: #2e745d;
}

@media (min-width: 1600px) {
  .app-shell {
    max-width: 2000px;
    margin: 0 auto;
    padding: 24px;
  }

  .listing-grid {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }
}

@media (min-width: 1800px) {
  .atlas-layout {
    grid-template-columns: minmax(420px, 1.2fr) minmax(300px, 0.8fr);
  }
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .detail-panel {
    position: static;
    grid-column: 1 / -1;
  }

  .market-page-layout {
    grid-template-columns: 1fr;
  }

  .realm-hero.with-media,
  .realm-visual-row {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.78fr);
  }

  .realm-hero.with-media .realm-hero-badge {
    grid-column: 1 / -1;
  }

  .lumenfield-page-layout {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  }

  .sunthread-editor-layout {
    grid-template-columns: 1fr;
  }

  .sunthread-editor-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .lumenfield-map-stage {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .lumenfield-listing-detail {
    position: static;
    grid-column: 1 / -1;
  }

  .market-watch-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .realm-hero,
  .realm-hero.with-media,
  .realm-visual-row,
  .realm-gallery-grid,
  .event-card,
  .daily-news-section,
  .pressure-list article {
    grid-template-columns: 1fr;
  }

  .daily-brief-grid {
    grid-template-columns: 1fr;
  }

  .picture-slot,
  .picture-slot-wide,
  .hero-picture-slot {
    min-height: 210px;
  }

  .realm-hero-badge {
    width: 100%;
  }

  .app-shell {
    width: 100vw;
    max-width: 100vw;
    padding: 10px;
    overflow-x: hidden;
  }

  .topbar {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    min-width: 0;
  }

  .market-page-topbar {
    display: flex;
  }

  .lumenfield-page-topbar {
    display: flex;
  }

  .sunthread-editor-topbar {
    display: flex;
  }

  .brand,
  .search,
  .top-actions,
  .music-player {
    width: 100%;
    max-width: 100%;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .top-actions > button {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .music-player {
    grid-template-columns: 42px minmax(0, 1fr) 42px 42px;
  }

  .music-volume {
    grid-column: 1 / -1;
  }

  .layout {
    grid-template-columns: 1fr;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .market-page-layout {
    grid-template-columns: 1fr;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .lumenfield-page-layout {
    grid-template-columns: 1fr;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .sunthread-editor-layout {
    grid-template-columns: 1fr;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .sunthread-editor-panel {
    grid-template-columns: 1fr;
  }

  .sunthread-stage-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control,
  .sunthread-camera-tools {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sunthread-stage-frame,
  .sunthread-3d-canvas {
    min-height: 560px;
  }

  .lumenfield-map-sidebar,
  .lumenfield-map-stage,
  .lumenfield-listing-detail {
    position: static;
  }

  .lumenfield-map-stage {
    grid-column: auto;
    grid-row: auto;
  }

  .lumenfield-stage-toolbar {
    display: grid;
    align-items: start;
  }

  .lumenfield-full-map-shell {
    aspect-ratio: auto;
    min-height: 520px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .lumenfield-full-map,
  .sunthread-town-map {
    width: max(100%, 740px);
    min-height: 0;
    height: 520px;
  }

  .venue-3d-view {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(420px, 1fr) auto;
  }

  .venue-3d-info {
    grid-template-columns: 1fr;
    border-top: 1px solid rgba(255, 253, 248, 0.14);
    border-left: 0;
  }

  .venue-3d-info dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-page-overview,
  .market-live-board,
  .market-watch-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .market-page-title,
  .instrument-price {
    display: grid;
    align-items: start;
  }

  .market-page-badge {
    justify-items: start;
  }

  .market-toolbar {
    grid-template-columns: 1fr;
  }

  .live-board-header {
    display: none;
  }

  .market-live-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .market-live-price,
  .market-live-move {
    grid-column: 2;
    justify-self: start;
  }

  .filters,
  .results,
  .detail-panel {
    position: static;
    width: 100%;
    max-width: 100%;
  }

  .results-toolbar,
  .detail-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .results-toolbar {
    display: grid;
  }

  .sort-control {
    min-width: 0;
  }

  .atlas-header {
    grid-template-columns: 1fr;
  }

  .market-header {
    display: grid;
    align-items: start;
  }

  .market-status {
    justify-items: start;
    min-width: 0;
  }

  .market-board-grid {
    grid-template-columns: 1fr;
  }

  .market-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .quote-price,
  .quote-change {
    text-align: left;
  }

  .atlas-pulse {
    justify-items: start;
    min-width: 0;
  }

  .atlas-layout {
    grid-template-columns: 1fr;
  }

  .map-card,
  #listoriyaMap {
    min-height: 320px;
  }

  .lumenfield-regional-map {
    min-height: 280px;
  }

  .lumenfield-region-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .institution-grid,
  .official-grid,
  .coordinate-grid {
    grid-template-columns: 1fr;
  }

  .food-logo-row,
  .food-chain-list,
  .resource-list,
  .resource-list.compact,
  .market-pulse-grid,
  .market-fact-grid,
  .lumenfield-stat-grid,
  .monster-summary,
  .monster-list,
  .monster-list.compact,
  .defense-list {
    grid-template-columns: 1fr;
  }

  .lumenfield-full-map-shell {
    aspect-ratio: auto;
    min-height: 430px;
  }

  .lumenfield-full-map,
  .sunthread-town-map {
    width: max(100%, 640px);
    min-height: 0;
    height: 430px;
  }

  .sunthread-stage-frame,
  .sunthread-3d-canvas {
    min-height: 460px;
  }

  .sunthread-object-tools,
  .sunthread-inspector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segmented-control,
  .sunthread-camera-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .venue-open-3d {
    right: 10px;
    bottom: 10px;
    min-height: 36px;
    padding: 0 11px;
  }

  .venue-3d-header {
    padding: 12px;
  }

  .venue-3d-view {
    grid-template-rows: minmax(360px, 1fr) auto;
  }

  .venue-3d-info {
    padding: 12px;
  }

  .venue-3d-info dl {
    grid-template-columns: 1fr;
  }

  .listing-gallery-main img {
    aspect-ratio: 3 / 3.35;
  }

  .listing-gallery-nav {
    width: 40px;
    height: 58px;
    font-size: 2rem;
  }

  .listing-gallery-controls {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
  }

  .listing-lightbox {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px;
    padding-top: 64px;
  }

  .listing-lightbox figure {
    grid-column: 1 / -1;
    grid-row: 1;
    max-height: calc(100vh - 148px);
  }

  .listing-lightbox img {
    max-height: calc(100vh - 220px);
  }

  .listing-lightbox figcaption {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .listing-lightbox-nav {
    grid-row: 2;
    height: 54px;
    border-radius: var(--radius);
    font-size: 2.4rem;
  }

  .listing-lightbox-nav.prev {
    grid-column: 1;
  }

  .listing-lightbox-nav.next {
    grid-column: 2;
  }

  .food-chain-list span,
  .resource-list span,
  .monster-list span,
  .defense-list span {
    width: auto;
  }

  .history-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
