/* Shared dialog and popup scale. Inputs stay 16px to avoid automatic iPhone form zoom. */
:root{--panel-font:system-ui,-apple-system,"Segoe UI",sans-serif;--panel-body:14px;--panel-small:12px}
:is(.modal,.sheetwrap,.targetFishSheet,.habitatSheet,.areaSheet,.fishingStyleSheet,.fishRegsModal){padding:8px;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom));align-items:center!important;overflow:hidden}
:is(.card,.sheet,.targetFishPanel,.habitatPanel,.areaPanel,.fishingStylePanel,.fishRegsCard,.privateLogDialog){box-sizing:border-box!important;width:min(520px,calc(100vw - 16px))!important;max-width:calc(100vw - 16px)!important;max-height:calc(100vh - 24px)!important;max-height:calc(var(--bitb-visible-height,100dvh) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;margin:auto!important;padding:16px!important;border-radius:18px!important;overflow:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;font-family:var(--panel-font)!important;font-size:var(--panel-body)!important;line-height:1.45!important;overflow-wrap:anywhere}
:is(.card,.sheet,.targetFishPanel,.habitatPanel,.areaPanel,.fishingStylePanel,.fishRegsCard,.privateLogDialog) h2{font:800 20px/1.25 var(--panel-font)!important;margin:2px 44px 10px 0!important}
:is(.card,.sheet,.targetFishPanel,.habitatPanel,.areaPanel,.fishingStylePanel,.fishRegsCard) h3{font-size:16px!important;line-height:1.3!important}
:is(.card,.sheet,.targetFishPanel,.habitatPanel,.areaPanel,.fishingStylePanel,.fishRegsCard) :is(.sub,small,.habitatMeta,.fishingStyleMeta,.fishRegsHint,.fishRegsNote,.reportSourceDate,.hourlySummaryNote,.legalUpdated){font-size:12px!important;line-height:1.4!important}
:is(.card,.sheet,.targetFishPanel,.habitatPanel,.areaPanel,.fishingStylePanel,.fishRegsCard,.privateLogDialog) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-family:var(--panel-font)!important;font-size:16px!important;max-width:100%;min-width:0;box-sizing:border-box}
:is(.card,.sheet,.targetFishPanel,.habitatPanel,.areaPanel,.fishingStylePanel,.fishRegsCard,.privateLogDialog) button{font-family:var(--panel-font)!important;font-size:13px!important;line-height:1.25!important;min-height:44px;white-space:normal;overflow-wrap:anywhere;max-width:100%}
:is(.targetFishGrid,.habitatGrid,.areaGrid,.checks,.subChoices){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
:is(.targetFishChoice,.habitatChoice,.areaChoice,.fishingStyleChoice,.checks label,.subChoices label){min-width:0!important;min-height:44px!important;font-size:13px!important;line-height:1.3!important;padding:8px!important;overflow-wrap:anywhere}
.targetFishChoice img{width:38px!important;height:28px!important;flex:0 0 38px!important}.targetFishChoice input{flex-shrink:0}
.bitbUniversalCloseX,.fishRegsCloseX,.privateLogDialog .privateLogClose{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;font-size:25px!important;line-height:1!important;right:6px!important;top:6px!important}
.reporthead{top:-16px!important;padding:12px 0 8px!important;margin:-16px 0 8px!important}.reporttitle h2{font-size:20px!important}.reportactions button{font-size:13px!important}
.fishRegsHead{align-items:flex-start}.fishRegsHead>div{min-width:0}.fishRegsHead h2{margin-right:40px!important}.fishRegsCols{grid-template-columns:repeat(2,minmax(0,1fr))}.fishRegLinks{flex-wrap:wrap}.legalNav{flex-wrap:wrap}
.leaflet-popup-content-wrapper{touch-action:pan-y!important;cursor:auto;font-family:var(--panel-font)!important}
.leaflet-popup-content{width:min(320px,calc(100vw - 64px))!important;min-width:0!important;max-width:calc(100vw - 64px)!important;max-height:calc(100vh - 200px);max-height:calc(var(--bitb-visible-height,100dvh) - 200px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y!important;font-family:var(--panel-font)!important;font-size:14px!important;line-height:1.4!important;overflow-wrap:anywhere;margin:16px!important}
.leaflet-popup-content :is(.bitbPop,.predictionSection,.popRow){max-width:100%!important;font-size:14px!important;line-height:1.4!important}
.leaflet-popup-content :is(small,.popNote,.popCoords,.popSources,.popSources a,.predictionNote,.predictionBestWhy){font-size:12px!important;line-height:1.4!important}
.leaflet-popup-content :is(.popTitle,.predictionSectionTitle){font-size:15px!important;line-height:1.3!important;padding-right:12px}
.leaflet-popup-content button{min-height:44px;font:700 13px/1.3 var(--panel-font)!important;max-width:100%;white-space:normal}.leaflet-popup-content :is(input,select,textarea){font-size:16px!important;max-width:100%}
.leaflet-container a.leaflet-popup-close-button{width:36px;height:36px;font-size:25px;line-height:32px;background:#f0f5f8;border-radius:50%;z-index:2}
.popActions{flex-wrap:wrap}.popActions button{min-width:90px}.mapkey[open]{max-height:calc(100dvh - 100px);overflow:auto;font-size:12px;line-height:1.4}
.privateLogActions{bottom:-16px}.privateLogDialog .privateLogLocation{font-size:16px!important}.privateLogDialog .privateLogEntry{font-family:var(--panel-font)}
@media(max-width:380px){.targetFishGrid,.fishchecks,.areaGrid,.fishRegsCols{grid-template-columns:minmax(0,1fr)!important}.targetFishChoice img{width:46px!important;flex-basis:46px!important}.fishchecks label{grid-template-columns:22px 50px minmax(0,1fr)!important}.hourlySummaryGrid{grid-template-columns:minmax(0,1fr)!important}}
@media(max-height:480px) and (orientation:landscape){:is(.card,.sheet,.targetFishPanel,.habitatPanel,.areaPanel,.fishingStylePanel,.fishRegsCard){width:min(620px,calc(100vw - 24px))!important}.leaflet-popup-content{max-height:calc(var(--bitb-visible-height,100dvh) - 200px)}}

.leaflet-popup-content :is(.predictionStructured,.namedPointPopup){min-width:0!important;max-width:100%!important;font-family:var(--panel-font)!important;font-size:14px!important;line-height:1.4!important}

.reportSource,.fishRegLinks a{display:inline-flex;align-items:center;min-height:44px;font-size:13px!important;line-height:1.3!important}

/* A single reading size throughout map popups; only the selected target is larger. */
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content,
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content * {font-size:14px!important;line-height:1.4!important}
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content .predictionTarget,
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content .predictionTarget * {font-size:18px!important;font-weight:700!important}
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content .marineSources {margin-top:10px;border-top:1px solid #d3e0e8;padding-top:8px}
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content .marineSources summary {cursor:pointer;color:#075575;font-weight:700;padding:4px 0}

/* v1.2.54 compact habitat/prediction popups for phones */
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content{font-size:12px!important;line-height:1.32!important}
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content *{font-size:12px!important;line-height:1.32!important}
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content :is(.predictionPlace,.popTitle){font-size:14px!important;line-height:1.25!important}
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content .predictionTarget,.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content .predictionTarget *{font-size:14px!important;font-weight:700!important}
.leaflet-container .leaflet-popup-content.leaflet-popup-content.leaflet-popup-content :is(.predictionSectionTitle,.predictionFactor>strong){font-size:12px!important;font-weight:700!important}
.leaflet-container .leaflet-popup-content .predictionSection{margin:7px 0!important}
.leaflet-container .leaflet-popup-content .predictionFactor{padding:6px 0!important}
.leaflet-container .leaflet-popup-content .predictionCoords{margin:1px 0 5px!important;font-size:11px!important;font-weight:400!important}
.leaflet-container .leaflet-popup-content .predictionRegulationsTop{text-align:left;margin:2px 0 7px 0;padding:5px 0 6px;border-bottom:1px solid #e3e9ee;max-width:100%;font-size:11px!important}
.leaflet-container .leaflet-popup-content .predictionRegulationsTop *{font-size:11px!important}
