:root {
  color-scheme: light;
  --bg: #6f5a3d;
  --panel: rgba(232, 221, 195, 0.95);
  --panel-strong: #eee2c4;
  --ink: #2f2114;
  --muted: #645442;
  --line: rgba(76, 56, 33, 0.22);
  --accent: #55613a;
  --accent-soft: rgba(85, 97, 58, 0.12);
  --danger: #8b4b33;
  --shadow: 0 26px 68px rgba(31, 20, 8, 0.22);
}

@font-face {
  font-family: "Champ1529";
  src: url("./fonts/1529Champ.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: #5d4a31;
  background:
    linear-gradient(180deg, rgba(255, 245, 222, 0.28), rgba(72, 58, 40, 0.08)),
    radial-gradient(circle at top left, rgba(208, 196, 148, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(92, 103, 64, 0.08), transparent 26%),
    url("./img/bg.png"),
    linear-gradient(135deg, #7b6141 0%, #55613a 50%, #4f3b27 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, no-repeat;
  background-position: center top, top left, bottom right, center top, center;
  background-size: auto, auto, auto, 760px 570px, cover;
}

button,
input {
  font: inherit;
}

select,
textarea {
  font: inherit;
}

.layout-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: start;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 1.2rem;
  background-color: #d7c6a0;
  background-image: url("./img/bg.png");
  background-repeat: repeat;
  background-position: top left;
  background-size: 874px 656px;
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
  box-shadow: inset -1px 0 0 rgba(239, 220, 185, 0.3);
}

.sidebar-top {
  display: grid;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent);
  font-family: "Champ1529", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.brand-name {
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.section-heading-display {
  margin: 0 0 0.45rem;
  font-family: "Champ1529", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

h1,
h2,
.lede,
.hint,
.coord-label,
.detail-eyebrow,
.detail-description {
  margin: 0;
}

h1 {
  font-family: "Champ1529", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 0.95;
  margin-bottom: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sidebar-title {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}

h2 {
  font-size: 1rem;
}

.lede,
.hint {
  color: var(--muted);
  line-height: 1.5;
}

.panel {
  background:
    linear-gradient(180deg, rgba(244, 235, 214, 0.84), rgba(226, 213, 184, 0.84)),
    url("./img/bg.png");
  background-repeat: no-repeat, repeat;
  background-position: center, center;
  background-size: cover, 760px 570px;
  border: 1px solid rgba(151, 120, 77, 0.26);
  border-radius: 18px;
  padding: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 231, 0.62),
    0 18px 36px rgba(31, 20, 8, 0.14);
}

.sidebar-panel {
  background:
    linear-gradient(180deg, rgba(233, 223, 193, 0.88), rgba(214, 197, 160, 0.86)),
    url("./img/bg.png");
  background-repeat: no-repeat, repeat;
  background-position: center, center;
  background-size: cover, 760px 570px;
  border-color: rgba(148, 117, 73, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 219, 0.64),
    0 18px 34px rgba(20, 14, 7, 0.14);
}

.site-info-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem 1rem 0.9rem;
  background:
    linear-gradient(180deg, rgba(233, 223, 193, 0.88), rgba(214, 197, 160, 0.86)),
    url("./img/bg.png");
  background-repeat: no-repeat, repeat;
  background-position: center, center;
  background-size: cover, 760px 570px;
  border: 1px solid rgba(148, 117, 73, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 219, 0.64),
    0 18px 34px rgba(20, 14, 7, 0.14);
}

.site-info-copy {
  display: grid;
  gap: 0.18rem;
}

.site-info-copy strong,
.site-info-copy p {
  margin: 0;
}

.site-info-copy strong {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  font-family: "Champ1529", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  letter-spacing: 0.03em;
}

.site-info-copy p {
  color: var(--muted);
  line-height: 1.35;
}

.site-info-copy p:first-of-type {
  color: var(--ink);
  font-weight: 600;
}

.site-info-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  align-items: stretch;
}

.section-kicker,
.stage-eyebrow {
  margin: 0 0 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent);
  font-family: "Champ1529", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span,
.coord-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

input[type="file"],
input[type="text"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  padding: 0.8rem 0.95rem;
  color: var(--ink);
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  padding: 0.8rem 0.95rem;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 6rem;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

a {
  color: inherit;
}

button:hover:enabled {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button-secondary,
.modal-close {
  background: rgba(31, 42, 42, 0.12);
  color: var(--ink);
}

#delete-marker {
  background: var(--danger);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.coords-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.coords-grid div {
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: var(--accent-soft);
}

.coords-grid strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.2rem;
}

.marker-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.campaign-panel {
  margin-top: auto;
}

.sidebar-tabs-panel {
  display: grid;
  gap: 1rem;
}

.sidebar-tab {
  background: rgba(110, 90, 57, 0.08);
  color: var(--ink);
  border: 1px solid rgba(110, 90, 57, 0.12);
  padding: 0.65rem 0.95rem;
}

.sidebar-tab.is-active {
  background: rgba(95, 112, 60, 0.95);
  color: #fff9ef;
  border-color: rgba(95, 112, 60, 0.95);
}

.sidebar-tab-panel {
  display: block;
}

.campaign-copy {
  margin-bottom: 1rem;
}

.campaign-stats,
.faction-state-list {
  display: grid;
  gap: 0.75rem;
}

.campaign-stats div,
.faction-state-card {
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: rgba(255, 248, 233, 0.34);
  border: 1px solid rgba(146, 117, 74, 0.18);
}

.campaign-stats strong,
.faction-state-card strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.15rem;
}

.faction-name {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--ink);
}

.faction-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.faction-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid rgba(123, 95, 59, 0.28);
  box-shadow: 0 4px 10px rgba(40, 28, 13, 0.12);
  background: rgba(255, 248, 233, 0.72);
}

.faction-block + .faction-block {
  margin-top: 0.85rem;
}

.faction-block-label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6e5a3c;
}

.faction-entry-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.faction-entry-list li + li {
  margin-top: 0.35rem;
}

.faction-entry-list strong {
  display: inline;
  margin: 0;
  font-size: 0.96rem;
}

.faction-empty-list {
  margin: 0;
  color: var(--muted);
  font-style: italic;
}

.campaign-stats p,
.faction-state-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.news-preview-card {
  margin-bottom: 0.85rem;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: rgba(111, 123, 67, 0.11);
}

.news-preview-card strong {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.5;
}

.news-list {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.news-list li + li {
  margin-top: 0.55rem;
}

.campaign-config {
  display: grid;
  gap: 0.85rem;
}

.config-card {
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: rgba(255, 248, 233, 0.28);
  border: 1px solid rgba(146, 117, 74, 0.18);
}

.config-card strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.05rem;
}

.config-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-actions-card {
  display: grid;
  gap: 0.85rem;
}

.admin-action-list {
  display: grid;
  gap: 0.65rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-radius: 14px;
  padding: 0.82rem 0.95rem;
  background:
    linear-gradient(180deg, rgba(253, 249, 239, 0.92), rgba(234, 221, 194, 0.9));
  border: 1px solid rgba(145, 116, 72, 0.2);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 16px rgba(58, 40, 18, 0.1);
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.button-link::after {
  content: ">";
  font-size: 0.85rem;
  color: rgba(87, 67, 39, 0.6);
}

.button-link:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 101, 61, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 12px 22px rgba(58, 40, 18, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.98), rgba(238, 227, 202, 0.96));
}

.button-link:active {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 6px 12px rgba(82, 67, 37, 0.08);
}

.community-link {
  width: auto;
  justify-content: flex-start;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(253, 249, 239, 0.96), rgba(233, 219, 190, 0.92));
  border: 1px solid rgba(145, 116, 72, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 8px 18px rgba(58, 40, 18, 0.08);
}

.community-link::after {
  content: none;
}

.community-link.is-discord::after {
  content: none !important;
}

.community-link.is-forums {
  display: grid;
  gap: 0.15rem;
  color: #4e3a23;
}

.community-link.is-discord {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 56px;
  background:
    linear-gradient(180deg, rgba(92, 84, 145, 0.96), rgba(68, 61, 118, 0.94));
  border: 1px solid rgba(50, 45, 88, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 14px rgba(39, 30, 66, 0.2);
}

.community-link-icon {
  width: 30px;
  height: 30px;
  display: block;
  flex: 0 0 auto;
  opacity: 1;
  filter: brightness(0) invert(1);
}

.community-link-copy {
  display: grid;
  gap: 0.15rem;
}

.community-link-title {
  display: block;
  font-family: "Champ1529", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 0.94rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.community-link-subtitle {
  display: block;
  font-size: 0.74rem;
  line-height: 1.25;
  color: var(--muted);
}

.community-link.is-discord .community-link-title {
  color: #ffffff;
}

.community-link.is-discord .community-link-subtitle {
  color: rgba(255, 255, 255, 0.78);
}

.detail-description:empty {
  display: none;
}

.faction-list {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.faction-list li + li {
  margin-top: 0.65rem;
}

.faction-list strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.faction-list span {
  display: block;
  line-height: 1.45;
}

.viewer-grid {
  padding: 1rem 1rem 1rem 0;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 0.55rem;
}

.map-stage {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.65rem;
  padding: 0.9rem;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(53, 42, 28, 0.18), rgba(53, 42, 28, 0.08)),
    radial-gradient(circle at top left, rgba(255, 243, 209, 0.32), transparent 28%),
    linear-gradient(180deg, rgba(118, 103, 65, 0.1), transparent 22%),
    url("./img/bg.png"),
    rgba(225, 211, 182, 0.82);
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, no-repeat;
  background-position: center, top left, top center, center, center;
  background-size: auto, auto, auto, 874px 656px, cover;
  box-shadow: var(--shadow);
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.stage-head-main {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.stage-controls {
  display: grid;
  justify-items: end;
  gap: 0.75rem;
}

.stage-tab-list {
  justify-content: flex-start;
}

.news-strip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  background: rgba(71, 64, 44, 0.9);
  color: white;
  overflow: hidden;
}

.news-emblem {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 248, 232, 0.16);
  padding: 0.2rem;
}

.news-label {
  flex: 0 0 auto;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
  font-family: "Champ1529", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.news-ticker {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
}

.stage-head h2 {
  font-size: 1.4rem;
}

.map-title {
  font-family: "Champ1529", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}

.status-banner {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(84, 76, 54, 0.88);
  color: white;
  box-shadow: var(--shadow);
  max-width: min(420px, 100%);
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  user-select: none;
}

.mode-switch-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

.mode-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-switch-track {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: rgba(88, 73, 45, 0.2);
  border: 1px solid rgba(88, 73, 45, 0.14);
  transition: background 140ms ease;
}

.mode-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff8e8;
  box-shadow: 0 4px 12px rgba(45, 36, 24, 0.18);
  transition: transform 140ms ease;
}

.mode-switch input:checked + .mode-switch-track {
  background: rgba(111, 123, 67, 0.55);
}

.mode-switch input:checked + .mode-switch-track .mode-switch-thumb {
  transform: translateX(22px);
}

.stage-head .sidebar-tab {
  background: rgba(88, 73, 45, 0.08);
}

#map {
  width: 100%;
  height: min(68vh, 680px);
  min-height: 500px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at center, rgba(255, 245, 214, 0.16), transparent 50%),
    #9ea07b;
}

.detail-bar {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.15rem;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(233, 223, 193, 0.88), rgba(214, 197, 160, 0.86)),
    url("./img/bg.png");
  background-repeat: no-repeat, repeat;
  background-position: center, center;
  background-size: cover, 760px 570px;
  border: 1px solid rgba(148, 117, 73, 0.32);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 219, 0.64),
    0 18px 34px rgba(20, 14, 7, 0.14);
}

.detail-eyebrow {
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
  font-family: "Champ1529", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.detail-copy h2 {
  margin-bottom: 0.35rem;
  font-size: 1.3rem;
  color: var(--ink);
}

.detail-description {
  color: var(--muted);
  line-height: 1.5;
  max-width: 70ch;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.detail-card {
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 248, 233, 0.52);
  border: 1px solid rgba(146, 117, 74, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 250, 241, 0.62);
}

.detail-card strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.15rem;
  color: #4a3822;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 18, 0.58);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: calc(100vh - 3rem);
  overflow: auto;
  padding: 1.25rem;
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.98);
  box-shadow: var(--shadow);
}

.modal-header {
  margin-bottom: 1rem;
}

.marker-form {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.icon-preview-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(31, 42, 42, 0.06);
  border: 1px solid rgba(31, 42, 42, 0.08);
}

.icon-preview-image {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.45rem;
  border: 1px solid rgba(31, 42, 42, 0.1);
}

.icon-preview-copy {
  display: grid;
  gap: 0.35rem;
}

.icon-preview-copy strong {
  font-size: 1rem;
}

.icon-preview-copy p {
  margin: 0;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-buttons {
  display: flex;
  gap: 0.75rem;
}

.context-menu {
  position: fixed;
  z-index: 1300;
  display: grid;
  gap: 0.45rem;
  min-width: 180px;
  padding: 0.55rem;
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.98);
  box-shadow: var(--shadow);
  border: 1px solid rgba(31, 42, 42, 0.08);
}

.context-menu button {
  width: 100%;
  text-align: left;
  background: rgba(31, 42, 42, 0.08);
  color: var(--ink);
}

.custom-div-icon {
  background: transparent;
  border: 0;
}

.marker-pin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid white;
  box-shadow: 0 8px 18px rgba(14, 124, 102, 0.3);
}

.marker-pin.is-selected {
  transform: scale(1.25);
  background: #f28f3b;
}

.map-image-icon {
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(14, 124, 102, 0.22));
}

.map-image-icon.is-selected {
  filter:
    drop-shadow(0 0 0 1px rgba(242, 143, 59, 0.95))
    drop-shadow(0 6px 12px rgba(242, 143, 59, 0.28));
}

.fallback-marker-icon {
  display: grid;
  place-items: center;
}

.viewer-marker-fallback {
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: var(--accent);
}

.viewer-marker-fallback.is-selected {
  background: #f28f3b;
}

@media (max-width: 900px) {
  .layout-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: auto;
  }

  .viewer-grid {
    padding: 0;
  }

  .map-stage {
    border-radius: 0;
  }

  #map {
    height: min(62vh, 560px);
    min-height: 50vh;
    max-height: none;
    border-radius: 24px 24px 0 0;
  }

  .stage-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-bar {
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .detail-meta,
  .detail-meta-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .icon-preview-card {
    grid-template-columns: 1fr;
  }

  .icon-preview-image {
    width: 72px;
    height: 72px;
  }

  .modal-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
