/* 1.3.5: preserve the established palette and responsive navigation. */
:root{--control-height135:44px;--control-radius135:10px}
.button{min-height:var(--control-height135);border-radius:var(--control-radius135)}
h1,h2,h3,.water-row strong,.catalog-card,.button{overflow-wrap:anywhere;min-width:0}
#add-catch{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;padding:0!important;border-radius:50%!important;aspect-ratio:1}
.top-actions #mobile-account{min-width:0;flex:1;text-align:center;justify-content:center;overflow:hidden;text-overflow:ellipsis}
.top-actions #logout-top{display:none}
.water-hero p{font-size:.875rem;line-height:1.45}
.water-cover135{display:grid;place-items:center;min-height:140px;width:100%;border-radius:12px;overflow:hidden;background:var(--paper);color:var(--muted);margin:0 0 12px}
.water-cover135 img{display:block;width:100%;max-height:260px;object-fit:contain}
.water-cover135 span{padding:20px;text-align:center}
[data-water-actions135]{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(0,1.15fr) minmax(0,1fr) 44px 44px!important;gap:6px!important;align-items:stretch!important}
[data-water-actions135]>.button{width:100%;min-width:0;white-space:normal;padding:8px 5px!important;line-height:1.25;font-size:12px!important;text-align:center}
[data-water-actions135]>.button[data-icon135]{font-size:20px!important;padding:6px!important}
.recent-waters135{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:8px 0 12px}
.recent-waters135 strong{font-size:11px}
.recent-waters135 button{white-space:normal;font-size:11px;padding:7px 10px}
.marker-preview135{max-width:240px;color:var(--ink)}
.marker-preview135 h3{font-size:16px;margin:6px 0}.marker-preview135 p{font-size:12px}
.marker-preview135 img{width:100%;max-height:110px;object-fit:contain}
#catch-form.form{gap:10px}#catch-form .catch-primary135{display:grid;gap:10px}
#catch-form .catch-primary135 label{margin:0}#catch-form .form-row{gap:8px}
#catch-form .catch-extras135{padding:10px 0}#catch-form .catch-extras135[open]{display:grid;gap:10px}
#catch-form .catch-extras135>summary{cursor:pointer;min-height:36px;display:list-item}
#catch-form .water-section{padding:12px;margin:8px 0}#catch-form h3{font-size:16px}
#catch-form .form-note{margin:4px 0}#catch-form .selected-photo{max-height:180px}
.water-secondary135>summary{cursor:pointer;font-size:14px;font-weight:600;min-height:44px;align-content:center}
#personal-navigation134 .button,#refresh-journal{font-size:11px;padding:8px 10px}
#view-journal .toolbar{gap:8px;margin:12px 0}#view-journal .search-box{min-height:44px}
@media(max-width:1000px){
 .sidebar #about-nav{align-items:center;justify-content:center;text-align:center}
 .sidebar #about-nav>span{align-self:center}
 .top-actions{display:grid!important;grid-template-columns:40px auto minmax(0,1fr) minmax(90px,auto)!important;gap:8px!important;width:100%}
 #add-catch{grid-column:1;grid-row:1}#nav-apk{grid-column:2;grid-row:1}
 #mobile-account{grid-column:3;grid-row:1;width:100%;max-width:none!important}
 .global-language{grid-column:4;grid-row:1;justify-self:end}
 .map-toolbar .search-box,.map-toolbar>.button{height:44px;min-height:44px}
 .map-toolbar #locate,.map-toolbar #fullscreen{width:44px;min-width:44px;padding:5px}
 .water-hero{padding:16px 12px}.water-hero h2{font-size:24px}
 .water-hero-actions .button{font-size:10px!important}
 .water-overview>aside{order:0}
}

/* Keep the account exactly between the APK action and language selector on desktop too. */
.top-actions{display:grid!important;grid-template-columns:40px auto minmax(0,1fr) minmax(90px,auto)!important;gap:8px!important;width:100%}
.top-actions #add-catch{grid-column:1;grid-row:1}
.top-actions #nav-apk{grid-column:2;grid-row:1}
.top-actions #mobile-account{grid-column:3;grid-row:1;justify-self:stretch}
.top-actions .global-language{grid-column:4;grid-row:1;justify-self:end}
#test-period-notice{margin:6px 0 12px;font-size:11px}
#catch-form .catch-primary135{padding:12px!important}
@media(max-width:700px){.map-toolbar{grid-template-columns:minmax(0,1fr) 44px 44px!important;padding-right:0!important}.map-toolbar #locate{margin-left:0}}
@media(max-width:300px){
 .top-actions{grid-template-columns:40px minmax(0,1fr) minmax(60px,.8fr)!important;grid-template-areas:"add account language" "apk apk apk"}
 .top-actions #add-catch{grid-area:add!important}.top-actions #mobile-account{grid-area:account!important}
 .top-actions .global-language{grid-area:language!important}.top-actions #nav-apk{grid-area:apk!important}
}

.top-actions .global-language{width:100%;min-width:0}.top-actions .global-language select{width:100%;min-width:0}

/* Keep water labels readable on the white Leaflet popup in dark mode. */
html[data-theme="dark"] .leaflet-popup .marker-preview135 :is(h3, p) { color: #203a30; }

@media (min-width: 701px) {
  .sidebar > .brand { margin-block-end: 12px; flex-shrink: 0; }
}
