.fmap-page { width: min(100%, 1120px); margin: 0 auto; padding: 14px; }
.fmap-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(39, 195, 165, .12), rgba(20, 48, 74, .92));
}
.fmap-command h2, .fmap-directory h2, .fmap-safety h2 { margin: 0; font-size: 1.05rem; }
.fmap-command p { max-width: 72ch; margin: 5px 0 0; color: var(--muted); }
.fmap-eyebrow { margin: 0 0 4px !important; color: var(--emerald) !important; font-size: .66rem !important; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.fmap-source-link { flex: none; min-height: 44px; display: grid; place-items: center; padding: 9px 14px; border: 1px solid var(--emerald-dim); border-radius: 8px; text-decoration: none; font-weight: 700; }

.fmap-filters { display: flex; gap: 8px; margin-bottom: 8px; }
.fmap-filters .filter-btn { min-height: 44px; padding: 9px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--inset); color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.fmap-filters .filter-btn.active { background: var(--emerald); border-color: var(--emerald); color: #05241f; }

.fmap-shell { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #0b1620; }
#fishing-map { height: clamp(430px, 64vh, 640px); background: #0b1620; }
.fmap-near-me { position: absolute; right: 12px; bottom: 48px; z-index: 800; min-height: 44px; padding: 9px 15px; border: 1px solid var(--border); border-radius: 999px; background: rgba(10, 22, 34, .94); color: var(--text); font: inherit; font-weight: 800; cursor: pointer; }
.fmap-location-status { position: absolute; left: 10px; bottom: 34px; z-index: 790; max-width: calc(100% - 130px); margin: 0; padding: 6px 9px; border-radius: 7px; background: rgba(10, 22, 34, .9); color: #dce8f2; font-size: .72rem; }
.fmap-data-status { min-height: 20px; margin: 7px 2px 12px; color: var(--muted); font-size: .76rem; }

.fmap-pin-wrap, .fmap-cluster-wrap { background: none; border: none; }
.fmap-pin { display: block; width: 15px; height: 15px; margin: -2px 0 0 -2px; border: 2.5px solid #f6faff; border-radius: 50%; box-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.fmap-pin.type-ramp { background: #5abeff; }
.fmap-pin.type-reef { background: #27c3a5; }
.fmap-pin.type-wreck { background: #fbbf24; border-style: dashed; }
.fmap-cluster { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border: 2px solid #dffcf5; border-radius: 999px; background: #117f71; color: #fff; font-size: .72rem; font-weight: 900; box-shadow: 0 2px 9px rgba(0, 0, 0, .55); }

.fmap-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; max-height: 78vh; overflow-y: auto; padding: 17px 16px calc(18px + env(safe-area-inset-bottom)); border: 1px solid var(--border); border-bottom: 0; border-radius: 16px 16px 0 0; background: linear-gradient(180deg, var(--panel), var(--panel-3)); box-shadow: 0 -10px 34px rgba(0, 0, 0, .55); }
.fmap-sheet-close { position: absolute; top: 8px; right: 10px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 1.7rem; cursor: pointer; }
.fmap-sheet-kicker { margin: 0; color: var(--emerald); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.fmap-sheet-name { margin: 3px 42px 10px 0; font-size: 1.35rem; }
.fmap-sheet-line { margin: 6px 0; color: #dce8f2; font-size: .88rem; }
.fmap-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.fmap-detail { padding: 9px 10px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--inset); }
.fmap-detail small { display: block; color: var(--faint); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.fmap-detail strong { display: block; margin-top: 2px; color: var(--text); font-size: .84rem; }
.fmap-warning { margin: 10px 0; padding: 10px 12px; border: 1px solid rgba(251, 191, 36, .4); border-radius: 9px; background: rgba(251, 191, 36, .09); color: #fde68a; font-size: .8rem; line-height: 1.5; }
.fmap-sheet-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.fmap-sheet-action { min-height: 46px; display: grid; place-items: center; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--inset); color: var(--emerald); font: inherit; font-size: .82rem; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; }
.fmap-sheet-action.primary { background: var(--emerald); border-color: var(--emerald); color: #05241f; }

.fmap-directory, .fmap-safety { margin-top: 13px; padding: 15px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--panel); }
.fmap-directory-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
#fmap-result-count { color: var(--muted); font-size: .75rem; }
.fmap-search-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.fmap-search { width: 100%; min-height: 46px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--inset); color: var(--text); font: inherit; font-size: 1rem; }
.fmap-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fmap-list-card { min-height: 64px; padding: 11px 12px; border: 1px solid var(--border-soft); border-radius: 9px; background: var(--inset); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fmap-list-card:hover, .fmap-list-card:focus-visible { border-color: var(--emerald-dim); }
.fmap-list-card strong { display: block; font-size: .9rem; }
.fmap-list-card span { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; }
.fmap-safety h2 { color: var(--gold); }
.fmap-safety p { margin: 7px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.6; }

@media (min-width: 900px) { .fmap-sheet { left: 50%; right: auto; width: 560px; transform: translateX(-50%); } }
@media (max-width: 640px) {
  .fmap-page { padding: 10px; }
  .fmap-command { align-items: stretch; flex-direction: column; padding: 14px; }
  .fmap-source-link { width: 100%; }
  .fmap-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .fmap-filters .filter-btn { padding-inline: 8px; }
  #fishing-map { height: 58vh; min-height: 430px; }
  .fmap-location-status { bottom: 38px; max-width: 62%; }
  .fmap-list { grid-template-columns: 1fr; }
  .fmap-detail-grid, .fmap-sheet-actions { grid-template-columns: 1fr; }
}
