/* 1.3.1: one shared gutter for mobile water details; no outer frame. */
@media(max-width:700px){
 dialog.water-dialog{inset:0 0 66px;margin:0;width:100%;max-width:100%;height:auto;max-height:calc(100dvh - 66px);border:0;border-radius:0;padding:0;scrollbar-gutter:auto;box-shadow:none}
 dialog.water-dialog[data-panel=expanded]{max-height:calc(100dvh - 66px)}
 .water-dialog .water-dialog-top,.water-dialog .water-hero{padding-inline:12px}
 .water-dialog .water-overview{padding:0;gap:12px}
 .water-dialog .water-overview>div,.water-dialog .water-overview>aside{min-width:0;width:100%;padding:0;margin-inline:0}
 .water-dialog .water-section,.water-dialog .water-note,.water-dialog .night-fishing-notice{box-sizing:border-box;width:100%;margin-inline:0;padding-inline:12px}
 .water-dialog .night-fishing-notice{margin-block:12px}
 .water-dialog .water-section,.water-dialog .water-note{margin-block:0 12px}
}

.settings-section131{box-sizing:border-box;width:100%;min-width:0;margin:0 0 16px;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--surface,transparent);display:flex;flex-direction:column;gap:12px}
.settings-section131 h3{font-family:inherit;font-size:1.15rem;font-weight:650;line-height:1.35;margin:0 0 4px}
#view-settings h2,#view-account-settings h2{font-size:1.6rem;line-height:1.25}
#view-settings p,#view-account-settings p,.settings-section131 p{font-family:inherit;font-size:.95rem;font-weight:400;line-height:1.6;margin:0}
#view-settings,#view-account-settings,#view-journal,#view-public{min-width:0;word-break:normal;overflow-wrap:normal;hyphens:none}
#view-settings button,#view-account-settings button,.settings-section131 button{word-break:normal;overflow-wrap:normal;white-space:normal}
.settings-section131 input,.settings-section131 select,.settings-section131 textarea{box-sizing:border-box;min-width:0;max-width:100%}
.settings-section131 .journal-filters{margin:0;width:100%}
#export1222{display:flex;flex-direction:row;flex-wrap:wrap}#export1222 h3{flex-basis:100%}
#view-account-settings{display:flex;flex-direction:column;gap:12px}#view-account-settings[hidden]{display:none}
#view-account-settings>h2{order:-3}#view-account-settings>p{order:-2}
#view-settings .settings-grid{display:block}#settings-form{display:block}
#statistics1222,#view-journal>.toolbar{border:1px solid var(--line);border-radius:16px;padding:20px;margin-block:0 16px}
@media(max-width:700px){
 .settings-section131{padding:16px}
 .top-actions #mobile-account{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .sidebar nav .nav{flex:1 1 0;width:0;min-width:0;word-break:normal;overflow-wrap:normal}
 #logout-top{display:none}
}

[data-theme=dark] .water-dialog,[data-theme=dark] .water-dialog :is(.water-dialog-top,.water-hero,.water-section,.water-note,.water-empty,.water-revir,.water-catch){background:var(--paper);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .water-dialog .weather-grid>div{background:#19251c;color:var(--ink)}
[data-theme=dark] .night-fishing-notice{background:#20251b;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .night-fishing-forbidden{background:#302817;color:#e8d6ad}
[data-theme=dark] .water-hero{background:linear-gradient(125deg,#1d2818,#202020)}

.settings-section131>h3{order:-1}
.settings-section131 summary,#statistics1222 summary{font-size:1.05rem;font-weight:600;line-height:1.4;cursor:pointer}
.settings-section131 details[open]>summary{margin-bottom:16px}
[data-theme=dark] :is(.water-list,.water-row,.map-layout,.catalog-card,.catch-card,.stat-card,.water-section,.admin-user){background:var(--paper);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .catch-placeholder{background:#29372a;color:#a3b59a}
.top-actions #logout-top{display:none}
.top-actions #mobile-account{justify-content:flex-start;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav svg,.icon-button svg{width:18px;height:18px;display:inline-block;flex:none;vertical-align:middle}

.sidebar>.account{display:none}

#view-settings .form-note,#view-account-settings .form-note{font-size:.9rem!important;line-height:1.6}
.top-actions #mobile-account{display:block!important}

/* Owner's mobile text scale: section headings match the heading beside the date. */
@media(max-width:700px){
 .heading h1,.view h2,.view h3,#view-settings h2,#view-account-settings h2,dialog h2,dialog.water-dialog .water-hero h2,dialog.water-dialog .water-section h3{font-size:1.25rem;line-height:1.3}
 .heading p{font-size:.6875rem;line-height:1.5}
 .view,.view p,.view label,.view .info,.view .notice,.view .catch-card .info span,.water-dialog p,.water-dialog dt,.water-dialog dd,dialog label,dialog p{font-size:.75rem;line-height:1.5}
 .view .form-note,#view-settings .form-note,#view-account-settings .form-note,dialog .form-note{font-size:.75rem!important;line-height:1.5}
 .view .catch-card h3,.view .catalog-card h3,.settings-section131 h3,.settings-section131 summary,#statistics1222 summary,.water-dialog .water-note h3{font-size:1rem;line-height:1.35}
 .view .button,.view .text-button,.view input,.view select,.view textarea,.settings-section131 button{font-size:.75rem}
 .view .summary-grid b{font-size:1.125rem}
 .latest-catch span{font-size:.625rem}
}

/* Account settings have their own section navigation, separate from the app menu. */
#account-sections131{display:none}
.account-mode131 .sidebar,.account-mode131 .topbar,.account-mode131 .heading,.account-mode131 main>footer{display:none!important}
.account-mode131 .workspace{margin-left:0}
.account-mode131 #account-sections131{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:1000;gap:6px;padding:8px;background:var(--paper);border-top:1px solid var(--line);overflow-x:auto}
#account-sections131 button{flex:1 0 90px;white-space:normal;font-size:12px}
#account-sections131 .active{background:var(--green);color:var(--paper)}
#account-back131{order:-5;align-self:flex-start}
#view-account-settings>.settings-section131[hidden]{display:none}
.account-mode131 main{padding-bottom:100px}

#account-sections131 button{flex:1 0 80px;padding:8px 4px;min-height:54px;word-break:normal;overflow-wrap:normal;line-height:1.3}
#account-sections131 .active{background:#174d35;color:#f1f4ec;border-color:#94b99b}
@media(max-width:700px){#view-account-settings p{font-size:.75rem;line-height:1.5}}

.account-actions131{display:flex;flex-direction:column;gap:12px}
.account-actions131>.button{width:100%;min-height:44px}
/* Preserve separation for stacked and wrapped actions throughout every view/dialog. */
:is(.toolbar,.actions,.form,.journal-actions,.journal-filters,.settings-section131,.dialog-actions,.water-actions,.account-actions131){row-gap:12px}
.account-actions131>button+button{margin-block-start:0}


/* 1.3.2: the complete footer stays centered on desktop and mobile. */
main>footer{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px}
main>footer>div{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px 22px;margin-top:0}
