:root { color-scheme: light; font: 16px/1.5 system-ui, sans-serif; color: #173c2c; background: #eff3e9; }
* { box-sizing: border-box; }
body { margin: 0; padding: 2rem 1rem; min-height: 100vh; display: grid; place-items: center; }
main { background: #fffdf7; border: 1px solid #cddbcf; border-radius: 1.5rem; width: min(100%, 28rem); padding: clamp(1.5rem, 6vw, 3rem); }
.brand { font: 700 2.75rem/1 Georgia, serif; margin: 0; }
.tagline { color: #41594b; margin: .5rem 0 2rem; }
h1 { font-size: 1.45rem; margin: 0 0 1rem; }
label { display: block; font-weight: 600; }
input, button { width: 100%; font: inherit; border-radius: .5rem; padding: .65rem .8rem; }
input { border: 1px solid #6e8576; margin: .35rem 0 .65rem; }
button { border: 1px solid #24533b; background: #24533b; color: white; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
form + form, .secondary, #confirm a { margin-top: .9rem; }
.secondary { background: transparent; color: #24533b; }
a { display: inline-block; color: #24533b; }
#status:empty { margin: 0; }

.signed-in { display: block; padding: clamp(.75rem, 3vw, 2rem); }
.signed-in main { width: min(100%, 76rem); margin: auto; padding: clamp(1rem, 4vw, 3rem); }
.workspace-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 1rem; }
.workspace-header h1 { font: 700 clamp(2rem, 5vw, 3.5rem)/1 Georgia, serif; }
.account-menu { max-width: 100%; overflow-wrap: anywhere; }
.garden-panel { border-top: 1px solid #d6dfd5; margin-top: 1.5rem; padding-top: 1rem; }
.garden-panel h2 { font: 700 1.65rem Georgia, serif; margin: .25rem 0 .65rem; }
.plant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin: 1rem 0; align-items: start; }
.plant-card { background: #f2f5ed; border: 1px solid #d5e0d4; border-radius: 1rem; padding: 1rem; min-width: 0; }
.plant-card h3 { margin: 0; font: 700 1.4rem Georgia, serif; overflow-wrap: anywhere; }
.plant-card p, .member p { overflow-wrap: anywhere; }
.plant-card img { width: 100%; border-radius: .5rem; margin-top: .75rem; }
.plant-notes { white-space: pre-wrap; }
.muted { color: #4a6355; }
.garden-form, .action-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; margin: .75rem 0; }
.garden-form label, .action-row label { flex: 1 1 12rem; min-width: 0; }
.garden-form button, .action-row button { width: auto; max-width: 100%; margin: 0; min-height: 44px; }
.signed-in input, .signed-in select, .signed-in textarea { width: 100%; min-height: 44px; font: inherit; margin: .35rem 0 0; border: 1px solid #6e8576; border-radius: .5rem; padding: .55rem .65rem; background: #fff; color: inherit; }
.signed-in textarea { resize: vertical; }
.signed-in details { margin-top: .75rem; }
.signed-in summary { cursor: pointer; padding: .5rem 0; font-weight: 650; }
.member { border-top: 1px solid #d6dfd5; padding-top: .5rem; }
.danger { color: #8b2424; border-color: #8b2424; }
.notice:empty { display: none; }
:focus-visible { outline: 3px solid #648759; outline-offset: 3px; }
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
.photo-gallery figure { margin: 0; min-width: 0; }
.task { padding: .75rem 0; border-top: 1px solid #d6dfd5; }
.task h3, .task p { margin: .25rem 0; }
.signed-in input[type="checkbox"] { width: 1.15rem; min-height: 1.15rem; margin: 0 .35rem; vertical-align: middle; }
.garden-nav a { padding: .55rem .8rem; border: 1px solid #a5b8a8; border-radius: .5rem; text-decoration: none; }
.garden-nav a:hover { background: #eff3e9; }
#plants, #protection, #care-tasks, #settings { scroll-margin-top: 1rem; }
@supports (padding: env(safe-area-inset-bottom)) {
  .signed-in { padding-bottom: max(clamp(.75rem, 3vw, 2rem), env(safe-area-inset-bottom)); }
}
.weather-warning { background: #f8ebd8; border-left: 4px solid #a36018; padding: .6rem .8rem; }
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; color: #e0eee0; background: #15251c; }
  main { background: #1d3024; border-color: #3d5848; }
  .tagline, .muted { color: #b8cabc; }
  .plant-card { background: #263b2d; border-color: #415a48; }
  .garden-panel, .member, .task { border-color: #496354; }
  .signed-in input, .signed-in select, .signed-in textarea { background: #19291f; border-color: #799986; }
  .secondary, a { color: #d2e8d5; border-color: #8bb69e; }
  .garden-nav a:hover { background: #294332; }
  .danger { color: #ffbbbb; border-color: #ffbbbb; }
  .weather-warning { background: #473321; }
}

body.signed-in .brand { font-size: 1.5rem; }
body.signed-in .tagline { display: none; }
.workspace-header { margin-top: 1.25rem; }
.inventory-picker { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem 1.5rem; }
.inventory-picker > label { flex: 0 1 22rem; }
.weather-overview { background: #193c32; color: #f3fbf5; border-radius: 1.25rem; padding: clamp(1rem, 3vw, 2rem); }
.weather-overview h2 { font-size: clamp(1.65rem, 4vw, 2.6rem); }
.weather-overview a, .weather-overview .secondary { color: #f3fbf5; border-color: #a8cbb8; }
.weather-overview .weather-warning { color: #412807; background: #f8ebd8; }
.weather-overview + h2 { margin-top: 1.35rem; }
.weather-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .6rem; }
.weather-metric, .forecast-strip li { display: grid; align-content: start; gap: .25rem; border-radius: .75rem; background: #285348; padding: .75rem; }
.weather-metric strong { font-size: clamp(1.35rem, 3vw, 2.75rem); line-height: 1.15; }
.weather-metric span, .forecast-strip span, .forecast-source { font-size: .9rem; }
.forecast-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(8.75rem, 1fr); gap: .55rem; list-style: none; padding: 0 0 .5rem; overflow: auto; }
.forecast-strip strong { font-size: 1.4rem; }
.cold-probe { margin-top: 1.25rem; padding: 1rem; border-radius: .8rem; border: 1px solid #789b8c; }
.probe-controls, .thermometer-ticks { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.probe-reading { font-size: 1.55rem; font-weight: 750; white-space: nowrap; }
.signed-in .thermometer input { appearance: none; display: block; cursor: ew-resize; border: none; padding: 0; min-height: 44px; background: transparent; }
.thermometer input::-webkit-slider-runnable-track { height: .85rem; border-radius: 1rem; background: linear-gradient(90deg, #75bce9, #b8e2e8 42%, #ffd48c 75%, #f0a260); }
.thermometer input::-moz-range-track { height: .85rem; border-radius: 1rem; background: linear-gradient(90deg, #75bce9, #b8e2e8 42%, #ffd48c 75%, #f0a260); }
.thermometer input::-webkit-slider-thumb { appearance: none; width: 1.55rem; height: 1.55rem; border: 3px solid #193c32; border-radius: 50%; background: white; margin-top: -.35rem; }
.thermometer input::-moz-range-thumb { width: 1.2rem; height: 1.2rem; border: 3px solid #193c32; border-radius: 50%; background: white; }
.probe-results ul { columns: 2 15rem; padding-left: 1.25rem; }
.probe-results li { break-inside: avoid; margin-bottom: .45rem; }
.plant-traits { display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: .4rem; }
.plant-traits li { border-radius: .45rem; padding: .2rem .5rem; background: #dfe9de; color: #193c32; font-size: .875rem; font-weight: 600; }
.plant-traits .sun-full { background: #ffe5a1; color: #513300; }
.plant-traits .sun-partial { background: #d7e8b9; color: #243c19; }
.plant-traits .sun-shade, .plant-traits .trait-cold { background: #d3e9f6; color: #193b54; }
.plant-traits .life-annual { background: #f9e2ec; color: #662747; }
.plant-cover { margin: .65rem 0; }
.plant-card .plant-cover img { aspect-ratio: 3 / 2; object-fit: cover; margin: 0; display: block; }
.plant-cover figcaption { font-size: .85rem; margin-top: .2rem; }
#admin-accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .75rem; }
[hidden] { display: none !important; }
