#dialog:is([data-kind="tide-nest-brief"],[data-kind="tide-nest-result"]) {
  width: min(690px, 94vw, calc(100vw - var(--phone-left, 0px) - var(--phone-right, 0px)));
  color: #28463d;
  background: #f8f3e4;
  border-color: #466655;
}
#dialog:is([data-kind="tide-nest-brief"],[data-kind="tide-nest-result"]) .dialog-content {
  padding: 17px 20px;
}
.nest-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 34%);
  align-items: center;
  gap: 14px;
  padding-inline-end: 48px;
}
.dialog-content .nest-page-head h2 {
  margin: 0 0 4px;
  color: #294b40;
  font-size: clamp(23px, 4vw, 34px);
  line-height: 1.15;
}
.dialog-content :is(.nest-page-head,.nest-bank-guide,.nest-foot) p {
  margin: 0;
  color: #43584c;
  font-size: 13px;
  line-height: 1.45;
}
.nest-shoreline {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #839984;
  border-radius: 5px;
}
.nest-bank-guide,.nest-species {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 11px;
}
.nest-bank-guide {
  padding: 8px 0;
  border-block: 1px solid #c7c9ae;
}
.nest-bank-guide strong {
  margin-right: .5em;
  color: #314e3e;
}
.nest-species-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}
.nest-species-row > svg {
  flex: none;
  width: 39px;
  height: 25px;
}
.nest-species-row > div { min-width: 0; }
.nest-species-row strong,.nest-species-row div > span { display: block; }
.nest-species-row strong { color: #315247; font-size: 14px; }
.nest-species-row div > span,.nest-species-row small { color: #4a604f; font-size: 11px; }
.nest-species-row small,.nest-reward { display: inline-flex; align-items: center; gap: 3px; }
.nest-species-row small { margin-left: auto; font-weight: 750; white-space: nowrap; }
.nest-species-row small svg,.nest-reward svg { width: 14px; height: 14px; }
.nest-foot {
  margin-top: 12px;
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px dashed #a9b39c;
}
.nest-foot > :first-child { flex: 1; }
.nest-foot button,#dialog:is([data-kind="tide-nest-brief"],[data-kind="tide-nest-result"]) :is(.dialog-close,.result-activity-link) {
  min-width: 44px;
  min-height: 44px;
}
.nest-foot button { flex: none; padding-inline: 12px; }
.nest-reward { color: #755530; font-size: 13px; }
#tide-nest-hud {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid #c4c796;
  border-radius: 6px;
  color: #f8efcf;
  background: #274a40f5;
  font-size: 12px;
  line-height: 1.3;
}
#tide-nest-hud[hidden] { display: none; }
#tide-nest-hud strong { color: #ffda99; white-space: nowrap; }
#tide-nest-hud[data-ready] { background: #ead19c; border-color: #4e6148; }
#tide-nest-hud[data-ready] :is(strong,span) { color: #294337; }
@media (orientation: landscape) and (max-height: 400px) {
  #dialog:is([data-kind="tide-nest-brief"],[data-kind="tide-nest-result"]) .dialog-content { padding: 8px 13px; }
  .nest-page-head { gap: 8px; grid-template-columns: 1fr 120px; }
  .dialog-content .nest-page-head h2 { font-size: 24px; margin-bottom: 2px; }
  .dialog-content :is(.nest-page-head,.nest-bank-guide,.nest-foot) p { font-size: 12px; line-height: 1.32; }
  .nest-bank-guide,.nest-species { gap: 9px; margin-top: 5px; }
  .nest-bank-guide { padding-block: 5px; }
  .nest-species-row strong { font-size: 13px; }
  .nest-foot { padding-top: 4px; margin-top: 4px; }
  .nest-foot button { padding-inline: 8px; }
  #dialog[data-kind="tide-nest-result"] .result-activity-footer { margin-top: 4px; padding-top: 0; }
  #tide-nest-hud { padding: 3px 5px; font-size: 11px; }
  .festival-overlay:has(#tide-nest-hud:not([hidden])) { gap: 2px; }
  .festival-overlay:has(#tide-nest-hud:not([hidden])) > .festival-card { padding-block: 3px; }
  .festival-overlay:has(#tide-nest-hud:not([hidden])) .festival-card-head { margin-bottom: 1px; }
}
@media (orientation: landscape) and (min-aspect-ratio: 2/1) and (max-height: 340px) {
  #app[data-play="tide"] .festival-overlay:has(> #tide-nest-hud:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
    gap: 4px;
    width: min(62vw, 390px, calc(100% - var(--phone-left) - var(--phone-right)));
  }
  .festival-overlay:has(> #tide-nest-hud:not([hidden])) > .festival-card {
    grid-area: 1 / 1;
    width: 100%;
    min-width: 0;
  }
  .festival-overlay:has(> #tide-nest-hud:not([hidden])) > #tide-gauges {
    grid-area: 2 / 1;
    width: 100%;
  }
  #tide-nest-hud { grid-area: 1 / 2; }
  #tide-nest-hud > span { min-width: 0; overflow-wrap: anywhere; }
  .festival-overlay:has(> #tide-nest-hud:not([hidden])) > #festival-waypoint { grid-area: 2 / 2; }
}
@media (max-width: 500px) and (orientation: portrait) {
  .nest-page-head { grid-template-columns: 1fr; }
  .nest-shoreline { max-width: 190px; }
  .nest-bank-guide,.nest-species { grid-template-columns: 1fr; gap: 5px; }
}
