.app-shell {
  min-height: 100vh;
  padding: 56px clamp(24px, 5vw, 80px);
}

.embed-toolbar {
  display: flex;
  gap: 16px;
  margin: -28px 0 28px;
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-soft);
}

.embed-toolbar[hidden] {
  display: none;
}

.embed-toolbar > div {
  display: flex;
  gap: 8px;
}

.embed-action {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  color: #ffffff;
  background: var(--color-primary);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.embed-action[hidden] {
  display: none;
}

.embed-action-secondary {
  color: var(--color-primary);
  background: #ffffff;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
  gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}

.page-header h1 {
  margin: 0;
  color: #33383d;
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  font-weight: 500;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.header-rule {
  height: 4px;
  border-radius: 99px;
  background: var(--color-primary);
}

.app-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 18px;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.footer-link {
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--color-primary);
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: 298px minmax(520px, 1fr);
  gap: 36px;
  align-items: start;
}

.filters-panel,
.summary-panel {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: var(--shadow-panel);
}

.panel-title,
.summary-title {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  color: #ffffff;
  background: var(--summary-accent, var(--color-primary));
  font-weight: 700;
  text-align: center;
}

.summary-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.summary-title > span {
  min-width: 0;
}

.summary-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
}

.summary-close svg {
  width: 18px;
  height: 18px;
}

.summary-close:hover,
.summary-close:focus {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.panel-title svg,
.summary-title svg,
.filter-section h2 svg,
.summary-body svg {
  width: 1em;
  height: 1em;
  stroke-width: 2;
  vertical-align: -0.14em;
}

.filters-content,
.summary-panel p,
.summary-body {
  padding: 5px 15px;
}

.filters-content {
  background: #fafafa;
}

.filter-section {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 8px;
}

.filter-section-level-1 {
  padding: 0 0 12px;
  background: transparent;
}

.filter-section-level-2 {
  background: #F5F5F5;
}

.filter-section-level-3 {
  margin: 14px 0 0 18px;
  background: #ededed;
}

.filter-section h2 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  font-size: 1rem;
}

.filter-option {
  display: block;
  margin: 8px 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.map-stage {
  position: relative;
  min-height: 560px;
}

.map-tooltip {
  position: absolute;
  z-index: 5;
  max-width: 240px;
  padding: 8px 10px;
  transform: translate(-50%, calc(-100% - 12px));
  border: 1px solid var(--tooltip-color, var(--color-primary));
  border-radius: 6px;
  color: #26313b;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(35, 49, 61, 0.16);
  font-size: 0.98rem;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
}

.map-tooltip[hidden] {
  display: none;
}

.workspace > .summary-panel {
  position: absolute;
  top: 8px;
  right: 0;
  z-index: 4;
  width: max-content;
  min-width: 300px;
  max-width: min(460px, calc(100% - 320px));
}

.map-root {
  display: flex;
  align-items: center;
  min-height: 560px;
}

.map-root svg {
  width: min(100%, 930px);
  height: auto;
}

.establishments-layer {
  pointer-events: none;
}

.establishment-marker {
  stroke: #ffffff;
  stroke-width: 1.8;
  cursor: pointer;
  pointer-events: auto;
  transition: r 160ms ease, stroke 160ms ease, stroke-width 160ms ease;
}

.establishment-marker:hover,
.establishment-marker:focus {
  stroke: var(--color-primary);
  stroke-width: 2.4;
  outline: none;
  r: 6.2;
}

.establishment-marker.is-selected {
  stroke: var(--color-primary);
  stroke-width: 3;
  outline: none;
  r: 6.2;
}

.summary-panel strong {
  color: var(--summary-accent, var(--color-primary));
  font-size: 1.25rem;
}

.summary-panel p {
  font-size: 18px;
}

.summary-body p {
  display: flex;
  gap: 10px;
  align-items: center;
}

.summary-body svg {
  width: 1.3em;
  height: 1.3em;
  color: var(--summary-accent, var(--color-primary));
}

.summary-body .summary-instruction {
  display: block;
  margin: 8px 0 0;
  color: #33383d;
  font-weight: 700;
}

.summary-body .summary-empty {
  display: block;
  margin-top: 8px;
  color: var(--color-muted);
  font-weight: 700;
}

.zone-legend-panel {
  margin-top: 12px;
}

.zone-legend-panel summary {
  color: var(--color-primary);
  font-weight: 700;
  cursor: pointer;
}

.zone-legend {
  display: grid;
  gap: 8px;
  max-height: 320px;
  margin-top: 10px;
  overflow: auto;
}

.zone-legend-item {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.zone-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--zone-color);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.zone-legend-count {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #0e7dc412;
  text-align: center;
}

.summary-action {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: var(--color-primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.summary-action:hover,
.summary-action:focus {
  background: #0b6aa8;
  outline: none;
}

.details-root[hidden],
.about-root[hidden] {
  display: none;
}

.details-backdrop,
.about-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(2px);
}

.about-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 11;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(620px, calc(100vw - 40px));
  max-height: min(680px, calc(100vh - 40px));
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(35, 49, 61, 0.18);
}

.about-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  color: #ffffff;
  background: var(--color-primary);
}

.about-header h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.about-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
}

.about-content {
  overflow: auto;
  padding: 24px 32px 30px;
  color: #33383d;
  line-height: 1.55;
}

.about-content p {
  margin: 0 0 18px;
}

.about-meta {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--color-soft);
}

.legal-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.legal-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
}

.legal-list dt {
  color: var(--color-muted);
  font-weight: 700;
}

.legal-list dd {
  margin: 0;
}

.about-content a {
  color: var(--color-primary);
  font-weight: 700;
}

.about-content h3 {
  margin: 22px 0 8px;
  color: var(--color-primary);
  font-size: 1rem;
}

.details-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 11;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(700px, calc(100vw - 40px));
  max-height: min(740px, calc(100vh - 40px));
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(35, 49, 61, 0.18);
}

.details-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  color: #ffffff;
  background: var(--details-accent, #2f6f47);
}

.details-header h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.details-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
}

.details-close svg {
  width: 22px;
  height: 22px;
}

.details-close:hover,
.details-close:focus {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.details-summary {
  display: flex;
  gap: 28px;
  justify-content: center;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--color-border);
}

.details-summary p {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.details-summary strong {
  color: #2f6f47;
  font-size: 1.2rem;
}

.details-content {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 22px 80px 28px;
}

.project-card {
  padding: 18px 24px;
  border-radius: 8px;
  background: #f8f8f8;
}

.details-establishment-group {
  display: grid;
  gap: 12px;
}

.details-establishment-group > h3 {
  margin: 20px 0 0;
  padding-left: 12px;
  border-left: 4px solid var(--details-accent, var(--color-primary));
  color: #33383d;
  font-size: 1rem;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.project-card p {
  margin: 10px 0 0;
}

.project-type {
  margin-top: 0;
  color: var(--color-muted);
  font-style: italic;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  color: var(--color-muted);
  font-size: 0.88rem;
}

.project-scope {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #ffffff;
  color: #31433a;
}

.project-scope > span {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
}

.project-scope svg {
  width: 1em;
  height: 1em;
  color: #2f6f47;
}

.project-targets {
  margin-top: 10px;
}

.project-targets summary {
  color: var(--color-primary);
  font-weight: 400;
  cursor: pointer;
}

.target-group {
  margin-top: 12px;
}

.target-group h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.target-group ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.target-group li span {
  color: var(--color-muted);
  font-size: 0.88rem;
}

.project-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.project-link svg {
  width: 1em;
  height: 1em;
}
