:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1e3036;background:#f0f2ee;font-synthesis:none;--ink:#1e3036;--muted:#647477;--line:#d3dcda;--accent:#27615b;--paper:#fff;--green:#dceddf}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}[hidden]{display:none!important}button{cursor:pointer;min-height:44px;border:1px solid #c4cfcd;border-radius:6px;padding:11px 16px;background:#fff;color:var(--ink);font-weight:650;line-height:1.35}button:hover{background:#e8eeeb;border-color:#91a6a0}button:disabled{opacity:.48;cursor:not-allowed}.primary{background:var(--accent);color:#fff;border-color:var(--accent)}.primary:hover{background:#1d4b46;border-color:#1d4b46}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #d7a64c;outline-offset:3px}a{color:inherit;text-underline-offset:3px}header{background:#17272b;color:#fff;display:flex;justify-content:space-between;align-items:center;padding:22px max(28px,calc((100vw - 1120px)/2));gap:20px}.brand{display:flex;gap:12px;align-items:center;text-decoration:none}.brand>span:not(.brand-mark){font-size:22px;font-weight:750;letter-spacing:-.7px}.brand small{display:block;font-size:9px;letter-spacing:2.3px;color:#abbfbd;font-weight:600;margin-top:5px}.brand-mark{display:grid;place-items:center;width:43px;height:43px;border:1px solid #a6b6a8;color:#d9e6c9;font-size:12px;font-weight:800;letter-spacing:.5px;border-radius:50%}.pill{font-size:11px;color:#b7cac6;border:1px solid #405655;padding:8px 11px;border-radius:4px}.pill>span{color:#98ba8a;font-size:8px;margin-right:6px}main{max-width:1176px;margin:auto;padding:0 28px}.hero{display:grid;grid-template-columns:1fr 1fr;gap:46px;padding:38px 0 32px;align-items:center}.hero-copy{min-width:0}.eyebrow{font-size:10px;font-weight:750;letter-spacing:1.65px;color:#55716b;margin:0 0 17px}h1{font-size:55px;line-height:1.04;font-weight:730;letter-spacing:-2.5px;margin:0 0 22px}p{font-size:14px;line-height:1.7;color:var(--muted)}.hero-description{font-size:20px;line-height:1.5;letter-spacing:-.4px;color:#344b4c;margin:0 0 14px}.hero-detail{font-size:13px;max-width:390px;margin:0 0 24px}.hero-actions{display:flex;gap:10px;flex-wrap:wrap}.hero-actions button{font-size:13px;padding:13px 16px}.hero-actions button span{margin-left:12px}.keeper-strip{display:flex;flex-wrap:wrap;gap:14px;margin-top:26px;font-size:10px;color:#6a7b76;letter-spacing:.5px;text-transform:uppercase;font-weight:600}.keeper-strip span+span:before{content:'·';margin-right:14px;color:#9baaa2}.tank-photo{margin:0;background:#101f20;border-radius:7px;overflow:hidden;height:390px;position:relative}.tank-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 65%}.tank-photo:after{content:'';position:absolute;inset:65% 0 0;background:linear-gradient(transparent,#071614c9);pointer-events:none}.tank-photo figcaption{position:absolute;bottom:15px;left:18px;right:18px;color:#e4ede7;font-size:11px;z-index:1;line-height:1.5}.tank-photo figcaption span{display:block;color:#b8c7bf;font-size:9px;margin-top:4px}nav{display:flex;gap:3px;border-bottom:1px solid #bccbc7;overflow:auto;scrollbar-width:thin;padding:0 0 0;max-width:100%}nav button{border:0;background:transparent;border-radius:0;font-size:13px;padding:15px 18px;white-space:nowrap;color:#657670;border-bottom:3px solid transparent;min-height:52px}nav button:first-child{padding-left:3px;padding-right:21px}nav button:hover{background:#e6ece6}nav button.active{color:#204f47;border-bottom-color:#2c6658;font-weight:750}#dueCount:not(:empty){font-size:10px;background:#dbe7cb;color:#355322;border-radius:3px;padding:3px 5px;margin-left:5px}#content{min-height:290px;padding:28px 0 40px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}h2{font-size:24px;font-weight:700;letter-spacing:-.7px;line-height:1.3;margin:0}h3{font-size:17px;margin:0 0 9px;line-height:1.4;font-weight:700;letter-spacing:-.25px}.muted{font-size:12px;color:#73817d}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.card{background:#fff;border:1px solid var(--line);border-top:3px solid #6b8b75;border-radius:7px;padding:23px;min-width:0;box-shadow:0 2px 3px #1d3b2803}.card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.card-top button{font-size:11px;padding:7px 12px;min-height:38px}.card p{white-space:pre-wrap;overflow-wrap:anywhere;margin:13px 0}.card p strong{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#6c7d73;font-weight:700}.card h3{font-size:21px;overflow-wrap:anywhere}.tag{background:#f0f3ee;font-size:11px;color:#586e64;border:1px solid #dde5da;padding:4px 7px;border-radius:3px}.quick{display:flex;gap:8px;flex-wrap:wrap;margin-top:17px}.quick button{font-size:12px;padding:10px 12px;background:#f4f6f2;border-color:#d5ded5}.quick button:hover{background:#e5eee2}.quick button.primary{background:var(--accent);color:white;border-color:var(--accent)}.danger{color:#9a4134!important}.empty{padding:28px 30px;background:#fff;border:1px solid var(--line);border-left:3px solid #8c9f82;border-radius:5px;display:flex;align-items:center;justify-content:space-between;gap:25px}.empty p{max-width:600px;margin-bottom:0}.empty-icon{font-size:43px;color:#a2b19b}.empty h3{font-size:19px}.note{font-size:12px;color:#53685f;background:#e7ece2;border-left:3px solid #a7b99b;padding:13px 16px;line-height:1.65;border-radius:3px}.row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:19px 0;border-bottom:1px solid var(--line)}.row>div{min-width:0}.row p{margin:5px 0;overflow-wrap:anywhere}.row .quick{margin:0;flex-shrink:0}.overdue{color:#a06026;font-weight:650}.backup{max-width:780px}.backup h3{margin-top:27px}.backup p{max-width:720px}footer{border-top:1px solid var(--line);font-size:10px;color:#73817b;display:flex;justify-content:space-between;gap:18px;padding:23px 0 30px}.has-tanks .hero{display:block;padding:25px 0 23px}.has-tanks .hero-copy{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px}.has-tanks .hero h1{font-size:30px;letter-spacing:-1px;margin:0}.has-tanks .hero .eyebrow,.has-tanks .hero .hero-description,.has-tanks .hero .hero-detail,.has-tanks .hero .tank-photo,.has-tanks .hero .keeper-strip{display:none}.has-tanks .hero-actions button{padding:10px 14px}dialog{border:1px solid #b5c5be;border-radius:9px;width:min(570px,calc(100% - 24px));padding:25px;max-height:90dvh;color:var(--ink);background:#fafbf8;box-shadow:0 30px 90px #071d1940}dialog::backdrop{background:#0b2523b3;backdrop-filter:blur(2px)}.modal-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:19px}.modal-head button{border:0;background:transparent;padding:8px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}label{display:block;margin:17px 0 6px;font-size:12px;font-weight:650;color:#475f55}input,select,textarea{display:block;width:100%;max-width:100%;border:1px solid #bfcfc5;border-radius:5px;padding:11px;background:#fff;font-size:16px;color:#203b30;min-width:0}textarea{min-height:90px;resize:vertical}input[type=checkbox],input[type=radio]{width:auto;display:inline-block;vertical-align:middle}input[type=file]{font-size:13px;padding:13px;background:#f0f4eb}input[type=file]::file-selector-button{padding:10px;background:#fff;border:1px solid #bbcbbd;border-radius:4px;margin-right:12px;font:inherit;font-weight:600}.form-grid,.import-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.helper{font-size:11px;margin:6px 0;color:#77877c}.import-panel{max-width:900px;background:#fff;border:1px solid var(--line);border-radius:7px;padding:25px;margin-bottom:20px}.import-panel h3{margin-top:8px}.import-grid>div{min-width:0}.import-preview{margin-top:24px;border-top:1px solid var(--line);padding-top:20px;max-width:100%}.import-status{background:#eef3e8;padding:13px 16px;border-radius:4px;font-size:13px;line-height:1.6;margin:15px 0}.import-table-wrap{overflow-x:auto;max-width:100%;margin:16px 0;border:1px solid var(--line);border-radius:4px}.import-table{border-collapse:collapse;width:100%;font-size:12px;text-align:left;line-height:1.5}.import-table th{background:#edf2eb;color:#4a6355;font-size:10px;letter-spacing:.5px;text-transform:uppercase}.import-table td,.import-table th{padding:11px 13px;border-bottom:1px solid #e0e7dd;vertical-align:top;max-width:300px;overflow-wrap:anywhere}.import-table tr:last-child td{border-bottom:0}.error{color:#9a4134}.good{color:#356d42}.import-panel .quick{margin-top:22px}details{margin:14px 0;font-size:12px}summary{cursor:pointer;color:#426553;min-height:32px;padding:6px 0}#storageWarning{background:#f7e7ce;color:#795b2b;padding:16px;border:1px solid #ddc69b;border-radius:5px;margin:15px 0;font-size:13px;line-height:1.5}#toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:#203b34;color:#fff;border:1px solid #507367;border-radius:7px;padding:11px 13px 11px 19px;z-index:20;max-width:calc(100% - 24px);width:max-content;box-shadow:0 8px 35px #0c251e2e;font-size:13px}#toast button{background:#ffffff10;border-color:#739286;color:#fff;padding:8px 11px;margin-left:14px;font-size:12px}button svg{vertical-align:middle}
@media(max-width:720px){header{padding:19px 20px}main{padding:0 20px}.brand>span:not(.brand-mark){font-size:20px}.brand-mark{width:36px;height:36px;font-size:10px}.pill{font-size:9px;padding:6px 8px}.hero{grid-template-columns:1fr;gap:25px;padding:28px 0}.eyebrow{font-size:9px;margin-bottom:13px}h1{font-size:43px;letter-spacing:-1.8px;line-height:1.07;margin-bottom:17px}.hero-description{font-size:18px}.hero-detail{font-size:12px;margin-bottom:20px}.hero-actions button{flex:1;font-size:12px;white-space:nowrap;padding:12px 10px}.hero-actions button span{margin-left:4px}.keeper-strip{margin-top:18px;font-size:9px;gap:10px}.keeper-strip span+span:before{margin-right:10px}.tank-photo{height:225px}.tank-photo img{object-position:50% 67%}.tank-photo figcaption{font-size:10px;bottom:12px;left:14px}.tank-photo figcaption span{font-size:8px}nav button{padding:13px 14px;font-size:12px}nav button:first-child{padding-right:17px}#content{padding:23px 0 30px}.section-head{align-items:flex-start;margin-bottom:17px}.section-head h2{font-size:22px}.section-head .muted{font-size:10px;text-align:right;max-width:115px}.section-head>button{font-size:11px;padding:9px 11px}.grid{grid-template-columns:1fr}.card{padding:20px}.empty{padding:23px}.empty-icon{display:none}.empty p{font-size:13px}.row{flex-direction:column;align-items:flex-start;gap:10px}.row .quick{flex-wrap:wrap}.backup h2{font-size:23px}footer{flex-direction:column;gap:7px;font-size:9px}.has-tanks .hero h1{font-size:27px}.has-tanks .hero-copy{gap:14px}.has-tanks .hero-actions{width:100%}.has-tanks .hero-actions button{flex:initial}.has-tanks .hero{padding:24px 0 20px}.import-panel{padding:18px}.import-grid{grid-template-columns:1fr}.import-table td,.import-table th{padding:9px}.import-table{min-width:480px}.import-status{font-size:12px}dialog{padding:20px}.form-grid{gap:10px}#toast{font-size:12px}.desktop{display:none}}
@media(prefers-reduced-motion:no-preference){button{transition:background .15s,border-color .15s}}
.import-panel>button{margin-top:16px}.import-table td{white-space:pre-line}.import-table input[type=checkbox]{width:20px;height:20px;accent-color:var(--accent)}.import-table th:first-child{width:50px}.import-panel>p:first-child{margin-top:0}.import-panel .import-grid{margin-bottom:20px}.import-status:empty{display:none}.card .quick button:first-child{background:#e1eddb;border-color:#bcd0b3;color:#2f5b35}

.brand-icon{width:48px;height:48px;object-fit:cover;border-radius:10px;flex-shrink:0}.hero,.has-tanks .hero{display:block;padding:28px 0 22px}.hero-copy,.has-tanks .hero>div:first-child{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}.hero h1,.has-tanks .hero h1{font-size:32px;line-height:1.15;margin:0}.hero-actions{margin:0!important}.hero button{margin:0!important}.empty{padding:24px}.empty p{margin:4px 0}.import-panel{padding:18px!important}.import-panel>p{margin:8px 0}.import-panel .note{font-size:12px}.section-head h2{font-size:23px}@media(max-width:650px){.hero,.has-tanks .hero{padding:22px 0 16px}.hero h1,.has-tanks .hero h1{font-size:28px}.brand-icon{width:42px;height:42px}.hero-copy,.has-tanks .hero>div:first-child{gap:12px}.hero-actions{width:100%;display:flex}.hero-actions button{flex:1}}

.tank-photos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 24px}.tank-photos a{display:block;border-radius:10px;overflow:hidden;background:#17272b}.tank-photos img{display:block;width:100%;height:160px;object-fit:cover}.tank-photos a:nth-child(2) img,.tank-photos a:nth-child(4) img{object-position:center 30%}.purge-box{margin-top:30px;padding-top:22px;border-top:1px solid #d7bcb6}.purge-box h3{color:#923e30}.purge-actions{display:flex;gap:10px;flex-wrap:wrap}@media(max-width:600px){.tank-photos img{height:105px}.tank-photos{gap:5px;margin-bottom:16px}}

/* FishTokMom's Linktree palette. Dark overlay keeps header text readable. */
:root{color:#08204a;--page-bg:#f1f7fc;background:var(--page-bg);--ink:#08204a;--muted:#526785;--line:#cad9e8;--accent:#02d2dd;--green:#e0f8fa}
header{background:linear-gradient(#08204a66,#08204a66),linear-gradient(100deg,#0828a1,#30a2c9)}
.brand small,.pill{color:#fff}.pill{border-color:#b8daef}.pill>span{color:#02d2dd}
button{border-color:#a6bdd4}button:hover{background:#e0f8fa;border-color:#577b9f}
.primary,.quick button.primary{background:#02d2dd;color:#08204a;border-color:#147a95}
.primary:hover,.quick button.primary:hover{background:#65e5ec;color:#08204a;border-color:#147a95}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:#0828a1}header a:focus-visible{outline-color:#fff}
nav{border-color:#a6bdd4}nav button{color:#526785}nav button:hover{background:#e0f0fb}nav button.active{color:#0828a1;border-bottom-color:#0828a1}
#dueCount:not(:empty){background:#02d2dd;color:#08204a}
.muted,.helper,footer,.card p strong{color:#526785}
.card{border-top-color:#30a2c9}.empty{border-left-color:#30a2c9}.empty-icon{color:#526785}
.tag{background:#e7f3fc;color:#24466f;border-color:#cad9e8}
.quick button{background:#eff7fd;border-color:#a6bdd4}.quick button:hover{background:#ddf5f9}
.card .quick button:first-child{background:#d5f6f8;border-color:#70b7c2;color:#08204a}
.note,.import-status{background:#e7f3fc;color:#24466f;border-left-color:#30a2c9}
label,summary{color:#24466f}input,select,textarea{color:#08204a;border-color:#8ca8c4}input[type=file]{background:#e7f3fc}
.import-table th{background:#e7f3fc;color:#24466f}.import-table td,.import-table th{border-bottom-color:#cad9e8}
dialog{background:#f7fbff;border-color:#8ca8c4}dialog::backdrop{background:#08204ab3}
#toast{background:#08204a;border-color:#577b9f}#toast button{border-color:#b8daef}
.tank-photos a{background:#08204a}.overdue{color:#8a4816}.good{color:#25613b}.error{color:#9a4134}
input[type=checkbox]{accent-color:#0828a1}

/* Theme changes never touch journal storage. */
:root{color-scheme:light}header #settings{background:#08204a;color:#fff;border-color:#9dcce6;flex-shrink:0;min-height:44px}header #settings[aria-pressed=true]{border-color:#02d2dd;box-shadow:0 0 0 1px #02d2dd}.settings-panel{max-width:780px}.settings-group{padding:24px 0;border-bottom:1px solid var(--line)}.settings-group .quick{margin-top:12px}.settings-back{margin-bottom:20px}.theme-toggle{display:flex;align-items:center;gap:12px;min-height:44px;margin:0}.theme-toggle input{width:24px;height:24px;accent-color:#0828a1}.settings-panel .row{align-items:center}#settingsTitle:focus{outline:none}
:root[data-theme=dark]{color-scheme:dark;--page-bg:#081522;background:var(--page-bg);color:#e8f3ff;--ink:#e8f3ff;--muted:#b2c6dc;--line:#354e66;--paper:#102438}
[data-theme=dark] button{background:#153149;border-color:#65839d;color:#e8f3ff}[data-theme=dark] button:hover{background:#20465f;border-color:#8db9d5}
[data-theme=dark] .primary,[data-theme=dark] .quick button.primary{background:#02d2dd;color:#08204a;border-color:#02d2dd}[data-theme=dark] .primary:hover,[data-theme=dark] .quick button.primary:hover{background:#65e5ec;color:#08204a}
[data-theme=dark] p,[data-theme=dark] .muted,[data-theme=dark] .helper,[data-theme=dark] footer,[data-theme=dark] .card p strong{color:#b2c6dc}
[data-theme=dark] nav{border-color:#354e66}[data-theme=dark] nav button{background:transparent;color:#b2c6dc}[data-theme=dark] nav button:hover{background:#153149}[data-theme=dark] nav button.active{color:#02d2dd;border-bottom-color:#02d2dd}
[data-theme=dark] .card,[data-theme=dark] .empty,[data-theme=dark] .import-panel{background:#102438}[data-theme=dark] .tag{background:#17374e;color:#c5e7ff;border-color:#52728e}
[data-theme=dark] .quick button,[data-theme=dark] .card .quick button:first-child{background:#153149;color:#e8f3ff;border-color:#65839d}[data-theme=dark] .quick button:hover{background:#20465f}
[data-theme=dark] .note,[data-theme=dark] .import-status{background:#153149;color:#c5e7ff;border-left-color:#30a2c9}
[data-theme=dark] label,[data-theme=dark] summary{color:#c5e7ff}[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{background:#0c1d2d;color:#e8f3ff;border-color:#65839d}[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#9eb7cf}[data-theme=dark] input[type=file]::file-selector-button{background:#153149;color:#e8f3ff;border-color:#65839d}
[data-theme=dark] dialog{background:#102438;border-color:#65839d}[data-theme=dark] .modal-head button{background:transparent}[data-theme=dark] .import-table th{background:#153149;color:#c5e7ff}[data-theme=dark] .import-table td,[data-theme=dark] .import-table th{border-color:#354e66}
[data-theme=dark] .danger,[data-theme=dark] .error,[data-theme=dark] .purge-box h3{color:#ffb4a7!important}[data-theme=dark] .purge-box{border-color:#8e645c}[data-theme=dark] .overdue{color:#ffd08a}[data-theme=dark] .good{color:#a3e7bd}[data-theme=dark] #storageWarning{background:#392b13;color:#ffdda6;border-color:#a48952}
[data-theme=dark] button:focus-visible,[data-theme=dark] a:focus-visible,[data-theme=dark] input:focus-visible,[data-theme=dark] select:focus-visible,[data-theme=dark] textarea:focus-visible{outline-color:#65e5ec}[data-theme=dark] input[type=checkbox]{accent-color:#02d2dd}

/* A continuous midnight-blue shell; cyan is reserved for actions. */
[data-theme=dark] header{background:linear-gradient(180deg,#0e2233,#081522);border-bottom:1px solid #263e52}
[data-theme=dark] header #settings{background:#102438;border-color:#4e708b;color:#e8f3ff}
[data-theme=dark] header #settings:hover{background:#17374e;border-color:#83c8d8}
[data-theme=dark] .brand small{color:#b2c6dc}
header #settings{display:flex;align-items:center;gap:7px;padding:6px 10px}
.settings-fish{display:block;width:38px;height:38px;object-fit:contain;flex-shrink:0}
@media(max-width:480px){header #settings{font-size:12px;gap:4px;padding:5px 7px}.settings-fish{width:34px;height:34px}}
@media(max-width:380px){header #settings .settings-label{display:none}header #settings{min-width:48px;min-height:48px}}
footer{display:grid;grid-template-columns:1fr auto 1fr;align-items:center}.app-version{text-align:center;font-variant-numeric:tabular-nums}footer>span:last-child{text-align:right}#settingsDialog{width:min(570px,calc(100% - 24px));max-height:85dvh;overflow:auto}#settingsDialog .modal-head{position:sticky;top:-25px;padding:12px 0;background:inherit;z-index:1}#settingsDialog .settings-panel .row{flex-direction:row;align-items:center}header #settings[aria-expanded=true]{border-color:#02d2dd;box-shadow:0 0 0 1px #02d2dd}@media(max-width:600px){footer{grid-template-columns:1fr;text-align:center;gap:10px}footer>span:last-child{text-align:center}#settingsDialog .modal-head{top:-20px}#settingsDialog .settings-group .quick{display:grid;grid-template-columns:1fr}}
.tank-empty{display:flex;flex-direction:column;text-align:center;gap:4px}.tank-empty>img{width:min(100%,520px);height:auto}.tank-cover{display:block;width:100%;height:190px;object-fit:cover;border-radius:6px;margin-bottom:18px}.tank-cover[src="tank-outline.svg"]{object-fit:contain;background:transparent}.photo-editor{margin-top:20px}.photo-editor>img{display:block;width:100%;max-height:180px;object-fit:contain;border-radius:6px}.photo-editor .quick{margin-top:8px}@media(max-width:600px){.tank-cover{height:180px}}
.choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:16px 0}.choice{display:flex;align-items:center;gap:10px;min-height:48px;margin:0;padding:12px;border:1px solid var(--line);border-radius:7px;cursor:pointer;overflow-wrap:anywhere}.choice:has(input:checked){border-color:#02a2b0;background:#d5f6f8;color:#08204a}.choice input{width:20px;height:20px;flex-shrink:0}.choice:focus-within{outline:2px solid #30a2c9;outline-offset:2px}[data-theme=dark] .choice:has(input:checked){background:#17374e;color:#e8f3ff;border-color:#02d2dd}#batchTests h3{margin-top:20px}#batchTankSummary{overflow-wrap:anywhere}#batchSummary{font-weight:650}@media(max-width:440px){.choice-grid{grid-template-columns:1fr}.hero-actions{flex-wrap:wrap}.hero-actions button{white-space:normal}}
.log-day{margin-bottom:32px}.log-date{font-size:18px;padding:8px 0 12px;border-bottom:1px solid var(--line);margin:0 0 14px}.log-tank{background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:18px 20px;margin-bottom:14px}.log-tank h4{font-size:17px;margin:0;overflow-wrap:anywhere}.log-tank h5{font-size:14px;line-height:1.4;margin:0;overflow-wrap:anywhere}.log-tank .row:last-child{border-bottom:0;padding-bottom:0}.log-tank .row p{white-space:pre-wrap}.log-tank .quick{flex-shrink:0}@media(max-width:600px){.log-tank{padding:16px}.log-day{margin-bottom:24px}}
.log-day{margin:0 0 16px}.log-day>.log-date{cursor:pointer;min-height:52px;padding:16px 10px;color:var(--ink);font-size:17px;font-weight:700;border:1px solid var(--line);border-radius:7px;margin:0;background:var(--paper)}.log-date .muted{float:right;font-weight:400;margin-left:12px}.log-day[open]>.log-date{margin-bottom:14px}.log-date:focus-visible{outline:3px solid #30a2c9;outline-offset:3px}@media(max-width:440px){.log-day>.log-date{font-size:15px}.log-date .muted{font-size:11px}}
.discover-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px}.discover-filters button{font-size:13px}.news-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.news-card h3{font-size:22px;line-height:1.4}.news-card h3 a{text-decoration:none}.news-card h3 a:hover{text-decoration:underline}.news-card .quick{align-items:center}.news-card .quick a{font-size:12px;margin-left:auto}.news-card button[aria-pressed=true]{border-color:var(--accent)}.shopping-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}.shopping-grid h3{font-size:16px;margin-top:14px;line-height:1.5}.source-url{display:block;font-size:11px;overflow-wrap:anywhere;white-space:pre-wrap;margin:12px 0}.discover>select{max-width:380px}.discover details p{font-size:12px}.discover .section-head p{margin-bottom:0}#discover-status:empty{display:none}@media(max-width:760px){.shopping-grid,.news-grid{grid-template-columns:1fr}.news-card h3{font-size:20px}.discover .section-head{align-items:center}.discover .section-head>button{flex-shrink:0}}

/* Keep News filters visible together on portrait phones without shrinking tap height. */
.news-filters{flex-wrap:nowrap;gap:6px;overflow-x:auto;scrollbar-width:thin}.news-filters button{flex:0 0 auto;white-space:nowrap;min-width:44px;min-height:44px;padding:10px 10px}
@media(max-width:380px){.news-filters{gap:4px}.news-filters button{padding-inline:8px}}

#reminderBanner{background:#a51f30;color:#fff;padding:10px max(16px,calc((100% - 1120px)/2));} .reminder-alert{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0}.reminder-alert+.reminder-alert{border-top:1px solid #ffffff55}.reminder-alert-actions{display:flex;gap:6px;flex-shrink:0}.reminder-alert button{background:#fff;color:#861526;border:0;min-height:44px;min-width:44px;padding:8px 10px}.reminder-alert-actions button:last-child{background:transparent;color:white}.reminder-alert strong{color:inherit}fieldset{border:1px solid var(--border,#657786);border-radius:12px;margin:14px 0;padding:12px}@media(max-width:550px){.reminder-alert{align-items:flex-start;flex-direction:column}.reminder-alert-actions{align-self:flex-end}}

.shop-cart{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:44px;padding:.5rem .75rem;border:1px solid var(--border,#69827d);border-radius:12px;text-decoration:none;font-weight:650;margin:.25rem 0 .75rem;line-height:1.25}.shop-cart svg{flex:none}.shop-cart-pending{opacity:.65;font-size:.875rem}.shop-cart:focus-visible{outline:3px solid currentColor;outline-offset:3px}

.inline-icon{vertical-align:middle;flex:none;margin-right:.15rem}
.water-number-field{position:relative;margin-bottom:1rem}.water-number-field textarea{padding-right:3.4rem;margin-bottom:0}.water-number-toggle{position:absolute;right:6px;top:6px;min-width:44px;min-height:44px;padding:.4rem;font-size:1.4rem}.water-number-options{max-height:240px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--border,#69827d);border-radius:12px;padding:.4rem;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.3rem;margin-top:.3rem}.water-number-options[hidden]{display:none}.water-number-options button{min-height:44px;padding:.45rem}.water-number-field>.helper:empty{display:none}


/* Owner-selected product photo; no third-party image requests. */
.shop-photo{display:block;width:100%;height:auto;aspect-ratio:1170/699;object-fit:contain;border-radius:12px;margin-bottom:14px}.shop-product{max-width:560px}.shop-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.shop-video{padding:10px 0}

.tank-glance{margin:18px 0}.tank-glance h4,.tank-glance h5{margin:12px 0 8px}.tank-glance dl{margin:0}.tank-glance dl>div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid var(--line)}.tank-glance dt{color:var(--muted)}.tank-glance dd{margin:0;text-align:right;overflow-wrap:anywhere}.tank-glance ul{margin:8px 0;padding-left:20px}.tank-original p{white-space:pre-wrap;overflow-wrap:anywhere}.tank-original summary{min-height:44px;padding:12px 0;cursor:pointer}@media(max-width:380px){.tank-glance dl>div{display:block}.tank-glance dd{text-align:left;margin-top:4px}}


/* Read-only home overview and tank finding controls. */
.overview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px}
.overview-card{display:flex;align-items:flex-start;text-align:left;gap:12px;min-height:140px;padding:18px;border-radius:16px}.overview-card-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:8px;overflow-wrap:anywhere}
.overview-card strong{font-size:1.3rem;overflow-wrap:anywhere}.overview-card small{font-size:.85rem;line-height:1.4}
.tank-list-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,180px);gap:12px;margin-bottom:16px}
.tank-list-controls input,.tank-list-controls select{width:100%;min-width:0}
[data-tank-card]:focus{outline:3px solid var(--accent,#829cff);outline-offset:4px}
@media(max-width:480px){.overview-card{min-height:120px}.tank-list-controls{grid-template-columns:minmax(0,1fr) 125px;gap:8px}}

/* One visible affiliate disclosure for the Tested shopping section only.
   Journal header/nav currently scroll normally; dialogs stay in the top layer. */
.shop-heading{font-size:clamp(1.125rem,5.2vw,1.5rem);line-height:1.2;margin:0 0 4px}.shop-disclosure{position:sticky;top:env(safe-area-inset-top,0px);z-index:5;background:var(--page-bg);color:var(--ink);padding:4px 0;margin:0 0 12px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}.shop-product .shop-cart,.shop-product .shop-video{scroll-margin-top:100px}

/* Existing saved photos only; decorative thumbnails never resize stored data. */
.overview-thumb{width:44px;height:44px;max-width:44px;object-fit:cover;border-radius:8px;flex:none;align-self:center}


/* Shopping directory only. */
.community-directory-controls{margin:16px 0}.community-directory-controls>div{min-width:0}.community-directory-controls input,.community-directory-controls select{width:100%;min-width:0;box-sizing:border-box}.community-directory-controls .discover-filters{align-items:end;margin:0}#recommendCommunityShop,[data-community-save],.community-directory-controls button{min-height:44px}#communityResults .card{min-width:0}#communitySuggestion{scroll-margin-top:16px}

.community-suggestion{max-width:620px;margin:12px 0 20px}.community-suggestion[hidden]{display:none}.community-suggestion input{width:100%;box-sizing:border-box}

.community-source{min-height:44px;white-space:normal;text-align:left}.community-source[aria-pressed=true]{border-color:var(--accent)}

.community-card-top{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:start;gap:8px}.community-card-top>.quick{min-width:0;flex-wrap:wrap;overflow-wrap:anywhere}.community-card-top .tag{max-width:100%;white-space:normal;box-sizing:border-box}.community-bookmark{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;padding:0;flex-shrink:0}.community-bookmark svg{display:block;pointer-events:none}.community-bookmark[aria-pressed=true]{color:var(--accent)}

.community-legend{display:flex;flex-wrap:wrap;gap:10px 18px;margin:12px 0 18px;font-size:12px;color:var(--muted)}.community-legend>span{display:inline-flex;align-items:center;gap:6px}.community-legend img,.community-legend svg{flex-shrink:0;object-fit:contain}.community-card-badges{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}.community-card-badges .community-source,.community-passive-badge{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;box-sizing:border-box;padding:0}.community-passive-badge img{object-fit:contain;border-radius:4px}


/* Lean card header and passive metadata; only the legend filters by source. */
#communityResults .card{display:flex;flex-direction:column}.community-card-top h3{margin:0;align-self:center;min-width:0;overflow-wrap:anywhere}.community-card-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0}.community-card-meta .community-passive-badge{width:24px;height:24px;border:0;background:none;padding:0}.community-legend .community-source{display:inline-flex;align-items:center;gap:6px;font:inherit}.community-votes{margin-top:auto;padding-top:8px}.community-votes button{min-width:44px;min-height:44px}

/* Community-only Amazon-style actions; shared tank control geometry stays unchanged. */
#communityResults .community-card-top{grid-template-columns:minmax(0,1fr) fit-content(116px) 44px;align-items:center;gap:8px}#communityResults .community-card-meta{justify-content:flex-end;align-self:center;margin:0;gap:5px}.community-card-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:auto;padding-top:8px}.community-card-actions>a,.community-card-actions .community-votes button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:44px;padding:.5rem .75rem;border:1px solid var(--border,#69827d);border-radius:12px;text-decoration:none;font-weight:650;line-height:1.25;box-sizing:border-box}.community-card-actions .community-votes{margin:0;padding:0;gap:8px}.community-card-actions>p[role=status]{flex-basis:100%;text-align:center}.community-legend .community-source{border-radius:20px;padding:6px 12px;background:transparent}.community-legend .community-source[aria-pressed=true]{border-color:var(--accent);text-decoration:underline}.community-directory-controls .tank-list-controls>div{min-width:0}

/* Pack passive metadata into the same header row on phones. */
@media(max-width:420px){#communityResults .card{padding-inline:14px}#communityResults .community-card-top{grid-template-columns:minmax(0,1fr) fit-content(112px) 44px;gap:6px}#communityResults .community-card-meta{gap:4px}#communityResults .community-card-meta .community-passive-badge,#communityResults .community-card-meta .community-passive-badge>svg,#communityResults .community-card-meta .community-passive-badge>img{width:18px;height:18px}}

/* Give the longest Shopping category room without changing the My tanks controls. */
@media(max-width:480px){.community-directory-controls .tank-list-controls{grid-template-columns:minmax(0,1fr) min(194px,72%)}.community-directory-controls #communityCategory{padding-inline:4px}}

/* Give the directory two compact rows, with the source key available on demand. */
/* A view switch looks like navigation; only the recommendation uses a filled button. */
.shopping-tabs{display:flex;gap:12px;margin:0 0 22px;border-bottom:1px solid var(--line)}
.shopping-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;padding:8px 6px;background:transparent;color:var(--muted);font-size:13px}
.shopping-tabs button:hover{background:transparent;color:var(--ink)}
.shopping-tabs button[aria-pressed=true]{color:var(--ink);border-bottom-color:var(--accent);font-weight:750}
.community-shopping>.shopping-tabs{margin-bottom:10px}
.community-directory-controls{margin:0 0 14px}
.community-directory-controls .tank-list-controls{margin-bottom:0}
.community-toolbar{container-type:inline-size;display:flex;flex-wrap:wrap;align-items:flex-start;gap:4px;margin-bottom:10px}
.community-toolbar details{margin:0}
.community-toolbar button,.community-toolbar summary{font-size:13px;padding:6px 8px}
.community-toolbar [data-community-view],.community-toolbar summary{border:1px solid transparent;border-radius:6px;color:var(--ink);background:transparent}
.community-toolbar [data-community-view]:hover,.community-toolbar [data-community-view][aria-pressed=true],.community-toolbar summary:hover,.community-toolbar details[open] summary{border-color:var(--line);background:var(--paper)}
.community-toolbar [data-community-view][aria-pressed=true]{text-decoration:underline;text-underline-offset:3px}
.community-toolbar summary{display:flex;align-items:center;min-height:44px;cursor:pointer;font-weight:650;box-sizing:border-box;list-style:none}
.community-toolbar summary::-webkit-details-marker{display:none}
.community-toolbar summary::after{content:'';width:5px;height:5px;margin-left:7px;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg) translateY(-1px)}
.community-toolbar summary:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
/* The row contributes height, but not width, so opening it cannot move its trigger. */
.community-menu-row{width:0}
.community-toolbar .community-legend{position:relative;left:var(--community-menu-shift,0px);display:grid;gap:8px;box-sizing:border-box;width:min(270px,calc(100vw - 40px));width:min(270px,100cqi);margin:4px 0 0;padding:10px;background:var(--paper);border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 18px #0003}
#communityResults .shopping-grid{margin-top:0}
#communityResults .card{padding-block:14px}
#communityResults .card>p{margin:6px 0}
#communityResults .community-card-actions{padding-top:5px}

#communityResults .community-card-actions>a{border-color:transparent;text-decoration:underline;text-underline-offset:3px}
#communityResults .community-card-actions>a:hover{color:var(--ink);border-color:var(--line)}
@media(max-width:380px){.community-toolbar{gap:3px}.community-toolbar button,.community-toolbar summary{font-size:11px;padding-inline:4px}}
.community-reset{text-align:right}
.community-reset button{border:0;background:transparent;color:var(--ink);text-decoration:underline;text-underline-offset:3px;font-size:12px;padding:4px 8px}
.community-reset button:hover{background:var(--paper)}

.community-suggestion-status{font-weight:700;font-size:1.05rem;padding:12px;border:2px solid var(--accent);border-radius:8px;color:var(--ink);scroll-margin-block:16px}.community-suggestion-status:focus{outline:2px solid currentColor;outline-offset:3px}


/* Persistently visible active filters; checkmarks belong only to menu options. */
.community-shopping{--community-active-bg:#124d78;--community-active-ink:#ffffff}
:root[data-theme=dark] .community-shopping{--community-active-bg:#a8dbff;--community-active-ink:#08243a}
.community-shopping .community-toolbar .community-source[aria-pressed=true],.community-shopping .community-toolbar [data-community-view][aria-pressed=true],.community-shopping .community-toolbar #communityFilterToggle[data-active=true],.community-shopping #communityCategory[data-active=true]{background:var(--community-active-bg);color:var(--community-active-ink);border-color:var(--community-active-bg);font-weight:700;text-decoration:none}
.community-filter-check{display:inline-block;flex-shrink:0;font-weight:800;line-height:1}

/* Release updates are in-app only, beside Settings. */
.header-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}#releaseUpdates{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;padding:0}#releaseUnreadDot{position:absolute;right:6px;top:5px;width:8px;height:8px;border-radius:50%;background:var(--accent);border:1px solid var(--paper)}#releaseUnreadDot[hidden]{display:none}#releaseUpdatesDialog{width:min(560px,calc(100vw - 32px));box-sizing:border-box}#releaseUpdatesContent{overflow-wrap:anywhere}.release-note{padding:12px 0;border-top:1px solid var(--line)}.release-note h4{margin:0 0 6px;font-size:16px;line-height:1.4}.release-state{font-size:13px;font-weight:700;margin:0}.release-note button{min-height:44px}.release-note li{margin-bottom:6px}


@media(max-width:480px){header{gap:8px}header .brand{gap:8px}header #settings .settings-label{display:none}header #settings{min-width:48px;min-height:48px}.header-actions{gap:6px}}

.community-top-star{display:inline-block;margin-left:6px;color:#8a6000;font-size:.85em;vertical-align:baseline}:root[data-theme=dark] .community-top-star{color:#f6c85f}
#bellReminders{overflow-wrap:anywhere}#bellReminders .row{flex-wrap:wrap;align-items:flex-start}#bellReminders .quick{max-width:100%;flex-shrink:1}#bellRemindersTitle,#bellAppUpdatesTitle{margin:20px 0 12px}
.care-log-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}.care-log-controls label{min-width:0}.care-entry-actions{position:relative;flex-shrink:0;margin:0}.care-entry-actions>summary{display:grid;place-items:center;min-width:44px;min-height:44px;list-style:none;border:1px solid var(--line);border-radius:6px;font-size:18px;color:var(--ink)}.care-entry-actions>summary::-webkit-details-marker{display:none}.care-entry-actions>summary:focus-visible{outline:3px solid #d7a64c;outline-offset:3px}.care-entry-menu{display:flex;gap:6px;flex-wrap:wrap;padding-top:6px}.log-tank .row:has(.care-entry-actions){align-items:flex-start;flex-direction:row}.log-tank .row>div:first-child{flex:1}.care-entry-actions[open]{max-width:45%}@media(max-width:420px){.care-entry-menu{flex-direction:column}.care-entry-menu button{width:100%}}
#scheduledReminders{overflow-wrap:anywhere}#settingsDialog #scheduledReminders .row{flex-wrap:wrap;align-items:flex-start}#scheduledReminders .quick{max-width:100%;flex-shrink:1}
.release-tabs{display:flex;gap:8px;margin:12px 0}.release-tabs [aria-selected=true]{background:var(--accent);color:#fff;border-color:var(--accent)}
[data-theme="dark"] .release-tabs [aria-selected=true]{color:#08204a}

/* Release dates organize both unread and archived feature notes. */
.release-date-group{margin:18px 0}.release-date-group>summary{min-height:44px;cursor:pointer;padding:10px 0;color:var(--muted)}.release-date-group>summary h3{display:inline;margin:0;font-size:16px}.release-date-count{margin-left:10px;font-size:12px}.release-date-group>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}.release-date-group .release-note{padding:12px 0}.release-version{white-space:nowrap}

/* EcoJournal collection dashboard */
.hero-copy, .has-tanks .hero>div:first-child { display: grid; gap: .65rem; }
#ecoTagline { margin: 0; font-size: 1.075rem; }
.collection-heading { margin: .25rem 0 .85rem; font-size: 1.15rem; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: .8rem; margin-bottom: 1.5rem; }
.collection-tile { min-width: 0; display: flex; flex-direction: column; align-items: start; gap: .45rem; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); border-top: 3px solid var(--collection-color); }
.collection-tile[data-collection=aquatic] { --collection-color: #4B91A9; }
.collection-tile[data-collection=plants] { --collection-color: #40865C; }
.collection-tile[data-collection=terrariums] { --collection-color: #A28861; }
.collection-tile[data-collection=pets] { --collection-color: #648989; }
.collection-tile[data-collection=invertebrates] { --collection-color: #AA7753; }
.collection-tile[data-collection=specimens] { --collection-color: #9274B5; }
.collection-tile h3, .collection-tile p { margin: 0; }
.collection-tile p { flex: 1; }
#ecoCollections[hidden], #ecoTagline[hidden] { display: none; }
@media (min-width: 360px) and (max-width: 480px) {
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .collection-tile { padding: .75rem; }
}

.eco-item-grid, .eco-photo-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: .8rem; }
.eco-specimen > img, .eco-photo-grid img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.eco-photo-grid figure { margin: 0 0 1rem; }
#ecoCollections > details { margin-block: .75rem; }
#ecoDialog label { display: block; margin-block: .6rem; }
#ecoDialog table { width: 100%; text-align: left; }
#ecoDialog [data-eco-error]:empty, #ecoStatus:empty { display: none; }
.eco-chart { display: block; width: min(100%, 26rem); color: var(--ink); background: var(--page-bg); border-radius: 8px; margin-block: .75rem; }
.eco-history-filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); gap: .75rem; padding-block: .75rem; }

/* Compact collection dashboard inspired by the Plant Journal prototype. */
:root { --eco-soft: #e5eff8; --eco-accent: #13567e; --eco-journal-action: #13567e; --eco-journal-action-ink: white; --eco-action: var(--eco-journal-action); --eco-on-action: var(--eco-journal-action-ink); }
:root[data-theme=dark] { --eco-soft: #153149; --eco-accent: #a8dbff; --eco-journal-action: #02d2dd; --eco-journal-action-ink: #08204a; }
body > header .brand { color: #fff; }
body > header .brand { font-size: 1.2rem; }
body > header .brand-icon { width: 34px; height: 34px; border-radius: 9px; }
body > header .brand small { font-size: .75rem; line-height: 1.3; font-weight: 500; }
body > header #settings, body > header #releaseUpdates {
  background: transparent; color: #fff; border: 1px solid #ffffff80; box-shadow: none;
  min-width: 44px; padding: 6px 10px;
}
body > header .settings-label { display: none; }
.eco-dashboard main { display: flex; flex-direction: column; }
.hero.eco-collection-header { padding: 1.2rem 0 .8rem; }
.hero.eco-collection-header h1 {
  color: var(--ink);
  font-size: clamp(2rem, 9vw, 3.55rem);
}
.hero.eco-collection-header .hero-copy, .has-tanks .hero.eco-collection-header .hero-copy { display: contents; }
.eco-collection-header #ecoTagline { font-size: .95rem; margin-top: .2rem; }
.eco-dashboard .hero .hero-actions { margin-top: .65rem; gap: .4rem; }
.eco-dashboard .hero .hero-actions button { font-size: .825rem; background: transparent; color: var(--ink); border: 1px solid var(--line); }
.eco-dashboard .hero .hero-actions button:disabled { display: none; }
#ecoCollections { color: var(--ink); }
#ecoCollections, #ecoDialog { overflow-wrap: anywhere; }
/* Overview cards open details and keep a rectangular shape. */
.eco-metrics {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .65rem;
  margin: .5rem 0 1.25rem;
}
.eco-metric-card {
  display: grid;
  align-content: start;
  align-items: center;
  gap: .45rem;
  padding: .7rem .8rem;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.eco-metric-label {
  grid-row: 2;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 650;
  line-height: 1.25;
}
.eco-metric-number {
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: .25rem;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.4rem, 6vw, 2rem);
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.eco-metric-emblem {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .55rem;
  background: var(--eco-soft);
  color: var(--eco-accent);
}
.eco-metric-emblem span {
  width: 1.15rem;
  height: 1.15rem;
  background: currentColor;
  mask: var(--metric-icon) center / contain no-repeat;
}
.eco-metric-due { border-color: var(--eco-accent); }
.eco-quick-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .45rem; }
#ecoCollections .eco-quick-actions button {
  display: grid; justify-items: center; gap: .1rem;
  padding: .35rem .15rem; min-width: 0; font-size: .825rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.eco-scan-image { display: block; max-width: 100%; max-height: 13rem; margin: .5rem auto; border-radius: 12px; object-fit: contain; }
#ecoDialog [data-scan-status] { margin-block: .6rem; }
/* Shared action rows center incomplete rows and keep matching touch targets. */
:is(.eco-collection-tools,.eco-overview-start,.eco-detail-heading,.eco-detail-actions) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-block: .75rem;
}
#ecoCollections :is(.eco-collection-tools,.eco-overview-start,.eco-detail-heading,.eco-detail-actions) > button {
  flex: 1 1 8rem;
  max-inline-size: 12rem;
  min-block-size: 44px;
  padding: .5rem .65rem;
  justify-content: center;
  text-align: center;
  overflow-wrap: anywhere;
}
.eco-inventory-heading { margin-block-start: 1rem; }
.eco-inventory-heading h2 { margin: 0; font-size: 1.2rem; }
.eco-feedback:has(#ecoStatus:empty):not(:has(button)) { display: none; }
.eco-feedback { display: flex; align-items: center; gap: .4rem; }
.eco-section-head { align-items: center; margin-block: .8rem .5rem; }
.eco-section-head h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.025em; }
#ecoCollections .collection-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: .6rem; margin-bottom: 1rem; }
#ecoCollections .collection-tile { display: block; padding: 0; border: 1px solid var(--line); border-radius: 14px; }
#ecoCollections .eco-tile-open { display: flex; text-align: left; align-items: center; gap: .6rem; width: 100%; padding: .75rem; color: var(--ink); background: transparent; border: 0; border-radius: 14px; }
.eco-tile-open strong, .eco-tile-open small { display: block; }
.eco-tile-open small { font-size: .8rem; color: var(--muted); }
.eco-specimen-heading { display: flex; gap: .65rem; align-items: center; margin-bottom: .65rem; }
.eco-specimen-heading img { width: 48px; height: 48px; aspect-ratio: 1; object-fit: cover; border-radius: 11px; }
.eco-specimen-heading h3, .eco-specimen-heading p { margin: 0; }
.eco-specimen-heading p { font-size: .875rem; }
.eco-empty { padding: 1rem; background: var(--paper); border-radius: 12px; margin: 0; }
.journal-nav-icon { display: none; }
@media (max-width: 640px) {
  body > header { padding: .5rem max(1rem, env(safe-area-inset-left)); }
  main { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .eco-metrics, #ecoCollections .collection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #ecoCollections .eco-tile-open { align-items: start; gap: .45rem; padding: .65rem .55rem; }
  .eco-tile-open strong { line-height: 1.25; font-size: .9rem; }
  nav.journal-nav {
    position: fixed; inset: auto 0 0; z-index: 7; display: flex; gap: 0; margin: 0;
    padding: 0 max(.3rem, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(.3rem, env(safe-area-inset-left));
    background: var(--paper); border: 0; border-top: 1px solid var(--line);
  }
  nav.journal-nav button { flex: 1; display: grid; gap: .1rem; justify-items: center; padding: .3rem .1rem; line-height: 1.2; min-height: 52px; border: 0; font-size: .775rem; color: var(--muted); }
  nav.journal-nav button[hidden] { display: none; }
  nav.journal-nav button.active { color: var(--eco-accent); background: var(--eco-soft); border-radius: 10px; }
  .journal-nav-icon { display: block; font-size: 1.3rem; line-height: 1; }
  #toast { bottom: calc(64px + env(safe-area-inset-bottom)); }
  #ecoDialog { width: 100%; max-width: 100%; max-height: calc(92% - env(safe-area-inset-top)); margin: auto 0 0; border-radius: 20px 20px 0 0; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}
.eco-transfer-source { margin-block: 0 .75rem; }
.eco-transfer-preview { display: grid; grid-template-columns: repeat(2,1fr); gap: .5rem; margin-bottom: .8rem; }
.eco-transfer-preview > div { background: var(--eco-soft); border-radius: 12px; padding: .6rem .75rem; }
.eco-transfer-preview span, .eco-transfer-preview strong { display: block; }
.eco-transfer-preview span { color: var(--muted); font-size: .825rem; }
.eco-transfer-preview strong { color: var(--eco-accent); font-size: 1.4rem; }

.eco-dashboard .hero-actions[hidden] { display: none !important; }

#ecoCollections .eco-reference-thumb, #ecoDialog .eco-reference-thumb {
  width: 48px; height: 48px; flex: 0 0 48px; object-fit: cover; border-radius: 10px;
}
.eco-photo-credit { font-size: .75rem; color: var(--muted); }
.eco-photo-credit summary { cursor: pointer; min-height: 44px; align-content: center; }
.eco-photo-credit p { margin: 0 0 .4rem; overflow-wrap: anywhere; }
.collection-tile > .eco-photo-credit, .eco-catalog-entry > .eco-photo-credit { margin-inline: .7rem; }
.eco-catalog-entry { border: 1px solid var(--line); border-radius: 12px; }
#ecoDialog .eco-catalog-entry > .eco-catalog-result { border: 0; }
.eco-catalog-results { display: grid; gap: .5rem; max-height: min(46vh, 30rem); overflow-y: auto; padding: .2rem; }
#ecoDialog .eco-catalog-result {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .7rem;
  width: 100%; padding: .55rem; text-align: left; border-radius: 12px;
}
.eco-catalog-result strong, .eco-catalog-result small, .eco-catalog-result i { display: block; }
.eco-catalog-result i, .eco-catalog-result small { font-size: .8rem; color: var(--muted); }
.eco-catalog-select { font-size: .8rem; color: var(--eco-accent); }
#ecoDialog [data-result-count] { margin-block: .4rem; font-size: .85rem; }
@media (max-width: 390px) {
  .eco-tile-open .eco-reference-thumb { width: 38px; height: 38px; flex-basis: 38px; }
}

.journal-nav button[hidden], .hero-actions[hidden] { display: none !important; }
.eco-place-section { margin-block: 1rem; }
.eco-place-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); gap: .55rem; }
.eco-place-grid button { display: grid; gap: .15rem; text-align: left; padding: .65rem .8rem; }
.eco-place-grid small { color: var(--muted); }
.eco-setup { margin-block: 1rem; padding: .75rem; background: var(--eco-soft); border-radius: 12px; }
.eco-setup p { white-space: pre-wrap; overflow-wrap: anywhere; }
.eco-care-day { margin-block: .65rem; padding: .65rem; background: var(--eco-soft); border-radius: 12px; }
.eco-care-day h3 { font-size: .95rem; }
.eco-preferences { min-inline-size: 0; display: grid; gap: .15rem; padding: .4rem .65rem; margin: .65rem 0; border: 1px solid var(--line); border-radius: 12px; }
#ecoDialog .eco-preferences label { display: flex; align-items: center; gap: .5rem; min-height: 44px; margin: 0; }
#ecoDialog .eco-preferences legend { font-weight: 650; padding-inline: .25rem; }
@media (max-width: 640px) {
  #ecoDialog[data-placement=center] {
    width: min(100% - 2rem, 32rem);
    max-width: calc(100% - 2rem);
    max-height: calc(100% - 2rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    margin: auto;
    border-radius: 18px;
    padding-bottom: 1rem;
  }
}

#ecoDialog [hidden] { display: none !important; }
.eco-water-fields, .eco-equipment { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,8rem),1fr)); gap: .35rem .75rem; }
.eco-equipment dt { color: var(--muted); font-size: .85rem; }
.eco-equipment dd { margin: 0 0 .4rem; overflow-wrap: anywhere; }
#ecoDialog .eco-remove-confirm { color: white; background: #a33b31; border-color: #a33b31; margin-inline-start: .45rem; }
#ecoCollections [data-eco^="remove-"], #ecoCollections [data-eco=unassign] { color: #963a34; }
[data-theme=dark] #ecoCollections [data-eco^="remove-"], [data-theme=dark] #ecoCollections [data-eco=unassign] { color: #ffb4a7; }
.eco-place-picker [data-place-fields] { margin-block: .6rem; border: 1px solid var(--line); border-radius: 12px; padding: .35rem .65rem; }
.eco-place-picker [data-place-fields] > legend { padding-inline: .25rem; }

:root { --guide-accent: #ffdc45; --guide-surface: #7be3f2; --guide-ink: #08204a; }
#ecoGuide {
  position: fixed; z-index: 30; pointer-events: auto; inset-inline: max(.75rem, calc((100vw - 29rem)/2));
  padding: .8rem 1rem; border: 3px solid var(--guide-accent); border-radius: 15px;
  background: var(--guide-surface); color: var(--guide-ink); box-shadow: 0 0 0 2px var(--guide-ink), 0 8px 32px #06162b88;
  bottom: calc(66px + env(safe-area-inset-bottom)); max-height: min(60dvh,25rem); overflow: auto;
}
#ecoGuide[data-edge=top] { bottom: auto; top: calc(.75rem + env(safe-area-inset-top)); }
#ecoGuide h2 { font-size: 1.15rem; margin: 0; }
#ecoGuide p { color: var(--guide-ink); margin: .35rem 0 .65rem; }
#ecoGuide .eco-guide-step { font-weight: 700; font-size: .8rem; margin: 0 0 .2rem; }
#ecoGuide .quick { justify-content: flex-end; }
#ecoGuide .quick button { background: #e9fbfe; color: var(--guide-ink); border-color: var(--guide-ink); }
#ecoGuide .quick .primary { background: var(--guide-ink); color: #fff; }
#ecoGuide .quick button:focus-visible { outline: 3px solid var(--guide-ink); outline-offset: 2px; }
#ecoGuideArrow {
  position: fixed; z-index: 29; pointer-events: none; transform: translateX(-50%); width: 29px; height: 29px;
  filter: drop-shadow(0 0 1px var(--guide-ink)) drop-shadow(0 0 2px var(--guide-ink));
}
#ecoGuideArrow::before {
  content: ""; display: block; width: 100%; height: 100%;
  background: var(--guide-accent); clip-path: polygon(50% 0, 100% 65%, 68% 65%, 68% 100%, 32% 100%, 32% 65%, 0 65%);
}
#ecoGuideArrow[data-direction=down] { transform: translateX(-50%) rotate(180deg); }
.eco-guide-target, .journal-nav .eco-guide-tab { outline: 4px solid var(--guide-accent); outline-offset: 3px; box-shadow: 0 0 0 9px var(--guide-ink); }
#ecoGuide[hidden], #ecoGuideArrow[hidden] { display: none !important; }
.eco-guide-open > header, .eco-guide-open > main { pointer-events: none; }
.eco-guide-open > main button.eco-guide-target[data-eco="place"] { pointer-events: auto; }
.eco-quick-actions img { display: block; margin-inline: auto; }
#ecoCollections .eco-reference-icon { padding: .45rem; background: var(--eco-soft); object-fit: contain; }
#ecoDialog [data-setup-group], .eco-legacy-plans [data-setup-group], .eco-setup-group { margin-block: .55rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 10px; }
#ecoDialog [data-setup-group] summary, .eco-legacy-plans [data-setup-group] summary, .eco-setup-group summary { display: list-item; cursor: pointer; }

/* Keep the original tank-card structure and let long labels wrap on narrow screens. */
.eco-place-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 1rem; }
.eco-place-grid .eco-habitat-card { min-width: 0; text-align: left; }
.eco-habitat-card .tank-cover { margin-bottom: .85rem; }
.eco-habitat-card .card-top { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.eco-habitat-card .card-top > div { flex: 1 1 9rem; min-width: 0; }
.eco-habitat-card h4, .eco-parameters h3, .eco-latest-parameter h4 { margin: 0 0 .25rem; line-height: 1.3; }
.eco-habitat-card h4 { font-size: 1.15rem; }
.eco-habitat-card p, .eco-parameters p { margin: .45rem 0; }
.eco-latest-parameter + .eco-latest-parameter { margin-top: .65rem; }
#ecoCollections :is(.section-head,.quick,.eco-feedback) { flex-wrap: wrap; }
#ecoCollections :is(button,h2,h3,h4,p,dd,summary,.tag), #ecoDialog :is(button,label,summary,legend) {
  min-width: 0; max-width: 100%; overflow-wrap: anywhere; white-space: normal;
}
#ecoCollections button, #ecoDialog button { min-height: 44px; height: auto; line-height: 1.25; }
#ecoDialog :is(form,fieldset,select,input:not([type=checkbox]),textarea) { min-width: 0; max-width: 100%; }
#ecoCollections .eco-tile-open > span { min-width: 0; }
#ecoCollections .eco-quick-actions button { font-size: max(.8rem, 13px); }
#ecoDialog .eco-setup-help { margin: .4rem 0 .7rem; }

@media (max-width: 640px) {
  :root {
    --eco-mobile-gap: .55rem;
    --eco-mobile-inset: clamp(.75rem, 4vw, 1.15rem);
    --eco-nav-size: calc(65px + env(safe-area-inset-bottom));
  }
  body > header { padding: .55rem var(--eco-mobile-inset); }
  body > header .brand { min-width: 0; gap: .55rem; }
  body > header .brand > span { overflow-wrap: anywhere; }
  body > header .header-actions { gap: .4rem; }
  main { padding-inline: var(--eco-mobile-inset); padding-bottom: calc(var(--eco-nav-size) + .9rem); }
  nav.journal-nav {
    gap: .25rem;
    padding-top: .3rem;
    padding-bottom: calc(.35rem + env(safe-area-inset-bottom));
  }
  nav.journal-nav button { min-height: 52px; min-width: 0; padding: .4rem .2rem; font-size: .8125rem; }
  nav.journal-nav button > span { overflow-wrap: anywhere; white-space: normal; }
  #toast { bottom: calc(var(--eco-nav-size) + .35rem); }

  .eco-metrics { gap: var(--eco-mobile-gap); }
  .eco-metric-card { padding: .65rem; }

  .eco-quick-actions { grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--eco-mobile-gap); }
  #ecoCollections .eco-quick-actions button { padding: .4rem .2rem; }
  #ecoCollections .quick { gap: var(--eco-mobile-gap); }
  #ecoCollections .quick button { padding: .45rem .65rem; }
  #ecoCollections .eco-section-head { gap: .5rem; }
  #ecoCollections .eco-section-head > h2 { flex: 1 1 8rem; }

  #ecoCollections .collection-grid { gap: .65rem; }
  #ecoCollections .eco-tile-open { padding: .7rem .6rem; }
  #ecoCollections .collection-tile > .eco-photo-credit { margin-inline: .6rem; }
  .eco-habitat-card, .eco-specimen { padding: .85rem; }
  .eco-habitat-card .tank-cover { height: clamp(120px, 43vw, 180px); }
  .eco-habitat-card .card-top > button { flex: 0 0 auto; padding-inline: .65rem; }
  .eco-specimen-heading > div { min-width: 0; }
  .eco-parameters .section-head > h3 { flex: 1 1 100%; }

  #ecoDialog { padding: .8rem var(--eco-mobile-inset); scroll-padding: 3rem 0 4.5rem; }
  #ecoDialog[data-placement=sheet] { max-height: min(92dvh, calc(100% - env(safe-area-inset-top))); }
  #ecoDialog .modal-head { align-items: center; gap: .55rem; margin-bottom: .65rem; }
  #ecoDialog .modal-head > h2 { min-width: 0; line-height: 1.25; }
  #ecoDialog .modal-head [data-close] { flex: 0 0 44px; min-width: 44px; padding: .25rem; }
  #ecoDialog :is(input:not([type=checkbox]),select,textarea) { font-size: 1rem; line-height: 1.35; }
  #ecoDialog[data-placement=sheet] .eco-dialog-actions {
    position: sticky; z-index: 2; bottom: -.8rem;
    display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem;
    margin: .7rem calc(-1 * var(--eco-mobile-inset)) -.8rem; padding: .65rem var(--eco-mobile-inset) calc(.65rem + env(safe-area-inset-bottom));
    background: #f7fbff; border-top: 1px solid var(--line);
  }
  [data-theme=dark] #ecoDialog[data-placement=sheet] .eco-dialog-actions { background: var(--paper); }
  #ecoDialog .eco-dialog-actions [data-eco-error] { flex-basis: 100%; margin: 0; }
  #ecoDialog .eco-dialog-actions button { padding-inline: .85rem; }
  #ecoDialog .eco-dialog-actions button:only-of-type { flex: 1 1 auto; min-height: 48px; }
  #ecoDialog .eco-catalog-results { padding: .25rem .1rem; gap: .55rem; }
  #ecoDialog .eco-catalog-result { gap: .65rem; padding: .65rem; }
  #ecoDialog .eco-catalog-result > span { min-width: 0; overflow-wrap: anywhere; }
  #ecoDialog .eco-water-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #ecoDialog .eco-water-fields > label { min-width: 0; margin: .35rem 0; }
  #settingsDialog .settings-group { padding-block: .7rem; }
  #settingsDialog .settings-group .quick { gap: var(--eco-mobile-gap); }
  #settingsDialog .settings-group button { max-width: 100%; padding: .45rem .7rem; white-space: normal; }
  #ecoGuide { bottom: calc(var(--eco-nav-size) + .3rem); }
  #ecoGuide .quick { gap: .45rem; }
  #ecoGuide .quick button { padding: .45rem .6rem; white-space: normal; }
}
@media (max-width: 360px) {
  #ecoDialog .eco-catalog-result { grid-template-columns: auto minmax(0,1fr); }
  #ecoDialog .eco-catalog-select { display: none; }
  #ecoDialog .eco-catalog-result .eco-reference-thumb { width: 40px; height: 40px; }
}

:root {
  --eco-control-bg: #edf6ff;
  --eco-control-ink: #123e65;
  --eco-control-line: #7796af;
  --eco-action-radius: .5rem;
}
:root[data-theme=dark] { --eco-control-bg: #18354f; --eco-control-ink: #e3f3ff; --eco-control-line: #6183a2; }
/* Journal actions share one radius. Fill is reserved for the primary action. */
#ecoCollections :is(.eco-quick-actions,.eco-parameters,.eco-habitat-card,.eco-specimen,.eco-detail-tools,.eco-detail-actions,.eco-place-primary)
  button:where(:not([data-eco^="remove-"],[data-eco=unassign])) {
  border: 1px solid var(--eco-control-line);
  border-radius: var(--eco-action-radius);
  background: transparent;
  color: var(--eco-control-ink);
  font-weight: 650;
}
#ecoCollections :is(.eco-quick-actions,.eco-parameters,.eco-specimen,.eco-detail-tools,.eco-detail-actions)
  button:where(:not([data-eco^="remove-"],[data-eco=unassign])):hover {
  background: var(--eco-control-bg);
}

.eco-records {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: .65rem;
  margin: 0 0 1rem;
}
.eco-records > button {
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent);
  border-radius: .5rem;
  padding: .65rem .85rem;
  min-width: 0;
}
.eco-record-label { color: var(--muted); font-size: .825rem; font-weight: 650; }
.eco-records strong { display: block; margin: .15rem 0 0; color: var(--ink); font-size: 1.1rem; font-weight: 700; }
.eco-records small { display: block; margin-top: .2rem; color: var(--muted); font-size: .825rem; font-weight: 400; }

.eco-manage-list { margin-top: .85rem; }
.eco-manage-row { padding: .35rem 0 .75rem; border-bottom: 1px solid var(--line); }
.eco-manage-row .quick { margin-top: .5rem; }
.eco-manage-row .quick button { overflow-wrap: anywhere; }
.eco-targets { min-width: 0; overflow-wrap: anywhere; margin: 0; }
.eco-targets label { display: flex; align-items: center; gap: .5rem; min-height: 44px; margin: 0; }
.eco-targets input { flex: none; }

.eco-anniversaries {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr));
  gap: .65rem;
  margin: .5rem 0 1rem;
}
.eco-anniversary {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .65rem .85rem;
  background: var(--eco-control-bg);
  border: 1px solid var(--eco-control-line);
  border-radius: 14px;
}
.eco-anniversary p { margin: 0; color: var(--eco-control-ink); font-size: .85rem; }
.eco-anniversary h3 { margin: 0; }
.eco-anniversary > div { flex: 1; min-width: 0; }
.eco-anniversary button, [data-eco=clear-celebration] {
  flex: none;
  background: transparent;
  border-color: var(--line);
  padding-inline: .6rem;
  font-size: .825rem;
}
#ecoCelebrationStatus:empty { margin: 0; }
.eco-cake {
  position: relative;
  display: block;
  flex: 0 0 54px;
  height: 55px;
  background: radial-gradient(ellipse 24px 4px at 50% 94%,#4c9eba 90%,transparent);
}
.eco-cake::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 4px;
  width: 46px;
  height: 32px;
  background: linear-gradient(#bbfbf8 45%,#568ab2 46% 66%,#a4ebef 67% 75%,#426996 76%);
  border-radius: 8px;
  clip-path: var(--cake-shape);
}
.eco-cake::after {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  width: 6px;
  height: 19px;
  background: linear-gradient(#ffd35e 0 32%,transparent 33% 39%,#426996 40% 63%,#baebff 64% 77%,#426996 78%);
  border-radius: 50% 50% 1px 1px;
}
.eco-cake i { position: absolute; inset: 22px 11px 13px; background: var(--cake-detail,none); }
.eco-cake-fish { --cake-shape: polygon(0 16%,21% 37%,36% 12%,62% 0,88% 21%,100% 48%,85% 79%,62% 100%,36% 89%,21% 62%,0 84%); --cake-detail: radial-gradient(circle at 85% 42%,#10395d 2px,transparent 3px); }
.eco-cake-frog { --cake-shape: polygon(0 46%,10% 30%,12% 3%,32% 0,40% 22%,60% 22%,68% 0,88% 3%,90% 28%,100% 48%,94% 83%,75% 100%,25% 100%,6% 83%); --cake-detail: radial-gradient(circle at 11% 12%,#10395d 2px,transparent 3px),radial-gradient(circle at 89% 12%,#10395d 2px,transparent 3px); }
.eco-cake-cat { --cake-shape: polygon(0 0,29% 24%,71% 24%,100% 0,96% 74%,81% 100%,20% 100%,4% 74%); --cake-detail: radial-gradient(circle at 28% 48%,#10395d 2px,transparent 3px),radial-gradient(circle at 72% 48%,#10395d 2px,transparent 3px); }
.eco-cake-plant { --cake-shape: polygon(8% 5%,30% 7%,48% 40%,64% 7%,92% 0,83% 35%,61% 55%,78% 55%,69% 100%,32% 100%,23% 55%,44% 55%,18% 40%); }
.eco-cake-paw { --cake-shape: polygon(0 30%,5% 16%,19% 16%,24% 30%,27% 6%,45% 0,50% 20%,55% 0,73% 6%,76% 30%,81% 16%,95% 16%,100% 30%,93% 50%,76% 50%,92% 76%,81% 97%,19% 97%,8% 76%,24% 50%,7% 50%); }
.eco-cake-tank { --cake-detail: repeating-linear-gradient(112deg,transparent 0 6px,#287887 7px 9px,transparent 10px 13px); }
.eco-cake-terrarium { --cake-shape: polygon(50% 0,95% 35%,95% 100%,5% 100%,5% 35%); --cake-detail: linear-gradient(90deg,transparent 46%,#256982 47% 53%,transparent 54%); }
.eco-cake-enclosure { --cake-shape: polygon(50% 0,100% 45%,100% 100%,0 100%,0 45%); --cake-detail: linear-gradient(90deg,transparent 34%,#256982 35% 65%,transparent 66%); }

.eco-metric-card, .eco-records > button { text-align: start; }
.eco-records > button { background: var(--paper); }
.eco-metric-card:hover, .eco-records > button:hover { background: var(--eco-soft); border-color: var(--eco-accent); }
.eco-metric-details { list-style: none; margin: 0; padding: 0; }
.eco-metric-details li { padding-block: .4rem; border-bottom: 1px solid var(--line); }
.eco-metric-details button { text-align: start; width: 100%; }
.eco-metric-details small { display: block; margin: .25rem .45rem; color: var(--muted); overflow-wrap: anywhere; }

.eco-metric-label, .eco-record-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
}
.eco-metric-label::after, .eco-record-label::after {
  content: '';
  flex: none;
  width: .4rem;
  height: .4rem;
  margin-inline-end: .15rem;
  border: solid var(--eco-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
}
.eco-record-label > span { margin-inline-end: .15rem; }

/* Expanding a card keeps its neighbors at their own height. */
#ecoCollections :is(.eco-item-grid,.eco-place-grid,.collection-grid), #tankResults > .grid {
  align-items: start;
}

.eco-place-tabs {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .25rem;
  padding: .25rem;
  margin-block: .5rem .9rem;
  background: var(--eco-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
}
#ecoCollections .eco-place-tabs button { background: transparent; border-color: transparent; padding: .5rem; }
#ecoCollections .eco-place-tabs [aria-selected=true] { background: var(--paper); border-color: var(--eco-control-line); color: var(--ink); }
.eco-habitat-card .tank-cover[src$="-outline.svg"],
.eco-habitat-card .tank-cover[src^="eco-outline-"],
#tankResults .tank-cover[src$="-outline.svg"],
#tankResults .tank-cover[src^="eco-outline-"] { object-fit: contain; }

/* Owner gallery palette. Reuse the journal tokens for shared dialogs and controls. */
.eco-habitats {
  --page-bg: #f1f6fb;
  --ink: #102641;
  --paper: #fff;
  --muted: #45617d;
  --eco-soft: #dfedf8;
  --eco-action: #204f79;
  --eco-on-action: #fff;
  color: var(--ink);
  background: var(--page-bg);
}
[data-theme=dark] .eco-habitats {
  --page-bg: #0c1624;
  --ink: #eaf4ff;
  --paper: #192c42;
  --muted: #aec7de;
  --eco-soft: #192c42;
  --eco-action: #add5f4;
  --eco-on-action: #102641;
}
.eco-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.eco-orchid-divider {
  display: flex;
  align-items: center;
  gap: .4rem;
  height: 46px;
  margin-block: .2rem .55rem;
  pointer-events: none;
}
.eco-orchid-divider::before, .eco-orchid-divider::after {
  content: "";
  flex: 1 1 0;
  border-top: 1px solid var(--line);
}
.eco-orchid-divider > span {
  flex: 0 0 90px;
  height: 100%;
  background: url(eco-habitats-blue-orchid.webp) center / contain no-repeat;
  transform: rotate(44deg);
}
.hero.eco-collection-header h1, .eco-detail-cover h2, .eco-gallery-name, .eco-recent-care h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.035em;
}
.eco-place-open .hero { display: none; }
.eco-habitats #ecoCollections .eco-place-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,205px),1fr)); }
.eco-habitats #ecoCollections .eco-gallery-card { padding: 0; border: 0; box-shadow: none; background: transparent; }
.eco-gallery-card .tank-cover { width: 100%; height: auto; aspect-ratio: .94; border-radius: 15px; background: var(--eco-soft); margin: 0 0 .35rem; }
.eco-gallery-card .tank-cover:is([src$="-outline.svg"],[src^="eco-outline-"]) { object-fit: contain; }
.eco-gallery-name, .eco-gallery-card h4 { display: block; font-size: 1.2rem; font-weight: 500; line-height: 1.2; padding: .2rem .2rem 0; margin: 0; }
.eco-gallery-card > p, .eco-gallery-meta { margin: .25rem .2rem; font-size: .8rem; line-height: 1.35; color: var(--muted); }
.eco-imported-stock { font-size: .8rem; overflow-wrap: anywhere; }
.eco-imported-stock summary { min-height: 44px; padding: .65rem .2rem; cursor: pointer; }
.eco-imported-stock ul { margin: .35rem 0; padding-inline-start: 1.3rem; }
.eco-gallery-card .quick { margin-top: .4rem; gap: .3rem; }
#ecoCollections .eco-gallery-card .quick button { padding: .35rem .45rem; font-size: .75rem; }
.eco-recent-care { margin-top: 1.25rem; }
.eco-recent-care p { background: var(--eco-soft); border-inline-start: 2px solid var(--eco-control-line); padding: .55rem .7rem; border-radius: .4rem; margin: .4rem 0; }
.eco-detail-tools details { margin: 0; }
.eco-place-primary {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: .5rem 0 .65rem;
  background: var(--page-bg);
}
/* These actions share the original journal controls; the gallery palette stays on the surrounding surface. */
#ecoCollections .eco-place-primary button,
#ecoCollections .eco-detail-actions button:first-child {
  background: var(--eco-journal-action);
  color: var(--eco-journal-action-ink);
  border-color: var(--eco-journal-action);
}
#ecoCollections .eco-place-primary > button { width: 100%; }
#ecoCollections .eco-detail-actions > button { min-width: 0; }
#ecoCollections .eco-detail-actions > button img { flex: none; width: 18px; height: 18px; }
#ecoCollections :is(.eco-place-primary,.eco-detail-actions,.eco-detail-tools) button:has(img) {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
}
#ecoCollections :is(.eco-place-primary,.eco-detail-actions) button:first-child img { filter: brightness(0) invert(1); }
[data-theme=dark] #ecoCollections :is(.eco-place-primary,.eco-detail-actions) button:first-child img { filter: brightness(0); }
.eco-detail-cover {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: .65rem .6rem;
  min-height: clamp(180px,52vw,350px);
  border-radius: 12px;
  overflow: hidden;
}
.eco-detail-cover .tank-cover { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.eco-detail-cover .tank-cover:is([src$="-outline.svg"],[src^="eco-outline-"]) { object-fit: contain; background: var(--eco-soft); }
.eco-detail-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,transparent 30%,var(--page-bg) 100%);
}
.eco-detail-cover h2 { font-size: clamp(2rem,9vw,3.15rem); }
.eco-detail-cover [data-eco=home] { background: var(--paper); border-color: var(--line); border-radius: var(--eco-action-radius); }
.eco-detail-type { margin: .15rem .6rem; }
.eco-inventory-group { margin-bottom: .7rem; }
.eco-inventory-group h3 { margin: 0 0 .35rem; color: var(--muted); font-size: .85rem; }
.eco-place-open .eco-inventory-group .eco-item-grid { grid-template-columns: 1fr; }
.eco-place-open .eco-inventory-group .eco-specimen { padding: .65rem .75rem; }
.eco-place-open .eco-inventory-group .eco-specimen .quick { margin-top: .45rem; }
.eco-detail-support { border-block: 1px solid var(--line); padding: .3rem 0; }
.eco-add-choices { display: grid; gap: .5rem; }
.eco-care-picks button[aria-pressed=true] { background: var(--eco-soft); border-color: var(--eco-action); }
#ecoCollections .eco-overview-start [data-eco=first-habitat] { background: var(--eco-action); color: var(--eco-on-action); border-color: var(--eco-action); }
@media (max-width: 700px) {
  .eco-habitats #ecoCollections .eco-place-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
  .eco-place-primary { bottom: calc(60px + env(safe-area-inset-bottom,0px)); }
}
.eco-habitats > header { background: var(--page-bg); color: var(--ink); }
.eco-habitats > header .brand { color: var(--ink); }
.eco-habitats > header .header-actions > button { color: var(--ink); background: var(--eco-soft); border-color: var(--line); }
.eco-place-open #ecoCollections .eco-feedback { margin: 0; gap: .5rem; }
.eco-place-open #ecoStatus { margin-block: .2rem; }
.eco-place-open .eco-item-grid .eco-specimen { min-height: 0; }
.eco-place-open .eco-item-grid .eco-specimen details { margin: .3rem 0 0; }
.eco-place-open .eco-detail-type { margin: .15rem .6rem .35rem; }
.eco-place-open .eco-care-day ul { padding-inline-start: 1.2rem; margin-block-start: .25rem; }

.eco-detail-tools img { flex: none; }
body.eco-habitats > header :is(#releaseUpdates,#settings) { color: var(--ink); background: var(--eco-soft); border-color: var(--line); }
body.eco-habitats > header #settings svg circle { fill: var(--eco-soft); }
.eco-profile-cover { display: block; width: 100%; max-height: 180px; object-fit: contain; background: var(--eco-soft); border-radius: 12px; }
@media (max-width: 700px) {
  .eco-detail-cover { min-height: clamp(158px,45vw,195px); }
  .eco-place-open .eco-section-head .quick { margin-top: 0; }
  .eco-place-open #ecoCollections .eco-section-head { margin-block: .55rem .35rem; }
}

.eco-place-open .eco-detail-type { font-size: .85rem; line-height: 1.45; }
.eco-place-open .eco-inventory-group h3 { font-size: .8rem; font-weight: 650; }
.eco-place-open #ecoCollections .eco-section-head h2 { font-size: 1.15rem; letter-spacing: -.02em; }
.eco-place-open .eco-inventory-group .eco-specimen { border-top-width: 1px; box-shadow: none; border-radius: .6rem; }
.eco-place-open .eco-history-tools > summary, .eco-place-open .eco-detail-support > summary { min-height: 44px; }

#ecoCollections .eco-combined-add { position: static; padding: 0; }
#ecoCollections .eco-combined-add button { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.eco-combined-symbol { display: inline-flex; align-items: center; gap: .2rem; }
.eco-combined-symbol svg, .eco-setup-scan svg, .eco-add-choices button svg { width: 24px; height: 24px; flex: none; vertical-align: middle; }
#ecoDialog fieldset[data-place-setup] { border: 0; margin: 0; padding: 0; }
#ecoDialog .eco-setup-scan { margin-top: .75rem; }

.eco-card-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .3rem;
  margin-top: .5rem;
}
#ecoCollections .eco-card-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  padding: .35rem .15rem;
  min-width: 0;
  font-size: .75rem;
}
.eco-card-actions img { flex: none; width: 15px; height: 15px; }

#ecoDialog [data-setup-guidance] { padding: .55rem .7rem; background: var(--eco-soft); border-radius: .5rem; }

.eco-practice-intro { background: var(--eco-soft); padding: .55rem .7rem; border-radius: .5rem; }
.eco-practice-intro p { margin: .2rem 0; }
.eco-practice-intro p:first-child { font-weight: 700; }
#ecoDialog[data-placement=sheet] .eco-practice-form > .eco-dialog-actions:not(.eco-practice-nav) { position: static; }

.eco-habitat-fields-row { display: grid; gap: .4rem; padding-block: .55rem; }
.eco-habitat-fields-row + .eco-habitat-fields-row { border-top: 1px solid var(--line); }
.eco-habitat-fields-row fieldset label { display: inline-flex; align-items: center; gap: .25rem; min-height: 44px; margin-inline-end: .6rem; }
#ecoDialog [data-plan-fields] { min-inline-size: 0; }
#ecoDialog [data-plan-fields] button { min-height: 44px; }
#ecoDialog .eco-preferences details { margin-block: .4rem; }
#ecoDialog .eco-preferences summary { min-height: 44px; padding-block: .6rem; cursor: pointer; }

.eco-habitat-links { display: flex; align-items: center; gap: .45rem; }
.eco-habitat-links { margin-top: .55rem; }
#ecoCollections .eco-habitat-links button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: .35rem; }
#ecoCollections .eco-habitat-links button:first-child { background: var(--eco-action); color: var(--eco-on-action); }
.eco-habitat-more summary { min-height: 44px; padding: .6rem .2rem; cursor: pointer; font-size: .8rem; }
.eco-habitat-recorded dd { margin: 0 0 .65rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.eco-habitat-recorded dt { color: var(--muted); }

.eco-empty-habitats {
  padding: 1rem;
  margin-block: .7rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--eco-soft);
  text-align: center;
}
.eco-empty-habitat-art {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  width: min(100%,240px);
  margin: 0 auto .8rem;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.eco-empty-habitat-art img {
  display: block;
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: contain;
  background: var(--eco-soft);
}
.eco-empty-habitats h3 { margin: 0; }
.eco-empty-habitats p { margin: .35rem 0 0; }

.eco-primary-row {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  margin-bottom: .5rem;
}
#ecoCollections .eco-primary-row > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-height: 44px;
  padding: .5rem;
}
.eco-primary-row > button img { width: 16px; height: 16px; flex: none; }
.eco-primary-row > .eco-place-primary {
  flex: 1;
  min-width: 0;
  position: static;
  padding: 0;
  margin: 0;
}
#ecoCollections .eco-primary-row .eco-combined-add > button { height: 100%; }
