.terrain-options label {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.terrain-options input,.terrain-options select {
  max-width:145px;
  min-width:0;
}
.sun-hours-scale {
  background:linear-gradient(90deg,#4a36aa,#2d87d7,#33bcaa,#8ccf5b,#fedb56,#f18640);
}
.terrain-direction-field {
  border:0;
  padding:0;
  margin:10px 0 14px;
  text-align:center;
}
.terrain-direction-field legend {
  font-size:12px!important;
  font-weight:600;
  text-align:left;
}
.terrain-direction-field small {
  font-size:11px;
  line-height:1.4;
  color:#58716f;
  display:block;
}
.terrain-aspect-wheel {
  position:relative;
  width:200px;
  height:200px;
  margin:0 auto 4px;
}
.terrain-aspect-wheel svg {
  width:100%;
  height:100%;
  display:block;
}
.terrain-aspect-wheel path {
  fill:#e1e9e6;
  stroke:white;
  stroke-width:2;
  cursor:pointer;
}
.terrain-aspect-wheel path.selected {
  fill:#217d71;
}
.terrain-aspect-wheel button {
  position:absolute;
  transform:translate(-50%,-50%);
  width:34px;
  height:32px;
  min-height:32px;
  padding:0;
  border:0;
  background:transparent;
  font-size:12px;
  border-radius:50%;
  color:#21454a;
}
.terrain-aspect-wheel button[aria-checked=true] {
  color:white;
  font-weight:700;
}
.terrain-aspect-wheel button:hover {
  background:#ffffff40;
}
.coordinate-bar #point-details {
  margin-left:auto;
}
.coordinate-bar #share-point,.coordinate-bar #copy-coordinate {
  margin-left:0;
}
.point-detail-dialog,.feedback-dialog {
  width:min(490px,calc(100% - 28px));
  max-height:88dvh;
  overflow:auto;
  border:1px solid #9cb7b0;
  border-radius:var(--ui-dialog-radius);
  padding:20px;
  color:#173f43;
  overscroll-behavior:contain;
}
.point-detail-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.point-detail-heading h2 {
  font-size:20px;
  line-height:1.2;
  margin:0;
}
.point-detail-heading button {
  flex:0 0 34px;
  width:34px;
  min-height:34px;
  padding:0;
  font-size:20px;
}
.point-detail-dialog>p {
  margin:0 0 18px;
  color:#607570;
  font-variant-numeric:tabular-nums;
}
.point-detail-controls {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
  margin:0 0 18px;
}
.point-detail-controls label {
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0;
  font-size:12px;
  font-weight:600;
  min-width:0;
}
.point-detail-controls input,.point-detail-controls select,.point-detail-controls button {
  width:100%;
  height:40px;
  margin:0;
  min-width:0;
}
.point-detail-controls button {
  padding:7px 10px;
  font-size:12px;
}
.point-detail-dialog dl {
  display:grid;
  grid-template-columns:100px minmax(0,1fr);
  gap:10px 14px;
  margin:12px 0 20px;
  font-size:14px;
}
.point-detail-dialog dt {
  color:#607570;
}
.point-detail-dialog dd {
  margin:0;
  font-weight:600;
  overflow-wrap:anywhere;
}
.point-detail-dialog h3 {
  font-size:16px;
  margin:18px 0 10px;
}
.point-detail-dialog p {
  font-size:13px;
  line-height:1.5;
  margin:9px 0;
}
.point-detail-dialog table {
  width:100%;
  font-size:11px;
  border-collapse:collapse;
  margin:10px 0;
  table-layout:fixed;
}
.point-detail-dialog td {
  padding:8px 4px;
  border-bottom:1px solid #d7e4de;
  overflow-wrap:anywhere;
  vertical-align:top;
}
.point-detail-dialog td:first-child {
  width:17%;
}
.point-detail-dialog a {
  display:block;
  font-size:11px;
  margin:10px 0;
}
.point-detail-dialog small {
  display:block;
  font-size:11px;
  line-height:1.5;
  color:#607570;
}
.point-detail-dialog::backdrop,.feedback-dialog::backdrop {
  background:#183f4366;
}
.route-terrain-summary {
  margin:12px 0;
  padding:10px;
  border:1px solid #d0e1dc;
  border-radius:8px;
}
.route-terrain-summary summary {
  cursor:pointer;
  font-weight:600;
}
.route-terrain-summary p,.route-terrain-summary small {
  font-size:12px;
  line-height:1.4;
}
.route-terrain-summary table {
  width:100%;
  font-size:12px;
  border-collapse:collapse;
}
.route-terrain-summary td,.route-terrain-summary th {
  text-align:left;
  padding:5px 3px;
  border-bottom:1px solid #e0e9e5;
}
.terrain-rose {
  max-width:240px;
  margin:auto;
}
.terrain-rose svg {
  width:100%;
  font-size:11px;
  fill:#234844;
}
.header-actions {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}
.header-actions button,.header-actions a {
  font:inherit;
  font-size:12px;
  white-space:nowrap;
  text-decoration:none;
  border:1px solid #ffffff40;
  border-radius:7px;
  padding:8px 10px;
  min-height:38px;
  color:#e1efeb;
  background:transparent;
}
.header-actions svg {
  display:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.header-actions button:hover,.header-actions a:hover {
  background:#ffffff15;
}
.feedback-form {
  display:grid;
  max-width:none;
  gap:14px;
}
.feedback-form label {
  font-size:13px;
  font-weight:600;
  margin:0;
  display:grid;
  gap:6px;
  min-width:0;
}
.feedback-form textarea {
  font:inherit;
  font-size:14px;
  line-height:1.5;
  width:100%;
  min-height:140px;
  resize:vertical;
  border:1px solid #b7cac5;
  border-radius:6px;
  padding:10px;
  color:#213e42;
}
.feedback-form .feedback-trap {
  position:absolute;
  left:-10000px;
  width:1px;
  height:1px;
  overflow:hidden;
}
.feedback-notice,.feedback-status {
  font-size:12px;
  line-height:1.5;
  margin:0;
}
.feedback-notice {
  color:#607570;
}
.feedback-status:empty {
  display:none;
}
.feedback-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
@media(max-width:760px),(max-width:1100px) and (max-height:500px) {
  .point-detail-dialog,.feedback-dialog {
    padding:16px;
    width:calc(100% - 24px);
  }
  .header-actions {
    gap:4px;
    margin-left:0;
  }
  .header-actions span {
    display:none;
  }
  .header-actions svg {
    display:block;
    width:19px;
    height:19px;
  }
  .header-actions button,.header-actions a {
    display:grid;
    place-items:center;
    width:32px;
    min-height:36px;
    padding:5px;
    border:0;
  }
  .point-detail-controls {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }
  .point-detail-controls>button {
    grid-column:1/-1;
    width:auto;
    justify-self:start;
    padding:6px 14px;
  }
}
@media(max-width:600px) {
  header .brand {
    display:none!important;
  }
}
.point-detail-dialog .point-timezone-note {
  margin:-8px 0 14px;
  font-size:11px;
  line-height:1.45;
  color:#607570;
}
@media(min-width:761px) {
  .coordinate-bar #point-details {
    margin-left:0;
  }
}
/* Solar controls: one row for the day, two compact rows for the shade. */
.terrain-options .solar-fields {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px;
  align-items:end;
  width:100%;
}
.terrain-options .solar-fields label {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:4px;
  margin:0;
  font-size:11px;
  min-width:0;
  line-height:1.3;
}
.terrain-options .solar-fields input,.terrain-options .solar-fields select {
  width:100%;
  max-width:none;
  min-width:0;
  height:36px;
  margin:0;
  padding:6px 8px;
  font-size:12px;
  box-sizing:border-box;
}
.terrain-options .solar-fields button {
  margin:0;
  min-height:36px;
  padding:5px 7px;
  font-size:11px;
  line-height:1.2;
}
.terrain-options .solar-hours-fields {
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
}
.terrain-options .solar-hours-fields label {
  flex-direction:row;
  align-items:center;
  gap:8px;
}
.terrain-options .solar-hours-fields input {
  flex:1;
  width:0;
  min-width:110px;
}
.terrain-options .solar-actions {
  display:flex;
  align-items:stretch;
  gap:5px;
  min-width:0;
}
.terrain-options .solar-actions button {
  flex:1;
  min-width:0;
}
.terrain-options .solar-actions .terrain-local-time {
  font-size:10px;
}

.feedback-status[data-state=error] {
  color:var(--ui-error);
  border-left:3px solid currentColor;
  padding:8px 10px;
  background:#fff3f1;
}
.feedback-status[data-state=pending] { color:var(--ui-muted); }
.feedback-form[aria-busy=true] button[type=submit] { cursor:wait; }
.point-detail-heading h2 { overflow-wrap:anywhere; }
.point-detail-heading>button { flex-shrink:0; }
