/* Chill Domains — gone-fishin.css
   The /gone-fishin page ("Gone Fishin' with Jack"): the stage, its HUD, the
   catch card, and the card that holds the title and logbook screens. Pairs
   with /assets/js/gone-fishin.js. */

/* the game sits straight under the breadcrumb; heading and intro follow it */
.gf-top { padding-block: clamp(1rem, 2.5vw, 1.75rem) clamp(2rem, 4vw, 3.5rem); }
.gf-top .crumb { max-width: 1100px; margin: 0 auto var(--space-3); }
.gf-intro { max-width: 760px; margin: var(--space-7) auto 0; text-align: center; }
.gf-intro h1 { margin-bottom: var(--space-4); }
.gf-lede { color: var(--text-muted); font-size: var(--fs-xl); }
@media (max-width: 640px) { .gf-lede { font-size: var(--fs-lg); } }
.gf-wrap { max-width: 1100px; margin-inline: auto; position: relative; }
.gf-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; container-type: inline-size;
  background: #86bcd8; border-radius: var(--radius-lg); color: var(--color-ink);
  box-shadow: 0 24px 60px -24px rgba(31, 41, 55, 0.5);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
@media (max-width: 640px) { .gf-stage { aspect-ratio: 4 / 5; } }
/* a phone on its side: keep the whole stage under the sticky header */
.gf-wrap { scroll-margin-top: 96px; }
@media (max-height: 560px) and (orientation: landscape) {
  .gf-stage { aspect-ratio: auto; height: calc(100vh - 110px); height: calc(100svh - 110px); min-height: 240px; }
}
.gf-stage:focus { outline: none; }
.gf-stage:focus-visible { outline: 3px solid var(--color-coral); outline-offset: 3px; }
.gf-stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }

.gf-wrap:fullscreen { max-width: none; background: #1f2937; display: flex; align-items: center; }
.gf-wrap:fullscreen .gf-stage { aspect-ratio: auto; height: 100%; border-radius: 0; box-shadow: none; }
.gf-wrap.is-pseudo-fs { position: fixed; inset: 0; z-index: 9999; max-width: none; background: #1f2937; }
.gf-wrap.is-pseudo-fs .gf-stage { aspect-ratio: auto; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
html.gf-lock, html.gf-lock body { overflow: hidden; }

/* HUD */
.gf-hud {
  position: absolute; z-index: 7; inset: 0 0 auto 0; display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px; pointer-events: none; font: 700 0.8rem/1.2 var(--font-sans);
}
.gf-hud__stats { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.gf-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px;
  background: rgba(251, 247, 238, 0.88); border: 1px solid rgba(44, 56, 72, 0.15); white-space: nowrap;
}
.gf-chip b { font-variant-numeric: tabular-nums; }
.gf-hud__btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; pointer-events: auto; }
.gf-stage.has-panel .gf-hud__stats { visibility: hidden; }
.gf-icon {
  height: 36px; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0;
  border: 1px solid rgba(44, 56, 72, 0.15); border-radius: 99px; background: rgba(251, 247, 238, 0.88);
  color: var(--color-ink); font: 700 0.8rem/1 var(--font-sans); cursor: pointer;
}
.gf-icon--text { padding: 0 12px 0 10px; }
.gf-icon:hover { background: #fff; }
.gf-icon:focus-visible { outline: 3px solid var(--color-coral); outline-offset: 1px; }
.gf-icon[aria-pressed="true"].gf-icon--text { background: var(--color-sage); border-color: var(--color-sage-2); }
@media (pointer: coarse) { .gf-icon { height: 44px; min-width: 44px; } }
.gf-icon svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gf-icon .gf-slash { display: none; }
.gf-icon[aria-pressed="false"] .gf-slash { display: block; }
.gf-icon .gf-i-shrink, .gf-icon.is-fs .gf-i-grow { display: none; }
.gf-icon.is-fs .gf-i-shrink { display: block; }
@media (max-width: 640px) {
  .gf-hud { font-size: 0.74rem; }
  .gf-icon--text span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .gf-icon--text { padding: 0; }
}

/* the catch card, bottom right over the water */
.gf-catch {
  position: absolute; z-index: 4; right: 12px; bottom: 12px; width: min(340px, calc(100% - 24px));
  display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  background: var(--color-cream-3); border: 1px solid var(--color-line); border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px -18px rgba(31, 41, 55, 0.6); animation: gf-up 0.35s var(--ease, ease) both;
}
.gf-catch[hidden] { display: none; }
@keyframes gf-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gf-catch { animation: none; } }
.gf-catch__pic { flex: none; width: 110px; height: 70px; }
.gf-catch__text { min-width: 0; }
.gf-catch h2 { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; margin: 0 0 0.15rem; }
.gf-catch p { margin: 0 0 0.35rem; }
.gf-catch__size { font-weight: 700; font-size: 0.85rem; color: var(--color-ink-2); }
.gf-catch__line { font-size: 0.88rem; }
.gf-catch .btn { min-height: 40px; padding-block: 0.4rem; margin-top: 0.2rem; }
@container (max-width: 520px) {
  .gf-catch { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 10px 12px; }
  .gf-catch__pic { width: 84px; height: 56px; }
  .gf-catch h2 { font-size: 1.1rem; }
}

/* the card: title and logbook */
.gf-panel {
  position: absolute; z-index: 6; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 56px 12px 12px; background: rgba(44, 56, 72, 0.25);
}
.gf-panel[hidden] { display: none; }
.gf-card {
  width: 100%; max-width: 520px; max-height: 100%; overflow: auto; overscroll-behavior: contain;
  background: var(--color-cream-3); border: 1px solid var(--color-line); border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px -20px rgba(31, 41, 55, 0.55); padding: clamp(16px, 3.5cqw, 28px);
  touch-action: pan-y; user-select: text; -webkit-user-select: text;
}
.gf-card h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 4.2cqw, 2.1rem); line-height: 1.1; margin: 0 0 0.5rem; }
.gf-card p { margin: 0 0 0.7rem; font-size: 0.95rem; }
.gf-kicker { font: 700 0.72rem/1.2 var(--font-sans) !important; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-sage-2); margin-bottom: 0.35rem !important; }
.gf-small { color: var(--color-muted); font-size: 0.85rem !important; }
.gf-controls { margin: 0 0 0.8rem; padding-left: 1.1rem; font-size: 0.9rem; }
.gf-controls li { margin-bottom: 0.25rem; }
.gf-controls kbd, .gf-keys kbd, .prose kbd {
  display: inline-block; min-width: 1.6em; padding: 0.05em 0.4em; border: 1px solid var(--color-line); border-bottom-width: 2px;
  border-radius: 5px; background: #fff; font: 700 0.8em/1.4 var(--font-sans); text-align: center; color: var(--color-ink);
}
.gf-btns {
  position: sticky; bottom: calc(-1 * clamp(16px, 3.5cqw, 28px)); z-index: 1;
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0.9rem calc(-1 * clamp(16px, 3.5cqw, 28px)) calc(-1 * clamp(16px, 3.5cqw, 28px));
  padding: 10px clamp(16px, 3.5cqw, 28px) clamp(12px, 3cqw, 22px); background: var(--color-cream-3);
  border-top: 1px solid var(--color-line-2);
}
.gf-btns .btn { min-height: 44px; }
.gf-book { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.gf-book th { text-align: left; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); padding: 4px 0; border-bottom: 1px solid var(--color-line); }
.gf-book td { padding: 4px 0; border-bottom: 1px dotted rgba(44, 56, 72, 0.2); }
.gf-book th:not(:first-child), .gf-book td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; padding-left: 10px; white-space: nowrap; }
.gf-book tr.is-unseen td { color: var(--color-muted); }

/* below the stage */
.gf-under { margin-top: var(--space-4); }
.gf-keys { margin: 0; font-size: var(--fs-sm); color: var(--color-ink-2); }
.gf-note { max-width: 760px; margin: var(--space-5) auto 0; text-align: center; font-size: var(--fs-sm); color: var(--color-muted); }
.gf-fish__h { max-width: var(--container-narrow); margin: var(--space-6) auto 0; font-size: var(--fs-lg); }
.gf-fish { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--space-4); margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.gf-fish li { background: var(--bg-card); border: 1px solid var(--color-line); border-radius: var(--radius); padding: var(--space-4) var(--space-5); }
.gf-fish h4 { font-size: var(--fs-md, 1.05rem); margin: 0 0 var(--space-2); }
.gf-fish p { margin: 0; font-size: var(--fs-sm); }
.gf-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); margin-top: var(--space-8); }
.gf-related a {
  display: block; padding: var(--space-5); text-decoration: none; color: var(--color-ink);
  background: var(--bg-card); border: 1px solid var(--color-line); border-radius: var(--radius);
  transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.gf-related a:hover { box-shadow: var(--shadow); transform: translateY(-1px); color: var(--color-ink); }
.gf-related strong { display: block; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; margin-bottom: var(--space-1); }
.gf-related span { font-size: var(--fs-sm); color: var(--color-ink-2); }
