/* v17 close-button fixes: 44px targets, safe-area, sticky heads, on top */
.drawer-close,.cd-x,.sp-sheet-x,.sm-x,.om-close,#ramp-sheet-close,#store-sheet-close,#coach-sheet-close{
  min-width:44px!important;min-height:44px!important;width:44px!important;height:44px!important;display:inline-flex!important;align-items:center;justify-content:center;
  font-size:18px!important;line-height:1!important;border-radius:50%!important;background:rgba(255,255,255,.1)!important;border:1px solid rgba(255,255,255,.16)!important;color:#e6f1fb!important;
  position:relative;z-index:5;flex:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer;padding:0!important}
.drawer-close:active,.cd-x:active,.sp-sheet-x:active,.sm-x:active{background:rgba(45,212,191,.3)!important}
.drawer-head,.cd-head,.sp-sheet-head{position:sticky;top:0;z-index:4}
.cd-head{background:#0d1b2a;margin:-14px -16px 8px;padding:10px 16px 8px}
.sp-sheet-head{background:#0d1b2a;margin:-14px -16px 8px;padding:10px 16px 8px}
/* keep fullscreen-ish sheets clear of notch/status bar */
.cd-panel{max-height:calc(100vh - env(safe-area-inset-top,0px) - 24px)!important;max-height:calc(100dvh - env(safe-area-inset-top,0px) - 24px)!important}
.cd-diary .cd-panel{min-height:min(70vh,calc(100dvh - env(safe-area-inset-top,0px) - 24px))}
.sp-sheet{max-height:calc(100dvh - env(safe-area-inset-top,0px) - 40px)!important;padding-bottom:calc(18px + env(safe-area-inset-bottom,0px))!important}
.drawer{z-index:1200}
.drawer-tall,.drawer-regs{max-height:calc(100% - env(safe-area-inset-top,0px) - 12px)}
.cd-pop .cd-x{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important}
/* v17 bottom bar: Map · Wind · [+] · Tides · Weather */
.tab-bar.tab-bar-5.tab-bar-v13.has-fab{grid-template-columns:1fr 1fr 76px 1fr 1fr!important}
.tab-bar.tab-bar-5.tab-bar-v13:not(.has-fab){grid-template-columns:repeat(4,1fr)!important}
.tab-bar .tab[data-tab="marks"]{display:none!important}
/* v17 root-cause fix: display:flex on these wrappers overrode [hidden], so ✕ "closed" them but they stayed on screen eating taps */
.cd-wrap[hidden],.sp-sheet-wrap[hidden],.om-screen[hidden],.side-scrim[hidden],#ramp-sheet[hidden],#store-sheet[hidden],#coach-sheet[hidden],.drawer[hidden]{display:none!important}
/* v18: bottom bar (+ raised Log) always above map sheets/timeline; sheets clear of the + disc */
.tab-bar.tab-bar-v13{position:relative;z-index:1400!important;overflow:visible!important}
.tab-bar-v13 .tab-fab{z-index:2}
.drawer{z-index:1200}
.drawer .drawer-scroll{padding-bottom:calc(40px + .5rem)!important}
.wa-ctl.wa-dock{bottom:calc(var(--st-nav-h,64px) + 30px)!important;z-index:1150!important}
.cd-pop{bottom:calc(var(--st-nav-h,80px) + 34px)!important}
.regs-prompt{bottom:var(--st-nav-h,80px)!important;padding-bottom:34px!important;z-index:1300!important}
/* v19 full-height sheets */
body.st-sheet-full .drawer:not([hidden]){position:fixed!important;top:var(--st-hdr-b,96px)!important;bottom:var(--st-nav-h,80px)!important;left:0!important;right:0!important;max-height:none!important;height:auto!important;border-radius:14px 14px 0 0;z-index:1200!important}
.st-nfn{margin:0 0 .4rem;font-size:11px;color:#fca5a5;opacity:.85;flex-shrink:0}
/* v20 fish + Log button */
.tab-fab .fab-fish{display:block;color:#03221f;margin-left:-2px}
.tab-fab .fab-plus{position:absolute;top:4px;right:4px;width:20px;height:20px;border-radius:50%;background:#03221f;color:#5eead4;font:800 17px/19px system-ui,sans-serif;text-align:center;box-shadow:0 0 0 2px #2dd4bf}
/* v21 whole-fish Log button */
.tab-bar.tab-bar-5.tab-bar-v13.has-fab{grid-template-columns:1fr 1fr 92px 1fr 1fr!important}
.tab-fab .fab-disc.fab-fishbtn{width:84px;height:52px;top:-22px;border-radius:0;background:none!important;box-shadow:none!important;filter:drop-shadow(0 6px 10px rgba(20,184,166,.45))}
.tab-fab .fab-fishsvg{display:block;width:84px;height:52px}
.tab-fab .tab-label{margin-top:32px}
