/* Homepage viewport geometry authority. Visual design stays in styles.css. */
html.jj-pager, html.jj-pager body {
  height:auto!important;
  min-height:calc(var(--jj-live-nav-h) + var(--jj-live-page-h) * var(--jj-page-count))!important;
  max-height:none!important;
  scroll-behavior:auto!important;
  scroll-snap-type:none!important;
  touch-action:pan-x pinch-zoom!important;
}
html.jj-pager body {padding-top:var(--jj-live-nav-h)!important;padding-bottom:0!important;}
html.jj-pager body > main {
  height:calc(var(--jj-live-page-h) * var(--jj-main-page-count))!important;
  min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;
}
html.jj-pager body > .hero, html.jj-pager body > main > .panel {
  box-sizing:border-box!important;
  height:var(--jj-live-page-h)!important;
  min-height:var(--jj-live-page-h)!important;max-height:var(--jj-live-page-h)!important;
  margin-top:0!important;margin-bottom:0!important;
  overflow:hidden!important;
  padding-bottom:max(.5rem,env(safe-area-inset-bottom,0px))!important;
}
html.jj-pager body > .hero > .hero-page-combined {height:100%!important;min-height:0!important;}
html.jj-pager #weather-alert.combined-live-card {
  height:100%!important;min-height:0!important;max-height:100%!important;
  overflow:hidden!important;padding-bottom:.42rem!important;
}
html.jj-pager .combined-live-card .call-body,
html.jj-pager .combined-live-card .call-copy {height:100%!important;min-height:0!important;overflow:hidden!important;}
html.jj-pager #weather-alert #almanac.combined-weather-details {min-height:0!important;overflow:hidden!important;}
html.jj-pager .latest-gallery-strip {height:100%!important;min-height:0!important;max-height:100%!important;}
html.jj-pager .latest-gallery-strip figure {box-sizing:border-box!important;height:100%!important;min-height:0!important;max-height:100%!important;}
html.jj-pager .home-gallery-photo {
  display:block;min-width:0;min-height:0;overflow:hidden;cursor:zoom-in;
  touch-action:pan-x pinch-zoom!important;
  -webkit-tap-highlight-color:rgba(250,204,21,.2);
}
/* Short landscape viewports need columns, not tall portrait stacks. */
@media(max-height:500px) and (min-width:600px) {
  html.jj-pager #gallery-feature {grid-template-columns:minmax(0,.65fr) minmax(0,1.35fr)!important;grid-template-rows:minmax(0,1fr)!important;}
  html.jj-pager #patterns {grid-template-columns:minmax(0,.65fr) minmax(0,1.35fr)!important;align-items:center!important;}
  html.jj-pager #patterns .pattern-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.35rem!important;}
  html.jj-pager #patterns article {padding:.45rem!important;}
  html.jj-pager #patterns article span {font-size:.68rem!important;line-height:1.18!important;}
  html.jj-pager #patterns h2, html.jj-pager .safety h2 {font-size:1.6rem!important;}
  html.jj-pager .safety .cards.three {grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:.45rem!important;}
  html.jj-pager .safety article {padding:.5rem!important;}
  html.jj-pager .safety article p {font-size:.72rem!important;line-height:1.2!important;}
  html.jj-pager #weather-alert.combined-live-card {--jj-tile-value:.85rem;--jj-tile-label:.6rem;--jj-meta:.6rem;padding:.4rem!important;}
  html.jj-pager #weather-alert .alert-weather-metric,
  html.jj-pager #weather-alert #almanac.combined-weather-details .scan-grid article {padding:.3rem!important;row-gap:.1rem!important;}
  html.jj-pager #weather-alert .metric-icon,
  html.jj-pager #weather-alert #almanac .scan-icon {width:22px!important;height:22px!important;font-size:1rem!important;}
  html.jj-pager #weather-alert .hourly-card {padding:.25rem!important;}
}
html.jj-pager .home-gallery-photo img {-webkit-user-drag:none;user-select:none;}
html.jj-pager .home-gallery-photo:focus-visible {outline:3px solid var(--gold);outline-offset:-3px;}
html.jj-pager #captain-jim.captain-bio {
  padding-bottom:calc(var(--jj-signoff-h) + env(safe-area-inset-bottom,0px))!important;
}
html.jj-pager #captain-jim .bio-signoff {bottom:env(safe-area-inset-bottom,0px)!important;}
@media(max-width:760px) {
  html.jj-pager body > .nav {
    box-sizing:border-box!important;
    height:calc(50px + env(safe-area-inset-top,0px))!important;
    padding-top:calc(.24rem + env(safe-area-inset-top,0px))!important;
    padding-left:env(safe-area-inset-left,0px)!important;
    padding-right:env(safe-area-inset-right,0px)!important;
  }
  html.jj-pager body > .hero {padding-top:.18rem!important;}
  html.jj-pager .home-gallery-photo {border-radius:10px!important;}
}

/* App shell: fixed pages, measured safe-area header/footer, no document snap math. */
html.jj-app-pages, html.jj-app-pages body {
  height:var(--jj-live-vh,100dvh)!important;min-height:0!important;max-height:var(--jj-live-vh,100dvh)!important;
  width:100%!important;margin:0!important;padding:0!important;overflow:hidden!important;
  scroll-padding:0!important;touch-action:pinch-zoom!important;
}
html.jj-app-pages body > main {height:0!important;min-height:0!important;max-height:0!important;padding:0!important;margin:0!important;}
html.jj-app-pages body > .hero,html.jj-app-pages body > main > .panel,html.jj-app-pages #captain-jim.captain-bio {
  position:fixed!important;top:var(--jj-live-nav-h,50px)!important;bottom:auto!important;left:0!important;right:0!important;
  width:100%!important;max-width:100%!important;height:var(--jj-live-page-h)!important;
  min-height:0!important;max-height:var(--jj-live-page-h)!important;margin:0!important;
  padding:8px!important;border-width:0!important;border-radius:0!important;
  overflow:hidden!important;contain:layout paint!important;scroll-margin:0!important;
  touch-action:pinch-zoom!important;
}
html.jj-app-pages body > .hero:not(.jj-active),html.jj-app-pages body > main > .panel:not(.jj-active) {display:none!important;}
html.jj-app-pages body > .nav {background:#081725!important;box-sizing:border-box!important;height:calc(50px + env(safe-area-inset-top,0px))!important;}
html.jj-app-pages .jj-page-controls {
  position:fixed;z-index:100;left:0;right:0;bottom:0;box-sizing:border-box;
  height:calc(44px + env(safe-area-inset-bottom,0px));padding:0 max(8px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(8px,env(safe-area-inset-left,0px));
  display:grid;grid-template-columns:76px minmax(0,1fr) 76px;align-items:center;gap:8px;
  background:#081725;border-top:1px solid #31485a;touch-action:manipulation;
}
html.jj-app-pages .jj-page-controls button {height:40px;min-height:40px;padding:0 8px;border:0;border-radius:8px;background:transparent;color:#fff8d0;font:700 14px system-ui;cursor:pointer;}
html.jj-app-pages .jj-page-controls button:disabled {opacity:.3;cursor:default;}
html.jj-app-pages .jj-page-label {text-align:center;font:600 12px system-ui;color:#bfd0df;white-space:nowrap;}
html.jj-app-pages #map.full-page-map-panel {display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;gap:8px!important;}
html.jj-app-pages #map .section-head {grid-row:1!important;margin:0!important;}
html.jj-app-pages #map .section-head h2 {font-size:clamp(20px,5vw,30px)!important;line-height:1.1!important;margin:0!important;}
html.jj-app-pages #map .section-head .kicker {font-size:10px!important;margin:0 0 3px!important;}
html.jj-app-pages #map .map-wrap {grid-row:2!important;margin:0!important;min-height:0!important;height:auto!important;touch-action:pinch-zoom!important;}
html.jj-app-pages #map .map-wrap iframe {pointer-events:none!important;touch-action:pinch-zoom!important;}
html.jj-app-pages #map .map-swipe-pad,html.jj-app-pages #map .map-caption {display:none!important;}
html.jj-app-pages #map .map-open-button {grid-row:3!important;min-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:6px 10px!important;font-size:12px!important;}
html.jj-app-pages #patterns {grid-template-rows:auto minmax(0,1fr)!important;align-content:stretch!important;gap:8px!important;}
html.jj-app-pages #patterns h2,html.jj-app-pages .safety h2 {font-size:clamp(22px,5.4vw,32px)!important;line-height:1.1!important;margin:0!important;}
html.jj-app-pages #patterns .kicker,html.jj-app-pages .safety .kicker {font-size:10px!important;margin:0 0 4px!important;}
html.jj-app-pages #patterns .pattern-grid {min-height:0!important;height:100%!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
html.jj-app-pages #patterns article {padding:10px!important;min-height:0!important;display:flex!important;flex-direction:column!important;justify-content:center!important;}
html.jj-app-pages #patterns article b {font-size:13px!important;line-height:1.15!important;margin:0 0 6px!important;}
html.jj-app-pages #patterns article span {font-size:12px!important;line-height:1.3!important;}
html.jj-app-pages #gallery-feature {grid-template-rows:auto minmax(0,1fr)!important;gap:8px!important;}
html.jj-app-pages #gallery-feature .gallery-captain-quote {font-size:16px!important;line-height:1.2!important;margin:4px 0!important;}
html.jj-app-pages #gallery-feature .gallery-open-button {min-height:40px!important;margin:4px 0 0!important;padding:8px 12px!important;font-size:13px!important;}
html.jj-app-pages #gallery-feature .latest-gallery-strip,html.jj-app-pages #gallery-feature .latest-gallery-strip figure {height:100%!important;min-height:0!important;max-height:100%!important;}
html.jj-app-pages .safety {display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:6px!important;justify-content:stretch!important;}
html.jj-app-pages .safety .cards {min-height:0!important;height:100%!important;grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:8px!important;}
html.jj-app-pages .safety article {padding:10px!important;min-height:0!important;display:flex!important;flex-direction:column!important;justify-content:center!important;}
html.jj-app-pages .safety article h3 {font-size:16px!important;margin:0 0 6px!important;}
html.jj-app-pages .safety article p {font-size:14px!important;line-height:1.3!important;margin:0!important;}
html.jj-app-pages #captain-jim.captain-bio {--jj-signoff-h:54px!important;padding-bottom:62px!important;grid-template-rows:minmax(0,3fr) minmax(0,1fr)!important;gap:6px!important;}
html.jj-app-pages #captain-jim .bio-photo {height:100%!important;min-height:0!important;max-height:100%!important;}
html.jj-app-pages #captain-jim .bio-photo figcaption {padding:6px 8px!important;}
html.jj-app-pages #captain-jim .bio-photo figcaption span {font-size:12px!important;line-height:1.25!important;}
html.jj-app-pages #captain-jim .bio-signoff {bottom:0!important;width:100%!important;}
html.jj-app-pages #captain-jim .jiffy-philosophy li {font-size:12px!important;}
html.jj-app-pages #weather-alert.combined-live-card {padding:6px!important;}
html.jj-app-pages .combined-live-card .alert-weather-metric,html.jj-app-pages #weather-alert #almanac.combined-weather-details .scan-grid article {padding:6px 4px!important;}
html.jj-app-pages.jj-short #patterns article {padding:6px!important;}
html.jj-app-pages.jj-short #patterns article span {font-size:11px!important;line-height:1.2!important;}
html.jj-app-pages.jj-short #patterns article b {font-size:12px!important;margin-bottom:4px!important;}
html.jj-app-pages.jj-short .safety article h3 {font-size:14px!important;}
html.jj-app-pages.jj-short .safety article p {font-size:12px!important;}
html.jj-app-pages.jj-short #weather-alert.combined-live-card {--jj-tile-value:.82rem;--jj-tile-label:.55rem;--jj-meta:.52rem;}
html.jj-app-pages.jj-short .combined-live-card .metric-icon,html.jj-app-pages.jj-short #weather-alert #almanac.combined-weather-details .scan-icon {height:24px!important;width:24px!important;font-size:1rem!important;}
@media(min-width:761px) {
  html.jj-app-pages #patterns {grid-template-rows:minmax(0,1fr)!important;}
  html.jj-app-pages #gallery-feature {grid-template-rows:minmax(0,1fr)!important;}
  html.jj-app-pages .safety .cards {grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr)!important;}
  html.jj-app-pages #captain-jim.captain-bio {grid-template-rows:minmax(0,1fr)!important;}
}
@media(max-height:500px) and (min-width:600px) {
  html.jj-app-pages #captain-jim.captain-bio {grid-template-columns:1fr 1fr!important;grid-template-rows:minmax(0,1fr)!important;grid-template-areas:"photo copy"!important;}
  html.jj-app-pages #captain-jim .bio-photo {grid-template-columns:1fr 1fr!important;grid-template-rows:minmax(0,1fr)!important;}
  html.jj-app-pages #captain-jim .bio-photo figcaption {align-self:center!important;}
  html.jj-app-pages #captain-jim .bio-photo figcaption span {font-size:10px!important;}
  html.jj-app-pages #patterns {grid-template-columns:1fr 3fr!important;grid-template-rows:minmax(0,1fr)!important;}
  html.jj-app-pages #gallery-feature {grid-template-columns:1fr 3fr!important;grid-template-rows:minmax(0,1fr)!important;}
  html.jj-app-pages .safety .cards {grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr)!important;}
  html.jj-app-pages .combined-live-card .alert-weather-metrics,html.jj-app-pages #almanac.combined-weather-details .scan-grid {grid-template-columns:repeat(4,minmax(0,1fr))!important;}
}
/* Respect data-driven visibility and give tide/flow copy real room on small screens. */
html.jj-app-pages #weather-alert #almanac.combined-weather-details .scan-grid article.is-hidden {display:none!important;}
html.jj-app-pages #weather-alert #almanac.combined-weather-details .scan-grid {grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr) auto!important;}
html.jj-app-pages #weather-alert #almanac.combined-weather-details .scan-grid #flowCard:not(.is-hidden) {
  grid-column:1/-1!important;grid-template-columns:26px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:6px!important;row-gap:3px!important;padding:6px!important;
}
html.jj-app-pages #weather-alert #almanac.combined-weather-details #flowCard .scan-icon {grid-column:1!important;grid-row:1 / span 2!important;width:24px!important;height:24px!important;}
html.jj-app-pages #weather-alert #almanac.combined-weather-details #flowCard h3 {grid-column:2!important;grid-row:1!important;}
html.jj-app-pages #weather-alert #almanac.combined-weather-details #flowCard p:first-of-type {grid-column:2!important;grid-row:2!important;font-size:11px!important;line-height:1.2!important;}
@media(max-height:500px) and (min-width:600px) {
  html.jj-app-pages .combined-live-card .call-copy {display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;gap:8px!important;}
  html.jj-app-pages #weather-alert #almanac.combined-weather-details {grid-column:1!important;grid-row:1!important;}
  html.jj-app-pages .combined-live-card .alert-live-weather {grid-column:2!important;grid-row:1!important;margin:0!important;min-height:0!important;}
  html.jj-app-pages .combined-live-card .alert-weather-metrics {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html.jj-app-pages #weather-alert #almanac.combined-weather-details #flowCard p:first-of-type {font-size:10px!important;}
  html.jj-app-pages .combined-live-card .alert-hourly-strip {margin-top:5px!important;}
  html.jj-app-pages .combined-live-card .hourly-card {padding:4px 1px!important;}
}
@media(max-height:500px) and (min-width:600px) {
  html.jj-app-pages .combined-live-card .alert-weather-metric {grid-template-columns:24px minmax(0,1fr)!important;grid-template-rows:auto auto!important;padding:4px!important;row-gap:2px!important;column-gap:3px!important;}
  html.jj-app-pages .combined-live-card .alert-weather-metric .metric-icon {grid-column:1!important;grid-row:1/span 2!important;}
  html.jj-app-pages .combined-live-card .alert-weather-metric strong {grid-column:2!important;grid-row:1!important;}
  html.jj-app-pages .combined-live-card .alert-weather-metric small {grid-column:2!important;grid-row:2!important;}
  html.jj-app-pages .combined-live-card .alert-tide-status {margin:4px 0!important;padding:4px 6px!important;font-size:11px!important;line-height:1.15!important;}
}
