.safety,
.source-details {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.safety > summary,
.source-details > summary,
.boundary > summary {
  min-height: 48px;
  padding: 10px 13px;
  font-weight: 850;
  cursor: pointer;
}

.safety .warning,
.source-details .source {
  margin: 0 12px 12px;
}

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

.voice-input {
  color: #153f80 !important;
  background: var(--sky) !important;
  border: 2px solid #245db4 !important;
}

.boundary {
  display: block;
}

@media (max-width: 820px) {
  body {
    line-height: 1.55;
  }

  header {
    min-height: 60px;
    padding-top: max(7px, env(safe-area-inset-top));
    padding-bottom: 7px;
    border-bottom-width: 3px;
  }

  .brand > span {
    width: 38px;
    height: 38px;
  }

  main {
    width: min(100% - 16px, 720px);
    padding-top: 8px;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr) 92px;
    min-height: 132px;
  }

  .intro > div {
    padding: 15px 14px;
  }

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

  .intro p {
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.45;
  }

  .intro img {
    min-height: 132px;
    height: 132px;
  }

  .tools {
    margin: 8px 0;
  }

  .tools button {
    min-height: 44px;
  }

  .panel {
    margin-top: 10px;
    padding: 16px 14px;
  }

  .panel h2 {
    font-size: 24px;
  }

  .categories {
    gap: 8px;
  }

  .categories button {
    min-height: 92px;
    padding: 13px;
    line-height: 1.35;
  }

  .categories small {
    line-height: 1.35;
  }

  .compose {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compose input {
    grid-column: 1 / -1;
  }

  .compose button {
    min-height: 52px;
  }

  .result {
    scroll-margin-top: 68px;
  }

  .result-head {
    display: grid;
  }

  .result-head button {
    width: 100%;
  }

  .details,
  .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .details details:last-child {
    grid-column: 1 / -1;
  }

  .actions button {
    min-height: 62px;
    line-height: 1.35;
  }
}

@media (max-width: 560px) {
  .categories {
    grid-template-columns: 1fr;
  }

  .categories button {
    min-height: 78px;
  }
}

@media (max-width: 380px) {
  .brand strong {
    font-size: 14px;
  }

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

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