.tide-launch-card { background: #eaf7ecf3; border-color: #689385; }
.tide-launch-card:hover { background: #d9f0e5; border-color: #43736b; }
.tide-ticket { color: #e3ffea; background: radial-gradient(ellipse at 50% 70%,#4c9689,#2c596e 81%); }
.explore-tide .explore-card-art { background: linear-gradient(125deg,#274b69,#55968a); color: #e6ffcd; }

#app[data-play="tide"] .festival-card { background: #173d46f4; border-color: #9ad5ba; }
#app[data-play="tide"] #festival-task, #app[data-play="tide"] .festival-stamps [data-icon] { color: #bef3ce; }
#app[data-play="tide"] .festival-waypoint { max-width: 100%; background: #1e4556f2; white-space: normal; }
.tide-gauges { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: min(100%,280px); gap: 4px; }
.tide-gauge { display: grid; min-width: 0; gap: 5px; padding: 5px 7px; border: 1px solid #b3decb84; border-radius: 7px; background: #1c3b4bef; }
.tide-gauge > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; white-space: nowrap; color: #fff9df; font-size: 10px; font-weight: 800; }
.tide-gauge b { color: var(--gauge); font-size: 11px; }
.tide-meter { height: 4px; overflow: hidden; border-radius: 3px; background: #a6ded044; }
.tide-meter i { display: block; width: 100%; height: 100%; background: var(--gauge); transform-origin: left; transform: scaleX(0); }

#dialog[data-kind="tide-guide"] { width: min(92vw,740px,calc(100% - var(--phone-left,0px) - var(--phone-right,0px))); }
.tide-chart-layout { grid-template-columns: minmax(0,1.13fr) minmax(0,1fr); }
.tide-route-list { display: grid; align-content: start; gap: 7px; }
.tide-route { padding: 6px 8px; border: 1px solid #506f7986; border-left: 4px solid var(--tide-zone); border-radius: 8px; background: #f1f2e9; }
.tide-route-title { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.tide-route-title h3 { margin: 0; color: #284957; font-size: 14px; }
.tide-route-title > span { flex: none; border: 1px solid #6296908f; border-radius: 6px; padding: 2px 6px; background: #e0efe5; color: #2c5b58; font-size: 10px; font-weight: 850; }
.dialog-content .tide-route p { margin: 5px 0 2px; color: #43585d; font-size: 11px; line-height: 1.42; }
.tide-restored { display: flex; align-items: center; gap: 5px; color: #2f604e; font-size: 11px; font-weight: 900; }
.tide-map-actions { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 2px; }
.tide-map-actions .place-pin { min-width: 44px; min-height: 44px; padding: 3px 5px; border-color: #619d8ba6; color: #2e5654; background: #f8fff5; font-size: 10px; }
.tide-map-actions .place-pin[aria-pressed="true"] { border-color: #52836d; background: #dcf3d9; }
.tide-map-actions .place-pin:hover { background: #e1f1e4; }
.tide-chart-layout .rescue-chart-legend { flex-wrap: wrap; }

#dialog[data-kind="wetland-guide"] { width: min(92vw, 660px, calc(100% - var(--phone-left, 0px) - var(--phone-right, 0px))); }
.wetland-feeder { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; padding: 7px 9px; border: 1px solid #8fada7; border-radius: 8px; background: #e7f2e9; color: #28535a; }
.wetland-feeder > [data-icon] { font-size: 20px; }
.dialog-content .wetland-feeder p { display: grid; gap: 2px; margin: 0; font-size: 12px; line-height: 1.35; }
.wetland-feeder span { color: #355f62; }
.wetland-feeder[data-routing="split"] { background: #e0f3ed; border-color: #77a8a0; }
.wetland-feed-branches { display: flex; flex: none; flex-direction: column; gap: 3px; font-size: 10px; font-weight: 800; }
.wetland-feed-branches span { padding: 2px 5px; border: 1px solid #aaccc0; border-radius: 5px; background: #f6fcf4; white-space: nowrap; }
.wetland-feed-branches span[data-ready] { border-color: #70a690; color: #245c4c; background: #d8efdd; }
.wetland-habitats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wetland-habitats article { padding: 8px; border: 1px solid #9db2a3; border-radius: 8px; background: #f0f5ec; }
.wetland-habitats article[data-species="reed"] { border-color: #b6ac83; background: #f7f2df; }
.wetland-section { position: relative; height: 37px; overflow: hidden; border-radius: 5px; background: linear-gradient(#c6e5dd 26%, #51979a 27%, #74aa9c 77%, #aa8c65 78%); }
.wetland-section i { position: absolute; top: 9px; left: 43%; width: 33px; height: 8px; border-radius: 45%; background: #4f8564; }
.wetland-section b { position: absolute; top: 3px; left: calc(43% + 8px); width: 15px; height: 9px; border-radius: 46% 50% 35% 35%; background: #ffc3bc; box-shadow: inset 0 -3px #d48896; }
[data-species="reed"] .wetland-section { background: linear-gradient(#d9e5bf 66%, #98856d 67%, #c7aa75); }
[data-species="reed"] .wetland-section i { top: 12px; left: 47%; width: 3px; height: 22px; border-radius: 0; background: #6c8549; box-shadow: -8px 3px #7f9459, 7px 2px #7f9459; }
[data-species="reed"] .wetland-section b { top: 4px; left: calc(47% - 1px); width: 5px; height: 12px; background: #b78446; box-shadow: -8px 3px #a97b46, 7px 2px #a97b46; }
.wetland-habitats h3 { margin: 5px 0 2px; font-size: 14px; color: #284950; }
.dialog-content .wetland-habitats p, .dialog-content .wetland-objective { margin: 0; font-size: 12px; line-height: 1.4; }
.dialog-content .wetland-objective { margin-top: 7px; color: #46634e; }
.wetland-gauge { --gauge: #ffd1c8; }
.wetland-gauge[data-species="reed"] { --gauge: #e9d193; }
.wetland-gauge > div:first-child { flex-wrap: wrap; }
.wetland-gauge > div:first-child > span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }

@media (orientation: landscape) and (max-height: 420px) and (min-aspect-ratio: 2/1) {
  .tide-gauges { width: min(100%,235px); }
  .tide-gauge { padding: 4px 5px; }
  .tide-gauge b { font-size: 10px; }
  #app[data-play="tide"] .race-place { justify-self: start; }
  #dialog[data-kind="wetland-guide"] .dialog-content { padding: 10px 16px; }
  #dialog[data-kind="wetland-guide"] h2 { font-size: 25px; line-height: 1.2; margin-bottom: 8px; }
  #dialog[data-kind="wetland-guide"] .dialog-close { top: 6px; }
  #dialog[data-kind="wetland-guide"] .dialog-actions { margin-top: 6px; }
  .wetland-feeder { padding-block: 5px; margin-bottom: 5px; }
  .dialog-content .wetland-feeder p { font-size: 11px; }
  .wetland-habitats article { padding: 6px; }
  .wetland-section { height: 26px; }
  .dialog-content .wetland-objective { margin-top: 5px; }
}

@media (orientation: portrait) and (max-width: 480px) {
  .tide-chart-layout { grid-template-columns: minmax(0,1fr); }
  #app[data-play="tide"] .festival-card { max-width: 100%; }
  .wetland-feeder { flex-wrap: wrap; }
  .wetland-feeder > p { flex: 1; }
  .wetland-feed-branches { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; padding-inline-start: 29px; }
}
