/* The coast replaces the living-room stage with Coconut Island's real world. */
#petownApp.is-at-coast .pet-sidebar-stack,
#petownApp.is-at-coast .pet-cat-webgl,
#petownApp.is-at-coast #petownCatCanvas,
#petownApp.is-at-coast .pet-mood-bubble {
  display: none !important;
}
#petownApp.is-at-coast .pet-shell { display: block; padding: 0; }
#petownApp.is-at-coast .pet-card.pet-scene.uses-3d {
  position: fixed;
  top: var(--pet-coast-top, 72px);
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100dvh - var(--pet-coast-top, 72px));
  min-height: 0;
  margin: 0;
}
#petownApp.is-at-coast .pet-scene-pills {
  position: absolute;
  left: 16px;
  top: 12px;
  right: auto;
}
#petownApp.is-at-coast .pet-scene-ambient {
  position: relative;
  inset: auto;
  width: 100%;
  margin-top: 8px;
  box-shadow: none;
  z-index: auto;
}
#petownApp .pet-coast-workspace {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-rows: minmax(0, 1fr);
  background: var(--pet-ui-surface);
  pointer-events: auto;
}
#petownApp .pet-coast-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
#petownApp #petCoastCanvas { display: block; width: 100%; height: 100%; touch-action: none; }
#petownApp .pet-coast-workspace .pet-fishing-panel {
  position: static;
  width: auto;
  max-height: none;
  min-height: 0;
  border-radius: 0;
  margin: 0;
  padding: 18px 14px;
  box-shadow: none;
  overflow: auto;
  border-width: 0 0 0 1px;
}
#petownApp .pet-fishing-rules summary,
#petownApp .pet-fishing-basket summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  gap: 4px;
}
#petownApp .pet-fishing-rules summary::before,
#petownApp .pet-fishing-basket summary::before { content: '+'; margin-right: 6px; }
#petownApp .pet-fishing-rules[open] summary::before,
#petownApp .pet-fishing-basket[open] summary::before { content: '-'; }
#petownApp .pet-fishing-basket { border-top: var(--pet-paper-border); }
#petownApp #petFishingStatus { min-height: 42px; }
#petownApp #petFishingHold { touch-action: none; user-select: none; -webkit-user-select: none; }
#petownApp .pet-coast-spots { position: absolute; inset: 0; pointer-events: none; }
#petownApp .pet-coast-spots button {
  position: absolute;
  translate: -50% -100%;
  transform: none;
  min-height: 44px;
  padding: 5px 10px;
  font-size: 12px;
  pointer-events: auto;
  white-space: nowrap;
  box-shadow: var(--pet-shadow-sm);
}
#petownApp .pet-coast-spots button::after {
  content: '';
  position: absolute;
  height: 14px;
  width: 2px;
  left: 50%;
  top: 100%;
  background: var(--pet-ui-text);
}
#petownApp #petCoastSpots [aria-pressed="true"] { background: var(--pet-ui-primary); color: var(--p-paper); }
#petownApp .pet-coast-look-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--pet-ui-surface);
  color: var(--pet-ui-text);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}
#petownApp .pet-coast-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: var(--pet-ui-surface);
}
#petownApp .pet-coast-loading[hidden],
#petownApp .pet-coast-spots [hidden] { display: none; }
@media (max-width: 650px) and (min-height: 501px) {
  #petownApp.is-at-coast .pet-card.pet-scene.uses-3d {
    height: calc(100dvh - var(--pet-coast-top, 64px));
    min-height: 0;
  }
  #petownApp .pet-coast-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(200px, 1fr) 270px;
  }
  #petownApp .pet-coast-workspace .pet-fishing-panel {
    padding: 8px 12px max(8px, env(safe-area-inset-bottom));
    border-width: 1px 0 0;
  }
  #petownApp .pet-fishing-heading h2 { font-size: 16px; }
  #petownApp .pet-fishing-panel p { margin: 4px 0; }
  #petownApp .pet-fishing-rules { float: right; }
  #petownApp .pet-fishing-rules[open] { float: none; }
  #petownApp #petFishingStatus { min-height: 36px; margin: 2px 0; font-size: 13px; }
  #petownApp #petFishingReadout { font-size: 12px; }
  #petownApp .pet-fishing-meter { margin: 3px 0; }
  #petownApp .pet-fishing-basket { clear: both; margin-top: 6px; }
  #petownApp .pet-coast-spots button { font-size: 11px; padding: 4px 6px; }
}
@media (max-height: 500px) {
  #petownApp.is-at-coast .pet-card.pet-scene.uses-3d { min-height: 0; height: calc(100dvh - var(--pet-coast-top, 64px)); }
  #petownApp .pet-coast-workspace { grid-template-columns: minmax(0, 1fr) 290px; }
  #petownApp .pet-coast-workspace .pet-fishing-panel { padding: 8px 12px; }
  #petownApp .pet-fishing-panel p { margin: 4px 0; }
  #petownApp #petFishingStatus { min-height: 32px; margin: 2px 0; font-size: 13px; }
  #petownApp .pet-fishing-meter { margin: 3px 0; }
  #petownApp .pet-fishing-rules { float: right; }
  #petownApp .pet-fishing-rules[open] { float: none; }

}

#petownApp .pet-seaside-links,
.pet-seaside-actions,
.pet-seaside-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
#petownApp .pet-seaside-links { padding: 8px 0; border-top: var(--pet-paper-border); }
#petownApp .pet-seaside-links button:first-child { flex-basis: 100%; text-align: left; }
#petownApp .pet-fishing-spot-hint { font-size: 14px; line-height: 1.5; color: var(--pet-ui-text); }
.pet-seaside-home { padding: 12px; border-radius: 12px; background: var(--pet-ui-surface); border: var(--pet-paper-border); }
.pet-seaside-home p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
.pet-seaside-sheet { --pet-ui-text: var(--p-ink); --pet-ui-primary: var(--p-cool); --pet-ui-surface: var(--p-paper); color: var(--pet-ui-text); }
.pet-seaside-sheet p, .pet-seaside-sheet li { font-size: 14px; line-height: 1.7; }
.pet-seaside-sheet h3 { font-size: 20px; margin: 20px 0 8px; }
.pet-seaside-sheet h4 { font-size: 16px; margin: 0 0 6px; }
.pet-seaside-sheet button { min-height: 44px; font-size: 14px; white-space: normal; }
.pet-seaside-tabs { position: sticky; top: 0; background: var(--p-paper); padding: 4px 0 10px; z-index: 2; }
#petownOverlay .pet-seaside-tabs [aria-pressed="true"], #petownOverlay .pet-seaside-choices [aria-pressed="true"] { background: var(--pet-ui-primary); color: var(--p-paper); }
.pet-seaside-reward { display: flex; align-items: center; gap: 16px; margin: 12px 0; }
.pet-seaside-reward img { object-fit: contain; flex: 0 0 120px; width: 120px; height: 120px; }
.pet-seaside-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.pet-seaside-choices article, .pet-seaside-record { padding: 14px; border: var(--pet-paper-border); border-radius: 12px; background: var(--pet-ui-surface); }
.pet-seaside-record { margin: 10px 0; }
.pet-seaside-feedback:empty { display: none; }
.pet-seaside-feedback { color: var(--pet-ui-text); padding: 8px 12px; background: var(--p-paper-soft); border-radius: 8px; }
.pet-seaside-fish-choice { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.pet-seaside-fish-choice select { min-height: 44px; font-size: 16px; background: var(--p-paper); color: var(--pet-ui-text); border: var(--pet-paper-border); border-radius: 8px; padding: 8px; }
@media (max-width: 650px) {
  .pet-seaside-choices { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .pet-seaside-reward { gap: 12px; }
  .pet-seaside-reward img { flex-basis: 88px; width: 88px; height: 88px; }
  .pet-seaside-tabs { gap: 6px; }
  .pet-seaside-tabs button { flex: 1 1 0; padding: 6px; }
}
