:root {
  --bg: #f7f1e8;
  --land: #bdd6d2;
  --road: rgba(251, 247, 240, 0.98);
  --river: rgba(173, 205, 213, 0.74);
  --panel: rgba(251, 247, 240, 0.8);
  --line: rgba(77, 93, 93, 0.12);
  --text: #243746;
  --muted: #718082;
  --accent: #cc9441;
  --accent-soft: rgba(204, 148, 65, 0.16);
  --green: #9b7440;
  --green-soft: rgba(155, 116, 64, 0.12);
  --locked: #a5aea0;
  --bronze: #9d6844;
  --silver: #8e9aa3;
  --gold: #b98a1f;
  --platinum: #5f8f92;
  --obsidian: #2f3138;
  --shadow: 0 18px 38px rgba(89, 79, 66, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Hiragino Sans GB", "PingFang SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(173, 205, 213, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(204, 148, 65, 0.08), transparent 22%),
    linear-gradient(180deg, #faf5ee 0%, #f1e8dc 100%);
}

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

.hidden {
  display: none !important;
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  overflow: hidden;
  transition: grid-template-columns 0.22s ease;
  position: relative;
}

.app-shell.rail-collapsed {
  grid-template-columns: minmax(0, 1fr) 0;
}

.map-view {
  position: relative;
  padding: 18px;
  min-width: 0;
  isolation: isolate;
}

.brand-bar {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  z-index: 1200;
  display: flex;
  justify-content: space-between;
  align-items: start;
  pointer-events: none;
}

.top-actions {
  display: flex;
  align-items: start;
  gap: 12px;
}

.upload-button,
.upload-confirm {
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: #284667;
  color: #fbfaf7;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(40, 70, 103, 0.16);
}

.brand-bar > * {
  pointer-events: auto;
}

.brand-kicker,
.small-label,
.region-label,
.meta-text {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-size: 34px;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.region-card,
.rail-card {
  background: var(--panel);
  border: 1px solid rgba(80, 92, 94, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.map-canvas {
  height: calc(100vh - 36px);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  background:
    radial-gradient(circle at 12% 14%, rgba(188, 214, 210, 0.38), transparent 24%),
    radial-gradient(circle at 78% 12%, rgba(204, 148, 65, 0.06), transparent 18%),
    linear-gradient(180deg, #f6efe6 0%, #eee4d7 100%);
}

.map-canvas::before,
.map-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 350;
  pointer-events: none;
}

.map-canvas::before {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.28), transparent 24%),
    radial-gradient(circle at 82% 74%, rgba(183, 211, 216, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(250, 246, 239, 0.28), rgba(244, 237, 228, 0.2));
}

.map-canvas::after {
  opacity: 0.28;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(92, 92, 92, 0.03) 0,
      rgba(92, 92, 92, 0.03) 1px,
      transparent 1px,
      transparent 6px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(92, 92, 92, 0.02) 0,
      rgba(92, 92, 92, 0.02) 1px,
      transparent 1px,
      transparent 7px
    );
}

.map-topline {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 1100;
  display: flex;
  gap: 10px;
  pointer-events: none;
}

.rail-toggle {
  position: absolute;
  top: 132px;
  right: 342px;
  transform: none;
  z-index: 1260;
  width: 34px;
  height: 76px;
  border-radius: 18px 0 0 18px;
  border: 1px solid rgba(80, 92, 94, 0.08);
  border-right: 0;
  background: rgba(251, 247, 240, 0.94);
  box-shadow: 0 16px 28px rgba(89, 79, 66, 0.12);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: right 0.22s ease, border-radius 0.22s ease, background 0.18s ease;
}

.rail-toggle:hover {
  background: rgba(251, 247, 240, 0.98);
}

.rail-toggle-glyph {
  color: #284667;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.region-card {
  border-radius: 16px;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  min-width: 132px;
  background: rgba(251, 248, 242, 0.66);
}

.marker-label {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(251, 247, 240, 0.84);
  border: 1px solid rgba(80, 92, 94, 0.08);
  font-size: 10px;
  letter-spacing: 0.04em;
  max-width: 138px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 0 auto;
}

.marker-label.hidden {
  display: none !important;
}

.portal-marker {
  width: 180px !important;
  height: 132px !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: auto;
  overflow: visible !important;
}

.leaflet-pane,
.leaflet-top,
.leaflet-bottom {
  z-index: 400;
}

.leaflet-control-container {
  z-index: 500;
}

.portal-marker-shell {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 180px;
  min-width: 180px;
  padding-top: 6px;
  overflow: visible;
}

.portal-marker-dot {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  transform: none;
  border: 3px solid #284667;
  background-color: rgba(247, 240, 231, 0.98);
  background-size: cover;
  background-position: center;
  display: block;
  box-shadow:
    0 14px 24px rgba(60, 67, 79, 0.18),
    0 0 0 8px rgba(247, 240, 231, 0.78);
  flex: 0 0 auto;
}

.portal-marker.zoom-9 .portal-marker-dot,
.portal-marker.zoom-10 .portal-marker-dot {
  width: 40px;
  height: 40px;
  border-width: 2px;
  box-shadow:
    0 10px 18px rgba(60, 67, 79, 0.14),
    0 0 0 5px rgba(247, 240, 231, 0.72);
}

.portal-marker.zoom-11 .portal-marker-dot {
  width: 52px;
  height: 52px;
  border-width: 2px;
  box-shadow:
    0 12px 20px rgba(60, 67, 79, 0.16),
    0 0 0 6px rgba(247, 240, 231, 0.74);
}

.portal-marker.hot .portal-marker-dot {
  width: 74px;
  height: 74px;
  border-color: var(--accent);
  box-shadow:
    0 16px 28px rgba(147, 103, 34, 0.22),
    0 0 0 10px rgba(247, 240, 231, 0.84);
}

.portal-marker.hot.zoom-9 .portal-marker-dot,
.portal-marker.hot.zoom-10 .portal-marker-dot {
  width: 48px;
  height: 48px;
  box-shadow:
    0 12px 20px rgba(147, 103, 34, 0.18),
    0 0 0 6px rgba(247, 240, 231, 0.8);
}

.portal-marker.hot.zoom-11 .portal-marker-dot {
  width: 60px;
  height: 60px;
  box-shadow:
    0 14px 22px rgba(147, 103, 34, 0.2),
    0 0 0 7px rgba(247, 240, 231, 0.82);
}

.portal-marker.mine .portal-marker-dot {
  border-color: #3d6289;
}

.portal-marker-pulse {
  position: absolute;
  top: -6px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1px solid rgba(211, 154, 59, 0.34);
  animation: pulse 2.8s infinite;
  pointer-events: none;
}

.leaflet-marker-pane {
  z-index: 450 !important;
}

.leaflet-marker-icon.portal-marker {
  overflow: visible !important;
}

.side-rail {
  border-left: 1px solid rgba(49, 61, 38, 0.08);
  padding: 18px 18px 18px 0;
  display: grid;
  gap: 12px;
  align-content: start;
  height: 100vh;
  overflow: hidden;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  transition: opacity 0.18s ease, transform 0.22s ease, padding 0.22s ease;
}

.app-shell.rail-collapsed .side-rail {
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
  padding-right: 0;
  overflow: hidden;
}

.app-shell.rail-collapsed .rail-toggle {
  right: 18px;
  border-right: 1px solid rgba(80, 92, 94, 0.08);
  border-radius: 18px;
}

.rail-card {
  border-radius: 22px;
  padding: 14px;
  min-height: 0;
  overflow: hidden;
  background: rgba(246, 239, 230, 0.9);
  box-shadow: 0 16px 28px rgba(83, 72, 58, 0.08);
}

.profile-head,
.card-heading,
.rank-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.profile-head {
  justify-content: start;
}

.profile-card {
  cursor: pointer;
}

.profile-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.profile-actions .author-link {
  flex: 1 1 0;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, #284667, #3d6289);
  color: white;
}

.profile-lines {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.badge-grid,
.rank-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.badge-item {
  border-radius: 18px;
  border: 1px solid rgba(80, 92, 94, 0.08);
  padding: 8px 6px;
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
  background: rgba(247, 240, 231, 0.72);
  position: relative;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
  min-height: 74px;
}

.badge-item.unlocked {
  background: linear-gradient(135deg, rgba(211, 154, 59, 0.12), rgba(169, 198, 200, 0.12));
}

.badge-item:hover,
.badge-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(86, 114, 65, 0.35);
  outline: none;
}

.badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: linear-gradient(180deg, rgba(249, 243, 234, 0.9), rgba(242, 232, 219, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.badge-icon svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-item.unlocked .badge-icon {
  color: var(--green);
}

.badge-item.locked .badge-icon {
  color: var(--locked);
  border: 1px solid var(--line);
}

.badge-item.tier-bronze .badge-icon {
  color: var(--bronze);
}

.badge-item.tier-silver .badge-icon {
  color: var(--silver);
}

.badge-item.tier-gold .badge-icon {
  color: var(--gold);
}

.badge-item.tier-platinum .badge-icon {
  color: var(--platinum);
}

.badge-item.tier-obsidian .badge-icon {
  color: var(--obsidian);
}

.badge-state {
  font-size: 11px;
  color: var(--muted);
  display: none;
}

.badge-item.unlocked .badge-state {
  color: var(--green);
}

.badge-item.locked {
  opacity: 0.64;
}

.lock-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  background: rgba(165, 174, 160, 0.18);
  color: var(--locked);
}

.badge-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  min-width: 140px;
  max-width: 170px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(33, 48, 34, 0.94);
  color: #f4f7ef;
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 12px 24px rgba(18, 25, 17, 0.18);
}

.badge-item:hover .badge-popover,
.badge-item:focus-visible .badge-popover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.rank-item {
  border-radius: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: rgba(247, 240, 231, 0.74);
  align-items: start;
}

.rank-main {
  display: grid;
  gap: 4px;
}

.rank-score {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

.badge-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tabs-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-button {
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: rgba(247, 240, 231, 0.72);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.18s ease;
}

.tab-button.active {
  background: #284667;
  color: #fbfaf7;
  border-color: transparent;
}

.rank-list {
  align-content: start;
  overflow: auto;
}

.floating-panel {
  position: fixed;
  top: 24px;
  bottom: 24px;
  width: 360px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(247, 240, 231, 0.96);
  border: 1px solid rgba(80, 92, 94, 0.08);
  box-shadow: 0 20px 38px rgba(83, 72, 58, 0.12);
  z-index: 1200;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
  backdrop-filter: blur(16px);
}

.floating-panel.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 55, 70, 0.18);
  backdrop-filter: blur(8px);
  z-index: 1400;
  display: grid;
  place-items: center;
}

.modal-backdrop.hidden {
  display: none;
}

.upload-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 18px;
  border-radius: 28px;
  background: rgba(251, 247, 240, 0.9);
  border: 1px solid rgba(80, 92, 94, 0.08);
  box-shadow: 0 28px 54px rgba(83, 72, 58, 0.18);
  display: grid;
  gap: 14px;
  backdrop-filter: blur(18px);
}

.login-modal {
  width: min(420px, calc(100vw - 32px));
}

.upload-dropzone {
  border: 1px dashed rgba(80, 92, 94, 0.18);
  border-radius: 20px;
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  background: rgba(252, 248, 242, 0.8);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.upload-dropzone.dragover {
  border-color: rgba(40, 70, 103, 0.38);
  background: rgba(244, 249, 250, 0.92);
  transform: translateY(-1px);
}

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

.location-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.coord-input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid rgba(80, 92, 94, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 252, 248, 0.8);
  color: var(--text);
}

.location-search-input {
  min-width: 0;
  margin-top: 0;
}

.search-button {
  width: auto;
  white-space: nowrap;
}

.mini-map {
  height: 240px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: linear-gradient(180deg, #f2e7d9 0%, #e8dccb 100%);
}

.upload-confirm {
  width: 100%;
  justify-self: stretch;
}

.upload-preview-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: rgba(249, 243, 234, 0.8);
}

.upload-preview-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: rgba(232, 224, 214, 0.9);
}

.upload-preview-meta {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.upload-preview-meta strong,
.upload-preview-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-preview-meta span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}


#portalPanel {
  right: 392px;
}

#agentPanel {
  right: 24px;
}

#myWorksPanel {
  right: 24px;
}

.floating-header,
.section-line,
.agent-summary,
.owned-portal-item,
.photo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.close-button,
.fold-button,
.author-link {
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: rgba(249, 243, 234, 0.82);
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
}

.close-button {
  width: 34px;
  height: 34px;
  font-size: 20px;
}

.fold-button {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
}

.floating-description,
.photo-note,
.owned-portal-item span,
.agent-meta span {
  color: var(--muted);
}

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

.editor-field {
  display: grid;
  gap: 6px;
}

.editor-modal-header {
  align-items: flex-start;
}

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

.editor-title-wrap .small-label {
  margin: 0;
}

.editor-title-wrap h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.editor-field-label {
  padding-left: 2px;
}

.editor-section-line {
  justify-content: flex-start;
  align-items: flex-start;
}

.editor-section-copy {
  display: grid;
  gap: 4px;
}

.editor-section-copy h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.editor-section-copy .meta-text {
  padding-left: 2px;
}

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

.stat-chip {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: rgba(246, 239, 230, 0.82);
  display: grid;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.photo-list {
  display: grid;
  gap: 10px;
}

.photo-list.collapsed {
  display: none;
}

.photo-card {
  border: 1px solid rgba(80, 92, 94, 0.08);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(246, 239, 230, 0.84);
}

.photo-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.photo-body {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.photo-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-link {
  padding: 6px 10px;
  font-size: 12px;
}

.subtle-link {
  border-color: rgba(80, 92, 94, 0.06);
  background: rgba(255, 252, 248, 0.72);
  color: rgba(44, 54, 56, 0.82);
}

.danger-link {
  color: #9c5a52;
  border-color: rgba(156, 90, 82, 0.12);
  background: rgba(255, 248, 246, 0.82);
}

.photo-rank {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.month-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.month-chip {
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: rgba(255, 252, 248, 0.72);
  color: rgba(44, 54, 56, 0.76);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: 0.18s ease;
}

.month-chip.active {
  background: #284667;
  color: #fbfaf7;
  border-color: transparent;
  box-shadow: 0 8px 16px rgba(40, 70, 103, 0.16);
}

.agent-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #284667, #3d6289);
  color: white;
  font-weight: 700;
  font-size: 22px;
}

.agent-meta {
  display: grid;
  gap: 6px;
}

.mini-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(80, 92, 94, 0.08);
  display: grid;
  place-items: center;
  background: rgba(249, 243, 234, 0.84);
}

.mini-badge svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.owned-portal-list {
  display: grid;
  gap: 8px;
}

.owned-portal-item {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: rgba(249, 243, 234, 0.8);
}

.editor-photo-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.editor-photo-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  background: rgba(232, 224, 214, 0.72);
}

.owned-portal-main {
  display: grid;
  gap: 4px;
}

.editor-photo-item .owned-portal-main {
  padding-top: 2px;
}

.editor-photo-item .owned-portal-main strong {
  font-size: 15px;
  line-height: 1.2;
}

.editor-photo-item .owned-portal-main span {
  line-height: 1.45;
}

.editor-photo-item .photo-head {
  justify-content: flex-start;
  gap: 8px;
  margin-top: 4px;
}

.editor-photo-actions .author-link {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.editor-footer-actions {
  margin-top: 4px;
  align-items: center;
}

.editor-footer-actions .upload-confirm {
  width: auto;
  min-width: 128px;
  justify-self: auto;
}

.portal-rank-badge {
  min-width: 38px;
  text-align: center;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(211, 154, 59, 0.2);
  color: #9f6d21;
  font-weight: 700;
  font-size: 12px;
}

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

.showcase-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(80, 92, 94, 0.08);
  background: rgba(249, 243, 234, 0.8);
}

.showcase-card img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  display: block;
}

.photo-card img {
  cursor: zoom-in;
}

.lightbox-image {
  width: 100%;
  max-height: min(70vh, 720px);
  object-fit: contain;
  border-radius: 18px;
  background: rgba(232, 224, 214, 0.72);
  display: block;
}

.showcase-card div {
  padding: 8px 10px 10px;
  display: grid;
  gap: 4px;
}

.showcase-card span {
  font-size: 11px;
  color: var(--muted);
}

.leaflet-control-zoom {
  margin-top: 98px !important;
  margin-left: 22px !important;
}

.leaflet-control-zoom a {
  width: 34px !important;
  height: 34px !important;
  line-height: 32px !important;
  border: 1px solid rgba(80, 92, 94, 0.08) !important;
  background: rgba(251, 247, 240, 0.78) !important;
  color: var(--text) !important;
  box-shadow: 0 10px 22px rgba(89, 79, 66, 0.08);
  backdrop-filter: blur(10px);
}

.leaflet-control-zoom a:hover {
  background: rgba(255, 251, 245, 0.96) !important;
}

.leaflet-control-attribution {
  display: none;
}

.leaflet-tile-pane {
  opacity: 0.84;
  filter: saturate(0.12) brightness(1.14) contrast(0.78) sepia(0.16) hue-rotate(-22deg);
}

.leaflet-container {
  background: linear-gradient(180deg, #f7efe4 0%, #eee4d7 100%);
}


@keyframes pulse {
  0% {
    transform: scale(0.86);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.42);
    opacity: 0;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: auto;
  }

  .side-rail {
    padding: 0 18px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    overflow: visible;
  }

  #portalPanel,
  #agentPanel {
    right: 18px;
    width: min(380px, calc(100vw - 36px));
  }

  #agentPanel {
    top: auto;
    bottom: 18px;
    max-height: 48vh;
  }
}

@media (max-width: 720px) {
  .brand-bar {
    position: static;
    margin-bottom: 12px;
  }

  .map-view {
    padding: 14px;
  }

  .map-canvas {
    min-height: 70vh;
  }

  .side-rail {
    grid-template-columns: 1fr;
    padding: 0 14px 14px;
  }
}
