:root {
  --bg: #f7f7f4;
  --panel: #ffffff;
  --ink: #202623;
  --muted: #65706b;
  --line: #d9ded9;
  --accent: #245047;
  --accent-strong: #173a33;
  --accent-soft: #e5efec;
  --gold: #8b6414;
  --gold-soft: #fff4d6;
  --danger: #9a2f22;
  --danger-soft: #fae5e1;
  --shadow: 0 10px 24px rgba(22, 34, 29, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body {
  margin: 0;
  background: var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

.app-header {
  align-items: end;
  background: var(--accent);
  color: #fff;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 22px clamp(16px, 5vw, 44px);
}

.kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1;
  margin: 0;
}

.subtitle {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.98rem;
  margin: 8px 0 0;
  max-width: 650px;
}

.progress-box {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  min-width: 116px;
  padding: 10px 12px;
  text-align: right;
}

#reviewed-count {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.progress-label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 18px clamp(12px, 4vw, 36px) 42px;
}

.inventory-note {
  background: var(--gold-soft);
  border: 1px solid #e3ca83;
  border-radius: 8px;
  color: #4f3d13;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.inventory-note:empty {
  display: none;
}

.cards {
  display: grid;
  gap: 14px;
}

.plant-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  min-height: 320px;
  overflow: hidden;
}

.photo-link {
  align-items: center;
  background: #ecefeb;
  display: flex;
  min-height: 100%;
}

.plant-photo {
  aspect-ratio: 4 / 3;
  display: block;
  max-height: 520px;
  object-fit: contain;
  width: 100%;
}

.plant-body {
  padding: 18px;
}

.photo-index {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.plant-name {
  color: var(--accent-strong);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.1;
  margin: 0;
}

.plant-botanical {
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
  margin: 5px 0 12px;
}

.plant-note {
  background: var(--gold-soft);
  border: 1px solid #e3ca83;
  border-radius: 6px;
  color: #4f3d13;
  font-size: 0.9rem;
  margin: 0 0 14px;
  padding: 9px 10px;
}

.plant-note:empty {
  display: none;
}

.review-options {
  border: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 14px;
  padding: 0;
}

.review-options legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 7px;
}

.choice {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  gap: 9px;
  min-height: 44px;
  padding: 9px 10px;
}

.choice:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
  font-weight: 700;
}

.choice input {
  accent-color: var(--accent);
  height: 18px;
  width: 18px;
}

.field {
  display: block;
  margin-top: 12px;
}

.field span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.field input,
.field textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  display: block;
  padding: 10px 11px;
  resize: vertical;
  width: 100%;
}

.field input:focus,
.field textarea:focus,
.choice:focus-within,
.primary-button:focus,
.secondary-button:focus {
  outline: 3px solid rgba(36, 80, 71, 0.22);
  outline-offset: 2px;
}

.submit-panel {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  margin-top: 16px;
  padding: 14px;
}

.submit-panel h2 {
  color: var(--accent-strong);
  font-size: 1rem;
  margin: 0;
}

.submit-panel p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 3px 0 0;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  min-height: 46px;
  padding: 0 18px;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary-button {
  background: #eef1ef;
  color: var(--accent-strong);
}

.submit-message {
  grid-column: 1 / -1;
}

.submit-message.success {
  color: var(--accent-strong);
  font-weight: 700;
}

.submit-message.error {
  background: var(--danger-soft);
  border: 1px solid #e1aaa3;
  border-radius: 6px;
  color: var(--danger);
  padding: 8px 10px;
}

.is-hidden {
  display: none;
}

@media (max-width: 760px) {
  .app-header {
    align-items: stretch;
    display: grid;
  }

  .progress-box {
    text-align: left;
  }

  .plant-card {
    grid-template-columns: 1fr;
  }

  .plant-photo {
    max-height: none;
  }

  .review-options {
    grid-template-columns: 1fr;
  }

  .submit-panel {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
