/* Glimmer Cove map (home page). Wide painted map on desktop, tall map on phones (<700px). Hotspots are real links
   placed with --x/--y (wide) and --tx/--ty (tall), in % of the map. Motion is off for reduced-motion visitors. */
/* Full-bleed hero: the map floods the first screen. The stage keeps the art's aspect ratio (so hotspots stay on
   their places) and covers the hero; it may crop up to 12% sideways, beyond that the blurred cove fills the gap. */
.cove-hero { --ar: 1.7917; position: relative; height: max(100svh, calc(100vw / var(--ar))); min-height: 520px; overflow: hidden; container-type: size;
  background: #c9a777 url(/img/map/bg-cove-day.webp) center / cover; }
.night .cove-hero { background-image: url(/img/map/bg-cove-night.webp); background-color: #1d3442; }
.map-stage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(max(100cqw, calc(100cqh * var(--ar))), 112cqw); aspect-ratio: var(--ar); }
.map-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-ui { position: absolute; left: 0; right: 0; top: 0; height: min(100%, 100svh); display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 max(16px, 2.5vw) calc(max(18px, 3.5vh) + 34px); pointer-events: none; z-index: 5; }
.hero-ui > * { pointer-events: auto; }
.welcome { width: min(410px, 100%); background: rgba(255, 249, 240, 0.94); border: 2px solid var(--ink); border-radius: 22px; padding: 14px 16px 14px; box-shadow: 0 6px 0 var(--ink), 0 22px 50px rgba(15, 25, 35, 0.35); position: relative; }
.welcome::before { content: ""; position: absolute; top: -12px; left: 38%; width: 92px; height: 24px; transform: rotate(-3deg); background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0 6px, transparent 6px 12px), var(--blush); opacity: 0.92; }
.welcome-head { display: flex; align-items: center; gap: 12px; }
.welcome-head .face { width: 48px; height: 48px; border-radius: 50%; background: var(--butter); border: 2px solid var(--ink); object-fit: cover; flex: none; }
.welcome .eyebrow { margin: 0; font-size: 0.78rem; }
.welcome h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0; line-height: 1.05; }
.welcome .lede { margin: 8px 0 0; color: var(--ink-2); font-size: 1rem; }
.welcome .bubble { margin-top: 8px; }
.welcome .bubble + .lede, .welcome:has(.bubble:not([hidden])) .lede { display: none; }
.welcome .hide { margin-left: auto; align-self: flex-start; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; font-size: 1.3rem; font-weight: 900; line-height: 1; cursor: pointer; color: var(--ink); }
.welcome.min .bubble, .welcome.min .lede { display: none; }
.scroll-cue { align-self: flex-end; background: rgba(255, 249, 240, 0.94); color: var(--ink); text-decoration: none; font-weight: 800; border: 2px solid var(--ink); border-radius: 999px; padding: 10px 18px; box-shadow: 0 4px 0 var(--ink); min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.scroll-cue:hover { color: var(--ink); transform: translateY(-1px); }
body.home .top { position: absolute; left: 0; right: 0; background: none; border: 0; backdrop-filter: none; }
body.home .top .wrap { background: rgba(255, 249, 240, 0.94); border: 2px solid var(--ink); border-radius: 20px; margin-top: 12px; box-shadow: 0 4px 0 var(--ink), 0 14px 30px rgba(15, 25, 35, 0.25); max-width: min(1120px, calc(100% - 24px)); }
.home-sheet { margin-top: -34px; position: relative; z-index: 6; }

/* hotspots */
.spot { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; text-decoration: none; z-index: 3; min-width: 44px; min-height: 44px; }
.spot .ring { width: clamp(64px, 9vw, 120px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 228, 150, 0.85) 0%, rgba(255, 210, 120, 0.35) 45%, transparent 70%); opacity: 0; transition: opacity 0.25s, transform 0.25s; transform: scale(0.8); }
.spot .sign { margin-top: -18px; background: linear-gradient(#8a5a34, #74482a); color: #fff4df; font-family: var(--hand); font-weight: 700; font-size: clamp(0.82rem, 1.15vw, 1.08rem); letter-spacing: 0.01em; padding: 5px 12px 6px; border-radius: 7px; border: 2px solid #5b3820; box-shadow: 0 3px 0 rgba(60, 35, 18, 0.55), 0 6px 14px rgba(30, 20, 10, 0.3); white-space: nowrap; position: relative; transition: transform 0.2s cubic-bezier(.3,1.4,.5,1); }
.spot .sign::before, .spot .sign::after { content: ""; position: absolute; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #5b3820; transform: translateY(-50%); }
.spot .sign::before { left: 5px; } .spot .sign::after { right: 5px; }
.spot .fav-mark { display: none; color: #ffb3c9; margin-left: 4px; }
.spot.fav .fav-mark { display: inline; }
.spot:hover .ring, .spot:focus-visible .ring, .spot.active .ring { opacity: 1; transform: scale(1); }
.spot:hover .sign, .spot:focus-visible .sign, .spot.active .sign { transform: translateY(-3px) rotate(-2deg); }
.spot:focus-visible { outline: none; }
.spot:focus-visible .sign { outline: 3px solid #fff; outline-offset: 3px; }
.spot.active .ring { animation: spotPulse 1.6s ease-in-out infinite; }
@keyframes spotPulse { 50% { transform: scale(1.12); opacity: 0.75; } }
.map.is-night .spot .ring { background: radial-gradient(circle, rgba(255, 214, 130, 0.9) 0%, rgba(255, 190, 90, 0.35) 45%, transparent 70%); }

/* Lumi floating in the pond */
.map-lumi { position: absolute; left: var(--x); top: var(--y); width: clamp(70px, 10%, 140px); transform: translate(-50%, -62%); z-index: 2; pointer-events: none; }
.map-lumi img { width: 100%; animation: lumiFloat 4.2s ease-in-out infinite; filter: drop-shadow(0 6px 6px rgba(20, 40, 50, 0.35)); }
.map-lumi.wave img { animation: lumiWave 0.9s ease-in-out 2, lumiFloat 4.2s ease-in-out 1.8s infinite; }
@keyframes lumiFloat { 50% { transform: translateY(-6%) rotate(-2deg); } }
@keyframes lumiWave { 25% { transform: rotate(-9deg); } 75% { transform: rotate(7deg); } }

/* Lumi's speech bubble (inside the welcome card) */
.bubble p { margin: 0; font-size: 1rem; line-height: 1.45; }
.bubble .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bubble .acts:empty { display: none; }
.bubble .acts .btn { min-height: 44px; padding: 6px 14px; font-size: 0.92rem; box-shadow: 0 3px 0 var(--ink); }
.bubble .step { font-size: 0.8rem; color: var(--ink-2); font-weight: 800; }

/* Mystery Shell */
.shell { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); z-index: 3; width: 48px; height: 48px; border: 0; padding: 0; background: none; cursor: pointer; }
.shell svg { width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(255, 240, 200, 0.95)); animation: shellGlint 2.6s ease-in-out infinite; }
.shell.found svg { opacity: 0.55; animation: none; }
@keyframes shellGlint { 50% { transform: scale(1.12) rotate(-6deg); filter: drop-shadow(0 0 12px rgba(255, 240, 200, 1)); } }
.shell:focus-visible { outline: 3px solid #fff; border-radius: 50%; }

/* seasonal touches */

/* portrait screens: the tall map; the welcome card docks at the bottom and can be tucked away */
@media (orientation: portrait) {
  .cove-hero { --ar: 0.5579; }
  .map-stage { width: min(max(100cqw, calc(100cqh * var(--ar))), 122cqw); }
  .spot { left: var(--tx); top: var(--ty); }
  .spot .ring { width: 72px; }
  .spot .sign { font-size: 0.82rem; padding: 4px 10px 5px; margin-top: -22px; }
  .map-lumi { left: var(--tx); top: var(--ty); width: 21%; }
  .shell { left: var(--tx); top: var(--ty); }
  .scroll-cue { display: none; }
  .welcome { width: 100%; padding: 10px 12px 12px; }
  .welcome h1 { font-size: 1.6rem; }
  .welcome .lede { font-size: 0.95rem; }
  .hero-ui { padding-bottom: calc(max(12px, 2vh) + 34px); }
}
@media (orientation: portrait) and (min-width: 600px) { .welcome { width: min(460px, 100%); } }
@media (orientation: portrait) {
  .home-sheet { margin-top: 0; }
  .hero-ui { padding-bottom: max(12px, 2vh); }
  /* tucked away: only Lumi's face stays, as a round button in the corner */
  .welcome.min { width: auto; padding: 0; background: none; border: 0; box-shadow: none; }
  .welcome.min::before, .welcome.min .welcome-head > div { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .welcome.min::before { display: none; }
  .welcome.min .welcome-head { gap: 0; }
  .welcome.min .face { display: none; }
  .welcome.min .hide { width: 60px; height: 60px; margin: 0; background: var(--butter) url(/img/otter/otter-cheered-320.webp) center 30% / 120% no-repeat; box-shadow: 0 4px 0 var(--ink), 0 10px 24px rgba(15, 25, 35, 0.35); position: relative; }
  .welcome.min .hide [aria-hidden] { position: absolute; right: -4px; top: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 1rem; display: grid; place-items: center; }
}
@media (max-width: 860px) {
  body.home .top .wrap { flex-wrap: nowrap; min-height: 52px; padding: 4px 8px 4px 6px; gap: 4px; }
  body.home .brand { gap: 0; flex: none; }
  body.home .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.home .brand img { width: 38px; height: 38px; }
  body.home .nav { margin: 0; width: auto; min-width: 0; padding: 0; }
}

/* places list */
.places { display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.place { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.place img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.place .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.place h3 { margin: 0; }
.place .says { margin: 0; font-style: italic; color: var(--ink-2); }
.place .goes { font-size: 0.88rem; font-weight: 800; color: var(--sea); margin: 0; }
.place .row { margin-top: auto; padding-top: 6px; }
.place .fav { min-width: 44px; min-height: 44px; border-radius: 50%; border: 2px solid var(--line); background: #fff; cursor: pointer; font-size: 1.2rem; line-height: 1; color: #c9b8a6; }
.place .fav[aria-pressed="true"] { color: #e8799c; border-color: #e8799c; background: #fff0f4; }
.place.is-fav { order: -1; border-color: #e8799c; }

/* shell dialog */
.shell-dialog { border: 2px solid var(--ink); border-radius: 22px; padding: 22px; max-width: min(420px, 92vw); box-shadow: 0 8px 0 var(--ink); background: var(--paper); text-align: center; }
.shell-dialog::backdrop { background: rgba(15, 28, 38, 0.55); }
.shell-dialog img.prize { width: 200px; margin: 0 auto 8px; }
.shell-dialog .set { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 12px 0; }
.shell-dialog .set span { aspect-ratio: 1; border-radius: 8px; background: var(--line); display: block; overflow: hidden; }
.shell-dialog .set span img { width: 100%; }
