/* The playable water and its shoreline share the same physical scene. */
:is(.scene-pair,.scene-pond,.scene-dock,.scene-book,.scene-waterways) {
  --scene-width: 510px;
  --bay-teal: #143f37;
  --bay-sand: #f3e6c8;
  position:relative;
  width:min(calc(100% - 24px - 2 * var(--safe-side)),464px);
  padding:calc(12px + env(safe-area-inset-top,0px)) 0 calc(16px + env(safe-area-inset-bottom,0px));
  color:var(--bay-teal);
}
:root { --bay-water-art:url('assets/bay-home-pond.jpg'); }
.scene-pair { --scene-paint:url('assets/bay-spring.jpg'); --sun-shapes:url('assets/bay-spring-sun.png'); }
.scene-waterways { --scene-paint:url('assets/bay-waterways.jpg'); --sun-shapes:url('assets/bay-waterways-sun.png'); }
.scene-dock { --scene-paint:url('assets/bay-arrival-dock.jpg'); }
.scene-pond,.scene-book { --scene-paint:url('assets/bay-home-pond.jpg'); }
:is(.scene-pair,.scene-pond,.scene-dock,.scene-book,.scene-waterways)::before,
.bay-living-water {
  position:fixed;
  inset:0;
  width:min(100%,var(--scene-width));
  height:100svh;
  margin-inline:auto;
  pointer-events:none;
}
:is(.scene-pair,.scene-pond,.scene-dock,.scene-book,.scene-waterways)::before {
  z-index:-2;
  background:var(--scene-paint) center / 100% 100% no-repeat;
  mask-image:none;
}
.bay-living-water { z-index:-1; }
@media (min-width:560px) {
  body:has(.bay-scene)::before {
    content:""; position:fixed; inset:-25px; z-index:-1;
    background:linear-gradient(#f5f8f3b8,#e4f3ef98),url('assets/bay-spring.jpg') center 48% / cover;
    filter:blur(15px); pointer-events:none;
  }
  :is(.scene-pair,.scene-pond,.scene-dock,.scene-book,.scene-waterways)::before,.bay-living-water {
    mask-image:linear-gradient(90deg,transparent,#000 4% 96%,transparent);
  }
}

.bay-scene > .waterfront-title {
  min-height:62px;
  padding:7px 44px 3px;
  gap:1px;
}
.waterfront-title h1,.scene-pair .pair-title h2,.bay-return h2 {
  font-family:"Songti SC","STSong","Noto Serif CJK SC",serif;
  color:#17473d;
  letter-spacing:.11em;
  font-weight:700;
  text-shadow:0 0 14px #fff8dc,0 1px 2px #fff8dfae;
}
.waterfront-title button {
  width:auto; min-width:58px; height:44px; padding:0 6px;
  color:#193f4a; border:0; background:radial-gradient(ellipse,#fff9e4d6,#fff9e465 55%,transparent 75%);
  font:650 .86rem/1 "Songti SC",serif; letter-spacing:.06em;
  text-shadow:0 0 4px #fffce9;
}
.waterfront-title p { color:#24564b; }

.scene-pair {
  display:flex;
  flex-direction:column;
  min-height:100svh;
  padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));
}
.scene-pair .pair-title {
  width:100%; flex:none; min-height:clamp(92px,14svh,125px);
  padding:clamp(12px,2.2svh,24px) 0 0 6%;
  text-align:left;
}
.scene-pair .pair-title h2 {
  margin:0; font-size:clamp(1.8rem,8vw,2.6rem);
  letter-spacing:.16em; text-shadow:0 1px 6px #fffaf0,0 0 16px #fff8ec;
}
.scene-pair .pair-mode { display:block; margin:3px 0 0 2px; font-size:.73rem; letter-spacing:.16em; color:#244d58; }
.scene-pair .pair-mode::after { content:none; }
.pair-stage-controls {
  position:absolute; top:6px; right:2%; gap:0; padding:0 3px;
  background:radial-gradient(ellipse,#fff9e6d9,#fff9e682 56%,transparent 74%);
}
.scene-pair .pair-stage-controls :is(.pair-revisit,.pair-sound) {
  min-width:44px; min-height:44px; padding:0 5px; color:#294952;
  font:600 .76rem/1 "PingFang SC",sans-serif; letter-spacing:.06em;
  text-shadow:0 0 4px #ffffee; background:none; border:none; box-shadow:none;
}
.scene-pair .pair-stage-controls .pair-sound::before {
  content:""; display:inline-block; vertical-align:middle; margin-right:4px; width:5px; height:5px;
  border-radius:50%; background:#387d81;
}
.scene-pair .pair-stage-controls .pair-sound[aria-pressed="false"]::before { background:#8b8880; }
.scene-pair .waterways-sign {
  position:absolute; right:2%; bottom:-4px; z-index:2;
  min-width:72px; min-height:44px; padding:5px;
  color:#214c54; border:0; border-radius:0; background:none;
  text-shadow:0 0 4px #fffdf0,0 0 9px #fffdf0,1px 1px 2px #fffdf0;
  font:700 .96rem/1.2 "Songti SC",serif; letter-spacing:.08em;
}
.waterways-sign::after {content:" ›"; font-family:serif;}
.scene-pair .pair-water {
  flex:1 0 auto;
  width:100%;
  height:clamp(229px,42svh,400px);
  margin:7px 0 3px;
}
.scene-pair .pair-intro-water { height:clamp(216px,42svh,386px); }
.pair-intro-water:not(.pair-legacy-intro) .pair-pool[data-pile="0"] { --x:25%; --y:20%; }
.pair-intro-water:not(.pair-legacy-intro) .pair-pool[data-pile="1"] { --x:66%; --y:47%; }
.pair-intro-water:not(.pair-legacy-intro) .pair-pool[data-pile="2"] { --x:35%; --y:41%; }
.pair-intro-water:not(.pair-legacy-intro) .pair-pool[data-pile="3"] { --x:77%; --y:20%; }
.pair-intro-water:not(.pair-legacy-intro) .pair-pool[data-pile="4"] { --x:20%; --y:69%; }
.pair-intro-water:not(.pair-legacy-intro) .pair-pool[data-pile="5"] { --x:64%; --y:85%; }
.pair-intro-water:not(.pair-legacy-intro) .pair-pool { --size:clamp(56px,19.5vw,91px); }
.pair-intro-water:not(.pair-legacy-intro) .pair-painted-fish { --painted-size:clamp(67px,23vw,108px); }
.pair-school .pair-pool { --size:clamp(54px,18vw,89px); }
.pair-school-current { opacity:.2; }
.pair-pool .pair-specimen { filter:drop-shadow(0 9px 5px #164c5261) drop-shadow(0 1px 1px #fff4cb65); }
/* A fixed hinge at the peduncle lets these two fins stroke without moving the eye or hit area. */
.pair-loiter > [data-fish="paper"],.pair-loiter > [data-fish="puffer"] {
  position:relative; background:none; --hinge:60%; --beat:1.08s;
}
.pair-loiter > [data-fish="puffer"] { --hinge:79%; --beat:.74s; }
.pair-loiter > :is([data-fish="paper"],[data-fish="puffer"])::before,
.pair-loiter > :is([data-fish="paper"],[data-fish="puffer"])::after {
  content:""; position:absolute; inset:0; background:var(--fish-art) center / contain no-repeat;
}
.pair-loiter > :is([data-fish="paper"],[data-fish="puffer"])::before { clip-path:inset(0 calc(100% - var(--hinge) - .5px) 0 0); }
.pair-loiter > :is([data-fish="paper"],[data-fish="puffer"])::after {
  clip-path:inset(0 0 0 var(--hinge)); transform-origin:var(--hinge) 50%;
  animation:bay-tail-stroke var(--beat) ease-in-out var(--pond-phase,0s) infinite alternate;
}
.pair-pool:nth-child(2n) .pair-loiter > .pair-painted-fish::after { animation-delay:calc(var(--pond-phase,0s) - .45s); }
@keyframes bay-tail-stroke { from { transform:skewY(-8deg) scaleX(.86); } to { transform:skewY(9deg) scaleX(1.015); } }
@media (prefers-reduced-motion:reduce) {
  .pair-loiter > :is([data-fish="paper"],[data-fish="puffer"])::after { animation:none; }
}
.pair-first-cue::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:32% -5% 12%;
  border-radius:50%;
  border:1.5px solid #fff8cfcb;
  box-shadow:0 0 8px #fff6bd90;
  animation:bay-ready-ring 2.45s ease-out infinite;
  pointer-events:none;
}
.pair-touch-label {
  position:absolute;
  top:-18%;
  left:50%;
  transform:translateX(-50%);
  color:#104e42;
  white-space:nowrap;
  font:700 clamp(.78rem,3.6vw,1rem)/1.15 "Songti SC","Noto Serif CJK SC",serif;
  text-shadow:0 0 4px #fff8d9,0 1px 1px #fff8e3,0 0 12px #f7ffe0;
  pointer-events:none;
}
@keyframes bay-ready-ring {
  0%,100% { opacity:.12; transform:scale(.88); }
  35% { opacity:1; }
  78% { opacity:0; transform:scale(1.39); }
}

.scene-pair .pair-bay {
  flex:none;
  min-height:92px;
  margin-block:5px 0;
  padding:6px 5px 0;
}
.scene-pair .pair-bay::before {
  inset:0 -6% -3%; border-radius:50%;
  background:radial-gradient(ellipse at center,#eff6e680,transparent 72%);
}
.pair-bay-title { gap:8px; margin-bottom:3px; color:#173e4d; text-shadow:0 1px 3px #fffdf0; }
.pair-bay-title h3 { font-size:1rem; letter-spacing:.16em; }
.pair-bay-title span { font-size:.72rem; color:#294d58; }
.pair-slots { width:min(88%,382px); gap:clamp(2px,1.3vw,7px); align-items:start; }
.pair-slot {
  aspect-ratio:1.38; border:1.3px solid #feffeac9;
  background:radial-gradient(ellipse at 44% 41%,#9ce4e818 36%,#68bdc56b 76%,#f6fff66b 88%);
  box-shadow:inset 0 -1px 2px #fffcedc2,0 2px 2px #30758255;
}
.pair-slot-filled { background:radial-gradient(ellipse,#f7fff2cc,#80cbd3a8 80%); }
.pair-intro-water .pair-pool:is([data-pile="1"],[data-pile="3"],[data-pile="5"]) .pair-loiter > .pair-painted-fish { scale:-1 1; }
.scene-pair .pair-hint { min-height:17px; margin-block:0; padding-inline:3px; font-size:.74rem; }
.scene-pair .pair-prize-preview { font-size:.7rem; min-height:19px; line-height:1.35; margin-block:0; }
.scene-pair .pair-prize-preview .pair-painted-fish { --painted-size:23px; }
.scene-pair .pair-companions { margin:0; padding:0; border:0; background:transparent; box-shadow:none; }
.scene-pair .pair-companion { margin:0; padding:1px 8px; min-height:37px; background:#fff7dd8c; border-radius:35% 40% 31% 28%; }
.scene-pair .pair-companion p { font-size:.69rem; }
.scene-pair .pair-guide-picker { margin:2px 0 0; font-size:.7rem; }

.shore-nav {
  flex:none; position:relative; z-index:1;
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0;
  width:100%; height:clamp(73px,15svh,148px); margin:0 auto;
  padding:0 0 env(safe-area-inset-bottom,0px);
  background:none;
}
.scene-pair { padding-bottom:0; }
.shore-nav button.shore-landmark {
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
  color:#243f43; background:none; border:0; min-width:0; min-height:44px;
  padding:0 2px 4px; font:700 1rem/1.3 "Songti SC","Noto Serif CJK SC",serif; letter-spacing:.14em;
  text-shadow:0 0 4px #fffaec,0 0 8px #fff9eb,0 1px 1px #fff;
}
.shore-landmark span { background:radial-gradient(ellipse,#fff8dfd9,transparent 75%); padding:1px 7px; }
.shore-landmark:active span { transform:translateY(2px); }
.scene-pair .bay-return {
  display:flex;
  flex-direction:column;
  flex:1;
  align-items:center;
  justify-content:center;
  gap:6px;
  width:100%;
  min-height:74svh;
  margin:0;
  padding:0 8px 10vh;
  border:0;
  background:transparent;
  text-align:center;
}
.bay-return h2 { font-size:clamp(2.1rem,9vw,3.15rem); }
.bay-return p { color:#174b3e; text-shadow:0 1px 8px #ffffe1; font-weight:650; }
.bay-return-fry {
  display:grid;
  place-items:center;
  width:min(86%,348px);
  height:clamp(180px,32svh,290px);
  position:relative;
  isolation:isolate;
}
.bay-return-fry::before {
  content:""; position:absolute; z-index:-1; inset:28% 5% 20%;
  border:1px solid #fff7bd; border-radius:50%;
  box-shadow:0 0 13px #fff2a3b5, inset 0 0 15px #f8fac966, 0 0 0 7px #ffefb944;
  animation:bay-ready-ring 3.5s ease-out infinite;
}
.bay-return-fry .fish-portrait { --portrait-width:min(90%,250px); animation:bay-guest-float 4.4s ease-in-out infinite alternate; }
.bay-return-fry .paper-fish { --paper-size:min(59vw,225px); }
.bay-return-actions { display:grid; justify-items:center; gap:5px; margin-top:15px; }
.bay-return-actions .water-action { min-width:145px; }
.scene-pair:has(.bay-return) .shore-nav { display:none; }

.scene-pond .pond-waterfront {
  height:clamp(250px,53svh,479px);
  background:none;
  border:0;
  border-radius:0;
  margin:0 0 1px;
  overflow:visible;
}
.scene-pond .pond-waterfront .ripples { opacity:.08; pointer-events:none; }
.pond-waterfront .fish-hit { --paper-size:245px; }
.pond-waterfront .fish-hit .paper-fish { --paper-size:clamp(162px,64cqw,285px); }
.pond-waterfront .fish-hit .fish-portrait { --portrait-width:clamp(144px,69cqw,288px); }
.pond-waterfront .pond-neighbor,.pond-waterfront .pond-neighbor:nth-of-type(2) { border:0; background:none; }
.pond-waterfront .pond-neighbor { top:16%; right:0; animation:bay-guest-float 5s ease-in-out infinite alternate; }
.pond-waterfront .pond-neighbor:nth-of-type(2) { top:auto; bottom:8%; left:1%; animation-delay:-2s; }
.pond-watercare {
  background:radial-gradient(ellipse,#fff4d5bc 2%,#fff4d55c 65%,transparent 77%);
  padding:2px 0 7px;
}
.pond-watercare h2 { letter-spacing:.08em; }
.pond-feed {
  display:flex; align-items:center; justify-content:center; flex-wrap:wrap; column-gap:8px;
}
.pond-feed .water-action { display:inline-flex; align-items:center; gap:8px; padding:3px 12px; background:#fcf5dfcc; color:#254650; border:1px solid #fff9e3bf; }
.pond-seed-dish {
  width:40px; height:20px; border:3px solid #fdf2ce;
  border-radius:50%;
  background:
    radial-gradient(circle at 33% 38%,#dde391 0 1.5px,transparent 2.3px) 2px 4px / 11px 8px,
    radial-gradient(circle at 48% 58%,#a1ac4d 0 1.2px,transparent 2.3px) 0 0 / 8px 6px,
    radial-gradient(ellipse,#738b4c,#52734a 65%,#e8d8ac 74%);
  box-shadow:0 2px 0 #bca07a,0 5px 4px #826a3d33,inset 0 1px 3px #3e5f4196;
}
.pond-requests { display:flex; justify-content:center; gap:10px; margin-top:6px; }
.scene-pond .shore-note,.scene-pond .pond-extras summary {
  color:#295747;
  background:#f7e7bcbd;
  border:1px solid #fff4cd;
  border-radius:4px 8px 5px 7px;
  box-shadow:0 2px 5px #50765925;
  padding:5px 11px;
  font-family:"Songti SC","Noto Serif CJK SC",serif;
}
.scene-pond .shore-note:nth-child(1) { transform:rotate(-3deg); }
.scene-pond .shore-note:nth-child(2) { transform:rotate(2deg); }
.scene-pond .pond-extras summary { width:max-content; margin:auto; text-align:center; }
.scene-pond .pond-extras[open] summary { margin-bottom:12px; }
.scene-pond .pond-roster { justify-content:safe center; padding-top:5px; }
.scene-pond .pond-roster-fish { background:#fff5dd62; min-height:45px; text-shadow:0 1px #fffcde; }
.scene-pond .pond-roster-fish[aria-pressed="true"] { background:#fff8d8c9; }

.dock-wallet {
  position:absolute; top:calc(80px + env(safe-area-inset-top,0px)); right:0;
  padding:7px 8px; color:#2e574a; background:#f3dcabeb; transform:rotate(4deg);
  box-shadow:0 3px 6px #385e4244; font-size:.8rem;
  border-radius:2px 6px 4px 4px;
}
.scene-dock .dock-water {
  display:block;
  min-height:0;
  height:clamp(262px,55svh,520px);
  padding:0;
  margin-top:2px;
}
.scene-dock .dock-water::before { content:none; }
.scene-dock .dock-guest {
  position:absolute;
  left:var(--dock-x);
  top:var(--dock-y);
  transform:translate(-50%,-50%);
  width:clamp(83px,30vw,136px);
  height:clamp(64px,23vw,109px);
  padding:0;
  margin:0;
  border:0;
  border-radius:38%;
  background:none;
  --portrait-width:100%;
}
.dock-guest:nth-child(1) { --dock-x:29%; --dock-y:24%; }
.dock-guest:nth-child(2) { --dock-x:69%; --dock-y:36%; }
.dock-guest:nth-child(3) { --dock-x:23%; --dock-y:61%; }
.dock-guest:nth-child(4) { --dock-x:69%; --dock-y:75%; }
.dock-guest :is(.fish-portrait,.paper-fish) {
  filter:drop-shadow(0 12px 6px #22595768);
  animation:bay-guest-float 4.8s ease-in-out infinite alternate;
}
.dock-guest .paper-fish { --paper-size:clamp(89px,28vw,135px); }
.dock-guest:nth-child(2n) :is(.fish-portrait,.paper-fish) { animation-delay:-2.6s; }
.dock-guest[aria-pressed="true"]::after {
  content:""; position:absolute; inset:38% 0 8%; border:1px solid #fffbe6; border-radius:50%;
  box-shadow:0 0 12px #fffcd6a8; animation:bay-ready-ring 2.4s ease-out infinite;
}
@keyframes bay-guest-float {
  from { transform:translate(-6px,1px) rotate(-1deg); }
  to { transform:translate(7px,-7px) rotate(3deg); }
}
.scene-dock .dock-invite {
  width:min(90%,370px);
  margin:0 auto;
  padding:14px 12px;
  background:radial-gradient(ellipse,#fff4d8ee,#fff2cbad 61%,transparent 77%);
  color:#254b3d;
}

.scene-book .fishbook {
  width:100%;
  min-height:clamp(285px,54svh,500px);
  grid-template-rows:repeat(2,minmax(0,1fr));
  gap:clamp(8px,3.4vw,18px);
  margin:8px auto 0;
  padding:clamp(19px,6vw,37px) clamp(16px,5.4vw,31px);
  background: url('assets/bay-book-page.webp') center / 100% 100% no-repeat;
  border:0;
  border-radius:0;
  box-shadow:none;
  filter:drop-shadow(0 8px 7px #34665438);
}
.scene-book :is(.book-print,button.book-print) {
  min-height:0;
  padding:3px;
  background:radial-gradient(ellipse,#edf0d644,#c4dcaa2b 64%,#dcc99730);
  border:1px solid #9fa97a59;
  border-radius:5% 4% 6% 4%;
  font-family:"Songti SC","Noto Serif CJK SC",serif;
}
.scene-book .book-print .fish-portrait,.scene-book .book-print .pair-painted-fish { width:min(95%,130px); }
.scene-book .book-print .paper-fish { --paper-size:min(32vw,138px); }
.scene-book .book-print strong { color:#315746; font-size:clamp(.83rem,4.3vw,1rem); }
.book-turn {
  display:flex; align-items:center; justify-content:space-between;
  width:min(92%,378px); margin:3px auto 0;
  color:#345849; font-size:.8rem; font-variant-numeric:tabular-nums;
  text-shadow:0 1px 5px #fff9de;
}
.scene-book .book-turn button {
  min-height:43px; padding:4px 11px;
  background:#ffefd3dc; color:#2f5949; border:1px solid #fff6dc;
}
.scene-book .book-turn button:disabled { opacity:.45; }
.scene-book .book-preview-entry { margin-top:2px; }

.scene-waterways > .waterfront-title { position:relative; z-index:2; }
.branch-map {
  position:fixed;
  z-index:0;
  inset:0;
  width:min(100%,var(--scene-width));
  margin-inline:auto;
  pointer-events:none;
}
.branch-marker {
  position:absolute; left:var(--place-x); top:var(--place-y);
  transform:translate(-50%,-50%); display:grid; gap:1px; place-content:center;
  min-height:44px; min-width:76px; padding:4px 9px; border:0; background:none; color:#183e48;
  text-shadow:0 0 4px white,0 0 8px #fffce9,1px 1px 2px #fff;
  pointer-events:auto;
}
.branch-marker::before {
  content:""; position:absolute; z-index:-1; inset:0 -10%;
  background:radial-gradient(ellipse,#fff6dfe8 5%,#fff9e4a6 45%,transparent 72%);
}
.branch-marker::after { content:""; position:absolute; bottom:56%; left:-5%; right:-5%; height:10svh; }
.branch-tides::after { left:10%; right:-35%; height:11svh; }
.branch-marker strong { white-space:nowrap; font:700 1.1rem/1.2 "Songti SC",serif; letter-spacing:.12em; }
.branch-marker small { font-size:.68rem; color:#234c55; letter-spacing:.03em; }
.branch-hop { --place-x:30%; --place-y:80%; }
.branch-shoal { --place-x:77%; --place-y:54%; }
.branch-tides { --place-x:74%; --place-y:32%; }

.scene-hop > .branch-return h1 { position:absolute; clip-path:inset(50%); width:1px; height:1px; overflow:hidden; }
.scene-hop > .branch-return { min-height:38px; }
.scene-tides .intro h2,.scene-shoal .intro h2 { position:absolute; clip-path:inset(50%); width:1px; height:1px; overflow:hidden; }
.scene-tides > .intro,.scene-shoal > .intro { margin-top:6px; }
.scene-shoal .stream { border-radius:12px; }

@media (max-height:680px) and (max-width:600px) {
  :is(.scene-pair,.scene-pond,.scene-dock,.scene-book,.scene-waterways) {
    padding-top:calc(6px + env(safe-area-inset-top,0px));
  }
  .scene-pair .pair-title { min-height:70px; padding-top:9px; }
  .scene-pair .waterways-sign { bottom:-26px; }
  .scene-pair .pair-water { height:clamp(181px,36svh,260px); }
  .scene-pair .pair-bay { min-height:79px; }
  .shore-nav { height:15svh; min-height:65px; }
  .scene-pond .pond-waterfront { height:clamp(182px,47svh,315px); }
  .scene-dock .dock-water { height:clamp(192px,49svh,350px); }
  .bay-return-fry { height:clamp(145px,29svh,252px); }
}
@media (prefers-reduced-motion:reduce) {
  .bay-living-water { display:none; }
  :is(.scene-pair,.scene-waterways)::after {
    content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
    width:min(100%,var(--scene-width)); height:100svh; margin:auto;
    background:#ffdfa0; opacity:.82; animation:none;
    mask:var(--sun-shapes) center / 100% 100% no-repeat; mask-mode:luminance;
  }
  .pair-first-cue::before,.bay-return-fry::before,.bay-return-fry .fish-portrait,
  .pond-waterfront .pond-neighbor,.dock-guest :is(.fish-portrait,.paper-fish),.dock-guest[aria-pressed="true"]::after { animation:none; }
  .pair-first-cue::before { opacity:.72; }

}

:is(.scene-tides,.scene-shoal,.scene-hop,.tail-game) { --scene-width:580px; }
:is(.scene-tasks,.scene-tides,.scene-shoal,.scene-hop,.tail-game)::before {
  background:linear-gradient(180deg,#fff1d956,#fff4dc13 49%,#fcf5e273),var(--bay-water-art) center / cover no-repeat;
}
.shoal-game .stream { min-height:clamp(225px,48svh,415px); margin-top:8px; border-color:#eaffeb9c; }

/* Feedback sits outside the scene so a quick tap remains visible through a page turn. */
#app :where(button,summary,canvas[data-action]) { -webkit-tap-highlight-color:transparent; }
#app :where(button,summary):focus-visible {
  outline:2px solid #235e66; outline-offset:2px;
  box-shadow:0 0 0 4px #fff5d4;
}
#app :where(button:disabled,button[aria-disabled="true"]) { cursor:default; }
#app button:disabled:not(.pair-pool,.tide-cell) { opacity:.58; filter:saturate(.52); }
#app .pair-water[aria-busy="true"] button { cursor:wait; }
#app [data-held] { filter:brightness(.88) saturate(1.12); }
#app :is(.pair-pool,.dock-guest,.fish-hit,.pond-neighbor)[data-held] {
  filter:brightness(1.12) drop-shadow(0 0 4px #fff1b4);
}
@media (prefers-reduced-motion:no-preference) {
  #app :is(.pair-pool,.dock-guest,.fish-hit,.pond-neighbor)[data-held] > :is(.pair-specimen,.fish-portrait,.swim-path,.paper-fish),
  #app [data-held] > :is(strong,.pond-seed-dish) { scale:.96; }
}
.shore-landmark span,.branch-marker strong {
  padding:2px 9px 3px; border-radius:43% 50% 46% 48% / 42% 45% 51% 48%;
  background:linear-gradient(150deg,#fffbeaca,#f6eed2a8);
  box-shadow:inset 0 1px 1px #fffff4bd,0 1px 1px #8479548c;
}
.scene-pair .pair-stage-controls {
  gap:2px; background:none;
}
.scene-pair .pair-stage-controls :is(.pair-sound,.pair-revisit),.scene-pair .waterways-sign {
  background:radial-gradient(ellipse at 40% 37%,#fffae7ec,#f3f4dbc9 56%,transparent 72%);
}
.scene-pair .pair-stage-controls button { font-size:.78rem; }
.scene-pair .waterways-sign { border-radius:50% 46% 48% 39%; }
.scene-pair .pair-stage-controls .pair-sound { min-width:60px; }
@media (hover:hover) and (pointer:fine) {
  #app :where(button:enabled,summary):not([data-held],[aria-disabled="true"]):hover {
    filter:brightness(1.07) drop-shadow(0 1px 2px #5b654647);
  }
}
.control-contact {
  --rim:#fff5c8; --shade:#648a7d; position:fixed; z-index:100;
  display:block; width:36px; height:25px; margin:-12.5px 0 0 -18px;
  border:1.4px solid var(--rim); border-radius:50%; pointer-events:none;
  background:radial-gradient(ellipse,#fffdf049 0%,transparent 69%);
  box-shadow:0 1px 2px var(--shade),inset 0 0 3px #fff9da8c;
}
.control-contact[hidden] { display:none; }
.control-contact.held { opacity:.94; scale:.74; }
.control-contact.released { animation:control-contact-spread .40s ease-out both; }
.contact-water { width:44px; height:22px; margin:-11px 0 0 -22px; --rim:#ffffdf; --shade:#398c91; }
.contact-water::after {
  content:""; position:absolute; inset:-5px -8px; border-radius:50%;
  border-top:1px solid #fff7c4d9; border-bottom:1px solid #fff7c4a8; rotate:-9deg;
}
.contact-paper {
  width:25px; height:25px; margin:-12.5px; rotate:-9deg;
  border-radius:33% 36% 28% 38%; --rim:#b18b4c; --shade:#fff5d4;
  background:radial-gradient(ellipse,#f8e0a438,transparent);
}
.contact-paper::after {
  content:""; position:absolute; inset:3px; border:1px solid #fff4d6b8; border-radius:inherit;
}
@keyframes control-contact-spread {
  0% { scale:.71; opacity:1; }
  30% { opacity:.95; }
  100% { scale:1.71; opacity:0; }
}
@media (prefers-reduced-motion:reduce) {
  .control-contact.released { animation:none!important; scale:1; opacity:.84; }
}
