/* ============================================================================
 * Vwhater.11n / v63.9.30 — Full-screen weather takeover (desktop + iPad)
 *
 * Brett: "use a lot of the screen to display the weather... no overlays or
 * garbage in background... click beacon → full screen → click off it → toggles"
 *
 * Strategy: on viewports ≥ 960px wide, the .v63fc-scrim becomes a solid,
 * edge-to-edge takeover — no blur, no padding, no rounded modal. Everything
 * inside is scaled up for 50-year-old eyes (big numbers, big labels).
 *
 * Mobile (<960px) keeps the existing compact experience — Brett said mobile
 * is "pretty good".
 * ============================================================================ */

@media (min-width: 960px) {
  /* Kill the centered modal look — make it a true takeover */
  .v63fc-scrim {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: #0a1526 !important;       /* solid navy, no blur, no scrim */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: v63fc-fs-in 0.18s ease-out !important;
  }
  @keyframes v63fc-fs-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .v63fc-modal {
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #f4f7fb !important;       /* soft off-white so content pops */
  }

  /* ---- Big header ------------------------------------------------------- */
  .v63fc-head {
    padding: 22px 36px !important;
    border-bottom: 4px solid #f6c23b !important;
  }
  .v63fc-head-title {
    font-size: 28px !important;
    letter-spacing: -0.3px !important;
  }
  .v63fc-head-sub {
    font-size: 16px !important;
    margin-top: 4px !important;
  }
  .v63fc-close {
    font-size: 44px !important;
    padding: 4px 18px !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
    border-radius: 10px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
  }
  .v63fc-close:hover {
    background: rgba(255,255,255,0.15) !important;
  }

  /* ---- Big tabs --------------------------------------------------------- */
  .v63fc-tabs {
    padding: 0 24px !important;
  }
  .v63fc-tab {
    padding: 18px 14px !important;
    font-size: 18px !important;
    letter-spacing: 0.2px !important;
  }
  .v63fc-tab[aria-selected="true"] {
    border-bottom-width: 4px !important;
  }

  /* ---- Body: more breathing room -------------------------------------- */
  .v63fc-body {
    padding: 28px 36px 40px !important;
  }

  /* ---- Summary stats: big numbers for old eyes ------------------------ */
  .v63fc-summary {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px !important;
    margin-bottom: 26px !important;
  }
  .v63fc-stat {
    padding: 20px 24px !important;
    border-radius: 14px !important;
  }
  .v63fc-stat-k {
    font-size: 15px !important;
    letter-spacing: 0.5px !important;
  }
  .v63fc-stat-v {
    font-size: 34px !important;
    margin-top: 6px !important;
  }

  /* ---- Section titles -------------------------------------------------- */
  .v63fc-section-title {
    font-size: 20px !important;
    margin: 24px 0 12px !important;
    letter-spacing: 0.4px !important;
  }
  .v63fc-hint,
  .v63fc-legend {
    font-size: 14px !important;
    margin-bottom: 12px !important;
  }
  .v63fc-legend-sw { width: 14px !important; height: 14px !important; }

  /* ---- Hourly strip: big readable hour cards ------------------------- */
  .v63fc-hourly {
    gap: 8px !important;
    padding: 4px 2px 14px !important;
  }
  .v63fc-hourly::-webkit-scrollbar { height: 10px !important; }
  .v63fc-hr {
    flex: 0 0 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    padding: 14px 6px 12px !important;
    border-radius: 14px !important;
    border-width: 3px !important;
  }
  .v63fc-hr-t { font-size: 15px !important; }
  .v63fc-hr-a { width: 34px !important; height: 34px !important; margin: 8px auto 4px !important; }
  .v63fc-hr-d { font-size: 14px !important; margin-top: 5px !important; }
  .v63fc-hr-w { font-size: 28px !important; margin-top: 6px !important; }
  .v63fc-hr-u { font-size: 12px !important; }
  .v63fc-hr-g { font-size: 13px !important; margin-top: 4px !important; }
  .v63fc-hr-chop {
    width: 22px !important; height: 22px !important;
    font-size: 13px !important; line-height: 22px !important;
    top: 5px !important; right: 6px !important;
  }

  /* ---- Wind-vs-tide strip -------------------------------------------- */
  .v63fc-vs-title { font-size: 18px !important; margin: 22px 0 10px !important; }
  .v63fc-vs-title .note { font-size: 14px !important; }
  .v63fc-vs-key { font-size: 14px !important; gap: 18px !important; margin-bottom: 10px !important; }
  .v63fc-vs { gap: 8px !important; }
  .v63fc-vs-cell {
    flex: 0 0 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    padding: 10px 4px 8px !important;
    border-radius: 14px !important;
    border-width: 2.5px !important;
  }
  .v63fc-vs-arrows { width: 44px !important; height: 44px !important; }
  .v63fc-vs-lbl { font-size: 12px !important; }

  /* ---- Tide items ----------------------------------------------------- */
  .v63fc-tide-row { gap: 14px !important; margin-top: 10px !important; }
  .v63fc-tide-item {
    padding: 14px 18px !important;
    font-size: 22px !important;
    border-radius: 12px !important;
    flex: 1 1 160px !important;
  }
  .v63fc-tide-item .tt { font-size: 13px !important; }

  /* ---- Week outlook rows --------------------------------------------- */
  .v63fc-week { gap: 12px !important; }
  .v63fc-wk-row {
    grid-template-columns: 140px 64px 1fr 160px !important;
    gap: 18px !important;
    padding: 18px 22px !important;
    border-radius: 16px !important;
    border-width: 2px !important;
  }
  .v63fc-wk-day { font-size: 20px !important; }
  .v63fc-wk-date { font-size: 14px !important; margin-top: 3px !important; }
  .v63fc-wk-arrow { width: 52px !important; height: 52px !important; }
  .v63fc-wk-bartrack { height: 16px !important; border-radius: 8px !important; }
  .v63fc-wk-stats { font-size: 16px !important; gap: 16px !important; margin-top: 10px !important; }
  .v63fc-wk-verdict {
    font-size: 15px !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    border-width: 2px !important;
  }

  /* ---- Swell stats ---------------------------------------------------- */
  .v63fc-swell { gap: 14px !important; }

  /* ---- Notes / footer ------------------------------------------------- */
  .v63fc-note { font-size: 15px !important; margin-top: 18px !important; }

  /* ---- Back button ---------------------------------------------------- */
  .v63fc-back {
    font-size: 16px !important;
    padding: 10px 18px !important;
    margin-bottom: 16px !important;
  }

  /* ---- NEW: Extras grid (moon / rain / weather) ---------------------- */
  .v63fc-extras {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 18px 0 24px;
  }
  .v63fc-xtra {
    background: #ffffff;
    border: 2px solid #e1e7ee;
    border-radius: 16px;
    padding: 20px 22px;
    display: flex; flex-direction: column; gap: 6px;
  }
  .v63fc-xtra-k {
    font-size: 14px; color: #556779; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
  }
  .v63fc-xtra-v {
    font-size: 32px; color: #0a1526; font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
  }
  .v63fc-xtra-sub {
    font-size: 14px; color: #556779; font-weight: 600; margin-top: 2px;
  }
  .v63fc-xtra-icon {
    font-size: 40px; line-height: 1;
    margin-bottom: 2px;
  }
}

/* iPad portrait (768-959px) — still better than mobile, use a focused takeover */
@media (min-width: 768px) and (max-width: 959px) {
  .v63fc-scrim {
    padding: 0 !important;
    align-items: stretch !important;
    background: #0a1526 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .v63fc-modal {
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #f4f7fb !important;
  }
  .v63fc-head { padding: 18px 24px !important; }
  .v63fc-head-title { font-size: 22px !important; }
  .v63fc-head-sub { font-size: 14px !important; }
  .v63fc-close { font-size: 36px !important; padding: 4px 14px !important; min-width: 52px !important; min-height: 52px !important; }
  .v63fc-tab { padding: 16px 10px !important; font-size: 16px !important; }
  .v63fc-body { padding: 22px 24px 32px !important; }
  .v63fc-stat-v { font-size: 26px !important; }
  .v63fc-section-title { font-size: 17px !important; }
  .v63fc-hr {
    flex: 0 0 76px !important; min-width: 76px !important; max-width: 76px !important;
    padding: 10px 4px 8px !important;
  }
  .v63fc-hr-w { font-size: 22px !important; }
  .v63fc-hr-t { font-size: 13px !important; }
  .v63fc-hr-d { font-size: 12px !important; }
  .v63fc-vs-cell {
    flex: 0 0 76px !important; min-width: 76px !important; max-width: 76px !important;
  }
  .v63fc-tide-item { font-size: 18px !important; padding: 12px 14px !important; }
  .v63fc-wk-row {
    grid-template-columns: 110px 52px 1fr 130px !important;
    gap: 14px !important;
    padding: 14px 18px !important;
  }
  .v63fc-wk-day { font-size: 17px !important; }
  .v63fc-wk-arrow { width: 44px !important; height: 44px !important; }
  .v63fc-wk-verdict { font-size: 13px !important; padding: 10px 10px !important; }
  .v63fc-extras {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 14px 0 18px;
  }
  .v63fc-xtra {
    background: #ffffff;
    border: 2px solid #e1e7ee;
    border-radius: 14px;
    padding: 14px 16px;
  }
  .v63fc-xtra-k { font-size: 13px; color: #556779; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
  .v63fc-xtra-v { font-size: 24px; color: #0a1526; font-weight: 800; }
  .v63fc-xtra-sub { font-size: 13px; color: #556779; font-weight: 600; }
  .v63fc-xtra-icon { font-size: 32px; line-height: 1; }
}

/* ============================================================================
 * Vwhater.25c — Mobile weather extras: use the full phone width.
 * Before: no mobile rules → tiles stacked as plain <div>s with all content
 * (icon, label, value, sub) each on its own line, content jammed left.
 * Now: 2-col grid, tiles laid out horizontally with icon left + text right,
 * so each tile fills a ~170px wide card and reads in one glance.
 * ============================================================================ */
@media (max-width: 767px) {
  .v63fc-extras {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin: 14px 0 20px !important;
  }
  /* Full-width "hero" tile for the Moon phase / bite card — most important info */
  .v63fc-extras > .v63fc-xtra:first-child {
    grid-column: 1 / -1;
  }
  .v63fc-xtra {
    background: #ffffff !important;
    border: 1.5px solid #e1e7ee !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    display: grid !important;
    grid-template-columns: 44px 1fr !important;
    grid-template-rows: auto auto auto !important;
    column-gap: 12px !important;
    row-gap: 2px !important;
    align-items: center !important;
  }
  .v63fc-xtra-icon {
    grid-column: 1 / 2;
    grid-row: 1 / 4;
    font-size: 34px !important;
    line-height: 1 !important;
    text-align: center;
    align-self: center;
  }
  .v63fc-xtra-k {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    font-size: 11px !important;
    color: #556779;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0 !important;
  }
  .v63fc-xtra-v {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    font-size: 20px !important;
    color: #0a1526;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    font-variant-numeric: tabular-nums;
    margin: 0 !important;
  }
  /* Stack multiple .v63fc-xtra-sub rows in the third grid row */
  .v63fc-xtra-sub {
    grid-column: 2 / 3;
    font-size: 12px !important;
    color: #556779;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
  }
  .v63fc-xtra-sub:nth-of-type(1) { grid-row: 3 / 4; }
  .v63fc-xtra-sub:nth-of-type(2) { grid-row: 4 / 5; }
  /* When tile has 2 subs, expand the grid rows to fit */
  .v63fc-xtra:has(.v63fc-xtra-sub + .v63fc-xtra-sub) {
    grid-template-rows: auto auto auto auto !important;
  }
  .v63fc-xtra:has(.v63fc-xtra-sub + .v63fc-xtra-sub) .v63fc-xtra-icon {
    grid-row: 1 / 5;
  }
  /* Modal body — use the full phone width, minimal side padding */
  .v63fc-body {
    padding: 14px 12px 32px !important;
  }
  .v63fc-section-title {
    margin: 14px 2px 8px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    color: #0a1526 !important;
  }

  /* ---- Summary stats (Max wind / Max gust / Dominant) ----
     Before: cramped 3-col grid with tiny numbers, inconsistent with sky tiles.
     Now: 3-col grid using the full width, bigger numbers, same card feel. */
  .v63fc-summary {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin: 14px 0 18px !important;
  }
  .v63fc-stat {
    background: #ffffff !important;
    border: 1.5px solid #e1e7ee !important;
    border-radius: 12px !important;
    padding: 10px 10px !important;
    text-align: center;
  }
  .v63fc-stat-k {
    font-size: 10.5px !important;
    color: #556779 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    line-height: 1.2 !important;
  }
  .v63fc-stat-v {
    font-size: 20px !important;
    color: #0a1526 !important;
    font-weight: 800 !important;
    margin-top: 4px !important;
    line-height: 1.1 !important;
    font-variant-numeric: tabular-nums;
  }

  /* ---- Hourly wind strip: show a fade on right edge so it's obviously scrollable ---- */
  .v63fc-hourly-wrap {
    position: relative;
    margin: 0 -12px; /* extend into modal body edges for true edge-to-edge scrolling */
    padding: 0;
  }
  .v63fc-hourly-wrap::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 8px;
    width: 24px;
    background: linear-gradient(to right, rgba(244,247,251,0), rgba(244,247,251,0.95));
    pointer-events: none;
    border-radius: 0 12px 12px 0;
  }
  .v63fc-hourly {
    padding: 2px 16px 10px !important;
    scroll-padding-left: 12px !important;
  }
  .v63fc-hr {
    flex: 0 0 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    padding: 8px 3px 6px !important;
  }
  .v63fc-hr-t { font-size: 13px !important; font-weight: 700 !important; }
  .v63fc-hr-w { font-size: 20px !important; }

  /* ---- Wind-strength legend: clean compact chips instead of messy wrap ---- */
  .v63fc-legend {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4px 10px !important;
    font-size: 11px !important;
    margin: 4px 0 8px !important;
  }
  .v63fc-hint {
    font-size: 11px !important;
    color: #556779 !important;
    line-height: 1.4 !important;
    margin: 4px 2px 8px !important;
  }

  /* ---- Wind vs Tide strip: same edge-to-edge scrolling + fade ---- */
  .v63fc-vs-title { margin: 14px 0 6px !important; }
  .v63fc-vs {
    margin: 0 -12px !important;
    padding: 2px 16px 8px !important;
    position: relative;
  }
  .v63fc-vs-cell {
    flex: 0 0 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
  }
  .v63fc-vs-key {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 4px 10px !important;
    font-size: 11px !important;
    margin: 0 0 6px !important;
  }
}

/* ============================================================================
 * Vwhater.25c — Desktop cleanup
 *   - Kill the sidebar Marine panel (pointless on desktop)
 *   - Kill the Navigate preset button (computers don't go to sea)
 *   Scoped to desktop breakpoint (>=960px). Mobile/iPad untouched.
 * ============================================================================ */
@media (min-width: 960px) {
  /* Hide the Marine panel wherever it renders on desktop */
  #marinePanel,
  body.v51-sidebar-panels #sidebar #marinePanel {
    display: none !important;
  }
  /* Hide the Navigate preset button in the top preset switch */
  .preset-switch .preset-btn[data-preset="navigate"] {
    display: none !important;
  }
}
