/*! Solar System Repair Co. | Source: https://orbitalforest.com */
/* The optional garden and fishing games share a bounded, calm picture stage. */
#game-shell #backyard-scene #backyard-activity-panel.is-garden-play {
  height:min(700px,calc(100% - 12px));max-height:calc(100% - 12px);
}
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play,
#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing { width:min(960px,calc(100vw - 24px));height:min(700px,calc(100dvh - 112px));max-height:calc(100dvh - 112px);padding:16px;display:block;overflow:hidden; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play[hidden],#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing[hidden] { display:none; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play>.dialogue-portrait,#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing>.dialogue-portrait { display:none; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play>.dialogue-content { height:100%;display:grid;grid-template-areas:"heading" "instructions" "board" "controls";grid-template-rows:auto auto minmax(0,1fr) 48px;gap:6px;overflow:hidden;padding:0; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-title { grid-area:heading; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-copy { grid-area:instructions; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-target { grid-area:board; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-controls { grid-area:controls;min-height:0; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-eyebrow,#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-feedback { display:none; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-title { margin:0 44px 0 0;font-size:18px;line-height:1.25; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-review-code { margin:0; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-copy { font-size:14px;line-height:1.3;margin:0; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-target { height:100%;min-height:0;overflow:hidden;margin:0; }
#game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-controls { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0; }
#game-shell .pastime-button { min-height:44px;min-width:44px;border:2px solid #ad9265;border-image:none;border-radius:3px;background:#e4cd93;color:#253629;box-shadow:inset 0 2px #fff6,0 3px #101c19;font:700 13px/1.2 ui-monospace,monospace;padding:6px 10px;touch-action:manipulation; }
#game-shell .pastime-button:focus-visible { outline:3px solid #fff4ac;outline-offset:2px; }
#game-shell .pastime-button:disabled { opacity:.7; }
#game-shell .pastime-button:active:not(:disabled) { transform:translateY(2px); }
.garden-minigame { display:grid;grid-template-rows:minmax(0,1fr) auto;height:100%;min-height:0;gap:5px;background:#182c20;overflow:hidden;border-radius:4px; }
.garden-stage-slot { display:grid;place-items:center;min-height:0;overflow:hidden; }
.garden-pixel-stage { position:relative;align-self:center;justify-self:center;max-width:100%;max-height:100%;overflow:hidden; }
.garden-pixel-backdrop,.coastal-backdrop { display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:fill;image-rendering:pixelated;user-select:none;pointer-events:none; }
#game-shell .garden-pixel-item { position:absolute;transform:translate(-50%,-50%);width:clamp(44px,11%,82px);height:clamp(44px,17%,82px);min-width:44px;min-height:44px;padding:0;border:0;border-image:none;box-shadow:none;background:transparent;border-radius:0;touch-action:manipulation; }
.garden-pixel-sprite { width:100%;height:100%;object-fit:contain;image-rendering:pixelated;pointer-events:none;filter:drop-shadow(2px 3px 0 #1d351655); }
.garden-minigame[data-job="leaves"] .garden-pixel-sprite { position:absolute;left:50%;top:50%;filter:none; }
#game-shell .garden-minigame[data-job="tomatoes"] .garden-pixel-item { width:clamp(44px,9%,66px);height:clamp(44px,13.5%,66px); }
#game-shell .garden-pixel-item.is-picked { visibility:hidden; }
#game-shell .garden-pixel-item:focus-visible { outline:3px dashed #ffffb7;outline-offset:0; }
.garden-soil-row { position:absolute;display:grid;grid-template-columns:repeat(6,minmax(44px,1fr));min-width:264px;min-height:44px;touch-action:none; }
#game-shell .garden-soil-patch { position:relative;min-width:44px;min-height:44px;border:0;border-image:none;box-shadow:none;border-radius:0;background:transparent;padding:0;touch-action:none; }
.garden-wet-soil { position:absolute;inset:0;pointer-events:none;opacity:var(--soil-wet,0);background:repeating-linear-gradient(90deg,#48392366 0 4px,#332d2355 4px 8px),repeating-linear-gradient(0deg,#44332255 0 4px,transparent 4px 8px);mix-blend-mode:multiply; }
#game-shell .garden-soil-patch:focus-visible { outline:3px dashed #ffe99b;outline-offset:-3px; }
.garden-minigame[data-job="water"] .garden-pixel-stage { touch-action:none;cursor:crosshair; }
.garden-pour-can { position:absolute;width:18%;height:27%;object-fit:contain;image-rendering:pixelated;pointer-events:none;transform-origin:50% 50%;transform:rotate(32deg); }
.garden-pour-drops { position:absolute;transform:translateX(-50%);width:6%;height:15%;object-fit:contain;image-rendering:pixelated;pointer-events:none; }
.garden-cut-flash { position:absolute;left:50%;top:75%;width:20px;height:3px;opacity:0;background:#ffe4a7;pointer-events:none; }
.garden-cut-flash::after { content:"";position:absolute;inset:0;background:#f9efd1;transform:rotate(85deg); }
.is-cutting .garden-cut-flash { animation:weed-snip .2s ease-out both; }
.is-cutting .garden-pixel-sprite { animation:weed-cut .45s ease-out both;transform-origin:50% 90%; }
@keyframes weed-snip { 0% { opacity:0;transform:scale(.3) rotate(-35deg); } 35% { opacity:1;transform:scale(1.3) rotate(0); } 100% { opacity:0;transform:scale(.5) rotate(35deg); } }
@keyframes weed-cut { 25% { transform:translateY(-6px) rotate(10deg);opacity:1; } 100% { transform:translateY(16px) rotate(30deg) scale(.6);opacity:0; } }
.garden-minigame-status { margin:0;padding:4px 8px;min-height:24px;text-align:center;font:700 13px/1.3 system-ui,sans-serif;color:#e7edc8; }
.garden-harvest-clock { position:absolute;top:6px;right:6px;background:#21372fe8;color:#fff5c5;padding:7px 10px;font:800 15px ui-monospace,monospace;border:2px solid #c7b279;pointer-events:none;z-index:4; }
.garden-round-result { position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max-content;max-width:88%;padding:16px 20px;border:2px solid #d0b36b;background:#f6e6bbed;color:#33442e;text-align:center;font:800 16px/1.35 ui-monospace,monospace;pointer-events:none;z-index:5; }
#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing .dialogue-content { display:grid;grid-template-rows:auto minmax(0,1fr);gap:5px;height:100%;min-height:0;padding:0;overflow:hidden; }
#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing :is(.dialogue-heading,#beach-dialogue-line,#beach-fishing-visual) { display:none; }
#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing #beach-review-code { margin:0 40px 0 0; }
#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing #beach-dialogue-choices { display:block;margin:0;height:100%;min-height:0;overflow:hidden; }
.coastal-fishing { height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto auto 52px;gap:6px;overflow:hidden; }
.coastal-fishing-header { display:grid;gap:6px;color:#e6d6a7;font:700 13px ui-monospace,monospace; }
.coastal-cast-spots { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px; }
#game-shell .coastal-cast-spots .pastime-button { padding:5px;font-size:11px; }
.coastal-stage-slot { display:grid;place-items:center;min-height:0;overflow:hidden;background:#203c44; }
.coastal-fishing-stage { position:relative;max-width:100%;max-height:100%;overflow:hidden; }
#game-shell .coastal-aim-surface { position:absolute;left:16%;top:22%;width:76%;height:48%;min-width:44px;min-height:44px;background:transparent;border:0;border-image:none;border-radius:0;box-shadow:none;z-index:3; }
#game-shell .coastal-aim-surface:focus-visible { outline:2px dashed #fbe6b0;outline-offset:-3px; }
.coastal-aim-marker { position:absolute;width:30px;height:30px;border:2px dashed #fff2b1;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 2px #30575f80;pointer-events:none;z-index:4; }
.coastal-rod { position:absolute;left:0;bottom:0;width:35%;height:56%;object-fit:contain;image-rendering:pixelated;pointer-events:none;transform-origin:15% 90%;transition:transform .25s;z-index:2; }
.coastal-rod.is-lifted { transform:rotate(-22deg); }
.coastal-basket { position:absolute;left:4%;bottom:1%;width:12%;height:19%;object-fit:contain;image-rendering:pixelated;pointer-events:none; }
.coastal-fishing-line { position:absolute;inset:0;pointer-events:none;z-index:1; }
.coastal-fishing-line svg { width:100%;height:100%; }
.coastal-bobber,.coastal-lure,.coastal-splash,.coastal-swimmer { position:absolute;transform:translate(-50%,-50%);object-fit:contain;image-rendering:pixelated;pointer-events:none; }
.coastal-bobber { width:7%;height:14%;min-width:20px;z-index:3; }
.coastal-lure { width:6%;height:10%;z-index:3; }
.coastal-splash { width:15%;height:16%;opacity:.8; }
.coastal-swimmer { width:17%;height:18%;opacity:.65; }
.coastal-status { margin:0;font:600 13px/1.3 system-ui,sans-serif;color:#e7ddbe;min-height:18px; }
.coastal-gauges { display:grid;grid-template-columns:1fr 1fr;gap:12px;color:#d2d5b7;font:700 10px ui-monospace,monospace; }
.coastal-gauges label { display:grid;gap:3px; }
.coastal-gauges progress { width:100%;height:12px;accent-color:#93c4a4; }
.coastal-gauges progress[data-high="true"] { accent-color:#eab468; }
.coastal-fishing-controls { display:grid;grid-template-columns:1fr 1fr;gap:8px; }
#game-shell #coastal-reel-control { display:flex;align-items:center;justify-content:center;gap:12px;touch-action:none; }
.coastal-reel-art { width:38px;height:38px;object-fit:contain;image-rendering:pixelated;pointer-events:none; }
.coastal-catch-card { position:absolute;inset:4%;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:3px;place-items:center;padding:8px;background:#f4e8c9f5;border:3px solid #927d51;color:#2c463c; }
.coastal-catch-tag { font:700 10px ui-monospace,monospace;letter-spacing:.1em; }
.coastal-catch-name { font:800 20px ui-monospace,monospace;margin:0;text-align:center; }
.coastal-catch-art { max-width:100%;max-height:100%;width:260px;height:156px;min-height:0;object-fit:contain;image-rendering:pixelated; }
.coastal-catch-length { font:800 17px ui-monospace,monospace; }
.coastal-catch-note { font:12px/1.3 system-ui,sans-serif;margin:0;text-align:center; }
.coastal-catch-gallery { display:grid;grid-template-columns:repeat(3,1fr);gap:6px;height:50px; }
.coastal-catch-gallery img { display:block;height:36px;width:100%;object-fit:contain;image-rendering:pixelated; }
.garden-harvest-clock[hidden],.garden-round-result[hidden],.garden-pour-drops[hidden],.coastal-fishing [hidden] { display:none; }
@media(max-width:600px){
  #game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play,#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing { width:calc(100vw - 12px);height:calc(100dvh - 104px);max-height:calc(100dvh - 104px);padding:10px; }
  #game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-copy { font-size:12px; }
  .garden-minigame-status,.coastal-status { font-size:12px; }
  .garden-harvest-clock { font-size:12px;padding:4px 7px; }
  .coastal-catch-name { font-size:15px; }
  .coastal-catch-note { font-size:11px; }
  #game-shell .pastime-button { font-size:11px;padding:5px; }
}
@media(max-height:520px){
  #game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play,#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing { width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);padding:8px; }
  #game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play>.dialogue-content { grid-template-areas:"instructions" "board" "controls";grid-template-rows:auto minmax(0,1fr) 44px;gap:4px; }
  #game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-title { display:none; }
  #game-shell[data-ui-layout] #backyard-activity-panel.is-garden-play #backyard-activity-copy { font-size:12px;line-height:1.2; }
  .garden-minigame-status { font-size:11px;padding:2px 6px; }
  .coastal-fishing { grid-template-columns:minmax(0,1fr) 230px;grid-template-rows:auto minmax(0,1fr) 46px;gap:6px 10px; }
  .coastal-fishing-header { grid-column:2;grid-row:1;font-size:11px; }
  .coastal-cast-spots { grid-template-columns:1fr;gap:3px; }
  #game-shell .coastal-cast-spots .pastime-button { min-height:44px; }
  .coastal-stage-slot { grid-column:1;grid-row:1/4; }
  .coastal-status { grid-column:2;grid-row:2;align-self:start;font-size:12px; }
  .coastal-gauges { grid-column:2;grid-row:2;align-self:end; }
  .coastal-catch-gallery { grid-column:2;grid-row:2;align-self:end; }
  .coastal-fishing-controls { grid-column:2;grid-row:3; }
  .coastal-catch-tag { display:none; }
  .coastal-catch-name { font-size:14px; }
  .coastal-catch-length { font-size:13px; }
  .coastal-catch-note { font-size:10px; }
  .coastal-catch-card { grid-template-rows:auto minmax(0,1fr) auto auto; }
}

/* Short landscape uses the space beside the picture for its guide and keys.
   Size the panel to the world slot so the HUD cannot cover its instructions. */
#game-shell[data-ui-layout="landscape"] #backyard-scene #backyard-activity-panel.is-garden-play {
  padding:6px;border-width:6px;border-image-width:6px;
}
#game-shell[data-ui-layout="landscape"] #backyard-activity-panel.is-garden-play>.dialogue-content {
  grid-template-areas:"board instructions" "board controls";
  grid-template-columns:minmax(0,1fr) clamp(164px,27vw,220px);
  grid-template-rows:minmax(0,1fr) 94px;gap:6px 10px;
}
#game-shell[data-ui-layout="landscape"] #backyard-activity-panel.is-garden-play #backyard-activity-title { display:none; }
#game-shell[data-ui-layout="landscape"] #backyard-activity-panel.is-garden-play #backyard-activity-copy {
  align-self:start;padding:6px 38px 6px 8px;font-size:12px;line-height:1.3;
}
#game-shell[data-ui-layout="landscape"] #backyard-activity-panel.is-garden-play #backyard-activity-controls {
  grid-template-columns:1fr;grid-template-rows:44px 44px;gap:6px;
}
@media(prefers-reduced-motion:no-preference){
  .coastal-bobber { animation:quiet-bob 2s ease-in-out infinite; }
  .coastal-bobber.has-bite { animation:bite-bob .5s ease-in-out infinite; }
  .coastal-fishing[data-phase="casting"] .coastal-rod { animation:rod-cast .7s ease-out; }
}
@keyframes quiet-bob { 50% { margin-top:2px; } }
@keyframes bite-bob { 50% { margin-top:7px;transform:translate(-50%,-50%) rotate(25deg); } }
@keyframes rod-cast { 40% { transform:rotate(-30deg); } }
#game-shell[data-reduced-motion="true"] :is(.coastal-bobber,.coastal-rod),body.reduce-motion :is(.coastal-bobber,.coastal-rod,.garden-pour-can,.is-cutting .garden-pixel-sprite,.garden-cut-flash) { animation:none;transition:none; }
@media(max-width:600px) and (max-height:520px){
  .coastal-fishing { grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto auto 46px;gap:4px; }
  .coastal-fishing-header,.coastal-stage-slot,.coastal-status,.coastal-gauges,.coastal-catch-gallery,.coastal-fishing-controls { grid-column:auto;grid-row:auto; }
  .coastal-cast-spots { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* Fishing takes place on the actual Beach scene. The original Rivet canvas
   stands on the painted dock; only the small control console floats above it. */
#game-shell[data-ui-layout] #beach-scene.is-dock-fishing #beach-world {
  width:var(--dock-camera-width);height:var(--dock-camera-height);
  transform:translate(var(--dock-camera-x),var(--dock-camera-y));
}
#game-shell[data-ui-layout] #beach-scene.is-dock-fishing #beach-player { width:8.2%;--depth-scale:1!important;z-index:125!important; }
#beach-scene.is-dock-fishing :is(#beach-zone-layer,#beach-follower,#beach-chester,.mission-move-pad,.mission-interact-button,.mission-interact-prompt) { visibility:hidden; }
.coastal-dock-effects { position:absolute;inset:0;z-index:126;pointer-events:none; }
.coastal-dock-effects .coastal-rod { bottom:auto;transform-origin:8% 86%;transform:rotate(50deg); }
.coastal-dock-effects .coastal-rod.is-lifted { transform:rotate(20deg); }
.coastal-dock-effects .coastal-basket { bottom:auto;width:5%;height:9%; }
.coastal-dock-effects .coastal-bobber { width:2.8%;height:6%;min-width:16px; }
.coastal-dock-effects .coastal-lure { width:2.4%;height:4%; }
.coastal-dock-effects .coastal-splash { width:7%;height:7%; }
.coastal-dock-effects .coastal-swimmer { width:9%;height:9%; }
#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing {
  position:absolute;left:50%;top:auto;bottom:calc(var(--ground-strip,0px) + 10px);
  transform:translateX(-50%);width:min(680px,calc(100vw - 24px));height:auto;
  max-height:calc(100dvh - 120px);padding:12px;overflow:hidden;
}
#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing.is-inspecting-fish {
  top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(580px,calc(100vw - 24px));
  height:min(440px,calc(100dvh - 120px));
}
#game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing .coastal-fishing {
  grid-template-columns:minmax(0,1fr);grid-template-rows:auto 0 auto auto 0 52px;
  grid-template-areas:"header" "catch" "status" "gauges" "gallery" "controls";
  height:auto;gap:5px;
}
#game-shell[data-ui-layout] #beach-dialogue-console.is-inspecting-fish .coastal-fishing { height:100%;grid-template-rows:auto minmax(0,1fr) auto auto auto 52px; }
.coastal-fishing-header { grid-area:header; }
.coastal-stage-slot { grid-area:catch; }
.coastal-status { grid-area:status; }
.coastal-gauges { grid-area:gauges; }
.coastal-catch-gallery { grid-area:gallery; }
.coastal-fishing-controls { grid-area:controls; }
.coastal-fishing .coastal-catch-card { position:relative;inset:auto;width:100%;height:100%;box-sizing:border-box; }
.coastal-fishing .coastal-stage-slot[hidden] { display:none; }
@keyframes rod-cast { 40% { transform:rotate(8deg); } }
@media(max-width:600px){
  #game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing { padding:9px;bottom:calc(var(--ground-strip,0px) + 6px);width:calc(100vw - 12px); }
  #game-shell[data-ui-layout] #beach-dialogue-console.is-inspecting-fish { height:min(440px,calc(100dvh - 120px)); }
}
@media(max-height:520px){
  #game-shell[data-ui-layout] #beach-dialogue-console.is-coastal-fishing { bottom:6px;width:min(540px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:8px; }
  #game-shell[data-ui-layout] #beach-dialogue-console.is-inspecting-fish { height:min(440px,calc(100dvh - 24px)); }
}
@media(prefers-reduced-motion:reduce){ .is-cutting .garden-pixel-sprite,.garden-cut-flash { animation:none; } }
