:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #173f35;
  --muted: #63766f;
  --panel: #ffffff;
  --line: #d9eadf;
  --leaf: #4c9f70;
  --leaf-dark: #2f7f65;
  --leaf-soft: #e4f3ec;
  --sun: #77bfa3;
  --sun-dark: #4c9f70;
  --alert: #8b5e34;
  --shadow: 0 18px 50px rgba(23, 63, 53, 0.12);
  --login-width: 430px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  font-size: 16px;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--leaf);
  color: #ffffff;
  cursor: pointer;
  font-weight: 750;
  min-height: 44px;
  padding: 0.75rem 1rem;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

button:hover {
  background: var(--leaf-dark);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

button:disabled:hover {
  background: var(--leaf);
  transform: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.photo-picker:focus-within {
  outline: 3px solid rgba(47, 107, 69, 0.28);
  outline-offset: 2px;
}

.app {
  margin: 0 auto;
  max-width: 1180px;
  padding: 2rem;
  width: 100%;
}

.signed-out .app {
  align-content: center;
  display: grid;
  min-height: 100vh;
  max-width: 760px;
}

.hero {
  align-items: end;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 2rem 0 1.5rem;
}

.signed-out .hero {
  justify-items: center;
  padding: 0 0 1.25rem;
}

.brand {
  margin: 0 0 1rem;
  max-width: 760px;
}

.signed-out .brand {
  margin: 0;
  max-width: var(--login-width);
  width: 100%;
}

.brand-logo {
  display: block;
  height: auto;
  max-height: 180px;
  max-width: min(100%, 760px);
  object-fit: contain;
  object-position: left center;
  width: 100%;
}

.signed-out .brand-logo {
  max-height: none;
  max-width: 100%;
  object-position: center;
  transform: translateX(8px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 0.96;
  margin-bottom: 1rem;
  max-width: 830px;
}

h2 {
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}

h3 {
  font-size: 1.4rem;
  margin-bottom: 0;
}

.human-name,
.common-name,
.plant-location,
.last-repotted,
.plant-notes,
.soil-type {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0;
  margin-top: 0.18rem;
}

.plant-notes {
  white-space: pre-wrap;
}

.intro,
.form-header p,
.list-header p {
  color: var(--muted);
}

.intro {
  font-size: 1.08rem;
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 560px;
}

.hero-stat {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  min-width: 145px;
  padding: 1rem;
  text-align: center;
}

.hero-stat span {
  color: var(--leaf);
  font-size: 2.7rem;
  font-weight: 850;
  line-height: 1;
}

.hero-stat small {
  color: var(--muted);
  font-weight: 700;
}

.workspace {
  align-items: start;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  min-width: 0;
}

.account-panel {
  align-items: end;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  margin-bottom: 1.25rem;
  min-width: 0;
  padding: 1rem;
}

.signed-out .account-panel {
  grid-template-columns: 1fr;
  margin-bottom: 0;
  max-width: var(--login-width);
  padding: 1.15rem;
  width: 100%;
  justify-self: center;
}

.auth-header {
  grid-column: 1 / -1;
  min-width: 0;
}

.signed-out .auth-header {
  text-align: center;
}

.signed-out .auth-header h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.account-heading {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-width: 0;
}

.settings-toggle,
.account-sign-out {
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  min-height: auto;
  padding: 0.15rem 0 0.25rem;
  white-space: nowrap;
}

.settings-toggle {
  align-items: center;
  border: 1px solid transparent;
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
  padding: 0.35rem;
  width: 38px;
}

.settings-toggle svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 22px;
}

.settings-toggle:hover,
.account-sign-out:hover {
  background: transparent;
  color: var(--leaf-dark);
  transform: none;
}

.signed-out .account-heading {
  display: block;
}

.account-panel p {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.account-panel p.error {
  color: var(--alert);
}

.settings-panel {
  background: #fbfdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.85rem;
  margin-top: 0.9rem;
  padding: 0.9rem;
}

.settings-panel h3 {
  font-size: 1rem;
}

.reminder-controls {
  display: grid;
  gap: 0.75rem;
}

.reminder-controls button,
.settings-sign-out,
.danger-settings-button {
  min-height: 38px;
  padding: 0.55rem 0.8rem;
}

.settings-field {
  font-size: 0.86rem;
}

.permission-note {
  background: #edf4e6;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  margin: 0;
  padding: 0.7rem;
}

.settings-note {
  font-size: 0.88rem;
}

.settings-link {
  color: var(--leaf-dark);
  font-size: 0.9rem;
  font-weight: 850;
  justify-self: start;
  text-decoration: none;
}

.settings-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.settings-sign-out {
  justify-self: start;
}

.danger-settings-button {
  background: #f3e8e2;
  color: var(--alert);
  justify-self: start;
  margin-top: 0.45rem;
}

.danger-settings-button:hover {
  background: #ead8cf;
  color: var(--alert);
}

.reminder-controls p {
  font-size: 0.88rem;
}

.auth-form {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.signed-out .auth-form {
  grid-template-columns: 1fr;
}

.name-fields {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}

.signed-out .auth-field {
  background: #f4f5f1;
  border: 1px solid transparent;
  border-radius: 999px;
  gap: 0.15rem;
  padding: 0.55rem 1rem 0.6rem;
}

.signed-out .auth-field:focus-within {
  border-color: rgba(155, 197, 75, 0.72);
  box-shadow: 0 0 0 3px rgba(155, 197, 75, 0.16);
}

.signed-out .auth-field > span:first-child {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.signed-out .auth-field input {
  background: transparent;
  border: 0;
  font-size: 16px;
  min-height: 24px;
  padding: 0;
}

.signed-out .auth-field input:focus-visible {
  outline: 0;
}

.auth-actions {
  display: flex;
  gap: 0.5rem;
  grid-column: 1 / -1;
}

.auth-actions button {
  flex: 1;
}

.signed-out .auth-actions {
  display: grid;
}

.signed-out .auth-actions button:not(.secondary) {
  background: var(--sun);
  color: #1d241c;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signed-out .auth-actions button:not(.secondary):hover {
  background: var(--sun-dark);
}

.password-control {
  align-items: center;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.password-toggle,
.link-button,
.inline-link {
  background: transparent;
  color: var(--leaf-dark);
  min-height: auto;
  padding: 0;
}

.password-toggle {
  font-size: 0.72rem;
  font-weight: 850;
}

.password-toggle:hover,
.link-button:hover,
.inline-link:hover {
  background: transparent;
  color: var(--leaf);
  transform: none;
}

.link-button {
  justify-self: center;
}

.auth-switch {
  color: var(--ink);
  font-size: 0.86rem;
  justify-self: center;
  margin: 3rem 0 0;
}

.inline-link {
  display: inline;
  font-size: inherit;
  font-weight: 800;
}

.plant-form,
.plant-list,
.boneyard-section {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.plant-form {
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  position: sticky;
  top: 1rem;
}

.form-header p,
.list-header p {
  line-height: 1.45;
  margin-bottom: 0;
}

label {
  color: var(--ink);
  display: grid;
  font-size: 0.9rem;
  font-weight: 780;
  gap: 0.45rem;
  max-width: 100%;
  min-width: 0;
}

input,
select,
textarea {
  background: #fbfdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: block;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-height: 44px;
  min-width: 0;
  min-inline-size: 0;
  padding: 0.75rem;
  width: 100%;
}

input[type="date"],
input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
  width: 100%;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--leaf-dark) 50%),
    linear-gradient(135deg, var(--leaf-dark) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px;
  padding-right: 2.5rem;
}

textarea {
  line-height: 1.45;
  min-height: 96px;
  resize: vertical;
}

input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.name-input-row {
  align-items: stretch;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
}

.name-picker-button {
  display: grid;
  gap: 0.1rem;
  line-height: 1.15;
  white-space: nowrap;
}

.name-picker-button small {
  font-size: 0.7rem;
  font-weight: 750;
  opacity: 0.82;
}

.name-picker-modal {
  align-items: end;
  background: rgba(18, 27, 20, 0.42);
  display: grid;
  inset: 0;
  padding: 1rem;
  position: fixed;
  z-index: 30;
}

.name-picker-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.8rem;
  max-height: min(88vh, 760px);
  min-height: 0;
  overflow: hidden;
  padding: 1rem;
  width: 100%;
}

.name-picker-header {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.name-picker-header p {
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 0;
}

.name-picker-close {
  background: #f5ebe6;
  color: var(--alert);
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0.55rem 0.75rem;
}

.name-picker-close:hover {
  background: #efd8ce;
}

.name-search-field {
  gap: 0.45rem;
}

.name-picker-list {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  max-height: min(52vh, 460px);
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.name-option {
  background: #fbfdf8;
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 42px;
  padding: 0.6rem 0.7rem;
  text-align: left;
}

.name-option:hover {
  background: var(--leaf-soft);
  color: var(--ink);
}

.name-picker-empty {
  color: var(--muted);
  font-weight: 750;
  margin: 0;
  padding: 1rem;
  text-align: center;
}

.confirm-modal {
  align-items: center;
  background: rgba(18, 27, 20, 0.42);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 1rem;
  position: fixed;
  z-index: 40;
}

.confirm-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.8rem;
  max-width: 440px;
  padding: 1rem;
  width: min(100%, 440px);
}

.confirm-panel p {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.danger-button {
  background: var(--alert);
}

.danger-button:hover {
  background: #873f19;
}

.photo-picker {
  align-items: center;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(135deg, rgba(47, 107, 69, 0.12), rgba(217, 233, 200, 0.55)),
    #eef6e7;
  border: 1px dashed #9cb68f;
  border-radius: 8px;
  color: var(--leaf-dark);
  display: grid;
  font-size: 1rem;
  font-weight: 850;
  gap: 0.05rem;
  justify-items: center;
  overflow: hidden;
  padding: 1rem;
  position: relative;
  text-align: center;
}

.photo-picker input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.photo-picker img {
  height: 100%;
  inset: 0;
  background: #ffffff;
  object-fit: cover;
  position: absolute;
  touch-action: none;
  transform: translate(var(--photo-x, 0), var(--photo-y, 0)) scale(var(--photo-scale, 1));
  transform-origin: center;
  user-select: none;
  width: 100%;
}

.photo-picker img:not([hidden]):not(.placeholder-image) {
  cursor: grab;
}

.photo-picker img:not([hidden]):not(.placeholder-image):active {
  cursor: grabbing;
}

.photo-choice-stack {
  display: grid;
  gap: 0.45rem;
  justify-items: stretch;
  max-width: min(100%, 260px);
  position: relative;
  width: 100%;
}

.photo-upload-button,
.clear-photo-button {
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  color: var(--leaf-dark);
  cursor: pointer;
  display: grid;
  font-size: 1rem;
  font-weight: 850;
  justify-items: center;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  position: relative;
  text-align: center;
  width: 100%;
}

.camera-button {
  cursor: pointer;
  position: relative;
}

.camera-icon {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(127, 168, 56, 0.28);
  border-radius: 999px;
  color: var(--leaf-dark);
  fill: none;
  height: 48px;
  margin-top: -0.3rem;
  padding: 0.65rem;
  position: relative;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 48px;
}

.clear-photo-button:hover {
  background: rgba(255, 255, 255, 0.94);
  color: var(--leaf-dark);
  transform: none;
}

.schedule-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
}

.input-with-unit {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  position: relative;
}

.input-with-unit input {
  padding-right: 4rem;
}

.input-with-unit span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  pointer-events: none;
  position: absolute;
  right: 0.75rem;
}

.date-input {
  display: block;
  position: relative;
}

.date-input input {
  padding-right: 0.75rem;
}

.date-input svg {
  color: var(--leaf-dark);
  display: none;
  fill: none;
  height: 22px;
  pointer-events: none;
  position: absolute;
  right: 0.85rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
}

.native-app .date-input input {
  padding-right: 3rem;
}

.native-app .date-input svg {
  display: block;
}

.form-actions {
  display: grid;
  gap: 0.6rem;
}

.form-status {
  background: #edf4e6;
  border: 1px solid #d6e8c8;
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(30, 56, 38, 0.2);
  color: var(--leaf-dark);
  font-size: 0.94rem;
  font-weight: 800;
  left: 50%;
  margin: 0;
  max-width: min(90vw, 440px);
  padding: 0.85rem 1.1rem;
  pointer-events: none;
  position: fixed;
  text-align: center;
  top: 32vh;
  transform: translateX(-50%);
  width: max-content;
  z-index: 9999;
}

.form-status.error {
  background: #f5ebe6;
  border-color: #efd8ce;
  color: var(--alert);
}

.native-app .form-status {
  max-width: calc(100vw - 2rem);
}

.plant-list {
  min-width: 0;
  min-height: 540px;
  padding: 1rem;
}

.boneyard-section {
  margin-top: 1.25rem;
  padding: 1rem;
}

.list-header {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.plant-list > .list-header {
  align-items: stretch;
  flex-direction: column;
}

.secondary {
  background: #edf4e6;
  color: var(--leaf-dark);
}

.secondary:hover {
  background: #dcebd2;
}

.list-action-button {
  align-self: stretch;
  background: rgba(237, 244, 230, 0.78);
  border: 1px solid var(--line);
  color: var(--leaf-dark);
  flex: 1 1 100%;
  font-size: 0.82rem;
  min-height: 34px;
  padding: 0.45rem 0.65rem;
  justify-self: stretch;
  white-space: nowrap;
  width: 100%;
}

.list-action-button:hover {
  background: #dcebd2;
}

.card-actions,
.boneyard-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.boneyard-actions {
  justify-content: space-between;
  width: 100%;
}

.boneyard-actions .delete-plant {
  margin-left: auto;
}

.card-actions .delete-plant {
  margin-left: auto;
}

.card-actions .edit-plant {
  flex: 0 0 auto;
}

.card-actions .add-note {
  flex: 0 0 auto;
}

.card-actions .move-to-boneyard {
  flex: 0 0 auto;
  min-width: 0;
}

.move-to-boneyard {
  background: #f5ebe6;
  color: var(--alert);
  min-height: 38px;
  padding: 0.55rem 0.75rem;
}

.move-to-boneyard:hover {
  background: #efd8ce;
}

.plants {
  display: grid;
  gap: 0.85rem;
}

.location-folders {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 1rem;
}

.location-folder {
  background: #edf4e6;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--leaf-dark);
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
}

.location-folder-select {
  align-content: center;
  background: transparent;
  color: var(--leaf-dark);
  display: grid;
  gap: 0.2rem;
  justify-items: start;
  min-height: 54px;
  padding: 0;
  text-align: left;
  width: 100%;
}

.location-folder-select span {
  font-size: 1rem;
  font-weight: 850;
}

.location-folder-select small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.location-folder:hover {
  background: #dcebd2;
  color: var(--leaf-dark);
}

.location-folder:hover .location-folder-select small {
  color: var(--muted);
}

.location-folder-select:hover,
.location-folder-select:focus-visible {
  background: transparent;
  color: var(--leaf-dark);
  transform: none;
}

.location-folder.active {
  background: #dcebd2;
  border: 2px solid var(--button);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: calc(0.75rem - 1px);
}

.location-folder.active .location-folder-select small {
  color: var(--leaf-dark);
}

.location-water-button {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(127, 168, 56, 0.26);
  border-radius: 999px;
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 850;
  justify-self: stretch;
  padding: 0.45rem 0.55rem;
  text-align: center;
}

.location-water-button:hover,
.location-water-button:focus-visible {
  background: #ffffff;
  color: var(--leaf-dark);
  transform: none;
}

.plant-card {
  background: #fbfdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  padding: 0.85rem;
  position: relative;
}

.plant-photo-frame {
  aspect-ratio: 1 / 1;
  background: var(--leaf-soft);
  border-radius: 8px;
  overflow: hidden;
}

.plant-image {
  background: var(--leaf-soft);
  height: 100%;
  object-fit: cover;
  transform: translate(var(--photo-x, 0), var(--photo-y, 0)) scale(var(--photo-scale, 1));
  transform-origin: center;
  width: 100%;
}

.placeholder-image {
  background: #ffffff;
  object-fit: contain;
  padding: 1.5rem;
  transform: none;
}

.plant-content {
  display: grid;
  gap: 0.85rem;
  padding: 0;
}

.plant-info-card,
.plant-action-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
}

.plant-info-card h3,
.plant-info-card p {
  color: var(--ink);
}

.icon-button {
  align-items: center;
  background: rgba(32, 49, 38, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #ffffff;
  display: inline-flex;
  font-size: 1.5rem;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  text-shadow: 0 1px 3px rgba(18, 27, 20, 0.7);
  width: 38px;
}

.icon-button:hover {
  background: rgba(164, 82, 34, 0.82);
  color: #ffffff;
}

.icon-button svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.care-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.care-pill {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 0.35rem;
  grid-template-rows: auto auto 1fr auto;
  padding: 0.8rem;
}

.care-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.care-pill strong {
  font-size: 1rem;
}

.care-pill small {
  color: var(--muted);
  line-height: 1.35;
}

.care-pill button {
  margin-top: 0.4rem;
  min-height: 38px;
  padding: 0.55rem 0.75rem;
}

.due-now {
  color: var(--alert);
}

.boneyard-count {
  align-items: center;
  background: #f5ebe6;
  border: 1px solid #efd8ce;
  border-radius: 8px;
  color: var(--alert);
  display: grid;
  min-width: 132px;
  padding: 0.75rem;
  text-align: center;
}

.boneyard-count span {
  font-size: 2rem;
  font-weight: 850;
  line-height: 1;
}

.boneyard-count small {
  color: #7d442b;
  font-weight: 750;
}

.boneyard-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.boneyard-card {
  background: #fbfdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  padding: 0.65rem;
  position: relative;
}

.boneyard-image {
  filter: grayscale(0.5);
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.boneyard-image.placeholder-image {
  object-fit: contain;
  padding: 1.5rem;
}

.boneyard-content {
  display: grid;
  gap: 0.65rem;
  padding: 0;
}

.boneyard-card .plant-info-card,
.boneyard-card .plant-action-card {
  padding: 0.7rem;
}

.boneyard-card h3 {
  font-size: 1.05rem;
  line-height: 1.15;
}

.boneyard-date {
  color: #7d442b;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.25rem 0 0;
}

.empty-state {
  align-items: center;
  border: 1px dashed #b9c8af;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  min-height: 340px;
  padding: 2rem;
  text-align: center;
}

@media (max-width: 860px) {
  .app {
    padding: 1rem;
  }

  .hero,
  .workspace,
  .account-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
  }

  .hero-stat {
    justify-self: start;
  }

  .plant-form {
    position: static;
  }
}

.native-app,
.native-app * {
  min-width: 0;
}

.native-app .app {
  max-width: 100%;
  overflow-x: hidden;
  padding: max(1rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
  width: 100%;
}

.native-app .hero,
.native-app .workspace,
.native-app .account-panel {
  grid-template-columns: 1fr;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.native-app .hero > *,
.native-app .workspace > *,
.native-app .account-panel > * {
  max-width: 100%;
  min-width: 0;
}

.native-app .hero {
  align-items: start;
}

.native-app .brand {
  margin: 0 0 1rem;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.native-app .brand-logo {
  display: block;
  height: auto;
  max-height: none;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
  width: 100%;
}

.native-app .hero-stat {
  justify-self: start;
}

.native-app .plant-form {
  position: static;
}

.native-app .plant-card {
  display: grid;
  min-height: 0;
}

.native-app .plant-photo-frame {
  aspect-ratio: 1 / 1;
}

.native-app .plant-content {
  display: grid;
  gap: 1rem;
  padding: 0;
}

.native-app .care-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.native-app .care-pill {
  aspect-ratio: auto;
  min-height: 0;
}

.native-app .care-pill button {
  align-self: end;
  font-size: 0.84rem;
  min-height: 38px;
  padding: 0.45rem 0.5rem;
}

.native-app .card-actions {
  align-items: center;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: auto auto;
  justify-content: center;
}

.native-app .card-actions .delete-plant {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 0;
}

.native-app .card-actions .edit-plant {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.native-app .card-actions .move-to-boneyard {
  font-size: 0.86rem;
  grid-column: 1 / -1;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  white-space: nowrap;
}

.native-app .boneyard-grid {
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.native-app .plant-form,
.native-app .plant-list,
.native-app .boneyard-section,
.native-app .plants,
.native-app .boneyard-grid,
.native-app .account-panel {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.native-app .auth-header,
.native-app .account-heading,
.native-app .form-header,
.native-app .list-header,
.native-app .photo-picker,
.native-app .name-input-row,
.native-app .plant-card,
.native-app .plant-photo-frame,
.native-app .plant-content,
.native-app .plant-info-card,
.native-app .plant-action-card,
.native-app .boneyard-card,
.native-app .boneyard-content,
.native-app .care-row,
.native-app .care-pill {
  max-width: 100%;
  min-width: 0;
}

.native-app .photo-picker,
.native-app .name-input-row,
.native-app .account-heading {
  width: 100%;
}

.native-app .account-heading h2 {
  flex: 1 1 auto;
  min-width: 0;
}

.native-app .account-sign-out {
  flex: 0 0 auto;
}

.native-app label,
.native-app .schedule-grid,
.native-app .input-with-unit,
.native-app input,
.native-app select,
.native-app textarea,
.native-app button {
  max-width: 100%;
  min-width: 0;
}

.native-app input,
.native-app select,
.native-app textarea,
.native-app button {
  appearance: none;
}

.native-app input[type="date"] {
  display: block;
  text-align: left;
}

@media (max-width: 620px) {
  .app {
    padding: max(1rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left));
  }

  .brand {
    margin-bottom: 0.85rem;
    max-width: 100%;
    width: 100%;
  }

  .brand-logo {
    max-height: none;
    object-position: center;
  }

  .hero,
  .workspace,
  .account-panel {
    width: 100%;
  }

  .plant-form,
  .plant-list,
  .boneyard-section,
  .account-panel {
    max-width: 100%;
  }

  .schedule-grid,
  .name-fields,
  .auth-form,
  .plant-card {
    grid-template-columns: 1fr;
  }

  .auth-actions {
    flex-direction: column;
  }

  .plant-card {
    min-height: 0;
  }

  .plant-photo-frame {
    aspect-ratio: 1 / 1;
  }

  .plant-content {
    padding: 0;
  }

  .care-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .care-pill {
    aspect-ratio: auto;
    min-height: 0;
  }

  .boneyard-grid {
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .native-app .plant-content {
    padding: 0;
  }

  .list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .card-actions,
  .boneyard-actions {
    justify-content: center;
  }

  .card-actions {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: auto auto;
    justify-content: center;
  }

  .card-actions .delete-plant {
    grid-column: 1 / -1;
    justify-self: center;
    margin: 0;
  }

  .card-actions .move-to-boneyard {
    font-size: 0.9rem;
    grid-column: 1 / -1;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    white-space: nowrap;
  }

  .boneyard-actions {
    justify-content: space-between;
  }

}

@media (min-width: 640px) {
  .name-picker-modal {
    align-items: center;
    justify-items: center;
  }

  .name-picker-panel {
    max-width: 560px;
  }
}
