:root {
  --bg: #06100e;
  --bg-deep: #040b09;
  --surface: #0a1714;
  --surface-2: #0d1c18;
  --surface-3: #11231e;
  --line: rgba(224, 214, 193, 0.11);
  --line-strong: rgba(224, 214, 193, 0.2);
  --text: #f0ebe1;
  --text-soft: #d5d2c9;
  --muted: #8c9b94;
  --muted-2: #64756e;
  --copper: #d9a25c;
  --copper-rgb: 217, 162, 92;
  --copper-bright: #efc88e;
  --mint: #6bd6bf;
  --mint-rgb: 107, 214, 191;
  --steel: #8fa4b0;
  --steel-rgb: 143, 164, 176;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Manrope", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "Manrope", "Consolas", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(var(--copper-rgb), 0.28);
  color: #fff8eb;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- Top bar ---------- */

.app {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 13% -10%, rgba(46, 102, 84, 0.2), transparent 32%),
    radial-gradient(circle at 91% 105%, rgba(166, 110, 54, 0.08), transparent 31%),
    var(--bg);
}

.topbar {
  position: relative;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0 27px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 16, 14, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 194px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: var(--copper);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.bm-hex {
  stroke: rgba(var(--copper-rgb), 0.82);
  stroke-width: 1.2;
  fill: rgba(var(--copper-rgb), 0.035);
}

.bm-layer {
  stroke: var(--copper-bright);
  stroke-width: 1.05;
  fill: rgba(var(--copper-rgb), 0.08);
}

.bm-line {
  stroke: rgba(239, 200, 142, 0.48);
  stroke-width: 0.7;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
}

.brand-copy small {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1;
}

.topbar-center {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 13px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.signal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(198, 213, 204, 0.72);
}

.signal i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(var(--mint-rgb), 0.08), 0 0 13px rgba(var(--mint-rgb), 0.8);
  animation: signalPulse 2.6s ease-in-out infinite;
}

.topbar-divider {
  width: 1px;
  height: 11px;
  background: var(--line);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.supplier-count {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.supplier-count b {
  margin-right: 3px;
  color: var(--copper-bright);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
}

.btn-export {
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 12px;
  border: 1px solid rgba(var(--copper-rgb), 0.55);
  background: rgba(var(--copper-rgb), 0.08);
  color: var(--copper-bright);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-export > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-export:hover {
  border-color: var(--copper);
  background: var(--copper);
  color: #15100a;
}

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 418px;
  grid-template-rows: minmax(0, 1fr);
  height: calc(100vh - 74px);
  height: calc(100dvh - 74px);
  min-height: 0;
}

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 53% 46%, rgba(34, 79, 64, 0.34), transparent 48%),
    radial-gradient(circle at 79% 30%, rgba(var(--copper-rgb), 0.055), transparent 35%),
    linear-gradient(135deg, #081411 0%, #07110f 50%, #081512 100%);
}

.map-stage::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(196, 218, 205, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 218, 205, 0.025) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse at 52% 48%, black 0%, transparent 76%);
  content: "";
  pointer-events: none;
}

.map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}

.map-wash {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(5, 13, 11, 0.8) 0%, rgba(5, 13, 11, 0.33) 27%, transparent 48%),
    linear-gradient(0deg, rgba(5, 12, 10, 0.8) 0%, transparent 21%),
    linear-gradient(180deg, rgba(4, 11, 9, 0.3) 0%, transparent 18%);
  pointer-events: none;
}

/* ---------- Map intro ---------- */

.map-intro {
  position: absolute;
  top: 38px;
  left: 39px;
  z-index: 700;
  width: min(560px, calc(100% - 78px));
  pointer-events: none;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: rgba(var(--copper-rgb), 0.78);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.19em;
  line-height: 1.4;
}

.eyebrow-line {
  display: inline-block;
  width: 21px;
  height: 1px;
  background: rgba(var(--copper-rgb), 0.65);
}

.map-intro h1 {
  margin: 17px 0 13px;
  color: #f4efe5;
  font-family: var(--serif);
  font-size: clamp(44px, 3.75vw, 57px);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.08;
  white-space: nowrap;
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);
}

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

.map-intro h1 .title-line {
  display: block;
  white-space: nowrap;
}

.map-intro h1 .title-sub {
  display: flex;
  align-items: baseline;
  gap: 0.03em;
  margin-top: 0.04em;
}

.title-qualifier {
  color: rgba(240, 235, 225, 0.64);
  font-family: var(--sans);
  font-size: 0.46em;
  font-weight: 500;
  letter-spacing: 0.015em;
  margin-right: 0.06em;
}

.intro-copy {
  width: min(420px, 100%);
  margin: 0;
  color: rgba(207, 211, 201, 0.62);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.9;
}

.hero-stats {
  display: flex;
  margin-top: 27px;
}

.hero-stat {
  min-width: 91px;
  padding: 0 19px;
  border-left: 1px solid rgba(224, 214, 193, 0.16);
}

.hero-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-stat strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #efe7d9;
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.hero-stat strong span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.hero-stat small {
  display: block;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.is-ready .map-intro .eyebrow,
.is-ready .map-intro h1,
.is-ready .map-intro .intro-copy,
.is-ready .map-intro .hero-stats {
  animation: introRise 0.9s var(--ease) both;
}

.is-ready .map-intro h1 {
  animation-delay: 0.07s;
}

.is-ready .map-intro .intro-copy {
  animation-delay: 0.14s;
}

.is-ready .map-intro .hero-stats {
  animation-delay: 0.21s;
}

/* ---------- Map controls & footer ---------- */

.map-controls {
  position: absolute;
  right: 23px;
  bottom: 88px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(217, 215, 203, 0.16);
  border-radius: 3px;
  background: rgba(8, 20, 17, 0.82);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.map-controls button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(226, 228, 215, 0.7);
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.map-controls button:hover {
  background: rgba(239, 229, 210, 0.08);
  color: var(--copper-bright);
}

.map-controls button .ui-icon,
.map-controls button > svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-separator {
  width: 17px;
  height: 1px;
  margin: 3px 0;
  background: var(--line);
}

.map-footer {
  position: absolute;
  right: 24px;
  bottom: 20px;
  left: 27px;
  z-index: 700;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(204, 209, 198, 0.55);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.legend-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tier);
  box-shadow: 0 0 0 3px rgba(var(--tier-rgb), 0.08);
}

.map-disclaimer {
  margin: 0;
  color: rgba(150, 163, 154, 0.42);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: #07110f;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.map-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loading-mark {
  display: block;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(var(--copper-rgb), 0.22);
  border-top-color: var(--copper);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.loading-mark.is-error {
  border-color: rgba(221, 134, 104, 0.6);
  animation: none;
}

/* ---------- Leaflet map skin ---------- */

.leaflet-container {
  background: transparent !important;
  font-family: var(--sans);
  outline: none;
}

.leaflet-container a {
  color: inherit;
}

.leaflet-interactive {
  outline: none;
}

.leaflet-overlay-pane svg path {
  transition: fill 0.22s ease, stroke 0.22s ease;
}

.province-tooltip-wrap {
  padding: 9px 12px !important;
  border: 1px solid rgba(var(--copper-rgb), 0.27) !important;
  border-radius: 2px !important;
  background: rgba(7, 18, 15, 0.95) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36) !important;
  color: var(--text) !important;
  font-family: var(--sans) !important;
}

.province-tooltip-wrap::before {
  border-top-color: rgba(var(--copper-rgb), 0.27) !important;
}

.province-tooltip {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.province-tooltip strong {
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.province-tooltip em {
  color: var(--muted-2);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.02em;
}

.province-label-wrap {
  border: 0 !important;
  background: transparent !important;
}

.province-label {
  position: absolute;
  display: block;
  color: rgba(199, 211, 201, 0.3);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, color 0.3s ease;
  pointer-events: none;
}

.province-label.has-data {
  color: rgba(219, 229, 217, 0.67);
}

.province-label.is-active {
  color: var(--copper-bright);
  font-weight: 600;
}

.province-label.is-dimmed {
  opacity: 0.18;
}

.province-label.is-tiny {
  font-size: 8px;
  letter-spacing: 0.04em;
}

/* ---------- Company pins ---------- */

.company-marker-wrap {
  display: grid;
  place-items: center;
  border: 0 !important;
  background: transparent !important;
  transition: opacity 0.28s ease;
}

.company-marker-wrap.is-filtered-out {
  opacity: 0.1;
  pointer-events: none;
}

.map-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(var(--tier-rgb), 0.57);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.09), transparent 50%),
    rgba(7, 18, 15, 0.94);
  box-shadow:
    0 7px 20px rgba(0, 0, 0, 0.43),
    0 0 0 1px rgba(0, 0, 0, 0.26),
    0 0 18px rgba(var(--tier-rgb), 0.12);
  color: var(--tier);
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 0.24s var(--ease), box-shadow 0.24s ease, border-color 0.24s ease;
}

.map-pin::before {
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(var(--tier-rgb), 0.14);
  border-radius: 50%;
  content: "";
  transition: border-color 0.25s ease;
}

.map-pin::after {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(var(--tier-rgb), 0.8);
  box-shadow: 0 0 6px rgba(var(--tier-rgb), 0.6);
  content: "";
}

.pin-core {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1px solid rgba(var(--tier-rgb), 0.2);
  border-radius: 50%;
  background: rgba(var(--tier-rgb), 0.08);
}

.pin-number {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.pin-caption {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 5;
  padding: 5px 8px;
  border: 1px solid rgba(216, 207, 188, 0.15);
  border-radius: 2px;
  background: rgba(7, 18, 15, 0.94);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
  color: rgba(237, 232, 218, 0.86);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.map-pin:hover,
.map-pin.is-active {
  z-index: 9;
  border-color: var(--tier);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(var(--tier-rgb), 0.2),
    0 0 26px rgba(var(--tier-rgb), 0.28);
  transform: scale(1.13);
}

.map-pin:hover::before,
.map-pin.is-active::before {
  border-color: rgba(var(--tier-rgb), 0.44);
}

.map-pin.is-active::before {
  animation: pinPulse 2.2s ease-out infinite;
}

.map-pin:hover .pin-caption,
.map-pin.is-active .pin-caption {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Sidebar ---------- */

.sidebar {
  position: relative;
  z-index: 1100;
  min-height: 0;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(15, 30, 25, 0.9) 0%, rgba(8, 19, 16, 0.97) 58%, #081411 100%);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.1);
}

.panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.panel-list {
  padding: 27px 25px 0;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.panel-head .eyebrow {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 6px 0 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(var(--copper-rgb), 0.28);
  border-radius: 20px;
  color: var(--copper-bright);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
}

.order-note {
  padding-bottom: 4px;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sheet-toggle {
  display: none;
}

.searchbox {
  position: relative;
  display: flex;
  align-items: center;
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.22s ease, background 0.22s ease;
}

.searchbox:focus-within {
  border-color: rgba(var(--copper-rgb), 0.48);
  background: rgba(var(--copper-rgb), 0.035);
}

.search-icon {
  width: 15px;
  height: 15px;
  margin-left: 13px;
  fill: none;
  stroke: var(--muted-2);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.searchbox input {
  width: 100%;
  height: 100%;
  padding: 0 34px 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11.5px;
  letter-spacing: 0.015em;
}

.searchbox input::placeholder {
  color: var(--muted-2);
}

.searchbox input::-webkit-search-cancel-button {
  display: none;
}

.searchbox kbd {
  position: absolute;
  right: 11px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(224, 214, 193, 0.13);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
}

.search-clear {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.search-clear:hover {
  color: var(--copper-bright);
}

.search-clear .ui-icon {
  width: 13px;
  height: 13px;
}

.searchbox:focus-within kbd,
.searchbox.has-value kbd {
  display: none;
}

.filter-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-top: 9px;
  padding: 3px;
  border: 1px solid rgba(224, 214, 193, 0.075);
  background: rgba(0, 0, 0, 0.11);
}

.filter-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-tab span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.filter-tab:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.filter-tab.is-active {
  background: rgba(var(--copper-rgb), 0.14);
  color: var(--copper-bright);
}

.filter-tab.is-active span {
  color: rgba(var(--copper-rgb), 0.72);
}

.region-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.region-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.region-label b {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
}

.region-chips {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 5px;
}

.region-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.region-chip b {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
}

.region-chip:hover {
  border-color: var(--line);
  color: var(--text-soft);
}

.region-chip.is-active {
  border-color: rgba(var(--copper-rgb), 0.28);
  background: rgba(var(--copper-rgb), 0.07);
  color: var(--copper-bright);
}

.region-chip.is-active b {
  color: var(--copper);
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 7px 0 4px;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.reset-filters {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(var(--copper-rgb), 0.8);
  font-size: 8.5px;
  cursor: pointer;
}

.reset-filters:hover {
  color: var(--copper-bright);
  text-decoration: underline;
}

.list-scroll {
  flex: 1;
  min-height: 0;
  margin: 0 -8px 0 0;
  padding: 0 8px 24px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(224, 214, 193, 0.16) transparent;
  scrollbar-width: thin;
}

.list-scroll::-webkit-scrollbar {
  width: 4px;
}

.list-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.list-scroll::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(224, 214, 193, 0.16);
}

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

.company-card {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) 16px;
  gap: 10px;
  width: 100%;
  padding: 13px 6px 13px 0;
  border: 0;
  border-bottom: 1px solid rgba(224, 214, 193, 0.08);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, padding 0.2s ease;
}

.company-card:hover {
  padding-left: 7px;
  background: linear-gradient(90deg, rgba(var(--copper-rgb), 0.055), transparent 86%);
}

.company-card.is-active {
  padding-left: 7px;
  background: linear-gradient(90deg, rgba(var(--copper-rgb), 0.095), transparent 90%);
  box-shadow: inset 1px 0 0 rgba(var(--copper-rgb), 0.65);
}

.card-number {
  padding-top: 2px;
  color: rgba(var(--copper-rgb), 0.54);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.card-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.card-title {
  overflow: hidden;
  color: rgba(238, 234, 224, 0.91);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-card:hover .card-title,
.company-card.is-active .card-title {
  color: #fff9ed;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.card-tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--tier);
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
}

.card-tier i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--tier);
  box-shadow: 0 0 5px rgba(var(--tier-rgb), 0.4);
}

.card-location {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-scope {
  overflow: hidden;
  color: rgba(138, 155, 146, 0.64);
  font-size: 8.5px;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-arrow {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--muted-2);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.card-arrow .ui-icon {
  width: 13px;
  height: 13px;
}

.company-card:hover .card-arrow {
  color: var(--copper);
  opacity: 1;
  transform: translate(0, 0);
}

.company-card.is-active .card-arrow {
  color: var(--copper-bright);
  opacity: 1;
  transform: translate(0, 0);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 240px;
  color: var(--muted);
  text-align: center;
}

.empty-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(var(--copper-rgb), 0.2);
  border-radius: 50%;
}

.empty-orbit::before,
.empty-orbit::after {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(var(--copper-rgb), 0.45);
  content: "";
}

.empty-orbit::before {
  top: 1px;
  left: 7px;
}

.empty-orbit::after {
  right: 4px;
  bottom: 7px;
}

.empty-orbit i {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(var(--copper-rgb), 0.4);
  border-radius: 50%;
}

.empty-state p {
  margin: 0;
  font-size: 11px;
}

.empty-state button {
  padding: 7px 12px;
  border: 1px solid rgba(var(--copper-rgb), 0.26);
  background: transparent;
  color: var(--copper-bright);
  font-size: 9px;
  cursor: pointer;
}

.panel-note {
  display: flex;
  gap: 10px;
  margin-top: 23px;
  padding-top: 15px;
  border-top: 1px solid rgba(224, 214, 193, 0.075);
  color: rgba(132, 146, 138, 0.45);
}

.note-dash {
  flex: 0 0 auto;
  width: 13px;
  height: 1px;
  margin-top: 6px;
  background: rgba(var(--copper-rgb), 0.4);
}

.panel-note p {
  margin: 0;
  font-size: 8px;
  letter-spacing: 0.02em;
  line-height: 1.8;
}

/* ---------- Detail panel ---------- */

.panel-detail {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(224, 214, 193, 0.16) transparent;
  scrollbar-width: thin;
}

.panel-detail::-webkit-scrollbar {
  width: 4px;
}

.panel-detail::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(224, 214, 193, 0.16);
}

.detail-view {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 26px 26px 21px;
  animation: detailEnter 0.45s var(--ease) both;
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.back-btn .ui-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.back-btn:hover {
  color: var(--copper-bright);
}

.back-btn:hover .ui-icon {
  transform: translateX(-3px);
}

.detail-number {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(var(--tier-rgb), 0.28);
  background: rgba(var(--tier-rgb), 0.055);
  color: var(--tier);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.detail-badge i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.detail-badge.is-soft {
  border-color: rgba(var(--mint-rgb), 0.2);
  background: rgba(var(--mint-rgb), 0.04);
  color: rgba(151, 222, 207, 0.72);
}

.detail-badge.is-neutral {
  border-color: rgba(224, 214, 193, 0.12);
  background: transparent;
  color: var(--muted);
}

.detail-hero h2 {
  margin: 0;
  color: #f6f0e5;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.45;
}

.detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.detail-location .ui-icon {
  width: 13px;
  height: 13px;
  color: rgba(var(--copper-rgb), 0.65);
}

.detail-profile {
  margin: 21px 0 0;
  padding: 15px 0 17px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: rgba(186, 195, 186, 0.68);
  font-size: 10.5px;
  line-height: 1.9;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 17px 0 18px;
}

.detail-facts > div {
  padding-left: 13px;
  border-left: 1px solid var(--line);
}

.detail-facts > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.detail-facts span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.detail-facts strong {
  display: block;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-section {
  padding: 17px 0 18px;
  border-top: 1px solid var(--line);
}

.detail-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}

.detail-section-head span {
  color: rgba(var(--copper-rgb), 0.53);
  font-family: var(--mono);
  font-size: 8px;
}

.detail-section-head h3 {
  margin: 0;
  color: rgba(223, 221, 211, 0.78);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.process-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.process-tags span {
  padding: 5px 8px;
  border: 1px solid rgba(212, 204, 188, 0.13);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(211, 215, 205, 0.7);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.scope-block {
  display: flex;
  gap: 13px;
  margin-top: 17px;
}

.scope-label {
  flex: 0 0 auto;
  padding-top: 4px;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.scope-values {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}

.scope-values i {
  color: rgba(var(--copper-rgb), 0.78);
  font-family: var(--serif);
  font-size: 11px;
  font-style: normal;
  line-height: 1.6;
}

.scope-values i + i::before {
  display: inline-block;
  margin: 0 7px;
  color: rgba(224, 214, 193, 0.22);
  content: "/";
  font-family: var(--sans);
  font-size: 8px;
}

.industry-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
}

.industry-row span {
  color: rgba(129, 147, 138, 0.58);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.industry-row span + span::before {
  margin-right: 5px;
  color: rgba(224, 214, 193, 0.17);
  content: "璺?;
}

.detail-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: rgba(200, 204, 195, 0.7);
  font-size: 10px;
  line-height: 1.8;
}

.detail-address .ui-icon {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin-top: 2px;
  color: rgba(var(--copper-rgb), 0.66);
}

.detail-note {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-left: 1px solid rgba(var(--copper-rgb), 0.38);
  background: rgba(var(--copper-rgb), 0.035);
  color: rgba(var(--copper-rgb), 0.74);
  font-size: 8.5px;
  line-height: 1.75;
}

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

.contact-row {
  display: grid;
  grid-template-columns: 22px 45px minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid rgba(224, 214, 193, 0.06);
}

.contact-row:last-child {
  border-bottom: 0;
}

.contact-icon {
  color: rgba(139, 155, 146, 0.55);
}

.contact-icon .ui-icon {
  width: 13px;
  height: 13px;
}

.contact-label {
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.contact-value {
  overflow: hidden;
  color: rgba(216, 217, 207, 0.8);
  font-size: 10px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-value a {
  transition: color 0.2s ease;
}

.contact-value a:hover {
  color: var(--copper-bright);
}

.detail-actions {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 8px;
  margin-top: 21px;
}

.btn-locate,
.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 39px;
  border: 1px solid transparent;
  font-size: 9.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.btn-locate {
  border-color: rgba(var(--copper-rgb), 0.55);
  background: rgba(var(--copper-rgb), 0.1);
  color: var(--copper-bright);
}

.btn-locate:hover {
  border-color: var(--copper);
  background: var(--copper);
  color: #16110a;
}

.btn-copy {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.btn-copy:hover {
  border-color: var(--line-strong);
  color: var(--text-soft);
}

.btn-locate .ui-icon,
.btn-copy .ui-icon {
  width: 14px;
  height: 14px;
}

.detail-source {
  margin: 14px 0 0;
  color: rgba(129, 144, 134, 0.38);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 3000;
  padding: 10px 15px;
  border: 1px solid rgba(var(--copper-rgb), 0.32);
  background: rgba(7, 20, 16, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  color: var(--copper-bright);
  font-size: 10px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.28s ease, transform 0.28s var(--ease);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Tier colors ---------- */

.tier-1 {
  --tier: #d9a25c;
  --tier-rgb: 217, 162, 92;
}

.tier-2 {
  --tier: #8fa4b0;
  --tier-rgb: 143, 164, 176;
}

.tier-cont {
  --tier: #6bd6bf;
  --tier-rgb: 107, 214, 191;
}

/* ---------- Animations ---------- */

@keyframes signalPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pinPulse {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.95); }
}

@keyframes introRise {
  from { opacity: 0; transform: translateY(11px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes detailEnter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .topbar-center {
    display: none;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr) 382px;
  }

  .panel-list {
    padding-right: 22px;
    padding-left: 22px;
  }

  .detail-view {
    padding-right: 23px;
    padding-left: 23px;
  }

  .map-intro {
    left: 32px;
  }
}

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

  .supplier-count {
    display: none;
  }

  .hero-stat {
    min-width: 80px;
    padding: 0 15px;
  }

  .map-intro h1 {
    font-size: 48px;
  }

  .region-row {
    gap: 7px;
  }

  .region-chip {
    padding: 0 5px;
  }
}

@media (max-width: 900px) {
  :root {
    --mobile-header: calc(56px + env(safe-area-inset-top, 0px));
    --sheet-h: 50%;
  }

  html,
  body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .app {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .topbar {
    position: relative;
    top: auto;
    flex: 0 0 var(--mobile-header);
    height: var(--mobile-header);
    padding: env(safe-area-inset-top, 0px) 17px 0;
    background: rgba(6, 16, 14, 0.96);
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .topbar-actions {
    gap: 0;
  }

  .supplier-count {
    display: none;
  }

  .btn-export {
    height: 32px;
    padding: 0 11px;
  }

  .layout {
    position: relative;
    flex: 1 1 auto;
    display: block;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .map-stage {
    position: absolute;
    inset: 0;
    height: 100%;
    min-height: 0;
    scroll-margin-top: var(--mobile-header);
    background:
      radial-gradient(circle at 56% 35%, rgba(34, 79, 64, 0.37), transparent 52%),
      linear-gradient(145deg, #081411 0%, #07110f 54%, #081512 100%);
  }

  .map-wash {
    background:
      linear-gradient(180deg, rgba(5, 13, 11, 0.58) 0%, transparent 27%),
      linear-gradient(0deg, rgba(5, 12, 10, 0.38) 0%, transparent 27%);
  }

  .map-intro {
    top: 15px;
    left: 18px;
    width: calc(100% - 36px);
  }

  .map-intro .eyebrow {
    font-size: 7.5px;
    letter-spacing: 0.15em;
  }

  .eyebrow-line {
    width: 16px;
  }

  .map-intro h1 {
    margin: 9px 0 0;
    font-size: 30px;
    letter-spacing: 0;
    line-height: 1.06;
  }

  .title-slash {
    margin: 0 0.09em;
    font-size: 0.52em;
  }

  .intro-copy {
    display: none;
  }

  .hero-stats {
    margin-top: 12px;
  }

  .hero-stat {
    min-width: 63px;
    padding: 0 11px;
  }

  .hero-stat strong {
    font-size: 18px;
    letter-spacing: -0.03em;
  }

  .hero-stat strong span {
    font-size: 7.5px;
  }

  .hero-stat small {
    margin-top: 4px;
    font-size: 7.5px;
    letter-spacing: 0.07em;
  }

  .map-controls {
    right: 14px;
    bottom: calc(var(--sheet-h) + 13px);
    padding: 4px;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .map-controls button {
    width: 29px;
    height: 29px;
  }

  .map-footer {
    display: none;
  }

  .province-label {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .province-label.is-tiny {
    display: none;
  }

  .map-pin {
    width: 31px;
    height: 31px;
  }

  .pin-number {
    font-size: 8.5px;
  }

  .pin-caption {
    top: calc(100% + 8px);
    font-size: 8.5px;
  }

  .sidebar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1150;
    height: var(--sheet-h);
    min-height: 0;
    overflow: hidden;
    border-top: 1px solid rgba(224, 214, 193, 0.15);
    border-left: 0;
    border-radius: 18px 18px 0 0;
    background:
      linear-gradient(180deg, rgba(16, 33, 27, 0.99) 0%, rgba(8, 19, 16, 0.99) 62%, #071310 100%);
    box-shadow: 0 -18px 54px rgba(0, 0, 0, 0.44);
    transition: height 0.34s var(--ease);
  }

  .sidebar::before {
    position: absolute;
    top: 7px;
    left: 50%;
    z-index: 4;
    width: 34px;
    height: 3px;
    border-radius: 3px;
    background: rgba(213, 210, 196, 0.2);
    content: "";
    transform: translateX(-50%);
    pointer-events: none;
  }

  .app.is-sheet-expanded .sidebar {
    height: 92%;
  }

  .app.is-sheet-expanded .map-controls {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
  }

  .panel {
    height: 100%;
    min-height: 0;
  }

  .panel-list {
    padding: 21px 17px 0;
  }

  .panel-head {
    align-items: center;
    margin-bottom: 11px;
  }

  .panel-head .eyebrow {
    display: none;
  }

  .panel-head h2 {
    margin: 0;
    font-size: 19px;
    letter-spacing: 0.03em;
  }

  .count-pill {
    height: 16px;
    min-width: 20px;
    font-size: 8px;
  }

  .order-note {
    display: none;
  }

  .sheet-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(224, 214, 193, 0.13);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.05em;
    cursor: pointer;
  }

  .sheet-toggle:active {
    background: rgba(var(--copper-rgb), 0.1);
    color: var(--copper-bright);
  }

  .searchbox {
    height: 38px;
  }

  .searchbox input {
    font-size: 11px;
  }

  .searchbox kbd {
    display: none;
  }

  .filter-tabs {
    margin-top: 7px;
  }

  .filter-tab {
    height: 28px;
    font-size: 9.5px;
  }

  .region-row {
    gap: 8px;
    margin-top: 9px;
    padding-bottom: 9px;
    overflow: hidden;
  }

  .region-label {
    font-size: 8px;
    gap: 4px;
  }

  .region-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .region-chips::-webkit-scrollbar {
    display: none;
  }

  .region-chip {
    flex: 0 0 auto;
    height: 22px;
    padding: 0 6px;
  }

  .list-toolbar {
    min-height: 25px;
    padding: 3px 0 2px;
  }

  .list-scroll {
    flex: 1;
    min-height: 0;
    margin: 0 -6px 0 0;
    padding: 0 6px calc(16px + env(safe-area-inset-bottom, 0px)) 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .company-card {
    grid-template-columns: 25px minmax(0, 1fr) 14px;
    gap: 8px;
    padding: 11px 4px 11px 0;
  }

  .card-main {
    gap: 4px;
  }

  .card-title {
    font-size: 12.5px;
  }

  .card-scope {
    font-size: 8px;
  }

  .company-card:hover,
  .company-card.is-active {
    padding-left: 5px;
  }

  .panel-note {
    margin-top: 18px;
  }

  .empty-state {
    min-height: 155px;
  }

  .panel-detail {
    position: fixed;
    top: var(--mobile-header);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1500;
    height: auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 18px 18px 0 0;
    background:
      radial-gradient(circle at 88% 4%, rgba(var(--copper-rgb), 0.08), transparent 24%),
      linear-gradient(180deg, #0d1d18 0%, #091612 68%, #071310 100%);
    box-shadow: 0 -22px 60px rgba(0, 0, 0, 0.5);
    animation: mobileSheetIn 0.38s var(--ease) both;
  }

  .detail-view {
    min-height: 100%;
    padding: 0 19px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .detail-topbar {
    position: sticky;
    top: 0;
    z-index: 3;
    margin-bottom: 15px;
    padding: 17px 0 13px;
    background: linear-gradient(180deg, #0d1d18 72%, rgba(13, 29, 24, 0));
  }

  .back-btn {
    min-height: 32px;
    font-size: 10px;
  }

  .detail-hero h2 {
    font-size: 23px;
    line-height: 1.42;
  }

  .detail-location {
    margin-top: 9px;
    font-size: 9.5px;
  }

  .detail-profile {
    margin-top: 17px;
    padding: 13px 0 15px;
    font-size: 10.5px;
    line-height: 1.85;
  }

  .detail-facts {
    padding: 14px 0;
  }

  .detail-facts > div {
    padding-left: 10px;
  }

  .detail-facts span {
    font-size: 7.5px;
  }

  .detail-facts strong {
    font-size: 9.5px;
  }

  .detail-section {
    padding: 15px 0 16px;
  }

  .contact-row {
    grid-template-columns: 22px 42px minmax(0, 1fr);
    min-height: 37px;
  }

  .contact-value {
    font-size: 11px;
  }

  .detail-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    grid-template-columns: 1.25fr 1fr;
    margin-top: 18px;
    padding: 12px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(0deg, #081411 72%, rgba(8, 20, 17, 0));
  }

  .btn-locate,
  .btn-copy {
    height: 42px;
    font-size: 10px;
  }

  .detail-source {
    margin: 3px 0 0;
  }

  .toast {
    bottom: 18px;
  }

  .map-loading {
    font-size: 8.5px;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

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

  .btn-export {
    width: 32px;
    height: 32px;
    padding: 0;
    border-color: var(--line-strong);
    background: transparent;
    color: var(--text-soft);
  }

  .btn-export span {
    display: none;
  }

  .map-intro {
    top: 13px;
    left: 16px;
    width: calc(100% - 32px);
  }

  .map-intro h1 {
    margin-top: 8px;
    font-size: 27px;
  }

  .hero-stats {
    margin-top: 10px;
  }

  .hero-stat {
    min-width: 55px;
    padding: 0 9px;
  }

  .hero-stat strong {
    font-size: 16px;
  }

  .hero-stat small {
    font-size: 7px;
  }

  .map-controls {
    right: 12px;
    bottom: calc(var(--sheet-h) + 11px);
  }

  .map-controls button {
    width: 27px;
    height: 27px;
  }

  .sidebar {
    border-radius: 16px 16px 0 0;
  }

  .panel-list {
    padding: 19px 14px 0;
  }

  .panel-head {
    margin-bottom: 9px;
  }

  .panel-head h2 {
    font-size: 18px;
  }

  .sheet-toggle {
    min-width: 50px;
    height: 28px;
    padding: 0 8px;
    font-size: 8.5px;
  }

  .searchbox {
    height: 36px;
  }

  .filter-tab {
    height: 27px;
    font-size: 9px;
  }

  .region-row {
    margin-top: 7px;
    padding-bottom: 7px;
  }

  .region-chip {
    height: 21px;
    padding: 0 5px;
  }

  .company-card {
    grid-template-columns: 24px minmax(0, 1fr) 13px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .card-title {
    font-size: 12px;
  }

  .card-scope {
    font-size: 7.8px;
  }

  .card-meta {
    gap: 7px;
  }

  .detail-view {
    padding-right: 17px;
    padding-left: 17px;
  }

  .detail-hero h2 {
    font-size: 21px;
  }

  .detail-profile {
    font-size: 10px;
  }

  .detail-actions {
    grid-template-columns: 1.2fr 1fr;
  }

  .contact-row {
    grid-template-columns: 21px 40px minmax(0, 1fr);
  }

  .province-label {
    font-size: 7.5px;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  :root {
    --mobile-header: calc(52px + env(safe-area-inset-top, 0px));
    --sheet-h: 0%;
  }

  .topbar {
    flex: 0 0 var(--mobile-header);
    height: var(--mobile-header);
    padding: env(safe-area-inset-top, 0px) 15px 0;
  }

  .brand-mark {
    width: 27px;
    height: 27px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand-copy small {
    display: none;
  }

  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(304px, 38%);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }

  .map-stage {
    position: relative;
    inset: auto;
    height: 100%;
  }

  .map-intro {
    top: 14px;
    left: 17px;
    width: min(48%, 270px);
  }

  .map-intro h1 {
    margin-top: 7px;
    font-size: 26px;
  }

  .map-intro .eyebrow {
    font-size: 7px;
  }

  .hero-stats {
    margin-top: 9px;
  }

  .hero-stat {
    min-width: 53px;
    padding: 0 9px;
  }

  .hero-stat strong {
    font-size: 16px;
  }

  .hero-stat strong span,
  .hero-stat small {
    font-size: 7px;
  }

  .map-controls {
    right: 12px;
    bottom: 14px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .map-controls button {
    width: 27px;
    height: 27px;
  }

  .sidebar,
  .app.is-sheet-expanded .sidebar {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    height: 100%;
    border-top: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    box-shadow: -12px 0 30px rgba(0, 0, 0, 0.18);
    transition: none;
  }

  .sidebar::before {
    display: none;
  }

  .sheet-toggle {
    display: none !important;
  }

  .app.is-sheet-expanded .map-controls {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .panel-list {
    padding: 14px 14px 0;
  }

  .panel-head {
    margin-bottom: 8px;
  }

  .panel-head h2 {
    font-size: 18px;
  }

  .searchbox {
    height: 34px;
  }

  .filter-tabs {
    margin-top: 6px;
  }

  .filter-tab {
    height: 26px;
  }

  .region-row {
    margin-top: 7px;
    padding-bottom: 6px;
  }

  .list-toolbar {
    min-height: 22px;
  }

  .company-card {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .card-title {
    font-size: 12px;
  }

  .panel-note {
    margin-top: 13px;
    padding-top: 10px;
  }

  .panel-detail {
    position: fixed;
    top: var(--mobile-header);
    right: 0;
    bottom: 0;
    left: auto;
    width: min(430px, 52vw);
    height: auto;
    border-radius: 14px 0 0 0;
  }

  .detail-view {
    padding: 0 18px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .detail-topbar {
    padding-top: 14px;
    margin-bottom: 12px;
  }

  .detail-hero h2 {
    font-size: 20px;
  }

  .detail-profile {
    margin-top: 13px;
    padding: 11px 0 13px;
    font-size: 10px;
  }

  .detail-facts {
    padding: 12px 0;
  }

  .detail-section {
    padding: 12px 0 13px;
  }

  .detail-actions {
    grid-template-columns: 1fr 1fr;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .btn-locate,
  .btn-copy {
    height: 38px;
  }

  .map-loading {
    font-size: 8px;
  }
}
@keyframes mobileSheetIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


