.relief-app { padding: 12px 0 28px; }
.relief-app .wrap {
  width: calc(100% - 20px);
  max-width: none;
}
.relief-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  height: calc(100vh - 96px);
  min-height: 560px;
}
.relief-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  flex: 1 1 0;
  min-height: 240px;
  min-width: 0;
}
.relief-card {
  background: #fff;
  border: 1px solid #eadfce;
  border-radius: 18px;
  padding: 14px;
  min-width: 0;
}
.relief-controls {
  flex: 0 1 auto;
  height: auto;
  max-height: 38%;
  overflow: auto;
}
.relief-card h1 { margin: 0 0 6px; font-size: 1.45rem; }
.relief-lead, .relief-note, .relief-hint { margin: 0 0 12px; color: #57534e; font-size: 0.92rem; }
.relief-hint { margin-top: -4px; font-size: 0.82rem; }
label.gen-slider .rel-num {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: #e56b1f;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
label.gen-slider .rel-num input[type="number"] {
  width: 5.2em !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 2px 8px !important;
  border: 1px solid #eadfce !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #e56b1f !important;
  box-shadow: none !important;
  font: inherit;
  font-weight: 700;
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
}
label.gen-slider .rel-num input[type="number"]::-webkit-outer-spin-button,
label.gen-slider .rel-num input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.relief-row { display: flex; gap: 8px; margin-bottom: 10px; }
.relief-row input[type="search"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #eadfce;
}
.relief-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.relief-picks button, .relief-go {
  border: 1px solid #eadfce;
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.relief-picks button.is-on, .relief-go {
  background: #e56b1f;
  border-color: #e56b1f;
  color: #fff;
}
.relief-four { margin: 0 0 12px; }
.relief-four p { margin: 0 0 8px; color: #57534e; font-size: 0.82rem; }
.relief-four-row { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; }
.relief-four-row span { width: 8.6rem; flex: none; font-size: 0.82rem; font-weight: 700; padding-top: 2px; }
.rel-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.rel-dots button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #eadfce;
  padding: 0;
  cursor: pointer;
}
.rel-dots button.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e56b1f; }
.relief-map {
  height: 100%;
  min-height: 0;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  margin: 0;
  border: 1px solid #eadfce;
}
.relief-layers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin: 0 0 8px;
}
.relief-key {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a8a29e;
}
.relief-layers label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
}
.relief-layers .is-lock { opacity: 0.72; }
.relief-layers .sw {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  flex: none;
}
.relief-hits { display: grid; gap: 4px; margin: -4px 0 10px; }
.relief-hits button {
  text-align: left;
  border: 1px solid #eadfce;
  background: #fffaf4;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}
.relief-view {
  min-height: 0;
  min-width: 0;
  height: 100%;
  padding: 0;
  background: #8f8f8f;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.relief-view canvas { width: 100%; height: 100%; display: block; min-height: 0; }
.relief-view-note {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  text-align: center;
  color: #1c1917;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  z-index: 2;
}
.relief-view-note[hidden] { display: none; }
.relief-status { margin: 8px 0 0; font-size: 0.9rem; }
.relief-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
html.is-embed,
html.is-embed body { height: 100%; margin: 0; }
html.is-embed .shell { height: 100%; min-height: 0; overflow: hidden; }
html.is-embed .relief-app { height: 100%; padding: 8px; box-sizing: border-box; overflow: hidden; }
html.is-embed .relief-app .wrap { width: 100%; height: 100%; }
html.is-embed .relief-grid { height: 100%; min-height: 0; }
html.is-embed .relief-pair { flex: 1 1 0; min-height: 0; }
html.is-embed .relief-controls { max-height: 34%; height: auto; overflow: auto; }
html.is-embed .relief-view { min-height: 0; height: 100%; }
html.is-embed .relief-view canvas { min-height: 0; height: 100%; }
@media (max-width: 980px) {
  .relief-grid { height: auto; min-height: 0; }
  .relief-pair {
    display: flex;
    flex-direction: column;
    flex: none;
    height: auto;
    min-height: 0;
  }
  .relief-controls { height: auto; max-height: none; }
  .relief-map { height: clamp(220px, 42vw, 380px); }
  .relief-view, .relief-view canvas { min-height: 280px; height: 52vw; }
  html.is-embed,
  html.is-embed body,
  html.is-embed .shell,
  html.is-embed .relief-app,
  html.is-embed .relief-app .wrap,
  html.is-embed .relief-grid,
  html.is-embed .relief-pair { height: auto; min-height: 0; overflow: visible; }
  html.is-embed .relief-controls { height: auto; max-height: none; overflow: visible; }
  html.is-embed .relief-view,
  html.is-embed .relief-view canvas { min-height: 280px; height: 52vw; }
  html.is-embed .relief-map { height: clamp(220px, 42vw, 380px); }
}
