/* Office of Living Things Inspired Stylesheet */

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #0000FF;
  --text-black: #000000;
  --bg-white: #FFFFFF;
  --text-gray: #333333;
  --light-gray: #F5F5F5;
  /* Legacy variables for compatibility */
  --ink-deep: #000000;
  --ink-soft: #000000;
  --ink-muted: #333333;
  --ink-light: #333333;
  --porcelain: #FFFFFF;
  --veil: #F5F5F5;
  --accent: #0000FF;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: rgba(0, 0, 0, 0.04);
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: var(--bg-white);
  color: var(--text-black);
  line-height: 1.5;
  font-size: 16px;
  letter-spacing: -0.01em;
}

/* Welcome Popup */
.welcome-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-white);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 1.5s;
  will-change: transform;
}

.welcome-popup.hidden {
  transform: translateY(-100%);
  pointer-events: none;
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 1.5s;
  visibility: hidden;
}

.welcome-content {
  max-width: 520px;
  padding: 0 40px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
}

.welcome-title {
  font-size: 3.5rem;
  font-weight: 400;
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--text-black);
  color: var(--text-black);
  letter-spacing: -0.02em;
  line-height: 1.2;
  width: 100%;
}

.welcome-description {
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--text-gray);
  margin: 0;
}

.welcome-definition {
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--text-gray);
  margin: 0;
}

.welcome-definition strong {
  color: var(--text-black);
  font-weight: 400;
}

.enter-viz-btn {
  padding: 12px 24px;
  border: 1px solid var(--primary-blue);
  background: var(--primary-blue);
  color: var(--bg-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
  margin-top: 0;
}

.enter-viz-btn:hover {
  opacity: 0.6;
}

/* Guided Tour Styles */
.tour-toggle-container {
  margin-top: 8px;
}

.tour-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-gray);
  cursor: pointer;
  user-select: none;
}

.tour-toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.05);
  z-index: 12000;
  pointer-events: none;
}

.tour-overlay.hidden {
  display: none;
}

.tour-tooltip {
  position: fixed;
  background: #fefefe;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    );
  border: 2px solid var(--text-black);
  border-radius: 0;
  padding: 0;
  max-width: 350px;
  z-index: 12001;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.1),
    inset 0 0 100px rgba(0, 0, 0, 0.01);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text-black);
  cursor: move;
  transform: rotate(-0.5deg);
  transition: transform 0.2s ease;
}

.tour-tooltip:hover {
  transform: rotate(0deg) scale(1.01);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.1),
    inset 0 0 100px rgba(0, 0, 0, 0.01);
}

.tour-tooltip.hidden {
  display: none;
}

.tour-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 2px dashed var(--text-black);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 250, 0.95) 100%);
  cursor: move;
  user-select: none;
  position: relative;
}

.tour-tooltip-header::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 8px,
    var(--text-black) 8px,
    var(--text-black) 10px
  );
}

.tour-step-number {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-black);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-step-number::before {
  content: '✉️';
  font-size: 16px;
  display: inline-block;
}

.tour-tooltip-stamp {
  width: 60px;
  height: 60px;
  border: 2px solid var(--text-black);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  /* Create perforated stamp edge effect using clip-path */
  clip-path: polygon(
    0% 6%, 6% 0%, 12% 0%, 18% 0%, 24% 0%, 30% 0%, 36% 0%, 42% 0%, 48% 0%, 54% 0%, 60% 0%, 66% 0%, 72% 0%, 78% 0%, 84% 0%, 90% 0%, 94% 0%, 100% 6%,
    100% 12%, 100% 18%, 100% 24%, 100% 30%, 100% 36%, 100% 42%, 100% 48%, 100% 54%, 100% 60%, 100% 66%, 100% 72%, 100% 78%, 100% 84%, 100% 90%, 100% 94%, 94% 100%,
    90% 100%, 84% 100%, 78% 100%, 72% 100%, 66% 100%, 60% 100%, 54% 100%, 48% 100%, 42% 100%, 36% 100%, 30% 100%, 24% 100%, 18% 100%, 12% 100%, 6% 100%, 0% 94%,
    0% 90%, 0% 84%, 0% 78%, 0% 72%, 0% 66%, 0% 60%, 0% 54%, 0% 48%, 0% 42%, 0% 36%, 0% 30%, 0% 24%, 0% 18%, 0% 12%
  );
}

.tour-tooltip-stamp::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  height: 85%;
  background-image: url('PostcardStamp.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.95;
  z-index: 1;
}

.tour-tooltip-stamp::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

.tour-close-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--text-black);
  font-size: 20px;
  color: var(--text-black);
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
  border-radius: 50%;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.tour-close-btn:hover {
  background: var(--text-black);
  color: var(--bg-white);
  transform: scale(1.1);
}

.tour-tooltip-content {
  padding: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-black);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 250, 0.95) 100%);
}

.tour-tooltip-content p {
  margin: 0 0 8px 0;
}

.tour-tooltip-content p:last-child {
  margin-bottom: 0;
}

.tour-tooltip-content strong {
  color: var(--text-black);
  font-weight: 600;
}

.tour-tooltip-content p {
  margin: 0 0 12px 0;
}

.tour-tooltip-content p:last-child {
  margin-bottom: 0;
}

.tour-tooltip-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 2px dashed var(--text-black);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 250, 0.95) 100%);
  position: relative;
}

.tour-tooltip-footer::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 8px,
    var(--text-black) 8px,
    var(--text-black) 10px
  );
}

.tour-nav-btn {
  padding: 8px 16px;
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  color: var(--text-black);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.tour-nav-btn:hover:not(:disabled) {
  background: var(--text-black);
  color: var(--bg-white);
}

.tour-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.tour-highlight {
  position: relative;
  z-index: 10000 !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 255, 0.4), 0 0 12px rgba(0, 0, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  transition: box-shadow 0.3s ease, background 0.3s ease !important;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

a {
  color: var(--text-black);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.6;
}

.legend-toggle {
  position: fixed;
  bottom: 32px;
  left: 32px;
  padding: 8px 16px;
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  color: var(--text-black);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  z-index: 13000; /* Higher than tour-tooltip (12001) so it appears above the guide */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 400;
  transition: opacity 0.2s ease;
}

.legend-toggle:hover {
  opacity: 0.6;
}

.legend-icon {
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  display: inline-block;
}

.legend-icon::before,
.legend-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.legend-icon::before {
  top: -6px;
}

.legend-icon::after {
  top: 6px;
}

.legend-panel {
  position: fixed;
  bottom: 80px;
  left: 32px;
  padding: 24px;
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  color: var(--text-black);
  z-index: 13000; /* Higher than tour-tooltip (12001) so it appears above the guide */
  min-width: 240px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.legend-panel h3 {
  margin: 0 0 20px 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--text-black);
  opacity: 0.6;
}

.legend-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.legend-panel li {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}

.legend-panel li span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--text-black);
  flex-shrink: 0;
}

.comparison-active .legend-toggle,
.comparison-active .legend-panel {
  display: none;
}

.analysis-view-active .legend-toggle,
.analysis-view-active #legend-panel {
  display: none;
}

body:not(.welcome-dismissed) .legend-toggle,
body:not(.welcome-dismissed) .legend-panel {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.headline-serif {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
}

.view-pane {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#map {
  z-index: 1;
  display: block;
  height: 100%;
}

#map.active,
#comparison-view.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mapbox Zoom Controls Styling */
.mapboxgl-ctrl-top-right {
  margin: 32px 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.mapboxgl-ctrl-bottom-right {
  margin: 0 32px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.mapboxgl-ctrl-group {
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  border-radius: 0;
  box-shadow: none;
}

.mapboxgl-ctrl-zoom-in,
.mapboxgl-ctrl-zoom-out {
  width: 40px;
  height: 40px;
  border: none;
  border-bottom: 1px solid var(--text-black);
  background: var(--bg-white);
  color: var(--text-black);
  font-size: 20px;
  font-weight: 400;
  cursor: pointer;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mapboxgl-ctrl-zoom-out {
  border-bottom: none;
}

.mapboxgl-ctrl-zoom-in:hover,
.mapboxgl-ctrl-zoom-out:hover {
  opacity: 0.6;
}

.mapboxgl-ctrl-zoom-in:active,
.mapboxgl-ctrl-zoom-out:active {
  background: var(--light-gray);
}

/* Continue Tour Button */
.continue-tour-btn {
  position: fixed;
  bottom: 70px; /* Moved up from 32px */
  right: 88px; /* To the left of zoom controls (32px margin + 40px zoom control + 16px gap) */
  padding: 8px 16px;
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  color: var(--text-black);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
  z-index: 3;
  white-space: nowrap;
}

.continue-tour-btn:hover {
  opacity: 0.6;
}

.continue-tour-btn:active {
  background: var(--light-gray);
}

.continue-tour-btn.hidden {
  display: none;
}

/* Continue Tour Button - Comparison Screen (Black Box) */
.continue-tour-btn-comparison {
  background: var(--text-black) !important;
  color: var(--bg-white) !important;
  border: 1px solid var(--text-black) !important;
  right: auto !important;
  left: 32px !important;
  bottom: 32px !important;
}

.continue-tour-btn-comparison:hover {
  opacity: 0.8;
  background: var(--text-black) !important;
}

.continue-tour-btn-comparison:active {
  background: #333333 !important;
}

/* Watershed Zoom Control */
.watershed-zoom-control {
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  border-radius: 0;
  box-shadow: none;
  width: 40px;
  height: 40px;
  transition: width 0.3s ease;
  overflow: visible;
  display: flex;
  align-items: center;
  position: relative;
}

.watershed-zoom-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-white);
  color: var(--text-black);
  cursor: pointer;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}

.watershed-zoom-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.watershed-zoom-btn:hover {
  opacity: 0.6;
}

.watershed-zoom-btn:active {
  background: var(--light-gray);
}

.watershed-search-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex-shrink: 0;
  position: relative;
  min-height: 40px;
  overflow: visible;
}

.watershed-search-input {
  width: 100%;
  height: 40px;
  border: none;
  background: var(--bg-white);
  color: var(--text-black);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 12px;
  padding: 0 12px;
  outline: none;
  box-sizing: border-box;
}

.watershed-search-input::placeholder {
  color: var(--text-gray);
  opacity: 0.5;
}

.watershed-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-white);
  border: 1px solid var(--text-black);
  border-top: none;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.watershed-suggestions.hidden {
  display: none !important;
}

.watershed-suggestions .suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.15s ease;
}

.watershed-suggestions .suggestion-item:hover,
.watershed-suggestions .suggestion-item.active {
  background: var(--light-gray);
}

.watershed-suggestions .suggestion-name {
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-black);
  font-size: 13px;
}

.watershed-suggestions .suggestion-meta {
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--text-gray);
}

#comparison-view {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--bg-white);
  z-index: 2;
  min-height: 100%;
  overflow: hidden;
}

.comparison-container {
  display: grid;
  grid-template-columns: 380px 1fr 360px;
  min-height: 100vh;
  gap: 0;
  box-sizing: border-box;
  position: relative;
}

.comparison-left {
  padding: 120px 40px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  background: var(--bg-white);
  border-right: 1px solid var(--text-black);
  overflow-y: auto;
  color: var(--text-black);
}

.comparison-center {
  padding: 120px 48px 48px 48px;
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  overflow-y: auto;
}

.comparison-right {
  padding: 120px 40px 40px 40px;
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border-left: 1px solid var(--text-black);
  overflow-y: auto;
  color: var(--text-black);
  min-height: 100vh;
}

.comparison-container::before,
.comparison-container::after {
  display: none;
}

.search-label {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gray);
  margin-bottom: 12px;
  opacity: 0.6;
}

.search-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  position: relative;
}

.search-wrapper input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--text-black);
  background: transparent;
  color: var(--text-black);
  font-size: 14px;
  letter-spacing: 0;
  transition: border-color 0.2s ease;
}

.search-wrapper input::placeholder {
  color: var(--text-gray);
  opacity: 0.5;
}

.search-wrapper input:focus {
  outline: none;
  border-bottom-color: var(--primary-blue);
}

.search-btn {
  padding: 12px 24px;
  border: 1px solid var(--text-black);
  background: var(--text-black);
  color: var(--bg-white);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}

.search-btn:hover {
  opacity: 0.6;
}

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-white);
  border: 1px solid var(--text-black);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 5;
}

.suggestions.hidden {
  display: none;
}

.suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.15s ease;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: var(--light-gray);
}

.suggestion-name {
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-black);
  font-size: 14px;
}

.suggestion-meta {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-gray);
}

.outline-box {
  height: 300px;
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-gray);
  font-size: 12px;
  letter-spacing: 0;
  position: relative;
  overflow: hidden;
  margin-top: 32px;
  margin-bottom: 32px;
  opacity: 0.5;
}

.comparison-map {
  height: 300px;
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  margin-top: 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.outline-canvas {
  position: absolute;
  inset: 0;
  border: none;
  overflow: hidden;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.outline-box.has-outline {
  opacity: 1;
}

.outline-box.has-outline .outline-canvas {
  opacity: 1;
}

.outline-placeholder {
  z-index: 2;
  padding: 0 18px;
  font-size: 13px;
  color: var(--text-gray);
}

.outline-box.has-outline .outline-placeholder {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--bg-white);
  border: 1px solid var(--text-black);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  color: var(--text-black);
  z-index: 10;
}

.criteria-card {
  padding: 16px 16px;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -30px;
}

.criteria-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text-gray);
  opacity: 0.6;
}

.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.criteria-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  min-height: 44px;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-left: 0;
}

.criteria-item.secondary {
  padding-left: 32px;
  cursor: default;
}

.criteria-item.secondary input {
  display: none;
}

.criteria-item span {
  flex: 1;
  color: var(--text-black);
  font-size: 14px;
}

.criteria-item.secondary .criteria-note {
  flex: 0 0 90px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-gray);
  font-weight: 400;
}

.criteria-select {
  margin-left: 0;
  flex: 0 0 120px;
  max-width: 120px;
}

.criteria-select select {
  padding: 4px 6px;
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  color: var(--text-black);
  font-size: 12px;
  letter-spacing: 0.01em;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.criteria-select select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--light-gray);
  border-color: var(--text-gray);
}

.criteria-select select:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.criteria-item:hover {
  background: var(--light-gray);
}

.criteria-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-blue);
  cursor: pointer;
}

.analysis-card {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.analysis-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 40px 0;
  color: var(--text-gray);
  opacity: 0.6;
}

.analysis-placeholder {
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--text-gray);
  text-align: center;
  padding: 6px 20px;
  margin-top: 6px;
}

.comparison-columns {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  grid-auto-rows: auto;
}

.comparison-columns .future-postcard-container {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 0;
  margin-bottom: 0;
}

.comparison-columns .comparison-column:nth-child(3),
.comparison-columns .comparison-column:nth-child(4) {
  grid-row: 3;
}

.future-postcard-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0;
  padding: 0 20px;
}

.future-postcard-container.hidden {
  display: none;
}

.future-postcard-btn {
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-black);
  background-color: transparent;
  border: 1px solid var(--text-black);
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
}

.future-postcard-btn:hover {
  background-color: var(--text-black);
  color: white;
}

.future-postcard-btn:active {
  transform: scale(0.98);
}

.comparison-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.comparison-map-scenario-toggle {
  margin-bottom: 8px;
}

.comparison-map-scenario-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-black);
}

.comparison-map-scenario-text {
  font-weight: 500;
}

.comparison-map-scenario-select {
  min-width: 150px;
  border: 1px solid var(--text-black);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  background: var(--bg-white);
  color: var(--text-black);
  cursor: pointer;
}

.analysis-details-card {
  margin-top: 24px;
  border: 1px solid var(--text-black);
  padding: 24px 28px;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.analysis-details-card .analysis-details-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.analysis-details-card .analysis-details-title {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-black);
  margin: 0;
}

.analysis-details-card .analysis-details-scenario {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-gray);
}

.analysis-details-card .analysis-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 13px;
  color: var(--text-gray);
}

.analysis-details-card .analysis-detail-meta span {
  font-weight: 400;
  color: var(--text-black);
}

.analysis-details-card .bioregion-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analysis-details-card .bioregion-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analysis-details-card .bioregion-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-black);
}

.analysis-details-card .bioregion-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-black);
}

.analysis-details-card .bioregion-percent {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-gray);
}

.matches-header {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gray);
  margin-bottom: 32px;
  opacity: 0.6;
}

.comparison-matches {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
}

.match-item {
  padding: 20px 0;
  border: none;
  border-bottom: 1px solid var(--text-black);
  background: transparent;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.match-item:hover {
  opacity: 0.6;
}

.match-item.active {
  opacity: 1;
}

.match-item-name {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-black);
  margin-bottom: 8px;
}

.match-item-state {
  font-size: 11px;
  color: var(--text-gray);
  font-weight: 300;
}

.match-item-meta {
  font-size: 12px;
  color: var(--text-gray);
  line-height: 1.5;
}

.match-item-meta div {
  margin-bottom: 4px;
}

.view-toggle {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  min-width: 240px;
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  overflow: hidden;
  z-index: 3;
}

.toggle-option {
  flex: 1 1 50%;
  padding: 12px 0;
  border: none;
  background: transparent;
  color: var(--text-black);
  font-weight: 400;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-align: center;
  text-transform: uppercase;
  font-size: 10px;
  transition: opacity 0.2s ease;
  opacity: 0.5;
}

.toggle-option:hover {
  opacity: 0.6;
}

.toggle-option.active {
  opacity: 1;
  font-weight: 400;
  background: var(--text-black);
  color: var(--bg-white);
}

.toggle-option:focus {
  outline: none;
}

.layer-toggle {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-white);
  border: 1px solid var(--text-black);
  border-radius: 6px;
  padding: 12px 14px;
  min-width: 220px;
}

.layer-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.layer-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-black);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
  user-select: none;
}

/* Apply opacity only to specific children on hover, not the entire label */
.layer-toggle-label:hover > span:not(.info-icon),
.layer-toggle-label:hover > input[type="radio"] {
  opacity: 0.6;
}

.layer-toggle-label:hover .info-icon {
  opacity: 1 !important;
}

.layer-toggle-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-blue);
  cursor: pointer;
  margin: 0;
}

.layer-toggle-label span {
  color: var(--text-black);
}

.info-icon {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(120, 120, 120, 1);
  color: rgba(120, 120, 120, 1) !important;
  font-size: 11px;
  font-weight: 700;
  cursor: default;
  line-height: 1;
  background: var(--bg-white);
  position: relative;
  text-transform: none;
  flex-shrink: 0;
  vertical-align: middle;
  text-align: center;
  padding-left: 0.5px;
}

.info-icon:hover {
  color: rgba(0, 0, 0, 0.8);
  border-color: rgba(0, 0, 0, 0.7);
  z-index: 12003 !important;
}

.layer-toggle-label:hover .info-icon {
  z-index: 13001 !important;
}

.layer-toggle-label:hover {
  z-index: 13001 !important;
  position: relative;
}

.layer-toggle:has(.info-icon:hover) {
  z-index: 13002 !important;
}

.info-icon .tooltip-content {
  position: absolute;
  top: 125%;
  left: 0;
  width: 280px;
  padding: 12px 14px;
  background: #000000 !important;
  background-color: #000000 !important;
  color: #ffffff;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: none;
  text-align: left;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 13000 !important;
  background-clip: padding-box;
  backdrop-filter: none;
  white-space: normal;
  transform: translateZ(0); /* Force new stacking context */
  will-change: opacity, transform; /* Optimize rendering */
}

.info-icon:hover {
  z-index: 13001 !important;
  position: relative;
}

.info-icon .tooltip-content p {
  margin: 0 0 8px 0;
  color: #ffffff;
  text-align: left;
  font-weight: 400;
}

.info-icon .tooltip-content p:last-child {
  margin-bottom: 0;
}

.info-icon .tooltip-content .tooltip-notation {
  font-size: 12px;
  font-style: italic;
  margin-top: -4px;
}

.info-icon .tooltip-content .tooltip-term {
  font-weight: 700;
  color: #ffffff !important;
}

.info-icon:hover .tooltip-content {
  opacity: 1 !important;
  pointer-events: auto;
  background: #000000 !important;
  background-color: #000000 !important;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 1);
  transform: translateZ(0); /* Force new stacking context */
}

.comparison-active .layer-toggle {
  display: none;
}

.layer-ssp {
  width: 100%;
}

.scenario-select {
  padding: 8px 12px;
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  color: var(--text-black);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
  min-width: 200px;
  width: 100%;
  border-radius: 10px;
}

.scenario-select.compact {
  padding: 8px 10px;
}

.scenario-select:hover {
  opacity: 0.6;
}

.scenario-select:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.scenario-select option {
  background: var(--bg-white);
  color: var(--text-black);
  padding: 8px;
}

.layer-ssp.disabled .scenario-select {
  opacity: 0.5;
  cursor: not-allowed;
}

#placeholder-box {
  position: fixed;
  top: 88px;
  right: 32px;
  width: 360px;
  min-height: 200px;
  background: var(--bg-white);
  border: 1px solid var(--text-black);
  z-index: 4;
  padding: 32px;
  padding-top: 48px;
  max-height: calc(100vh - 140px);
  overflow: hidden;
}

#placeholder-box.hidden {
  display: none;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-black);
  padding: 5px 10px;
  line-height: 1;
  transition: opacity 0.2s;
}

.close-btn:hover {
  opacity: 0.6;
}

.placeholder-content {
  color: var(--text-gray);
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.placeholder-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.placeholder-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  margin: 0 0 16px 0;
  color: var(--text-black);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 400;
  line-height: 1.4;
}

.placeholder-subtitle {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-gray);
}

.placeholder-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.placeholder-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-gray);
}

.placeholder-label {
  font-weight: 400;
  color: var(--text-black);
}

.placeholder-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-gray);
}

.placeholder-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.placeholder-action {
  align-self: flex-start;
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px solid var(--text-black);
  background: var(--text-black);
  color: var(--bg-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-weight: 400;
}

.placeholder-action:hover {
  opacity: 0.6;
}

.bioregion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bioregion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-gray);
}

.bioregion-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--text-black);
}

.bioregion-name {
  flex: 1;
  color: var(--text-black);
}

.bioregion-metric {
  font-weight: 400;
  color: var(--text-black);
}

/* Analysis View */
.analysis-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-white);
  z-index: 10;
  overflow-y: auto;
  opacity: 1 !important;
  visibility: visible;
  transition: none;
  pointer-events: auto;
}

.analysis-view.hidden {
  display: none;
}

.analysis-view.visible {
  opacity: 1 !important;
  visibility: visible;
  pointer-events: auto;
}

.analysis-close-btn {
  position: fixed;
  top: 32px;
  right: 32px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--text-black);
  padding: 0;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  z-index: 11;
}

.analysis-close-btn:hover {
  opacity: 0.6;
}

.analysis-view-content {
  padding: 90px 24px 120px 60px;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  min-height: calc(100vh + 600px); /* Extend canvas well beyond viewport */
  position: relative;
}

.analysis-view-content::before {
  content: '';
  position: absolute;
  left: calc(66.666% + 54px);
  top: 157px;
  bottom: 0;
  width: 1px;
  border-left: 2px dotted var(--text-black);
  z-index: 0;
}

.analysis-map-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analysis-search {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 3;
}

.analysis-search .search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.analysis-search .suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 260px;
  z-index: 5;
}

.analysis-search input {
  min-width: 220px;
  padding: 8px 28px 8px 10px;
  border: none;
  border-bottom: 1px solid var(--text-black);
  background: transparent;
  font-size: 14px;
}

.analysis-search input:focus {
  outline: none;
  border-bottom-color: var(--primary-blue);
}

.analysis-search input::placeholder {
  color: var(--text-gray);
  opacity: 0.5;
}

.search-clear-btn {
  position: absolute;
  right: 4px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-gray);
  padding: 4px 8px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.search-clear-btn:hover {
  opacity: 0.6;
  color: var(--text-black);
}

.search-btn.compact {
  padding: 8px 12px;
  font-size: 13px;
}

.analysis-watershed-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-black);
  margin: 0 0 4px 0;
  height: 20px;
}

.analysis-map-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

.analysis-map {
  width: 66.666%;
  height: 360px;
  border: 1px solid var(--text-black);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.bioregion-visualization-wrapper {
  width: 66.666%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.bioregion-pixel-canvas {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 400px;
  border: none;
  border-radius: 0;
  background: transparent;
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.bioregion-slider-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: auto;
  max-width: 100%;
}

.bioregion-slider-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-black);
  letter-spacing: 0.02em;
}

.bioregion-scenario-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--light-gray);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.bioregion-scenario-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-black);
  cursor: pointer;
  border: 2px solid var(--bg-white);
  box-shadow: 0 0 0 1px var(--text-black);
}

.bioregion-scenario-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-black);
  cursor: pointer;
  border: 2px solid var(--bg-white);
  box-shadow: 0 0 0 1px var(--text-black);
}

.bioregion-slider-labels {
  display: flex;
  justify-content: space-between;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: var(--text-gray);
  letter-spacing: 0.02em;
  padding: 0 8px;
}

.bioregion-legend {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--text-black);
  border-radius: 2px;
  background: var(--bg-white);
  width: auto;
  max-width: 100%;
}

.bioregion-legend-title {
  margin: 0 0 12px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-black);
}

.bioregion-legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  max-height: 300px;
  overflow-y: auto;
}

.bioregion-legend-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}

.bioregion-legend-list li span:first-child {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--text-black);
  flex-shrink: 0;
  display: block;
}

.bioregion-legend-list li {
  justify-content: space-between;
}

.bioregion-legend-percent {
  margin-left: auto;
  color: var(--text-gray);
  font-size: 11px;
  opacity: 0.6;
}

.analysis-description {
  width: 33.333%;
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--text-gray);
  padding: 0;
  padding-left: 34px;
  position: relative;
  margin-left: 10px;
  text-align: left;
}

.analysis-description::after {
  display: none;
}

.analysis-description::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0.8em;
  width: 12px;
  height: 1px;
  background: var(--text-black);
  z-index: 1;
}

.analysis-description .dynamic-value {
  color: var(--primary-blue);
}

.analysis-layer-toggle {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--text-black);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 2;
}

.comparison-map-layer-toggle-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  margin-top: 8px;
}

.comparison-shared-toggle {
  position: relative;
  top: auto;
  left: auto;
  display: flex;
  gap: 12px;
  background: var(--bg-white);
  border: 1px solid var(--text-black);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 2;
}

.analysis-layer-toggle label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-black);
  cursor: pointer;
}

.analysis-layer-toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary-blue);
  margin: 0;
}

.analysis-layer-toggle .scenario-select {
  min-width: 150px;
  border: 1px solid var(--text-black);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.analysis-layer-toggle .scenario-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.analysis-visualizations {
  margin-top: 0;
  min-height: 1000px;
  padding: 0 0 100px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
}


.landuse-chart-container {
  margin-top: 108px;
  position: relative;
  max-width: 100%;
  width: 100%;
  padding: 0;
  margin-left: 0;
  margin-right: auto;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: flex-start;
}


.landuse-chart-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 66.666%;
  flex-shrink: 0;
  margin-left: -160px;
}

.landuse-text-container {
  width: 33.333%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  margin-left: 99px;
  margin-right: 0;
  padding-left: 34px;
  position: relative;
  min-height: 600px;
}

.landuse-description {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--text-gray);
  padding: 0;
  margin-bottom: 0;
  position: absolute;
  top: 0;
  left: 0;
  text-align: left;
}

.landuse-description::after {
  display: none;
}

.landuse-description::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 0.8em;
  width: 12px;
  height: 1px;
  background: var(--text-black);
  z-index: 1;
}

.landuse-description .dynamic-value {
  color: var(--primary-blue);
}

.species-description {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--text-gray);
  padding: 0;
  margin-top: 0;
  position: absolute;
  top: 421px;
  left: 0;
  text-align: left;
}

.species-description::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 0.8em;
  width: 12px;
  height: 1px;
  background: var(--text-black);
  z-index: 1;
}

.species-description .dynamic-value {
  color: var(--primary-blue);
  transition: color 0.3s ease;
  cursor: pointer;
}

.species-description .dynamic-value.species-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.species-description .dynamic-value.species-name-highlight {
  color: #FF0000;
  font-weight: 600;
}

.species-images-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 180px;
  margin-left: 280px;
  padding: 0;
  width: 100%;
  position: relative;
}

.species-carousel-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  position: relative;
}

.species-carousel-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.species-carousel {
  position: relative;
  width: 1000px;
  height: 600px;
  margin: 0 auto;
  overflow: visible;
  pointer-events: none;
}

.species-carousel .species-carousel-item {
  pointer-events: auto;
}

.species-carousel-item {
  width: 320px;
  height: 200px;
  border-radius: 2px;
  border: none;
  overflow: hidden;
  background-color: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: absolute;
  cursor: pointer;
  transition: left 450ms ease, top 450ms ease, transform 450ms ease, z-index 450ms ease, opacity 450ms ease;
  left: 50%;
  top: 50%;
  margin-left: -160px; /* Half of width to center */
  margin-top: -100px; /* Half of height to center */
  opacity: 1;
  pointer-events: auto;
}

.species-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
}

.species-carousel-item.prominent-item {
  opacity: 1 !important;
  z-index: 200 !important;
}

.species-carousel-item.species-circle-highlight {
  outline: 3px solid #FF0000;
  outline-offset: 4px;
}

.species-carousel-nav-btn {
  background: var(--bg-white);
  border: 1px solid var(--text-black);
  color: var(--text-black);
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  padding: 0;
  position: relative;
  z-index: 300;
  pointer-events: auto;
}

.species-carousel-nav-btn:hover {
  background: var(--text-black);
  color: var(--bg-white);
}

.species-carousel-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.species-carousel-nav-btn:disabled:hover {
  background: var(--bg-white);
  color: var(--text-black);
}

.species-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin-top: -150px;
  position: relative;
  z-index: 300;
  pointer-events: auto;
}

.species-carousel-season-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-black);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}


.species-tooltip {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-white);
  border: 1px solid var(--text-black);
  padding: 12px 16px;
  min-width: 180px;
  max-width: 220px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-black);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%) translateY(-8px);
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.species-carousel-item:hover .species-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.species-tooltip-name {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-black);
}

.species-tooltip-count {
  color: var(--text-gray);
  font-size: 12px;
}

.landuse-chart-header {
  margin-bottom: 16px;
}

.landuse-chart-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-black);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.landuse-chart {
  display: grid;
  gap: 3px;
  justify-content: center;
}

.landuse-box {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  border-radius: 2px;
}

.landuse-legend {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--text-gray);
  margin-left: -120px;
  align-self: flex-start;
  margin-top: 37px;
}

.landuse-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.landuse-legend-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  border-radius: 2px;
}

/* Clustering Insights Button */
.clustering-insights-btn {
  margin-bottom: 32px;
  padding: 8px 16px;
  border: 1px solid var(--text-black);
  background: var(--text-black);
  color: var(--bg-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-weight: 400;
  width: 100%;
  text-align: center;
}

.clustering-insights-btn:hover {
  opacity: 0.6;
}

/* Clustering Insights View */
.clustering-insights-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-white);
  z-index: 10;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.clustering-insights-view.hidden {
  display: none;
}

.clustering-insights-view.visible {
  opacity: 1;
  visibility: visible;
}

.clustering-insights-close-btn {
  position: fixed;
  top: 32px;
  right: 32px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--text-black);
  padding: 0;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  z-index: 11;
}

.clustering-insights-close-btn:hover {
  opacity: 0.6;
}

.clustering-insights-content {
  padding: 90px 48px 48px 48px;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 100vh;
}

.clustering-visualizations-container {
  display: flex;
  gap: 48px;
  max-width: 1600px;
  margin: 0 auto;
  align-items: flex-start;
}

/* Future Postcard Popup */
.future-postcard-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.future-postcard-popup.hidden {
  display: none;
}

.future-postcard-popup.visible {
  opacity: 1;
  visibility: visible;
}

.future-postcard-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.future-postcard-modal {
  position: relative;
  background: #fefefe;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    );
  border: 2px solid var(--text-black);
  width: 90%;
  max-width: 900px;
  aspect-ratio: 1.4 / 1;
  max-height: 90vh;
  height: auto;
  z-index: 21;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.1),
    inset 0 0 100px rgba(0, 0, 0, 0.01);
  display: flex;
  flex-direction: row;
  overflow: hidden;
  transform: rotate(-0.5deg);
  transition: transform 0.2s ease;
}

.future-postcard-modal:hover {
  transform: rotate(0deg) scale(1.01);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.1),
    inset 0 0 100px rgba(0, 0, 0, 0.01);
}

.future-postcard-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--text-black);
  font-size: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  cursor: pointer;
  color: var(--text-black);
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 22;
  border-radius: 50%;
}

.future-postcard-close-btn:hover {
  background: var(--text-black);
  color: var(--bg-white);
  transform: scale(1.1);
}

.future-postcard-content {
  flex: 1;
  display: flex;
  flex-direction: row;
  height: 100%;
  overflow: hidden;
}

.future-postcard-message-area {
  flex: 1.4;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  border-right: 2px dashed var(--text-black);
  position: relative;
}

.future-postcard-message-area::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 8px,
    var(--text-black) 8px,
    var(--text-black) 10px
  );
}

.future-postcard-address-area {
  flex: 0.6;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 250, 0.95) 100%);
}

.future-postcard-stamp {
  width: 100px;
  height: 100px;
  border: 2px solid var(--text-black);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Create perforated stamp edge effect using clip-path */
  clip-path: polygon(
    0% 6%, 6% 0%, 12% 0%, 18% 0%, 24% 0%, 30% 0%, 36% 0%, 42% 0%, 48% 0%, 54% 0%, 60% 0%, 66% 0%, 72% 0%, 78% 0%, 84% 0%, 90% 0%, 94% 0%, 100% 6%,
    100% 12%, 100% 18%, 100% 24%, 100% 30%, 100% 36%, 100% 42%, 100% 48%, 100% 54%, 100% 60%, 100% 66%, 100% 72%, 100% 78%, 100% 84%, 100% 90%, 100% 94%, 94% 100%,
    90% 100%, 84% 100%, 78% 100%, 72% 100%, 66% 100%, 60% 100%, 54% 100%, 48% 100%, 42% 100%, 36% 100%, 30% 100%, 24% 100%, 18% 100%, 12% 100%, 6% 100%, 0% 94%,
    0% 90%, 0% 84%, 0% 78%, 0% 72%, 0% 66%, 0% 60%, 0% 54%, 0% 48%, 0% 42%, 0% 36%, 0% 30%, 0% 24%, 0% 18%, 0% 12%
  );
}

.future-postcard-stamp::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  height: 85%;
  background-image: url('PostcardStamp.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.95;
  z-index: 1;
}

.future-postcard-stamp::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

.future-postcard-address-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 24px;
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-black);
  text-align: right;
  width: 100%;
}

.future-postcard-address-line {
  min-height: 22px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  width: 100%;
  padding-bottom: 4px;
  font-style: italic;
  opacity: 0.8;
}

.future-postcard-address-line:last-child {
  margin-top: 12px;
  border-bottom: 2px solid var(--text-black);
  font-weight: 500;
  font-style: normal;
  opacity: 1;
}

.future-postcard-header {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  margin-bottom: 3px;
  flex-shrink: 0;
}

.future-postcard-header-title {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-black);
  margin: 0;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: none;
}

.future-postcard-header-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-gray);
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}

.future-postcard-header-description {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-gray);
  margin: 0;
  letter-spacing: 0.02em;
  opacity: 0.6;
  font-style: italic;
}

.future-postcard-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.future-postcard-section-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 9px;
  font-weight: 500;
  color: var(--text-black);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0;
  opacity: 0.8;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 5px;
}

.future-postcard-section-content {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-black);
  letter-spacing: 0.01em;
}

.future-postcard-section-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.future-postcard-section-content li {
  padding-left: 0;
  font-size: 14px;
  line-height: 1.6;
}

.future-postcard-section-content li::before {
  content: "";
  margin-right: 0;
}

.future-postcard-narrative {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.future-postcard-narrative-item {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-black);
  letter-spacing: 0.02em;
}

.future-postcard-summary-box {
  background: var(--light-gray);
  border: 1px solid var(--text-black);
  padding: 16px;
  margin-top: 0;
}

.future-postcard-summary-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 8px 0;
  opacity: 0.6;
}

.future-postcard-summary-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-black);
  margin: 0;
  letter-spacing: 0.02em;
}

.future-postcard-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
  justify-items: center;
  align-items: start;
}

.future-postcard-image-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.future-postcard-species-name {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-black);
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.future-postcard-image-small {
  width: 100%;
  height: auto;
  border: 1px solid rgba(0, 0, 0, 0.3);
  display: block;
  object-fit: cover;
  aspect-ratio: 1.4 / 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.future-postcard-image-small:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.future-postcard-section-content audio {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 4px;
  height: 32px;
  border-radius: 2px;
}

.future-postcard-section-content audio::-webkit-media-controls-panel {
  background-color: rgba(255, 255, 255, 0.9);
}

.clustering-left-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.clustering-right-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.pca-scatter-container {
  width: 100%;
  min-height: 350px;
}

.cluster-description {
  padding: 20px 24px;
  background: #fefefe;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    );
  border: 2px solid var(--text-black);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-black);
  min-height: 200px;
  height: 200px;
  overflow-y: auto;
  box-sizing: border-box;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.05),
    inset 0 0 50px rgba(0, 0, 0, 0.01);
  letter-spacing: 0.02em;
}

.cluster-description.empty {
  color: var(--text-gray);
  opacity: 0.5;
}

.cluster-map-container {
  width: 100%;
  min-height: 450px;
  border: 1px solid var(--text-black);
  background: var(--bg-white);
  position: relative;
}

.bar-chart-container {
  width: 100%;
  min-height: 300px;
}

.bar-chart-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-black);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 1200px) {
  .clustering-visualizations-container {
    flex-direction: column;
    gap: 32px;
  }
  
  .clustering-left-panel,
  .clustering-right-panel {
    width: 100%;
  }
}

@media (max-width: 1200px) {
  .comparison-container {
    grid-template-columns: 320px 1fr 320px;
  }
  
  .comparison-left,
  .comparison-right {
    padding: 32px 24px;
  }
  
  .comparison-center {
    padding: 32px;
  }
}

@media (max-width: 960px) {
  .comparison-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    height: auto;
    min-height: 100vh;
  }

  .comparison-left {
    border-right: none;
    border-bottom: 1px solid var(--text-black);
    padding: 24px;
  }

  .comparison-center {
    padding: 24px;
  }

  .comparison-right {
    border-left: none;
    border-top: 1px solid var(--text-black);
    padding: 24px;
    max-height: 400px;
  }

  .outline-box {
    height: 250px;
  }
  
  .comparison-map {
    height: 300px;
  }
}

@media (max-width: 560px) {
  .search-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .search-btn {
    width: 100%;
  }

  .comparison-left,
  .comparison-center,
  .comparison-right {
    padding: 20px 16px;
  }

  .criteria-card {
    padding: 20px;
  }

  .criteria-item {
    padding: 8px 4px;
  }

  .view-toggle {
    transform: translate(-50%, 0);
  }

  .scenario-toggle {
    top: 16px;
    right: 16px;
  }

  .scenario-select {
    min-width: 160px;
    font-size: 12px;
    padding: 10px 16px;
  }

  #placeholder-box {
    top: 70px;
    right: 16px;
    width: calc(100% - 32px);
    max-width: 350px;
  }
  
  .outline-box {
    height: 200px;
  }
  
  .comparison-map {
    height: 250px;
  }

  .future-postcard-modal {
    width: 95%;
    max-height: 90vh;
    flex-direction: column;
    aspect-ratio: auto;
  }

  .future-postcard-content {
    flex-direction: column;
  }

  .future-postcard-message-area {
    border-right: none;
    border-bottom: 2px dashed var(--text-black);
    padding: 20px;
  }

  .future-postcard-message-area::after {
    display: none;
  }

  .future-postcard-address-area {
    padding: 20px;
    align-items: center;
  }

  .future-postcard-stamp {
    width: 60px;
    height: 60px;
  }

  .future-postcard-header-title {
    font-size: 18px;
  }

  .future-postcard-close-btn {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    font-size: 20px;
  }

  .future-postcard-images {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}
