.citygml-page {
  min-height: calc(100vh - var(--header-height));
  padding: 28px 0 54px;
}

.citygml-page .shell {
  width: min(1460px, calc(100% - 32px));
}

.citygml-app {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  min-height: min(760px, calc(100vh - 180px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(7, 16, 27, 0.92);
  box-shadow: var(--shadow);
}

.citygml-sidebar {
  position: relative;
  z-index: 2;
  padding: 20px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 29, 45, 0.98), rgba(8, 19, 31, 0.96));
}

.citygml-sidebar h2,
.citygml-sidebar h3 {
  margin-top: 0;
  color: #fff;
}

.citygml-sidebar h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.citygml-sidebar h3 {
  margin-bottom: 10px;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.citygml-sidebar p {
  color: var(--text-soft);
}

.citygml-section + .citygml-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.citygml-dropzone {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 20px;
  border: 1px dashed rgba(77, 200, 255, 0.54);
  border-radius: 16px;
  background: rgba(77, 200, 255, 0.055);
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.citygml-dropzone:hover,
.citygml-dropzone:focus-within,
.citygml-dropzone.is-dragover {
  border-color: var(--brand);
  background: rgba(77, 200, 255, 0.11);
  transform: translateY(-1px);
}

.citygml-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.citygml-drop-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border: 1px solid rgba(77, 200, 255, 0.45);
  border-radius: 12px;
  background:
    linear-gradient(var(--brand), var(--brand)) center 12px / 2px 16px no-repeat,
    linear-gradient(45deg, transparent 45%, var(--brand) 46% 54%, transparent 55%) 12px 8px / 10px 10px no-repeat,
    linear-gradient(-45deg, transparent 45%, var(--brand) 46% 54%, transparent 55%) 20px 8px / 10px 10px no-repeat,
    rgba(77, 200, 255, 0.08);
}

.citygml-dropzone strong {
  display: block;
  color: #fff;
}

.citygml-dropzone span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.citygml-file-button {
  border: 1px solid rgba(77, 200, 255, 0.45);
  border-radius: 11px;
  background: rgba(77, 200, 255, 0.10);
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 720;
  cursor: pointer;
}

.citygml-file-button {
  margin-top: 14px;
  padding: 9px 14px;
}


.citygml-file-button:hover,
.citygml-file-button:focus-visible {
  border-color: rgba(77, 200, 255, 0.72);
  background: rgba(77, 200, 255, 0.16);
  outline: none;
}


.citygml-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(148, 184, 214, 0.08);
  color: var(--text-soft);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.citygml-status[hidden] {
  display: none;
}


.citygml-status[data-state="error"] {
  color: #ffe5e5;
  background: rgba(255, 141, 141, 0.1);
}

.citygml-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.citygml-button,
.citygml-select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(148, 184, 214, 0.08);
  color: var(--text);
  font: inherit;
}

.citygml-button {
  padding: 0 12px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 720;
}

.citygml-button:hover,
.citygml-button:focus-visible,
.citygml-button[aria-pressed="true"] {
  border-color: rgba(77, 200, 255, 0.62);
  background: rgba(77, 200, 255, 0.13);
  outline: none;
}

.citygml-button:disabled,
.citygml-select:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.citygml-field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.citygml-field label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.citygml-select {
  width: 100%;
  padding: 0 10px;
}

.citygml-stats {
  display: grid;
  gap: 8px;
  margin: 0;
}

.citygml-stats > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(148, 184, 214, 0.1);
}

.citygml-stats dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.citygml-stats dd {
  margin: 0;
  max-width: 190px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 720;
  text-align: right;
  overflow-wrap: anywhere;
}

.citygml-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.citygml-legend li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.citygml-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--swatch);
  box-shadow: 0 0 12px color-mix(in srgb, var(--swatch) 35%, transparent);
}

.citygml-limitations {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.citygml-limitations li + li {
  margin-top: 4px;
}

.citygml-stage {
  position: relative;
  min-width: 0;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(35, 107, 142, 0.17), transparent 42%),
    linear-gradient(180deg, #071321, #030912 72%);
}

.citygml-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}


.public-viewer-promo {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 22px;
  align-items: center;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(77, 200, 255, 0.32);
  border-radius: var(--radius-medium);
  background: linear-gradient(135deg, rgba(77, 200, 255, 0.11), rgba(125, 227, 195, 0.055));
}

.public-viewer-promo h3 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
}

.public-viewer-promo p {
  margin: 0;
  color: var(--text-soft);
}

.public-viewer-promo a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--brand);
  color: #00141f;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 1040px) {
  .citygml-app {
    grid-template-columns: 310px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .citygml-page .shell {
    width: min(100% - 20px, 1460px);
  }

  .citygml-app {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 18px;
  }

  .citygml-sidebar {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .citygml-stage {
    min-height: 68vh;
  }

  .public-viewer-promo {
    grid-template-columns: 1fr;
  }

  .public-viewer-promo a {
    justify-self: start;
  }
}
