:root {
  --ink: #18332a;
  --muted: #65766f;
  --paper: #f4f1e8;
  --surface: #fffdf7;
  --line: #d9ddd2;
  --green: #245e46;
  --green-bright: #3f8b63;
  --wheat: #d28b31;
  --corn: #efbd3d;
  --soy: #4f9263;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 75% 7%, rgba(239, 189, 61, 0.13), transparent 23rem),
    var(--paper);
  color: var(--ink);
  font-family:
    "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system,
    BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

main {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  width: min(1460px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(24, 51, 42, 0.15);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px 12px 4px 12px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 23px;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand strong {
  font-size: 16px;
  letter-spacing: -0.04em;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.header-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 5px rgba(63, 139, 99, 0.12);
}

.intro {
  width: min(1460px, calc(100% - 48px));
  margin: 56px auto 38px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: 48px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green-bright);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.intro h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(44px, 5.4vw, 82px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.intro h1 em {
  color: var(--green-bright);
  font-style: normal;
}

.intro-copy {
  max-width: 520px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  word-break: keep-all;
}

.dashboard {
  width: min(1460px, calc(100% - 48px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(24, 51, 42, 0.15);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(43, 70, 57, 0.12);
}

.control-panel {
  position: relative;
  z-index: 3;
  padding: 26px 22px;
  background:
    linear-gradient(rgba(255, 253, 247, 0.94), rgba(255, 253, 247, 0.96)),
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 20px,
      rgba(36, 94, 70, 0.04) 20px,
      rgba(36, 94, 70, 0.04) 21px
    );
  border-right: 1px solid var(--line);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.year-pill {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e6eee8;
  color: var(--green);
  letter-spacing: -0.02em;
}

.filter-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.filter-buttons button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: 180ms ease;
}

.filter-buttons button:hover,
.filter-buttons button:focus-visible {
  border-color: var(--green-bright);
  outline: none;
  transform: translateY(-1px);
}

.filter-buttons button.active {
  border-color: var(--green);
  background: var(--green);
  color: white;
  box-shadow: 0 8px 22px rgba(36, 94, 70, 0.2);
}

.product-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
}

.total-card {
  margin: 24px 0 18px;
  padding: 22px 18px;
  border-radius: 18px;
  background: #193c2f;
  color: white;
}

.total-card > span {
  display: block;
  color: #c9dbd2;
  font-size: 11px;
  font-weight: 700;
}

.total-card strong {
  display: block;
  margin: 7px 0 4px;
  font-family: Georgia, serif;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.total-card small {
  color: #acc6b9;
  font-size: 10px;
}

.grain-list {
  display: flex;
  flex-direction: column;
}

.grain-list button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.grain-list button:hover,
.grain-list button.is-active {
  background: rgba(79, 146, 99, 0.07);
}

.grain-list span {
  font-size: 12px;
  font-weight: 700;
}

.grain-list strong {
  font-family: Georgia, serif;
  font-size: 13px;
}

.grain-swatch {
  width: 8px;
  height: 26px;
  border-radius: 3px;
}

.interaction-hint {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.interaction-hint span {
  width: 24px;
  height: 24px;
  margin-right: 5px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
}

.country-picker,
.country-detail--mobile {
  display: none;
}

.map-shell {
  position: relative;
  min-width: 0;
  min-height: 650px;
  overflow: hidden;
  background: #dfeaed;
}

.map-shell > .map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  transition: opacity 260ms ease;
}

.map-shell.is-ready > .map {
  opacity: 1;
}

.map-shell > .map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(244, 241, 232, 0.12), transparent 20%),
    linear-gradient(0deg, rgba(24, 51, 42, 0.05), transparent 20%);
}

.world-map {
  width: 100%;
  height: 100%;
  display: block;
}

.world-map.is-zoomed {
  cursor: grab;
  touch-action: none;
}

.world-map.is-panning {
  cursor: grabbing;
}

.map-ocean {
  fill: #dfeaed;
}

.map-viewport {
  transform-origin: center;
  transition: transform 280ms ease;
}

.country-shapes path {
  fill: #e9eadf;
  stroke: #8fa099;
  stroke-width: 0.65;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition:
    fill 240ms ease,
    opacity 240ms ease;
}

.country-shapes path.is-supplier {
  fill: rgba(57, 119, 90, 0.58);
}

.trade-routes path {
  fill: none;
  stroke: var(--route-color);
  stroke-width: var(--route-width);
  stroke-linecap: round;
  stroke-dasharray: 4 8;
  opacity: 0.72;
  vector-effect: non-scaling-stroke;
  animation: route-flow 1.6s linear infinite;
}

.marker-leader {
  stroke: rgba(24, 51, 42, 0.42);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  vector-effect: non-scaling-stroke;
}

@keyframes route-flow {
  to {
    stroke-dashoffset: -24;
  }
}

.map-controls {
  position: absolute;
  right: 20px;
  bottom: 54px;
  z-index: 4;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(24, 51, 42, 0.14);
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 7px 20px rgba(24, 51, 42, 0.12);
}

.map-controls button {
  width: 34px;
  height: 32px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 19px;
  font-weight: 700;
}

.map-controls button:last-child {
  border-bottom: 0;
}

.map-controls button:hover:not(:disabled),
.map-controls button:focus-visible {
  background: rgba(79, 146, 99, 0.12);
  outline: none;
}

.map-controls button:disabled {
  cursor: default;
  opacity: 0.35;
}

.map-attribution {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  color: #52685f;
  font-size: 8px;
}

.map-status {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #49635a;
  background:
    linear-gradient(rgba(223, 234, 237, 0.78), rgba(223, 234, 237, 0.92)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 39px,
      rgba(36, 94, 70, 0.12) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 39px,
      rgba(36, 94, 70, 0.12) 40px
    );
}

.map-status-grid {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border: 2px solid rgba(36, 94, 70, 0.25);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: map-loading 900ms linear infinite;
}

.map-status strong {
  font-size: 13px;
}

.map-status small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.map-status.is-error {
  z-index: 5;
}

.map-shell.is-ready .map-status {
  display: none;
}

@keyframes map-loading {
  to {
    transform: rotate(360deg);
  }
}

.map-title {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 3;
  width: max-content;
  max-width: calc(100% - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 13px;
  border: 1px solid rgba(24, 51, 42, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.9);
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.map-title span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.map-title strong {
  margin-top: 2px;
  font-size: 12px;
}

.country-detail {
  position: absolute;
  right: auto;
  bottom: 20px;
  left: 50%;
  z-index: 3;
  width: 200px;
  padding: 16px;
  border: 1px solid rgba(24, 51, 42, 0.13);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 14px 40px rgba(24, 51, 42, 0.14);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.country-detail-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.country-flag {
  font-size: 27px;
}

.country-detail-heading span:last-child {
  display: flex;
  flex-direction: column;
}

.country-detail-heading small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.country-detail-heading strong {
  font-size: 15px;
}

.country-detail-total {
  margin: 13px 0 9px;
  padding: 10px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.country-detail-total span {
  color: var(--muted);
  font-size: 9px;
}

.country-detail-total strong {
  font-family: Georgia, serif;
  font-size: 17px;
}

.country-products {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.country-products div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
}

.country-products span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.country-products i,
.map-legend i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
}

.map-legend {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 3;
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 7px 25px rgba(24, 51, 42, 0.12);
  font-size: 9px;
  font-weight: 700;
}

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

.map-legend .gis-legend {
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.map-legend .gis-legend i {
  width: 12px;
  height: 8px;
  border: 1px solid #2e6c50;
  border-radius: 2px;
  background: rgba(57, 119, 90, 0.58);
}

.country-marker {
  position: relative;
  width: 92px;
  min-height: 108px;
  padding: 7px 7px 8px;
  border: 1px solid rgba(24, 51, 42, 0.14);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 8px 24px rgba(24, 51, 42, 0.16);
  cursor: pointer;
  transform-origin: bottom center;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
  backdrop-filter: blur(10px);
}

.country-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(24, 51, 42, 0.14);
  border-bottom: 1px solid rgba(24, 51, 42, 0.14);
  background: rgba(255, 253, 247, 0.94);
}

.country-marker:hover,
.country-marker:focus-visible,
.country-marker.is-selected {
  z-index: 5;
  outline: none;
  border-color: var(--green-bright);
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 13px 35px rgba(24, 51, 42, 0.23);
}

.marker-country {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
}

.marker-country strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marker-bars {
  height: 64px;
  margin-top: 3px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
}

.marker-bar-wrap {
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.marker-bar {
  width: 14px;
  height: var(--bar-height);
  display: block;
  border-radius: 3px 3px 1px 1px;
  background: var(--bar-color);
  box-shadow: inset 0 -8px 12px rgba(24, 51, 42, 0.1);
  animation: grow-bar 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: bottom;
}

.marker-bar-wrap small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
}

.marker-total {
  display: block;
  margin-top: 3px;
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 700;
}

@keyframes grow-bar {
  from {
    transform: scaleY(0);
    opacity: 0.4;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.korea-map-dot {
  fill: var(--green);
  stroke: #fffdf7;
  stroke-width: 2;
  filter: drop-shadow(0 2px 3px rgba(24, 51, 42, 0.45));
  vector-effect: non-scaling-stroke;
}

.insight-strip {
  width: min(1460px, calc(100% - 48px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  border-top: 1px solid rgba(24, 51, 42, 0.18);
  border-bottom: 1px solid rgba(24, 51, 42, 0.18);
}

.insight-strip > div {
  min-height: 116px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-right: 1px solid rgba(24, 51, 42, 0.18);
}

.insight-strip > div:last-child {
  border-right: 0;
}

.insight-number {
  color: var(--green-bright);
  font-family: Georgia, serif;
  font-size: 39px;
  font-weight: 700;
}

.insight-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

.insight-text {
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center;
  gap: 7px !important;
}

.insight-text span {
  color: var(--green-bright);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.insight-text p {
  max-width: 580px;
  color: var(--ink);
  font-size: 13px;
  word-break: keep-all;
}

footer {
  width: min(1460px, calc(100% - 48px));
  margin: 40px auto 0;
  padding-bottom: 52px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}

footer strong {
  font-size: 12px;
}

footer p {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  word-break: keep-all;
}

.source-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.source-links a {
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .control-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .panel-heading,
  .filter-buttons {
    grid-column: 1;
  }

  .total-card {
    grid-column: 2;
    grid-row: 1 / 3;
    margin: 0;
  }

  .grain-list,
  .interaction-hint {
    display: none;
  }

  .map-shell {
    min-height: 610px;
  }

  .insight-strip {
    grid-template-columns: 1fr 1fr;
  }

  .insight-text {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(24, 51, 42, 0.18);
  }
}

@media (max-width: 640px) {
  .site-header,
  .intro,
  .dashboard,
  .insight-strip,
  footer {
    width: min(100% - 24px, 1460px);
  }

  .site-header {
    min-height: 62px;
  }

  .header-meta {
    font-size: 9px;
  }

  .brand small {
    display: none;
  }

  .intro {
    margin-top: 38px;
  }

  .intro h1 {
    font-size: 45px;
  }

  .intro-copy {
    font-size: 13px;
  }

  .dashboard {
    border-radius: 18px;
  }

  .control-panel {
    display: block;
    padding: 18px 16px;
  }

  .total-card {
    margin: 15px 0 0;
    padding: 15px;
  }

  .total-card strong {
    font-size: 25px;
  }

  .country-picker {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .country-picker select {
    width: 100%;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    letter-spacing: 0;
  }

  .country-detail--mobile {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 13px 14px;
    border-radius: 13px;
    background: #eef5ef;
    box-shadow: none;
    transform: none;
  }

  .map-shell {
    min-height: 410px;
  }

  .map-title {
    top: 12px;
    left: 50%;
    max-width: calc(100% - 24px);
  }

  .country-detail {
    display: none;
  }

  .map-legend {
    left: 12px;
    bottom: 14px;
  }

  .country-marker {
    width: 26px;
    min-height: 26px;
    padding: 0;
    border-radius: 50%;
    transform: translate(33px, 95px);
  }

  .country-marker::after,
  .country-marker .marker-bars,
  .country-marker .marker-total,
  .country-marker .marker-country strong {
    display: none;
  }

  .country-marker .marker-country {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 12px;
  }

  .country-marker:hover,
  .country-marker:focus-visible,
  .country-marker.is-selected {
    transform: translate(33px, 92px) scale(1.15);
  }

  .insight-strip {
    grid-template-columns: 1fr;
  }

  .insight-strip > div {
    min-height: 98px;
    border-right: 0;
    border-bottom: 1px solid rgba(24, 51, 42, 0.18);
  }

  .insight-text {
    grid-column: auto;
    border-top: 0;
    border-bottom: 0 !important;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .source-links {
    align-items: flex-start;
  }
}

/* ── 단계구분도(choropleth) ─────────────────────────────── */

.country-shapes path.is-graded {
  stroke: #7d8f88;
  stroke-width: 0.5;
}

.country-shapes path.is-picked {
  stroke: #18332a;
  stroke-width: 1.6;
}

.choropleth-legend {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 3;
  min-width: 168px;
  padding: 11px 13px;
  border: 1px solid rgba(24, 51, 42, 0.13);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 7px 25px rgba(24, 51, 42, 0.12);
  backdrop-filter: blur(12px);
}

.choropleth-legend > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 10px;
  letter-spacing: -0.01em;
}

.choropleth-legend ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.choropleth-legend li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.choropleth-legend i {
  width: 16px;
  height: 9px;
  flex: none;
  border: 1px solid rgba(24, 51, 42, 0.22);
  border-radius: 2px;
}

.choropleth-legend .legend-nodata i {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(24, 51, 42, 0.22) 2px,
    rgba(24, 51, 42, 0.22) 3px
  );
}

/* 단계구분도에서는 값 라벨만 국가 위에 얹는다 */
.value-label {
  paint-order: stroke fill;
  fill: #18332a;
  stroke: rgba(255, 253, 247, 0.92);
  stroke-width: 3;
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
  pointer-events: none;
}

.value-label.is-light {
  fill: #fffdf7;
  stroke: rgba(24, 51, 42, 0.55);
}

/* ── 시계열(timeline) ───────────────────────────────────── */

.timeline-slider {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(24, 51, 42, 0.13);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 10px 30px rgba(24, 51, 42, 0.14);
  backdrop-filter: blur(12px);
}

.timeline-slider .timeline-play {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--green);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.timeline-slider .timeline-play:hover,
.timeline-slider .timeline-play:focus-visible {
  border-color: var(--green-bright);
  outline: none;
  background: rgba(79, 146, 99, 0.12);
}

.timeline-slider .timeline-year {
  min-width: 58px;
  flex: none;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.timeline-slider input[type="range"] {
  width: 100%;
  min-width: 0;
  height: 24px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.timeline-slider .timeline-ticks {
  position: absolute;
  right: 14px;
  bottom: 2px;
  left: 116px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  pointer-events: none;
}

/* 시계열이 있으면 하단 오버레이가 서로 겹치지 않게 올린다 */
.map-shell.has-timeline .map-legend,
.map-shell.has-timeline .choropleth-legend {
  bottom: 76px;
}

.map-shell.has-timeline .country-detail {
  bottom: 76px;
}

.map-shell.has-timeline .map-controls {
  bottom: 110px;
}

.map-shell.has-timeline .map-attribution {
  bottom: 62px;
}

@media (max-width: 640px) {
  .choropleth-legend {
    left: 12px;
    bottom: 150px;
    min-width: 148px;
  }

  .value-label {
    font-size: 9px;
  }

  .timeline-slider {
    right: 12px;
    left: 12px;
    gap: 9px;
    padding: 8px 11px;
  }

  .timeline-slider .timeline-year {
    min-width: 46px;
    font-size: 16px;
  }

  .timeline-slider .timeline-ticks {
    display: none;
  }

  .map-shell.has-timeline .map-legend,
  .map-shell.has-timeline .choropleth-legend {
    bottom: 206px;
  }

  .map-shell.has-timeline .country-detail {
    bottom: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
