.sty-viewer-app,
body[data-rail="collapsed"] .sty-viewer-app {
  grid-template-columns: 1fr;
}

.viewer-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
}

.viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(18px, 3vw, 40px) 8px;
}

.viewer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.viewer-brand:hover {
  color: var(--accent-ink);
}

.viewer-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.viewer-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  line-height: 1;
  overflow-wrap: anywhere;
}

.viewer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.sty-viewer .view {
  padding: 16px clamp(18px, 3vw, 40px) 34px;
}

.sty-viewer .builder {
  height: calc(100vh - 128px);
  min-height: 560px;
}

.sty-viewer .builder-top {
  padding-top: 2px;
}

@media (max-width: 880px) {
  .viewer-bar {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 16px;
  }

  .viewer-actions {
    justify-content: flex-start;
  }

  .sty-viewer .view {
    padding-top: 10px;
  }

  .sty-viewer .builder {
    height: auto;
    min-height: 680px;
  }
}

@media (max-width: 520px) {
  .viewer-actions .btn {
    padding-inline: 12px;
  }

  .viewer-actions .btn span {
    display: none;
  }

  .viewer-mark {
    width: 36px;
    height: 36px;
  }
}
