.external-link {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--bright-yellow);
  font-size: 0.82rem;
  text-align: center;
}
.fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.action-row .secondary {
  margin-top: 0;
}
@media (min-width: 720px) and (min-height: 600px) and (orientation: landscape) {
  html,
  body {
    min-height: 100%;
  }
  .shell {
    min-height: 100dvh;
    height: auto;
    max-width: none;
    padding: 14px 20px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .topbar {
    margin-bottom: 10px;
    min-height: 42px;
  }
  .topbar h1 {
    font-size: 1.15rem;
    margin: 2px 0;
  }
  .layout {
    min-height: 0;
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "compass chart"
      "controls controls";
    gap: 12px;
  }
  .right-col {
    display: contents;
  }
  .panel {
    padding: 16px;
    border-radius: 18px;
  }
  .compass-panel {
    min-height: 0;
    height: 100%;
    padding: 14px 18px;
  }
  .period strong {
    font-size: clamp(2rem, 4vh, 2.65rem);
  }
  .compass-wrap {
    min-height: 0;
    overflow: hidden;
  }
  .compass-wrap {
    --dial-size: min(78%, 42vh, 410px);
  }
  .direction-cards {
    margin: 2px 0 8px;
  }
  .direction-cards div {
    padding: 8px;
  }
  .direction-cards strong {
    font-size: 1.45rem;
  }
  .primary,
  .secondary,
  .ghost {
    min-height: 38px;
  }
  .lock-button {
    margin-top: 7px;
  }
  .range-label {
    margin-top: 10px;
  }
  input[type="range"] {
    margin: 7px 0;
  }
  .hint,
  .external-link {
    margin-top: 2px;
    font-size: 0.75rem;
  }
  .fields {
    margin: 12px 0;
    gap: 8px;
  }
  .fields label span {
    margin-bottom: 4px;
  }
  select {
    padding: 9px;
  }
  .summary {
    padding-top: 10px;
  }
  .chart-panel {
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .grid {
    margin-top: 10px;
    min-height: 0;
    height: 100%;
  }
  .palace {
    min-height: 0;
    height: auto;
  }
  .palace > strong {
    font-size: clamp(2.6rem, 5.4vh, 4rem);
  }
  .methods {
    margin-top: 9px;
  }
  .methods div {
    padding: 8px 10px;
  }
  .methods strong {
    margin: 4px 0;
  }
  .methods p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (min-width: 720px) and (max-width: 900px) and (min-height: 600px) and (orientation: landscape) {
  .fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) and (orientation: portrait) {
  .fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
