:root {
  color-scheme: light;
  --bg: #f5f8f3;
  --surface: rgba(255, 255, 255, .94);
  --surface-raised: #f0f5ee;
  --surface-glass: rgba(250, 253, 248, .86);
  --hero-tint: #e7f0e2;
  --ink: #26372d;
  --muted: #6f7f73;
  --line: rgba(54, 91, 63, .15);
  --blue: #477a54;
  --cyan: #8ebc91;
  --pink: #e9a9a1;
  --green: #72a982;
  --gradient: linear-gradient(110deg, #477a54, #78aa83);
  --glow-one: rgba(118, 164, 111, .16);
  --glow-two: rgba(190, 218, 174, .22);
  --glow-three: rgba(237, 169, 161, .13);
  --sans: "DM Sans", Arial, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --dock-h: 80px;
}

* { box-sizing: border-box; }
.icon-library { width: 0; height: 0; position: absolute; overflow: hidden; }
.ui-icon { width: 1.15em; height: 1.15em; display: inline-block; flex: 0 0 auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
button .ui-icon { pointer-events: none; }
html { min-height: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  padding-bottom: 120px;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(ellipse at 5% 5%, var(--glow-one), transparent 37rem),
    radial-gradient(ellipse at 94% 19%, var(--glow-two), transparent 39rem),
    radial-gradient(ellipse at 77% 92%, var(--glow-three), transparent 34rem),
    var(--bg);
  transition: color .25s, background-color .25s;
}
body.dark-theme {
  color-scheme: dark;
  --blue: #9fcca7;
  --cyan: #c2e2c1;
  --green: #91be99;
  --bg: #151b17;
  --surface: #202821;
  --surface-raised: #29342c;
  --surface-glass: rgba(29, 38, 32, .9);
  --hero-tint: #26342a;
  --ink: #f1f5ef;
  --muted: #a8b7a9;
  --line: rgba(210, 231, 211, .13);
  --glow-one: rgba(67, 115, 72, .25);
  --glow-two: rgba(108, 128, 74, .14);
  --glow-three: rgba(79, 106, 74, .12);
  background:
    radial-gradient(ellipse at 14% 4%, var(--glow-one), transparent 38rem),
    radial-gradient(ellipse at 89% 28%, var(--glow-two), transparent 38rem),
    radial-gradient(ellipse at 77% 92%, var(--glow-three), transparent 34rem),
    var(--bg);
}
html:has(body.dark-theme) { background: #151b17; }
html:has(body.dark-theme[data-palette="lavender"]) { background: #181620; }
html:has(body.dark-theme[data-palette="rose"]) { background: #1d171a; }
html:has(body.dark-theme[data-palette="sand"]) { background: #1d1a15; }
a { color: inherit; text-decoration: none; }
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.visually-hidden {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.shell { width: min(1240px, calc(100% - 44px)); margin-inline: auto; }

.topline {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  color: #f7f9ff;
  background: var(--gradient);
  font-size: 10px;
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 8;
  border-bottom: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(1.3);
}
.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.07em; }
.brand-mark {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--gradient);
  box-shadow: 0 7px 18px rgba(80, 125, 235, .25);
  font-size: 21px;
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.botanist-header-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin-left: 4px; padding: 0 14px; border: 1px solid color-mix(in srgb, var(--blue) 24%, transparent); border-radius: 13px; color: #fff; background: var(--gradient); box-shadow: 0 5px 13px color-mix(in srgb, var(--blue) 18%, transparent); font-size: 11px; font-weight: 800; white-space: nowrap; transition: transform .2s, box-shadow .2s; }
.botanist-header-button:hover { transform: translateY(-2px); box-shadow: 0 8px 17px color-mix(in srgb, var(--blue) 26%, transparent); }
.botanist-header-button .ui-icon { width: 17px; height: 17px; }
.palette-select {
  width: auto;
  min-width: 124px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  border-color: transparent;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 5px 13px color-mix(in srgb, var(--blue) 18%, transparent);
  font-size: 11px;
  font-weight: 700;
}
.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  transition: transform .2s, border-color .2s;
}
.icon-button:hover { transform: translateY(-2px); border-color: var(--blue); }
.install-app-button { font-size: 20px; font-weight: 800; }
.install-app-button[hidden] { display: none; }
.collection-open { position: relative; }
.collection-open span { min-width: 16px; height: 16px; position: absolute; top: -5px; right: -5px; display: grid; place-items: center; padding: 0 4px; border-radius: 999px; color: #fff; background: var(--blue); font-size: 9px; font-weight: 800; }

.main-content { min-height: 70vh; padding-top: 32px; }
.page { animation: page-in .45s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.hero-card {
  min-height: 340px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 30px;
  background: linear-gradient(125deg, var(--surface) 0%, var(--hero-tint) 100%);
  box-shadow: 0 24px 66px rgba(45, 83, 52, .12);
}
.hero-copy { align-self: center; padding: clamp(28px, 5vw, 66px); }
.hero-copy .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); }
h1 { margin: 10px 0 14px; font-family: var(--serif); font-size: clamp(34px, 5vw, 57px); font-weight: 600; letter-spacing: -.045em; line-height: 1.08; }
h2 { margin-bottom: 10px; font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 15px; font-weight: 800; }
.gradient-text { color: transparent; background: var(--gradient); background-clip: text; -webkit-background-clip: text; }
.hero-copy > p { max-width: 510px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-art { min-height: 340px; position: relative; overflow: hidden; background: #e2eee0; }
.hero-art::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, rgba(27,38,68,.08), transparent 48%), linear-gradient(0deg, rgba(22,35,61,.32), transparent 38%); }
.hero-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.hero-art-label { position: absolute; z-index: 1; bottom: 20px; left: 23px; color: #fff; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.hero-orbit {
  width: 108px;
  height: 108px;
  position: absolute;
  z-index: 1;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .17);
  backdrop-filter: blur(10px);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.25;
  text-align: center;
  transform: rotate(8deg);
}
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 8px 19px rgba(81, 116, 231, .2);
  font-size: 12px;
  font-weight: 800;
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 11px 24px rgba(81, 116, 231, .28); filter: saturate(1.08); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.button.secondary { color: var(--blue); border: 1px solid rgba(87,121,245,.2); background: rgba(87,121,245,.09); box-shadow: none; }
.button.ghost { color: var(--muted); border: 1px solid var(--line); background: var(--surface); box-shadow: none; }
.button.small { min-height: 34px; padding-inline: 12px; border-radius: 10px; font-size: 10px; }
.button.full { width: 100%; }

.home-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.home-fact {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.home-fact > .ui-icon { width: 19px; height: 19px; color: var(--blue); }
.home-fact strong, .home-fact small { display: block; }
.home-fact strong { font-size: 13px; }
.home-fact small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.surface-card {
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: 0 9px 25px rgba(48, 70, 130, .055);
}
.home-widget { min-height: 210px; padding: 22px; }
.widget-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.widget-head h2 { margin: 0; }
.muted { color: var(--muted); }
.challenge-badge { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--gradient); font-size: 17px; }
.challenge-badge .ui-icon { width: 18px; height: 18px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.field label { color: var(--muted); font-size: 10px; font-weight: 700; }
input, select {
  width: 100%;
  min-height: 41px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
  font-size: 11px;
}
input::placeholder { color: #98a2b6; }
input:focus, select:focus { border-color: var(--blue); outline: 2px solid rgba(87,121,245,.12); }
.status-message { min-height: 18px; margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 15px; }
.quick-link {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  transition: transform .2s, border-color .2s;
}
.quick-link:hover { transform: translateY(-3px); border-color: rgba(87,121,245,.5); }
.quick-link .quick-link-icon { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border-radius: 11px; color: #fff; background: var(--gradient); }
.quick-link .quick-link-icon .ui-icon { width: 17px; height: 17px; }
.quick-link span:last-child { margin-left: auto; color: var(--blue); }
.button > .ui-icon { width: 16px; height: 16px; }
.button.secondary > .ui-icon, .button.ghost > .ui-icon { color: var(--blue); }

.page-title-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 12px 0 22px; }
.page-title-row h1 { margin-bottom: 8px; font-size: clamp(34px, 4vw, 48px); }
.catalog-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .7fr) minmax(180px, .7fr); align-items: end; gap: 10px; margin: 18px 0 16px; }
.search-wrap { min-width: 0; position: relative; grid-column: 1 / -1; }
.search-input { min-height: 45px; padding-left: 15px; border-radius: 13px; background: var(--surface); box-shadow: 0 4px 12px rgba(45, 83, 52, .04); }
.search-suggestion { position: absolute; z-index: 7; top: calc(100% + 6px); right: 0; left: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 12px 30px rgba(35, 55, 39, .15); }
.search-suggestion-option { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border: 0; color: var(--ink); background: transparent; text-align: left; }
.search-suggestion-option:hover, .search-suggestion-option:focus-visible { background: var(--surface-raised); }
.search-suggestion-title { overflow: hidden; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.search-suggestion-latin { overflow: hidden; color: var(--muted); font-family: var(--serif); font-size: 10px; font-style: italic; text-overflow: ellipsis; white-space: nowrap; }
.catalog-control, .catalog-sort-label { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.catalog-control select, .catalog-sort-label select { min-height: 40px; width: 100%; border-radius: 12px; background: var(--surface); font-size: 10px; }
.care-filter-disclosure { margin: 0 0 13px; border-bottom: 1px solid var(--line); }
.care-filter-disclosure summary { min-height: 36px; position: relative; display: flex; align-items: center; gap: 8px; padding-left: 28px; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }
.care-filter-disclosure summary::-webkit-details-marker { display: none; }
.care-filter-disclosure summary::before, .care-filter-disclosure summary::after { content: ""; position: absolute; top: 50%; left: 8px; background: var(--blue); transform: translateY(-50%); }
.care-filter-disclosure summary::before { width: 10px; height: 2px; }
.care-filter-disclosure summary::after { width: 2px; height: 10px; left: 12px; }
.care-filter-disclosure[open] summary::after { opacity: 0; }
.care-filter-disclosure summary span { margin-left: auto; font-size: 9px; font-weight: 500; }
.care-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 8px 0 12px; }
.care-filter-label { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.care-filter-label select { min-height: 38px; width: 100%; border-radius: 11px; background: var(--surface); font-size: 10px; }
.catalogue-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.catalog-count { margin: 14px 0 13px; color: var(--muted); font-size: 11px; }
.flower-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.flower-grid[hidden] { display: none; }
.search-empty[hidden] { display: none; }
.search-empty { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 28px 20px; color: var(--muted); text-align: center; animation: search-empty-appear .35s ease both; }
.search-empty strong { color: var(--ink); font-family: var(--serif); font-size: clamp(20px, 3vw, 26px); font-weight: 600; }
.search-empty strong .ui-icon { width: 22px; height: 22px; color: var(--blue); }
.search-empty span { max-width: 360px; font-size: 12px; line-height: 1.6; }
@keyframes search-empty-appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.flower-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 8px 25px rgba(45, 83, 52, .07);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  animation: card-in .38s ease both;
}
.flower-card:hover { transform: translateY(-5px); border-color: rgba(71,122,84,.4); box-shadow: 0 18px 38px rgba(45, 83, 52, .15); }
@keyframes card-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.flower-photo-wrap { height: 205px; position: relative; overflow: hidden; background: linear-gradient(135deg,#e7efe2,#e4f1e8 52%,#f9e7e4); }
.flower-photo { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.flower-card:hover .flower-photo { transform: scale(1.045); }
.flower-photo-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: color-mix(in srgb, var(--blue) 70%, var(--muted)); background: radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--surface) 92%, transparent), transparent 42%), linear-gradient(135deg, var(--surface-raised), var(--surface)); font-size: 10px; font-weight: 700; }
.flower-photo-placeholder[hidden] { display: none; }
.flower-photo-placeholder .ui-icon { width: 38px; height: 38px; }
.flower-photo-wrap::after { position: absolute; inset: 45% 0 0; content: ""; pointer-events: none; background: linear-gradient(0deg,rgba(12,20,36,.34),transparent); }
.flower-tag, .flower-number { position: absolute; z-index: 1; top: 11px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.36); border-radius: 999px; color: white; background: rgba(25,34,56,.45); backdrop-filter: blur(9px); font-size: 9px; font-weight: 700; }
.flower-tag { left: 11px; }
.flower-number { right: 11px; }
.favorite-button {
  width: 38px;
  height: 38px;
  position: absolute;
  z-index: 2;
  top: 48px;
  right: 11px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 50%;
  color: #fff;
  background: rgba(25,34,56,.45);
  backdrop-filter: blur(9px);
}
.favorite-button .ui-icon { width: 19px; height: 19px; }
.favorite-button.is-favorite { color: #d5527a; background: #fff; }
.plant-note-indicator {
  width: 34px;
  height: 34px;
  position: absolute;
  z-index: 2;
  top: 50px;
  right: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  color: #39794c;
  background: rgba(246, 252, 242, .96);
  box-shadow: 0 3px 10px rgba(23, 53, 31, .16);
  backdrop-filter: blur(9px);
}
.plant-note-indicator .ui-icon { width: 17px; height: 17px; }
body.dark-theme .plant-note-indicator { color: #c7efc6; background: rgba(34, 62, 42, .96); }
.photo-credit { max-width: calc(100% - 22px); position: absolute; z-index: 2; bottom: 9px; left: 11px; overflow: hidden; color: #fff; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.photo-credit:hover { text-decoration: underline; }
.flower-info { min-height: 116px; display: flex; flex-direction: column; padding: 14px; }
.flower-card-name { min-width: 0; }
.flower-card-name h3 { overflow: hidden; text-overflow: ellipsis; }
.flower-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.flower-title-row > span { font-size: 20px; }
.flower-latin { margin-top: 4px; color: var(--muted); font-family: var(--serif); font-size: 11px; font-style: italic; }
.taxonomy-line { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.plant-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.plant-tag { padding: 5px 8px; border-radius: 999px; color: #477a54; background: rgba(114,169,130,.12); font-size: 9px; font-weight: 700; }
.microclimate { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.microclimate-chip { min-height: 23px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-raised); font-size: 8px; line-height: 1.2; }
.microclimate-chip > .ui-icon { width: 13px; height: 13px; color: var(--blue); }
.plant-mark { width: 22px; height: 22px; display: block; flex: 0 0 auto; margin-top: 2px; color: var(--blue); }
body.dark-theme .microclimate-chip > .ui-icon, body.dark-theme .plant-mark { color: var(--cyan); }
body.dark-theme .button.secondary { color: var(--ink); border-color: color-mix(in srgb, var(--cyan) 30%, transparent); background: color-mix(in srgb, var(--cyan) 12%, var(--surface)); }
body.dark-theme .button.secondary > .ui-icon, body.dark-theme .button.ghost > .ui-icon { color: var(--cyan); }
.flower-description { display: -webkit-box; overflow: hidden; margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.botanical-meta { margin: 7px 0 0; color: var(--muted); font-size: 9px; }
.flower-card-actions { display: flex; gap: 7px; margin-top: auto; padding-top: 10px; }
.flower-card-actions .button { flex: 1; padding-inline: 8px; }
.collection-card .flower-info { min-height: 112px; }
.collection-toggle { white-space: nowrap; }
.collection-toggle.is-saved { color: #a43f62; background: rgba(191,87,114,.12); }
.collection-no-photo { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); background: var(--surface-raised); font-size: 54px; }
.collection-no-photo .ui-icon { width: 54px; height: 54px; color: var(--blue); }
.taxonomy-details { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 10px; }
.taxonomy-details summary { cursor: pointer; color: var(--blue); font-weight: 750; }
.taxonomy-details .flower-facts { margin-top: 10px; }
.detail-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.detail-action-button { min-width: 0; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface-raised); box-shadow: none; font-size: 11px; font-weight: 750; transition: border-color .2s, background .2s, transform .2s; }
.detail-action-button > span { min-width: 0; }
.favorite-detail-button { white-space: nowrap; }
.care-pdf-button { line-height: 1.35; }
.detail-action-button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); background: color-mix(in srgb, var(--blue) 7%, var(--surface)); box-shadow: none; }
.detail-action-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); outline-offset: 2px; }
.detail-action-button > .ui-icon { width: 17px; height: 17px; flex: 0 0 auto; color: var(--blue); }
.favorite-detail-button.is-favorite { border-color: color-mix(in srgb, #c45173 32%, var(--line)); color: #a43f62; background: color-mix(in srgb, #c45173 9%, var(--surface)); }
.favorite-detail-button.is-favorite > .ui-icon { color: #c45173; fill: color-mix(in srgb, #c45173 20%, transparent); }
.care-pdf-button:disabled { cursor: wait; opacity: .65; transform: none; }
.care-pdf-status { min-height: 1em; margin: 6px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.admin-panel { width: min(420px, calc(100% - 28px)); position: fixed; z-index: 30; top: 82px; right: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface); box-shadow: 0 20px 70px rgba(15,25,48,.25); }
.admin-panel[hidden] { display: none; }
.admin-panel h2 { margin: 7px 35px 8px 0; font-family: var(--serif); font-size: 20px; }
.admin-panel > p { color: var(--muted); font-size: 10px; line-height: 1.55; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-status { min-height: 1em; margin-bottom: 0; }
.care-pdf-sheet { box-sizing: border-box; position: fixed; z-index: -1; top: 0; left: -10000px; width: 720px; min-height: 1018px; padding: 48px; color: #263329; background: #fff; font: 18px/1.65 Arial, sans-serif; }
.care-pdf-sheet > p:first-child { color: #477a54; font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.care-pdf-sheet > img { width: 100%; height: 310px; object-fit: cover; border-radius: 18px; background: #edf5ed; }
.care-pdf-sheet h1 { margin: 26px 0 6px; color: #315f3e; font: 700 38px/1.2 Georgia, serif; }
.care-pdf-sheet > p:nth-of-type(2) { color: #718072; font: italic 18px Georgia, serif; }
.care-pdf-sheet ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; padding: 0; list-style: none; }
.care-pdf-sheet li { padding: 8px 13px; border-radius: 20px; color: #477a54; background: #edf5ed; font-size: 15px; }
.care-pdf-sheet > p { margin: 18px 0; }
.care-pdf-sheet footer, .care-pdf-sheet small { display: block; margin-top: 36px; padding-top: 14px; border-top: 1px solid #dce6dc; color: #718072; font-size: 12px; }
.install-dialog { width: min(420px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 100px rgba(15,25,48,.34); }
.install-dialog::backdrop { background: rgba(18,28,50,.58); backdrop-filter: blur(5px); }
.install-card { position: relative; padding: 28px; }
.install-card h2 { margin: 10px 0; font-family: var(--serif); font-size: 23px; }
.install-instructions { margin: 0 0 17px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-state { grid-column: 1/-1; padding: 42px 20px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; font-size: 13px; }
.catalog-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 24px 0 10px; color: var(--muted); font-size: 11px; }
.catalog-pagination[hidden] { display: none; }
.season-open-button { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.season-intro { max-width: 620px; margin: 0; font-size: 12px; line-height: 1.6; }
.season-tracker { padding: clamp(16px, 3vw, 28px); }
.season-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 180px); align-items: end; gap: 16px; }
.season-month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.season-month {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 700;
}
.season-month small { min-width: 18px; min-height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface-raised); font-size: 9px; }
.season-month.is-selected { border-color: color-mix(in srgb, var(--blue) 48%, var(--line)); color: var(--blue); background: color-mix(in srgb, var(--blue) 9%, var(--surface)); }
.season-month.is-selected small { color: #fff; background: var(--blue); }
.season-year-label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.season-year-label select { min-height: 42px; background: var(--surface); }
.season-summary { margin: 17px 0; padding: 11px 13px; border-radius: 11px; color: var(--blue); background: var(--surface-raised); font-size: 12px; font-weight: 800; }
.season-tracker-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.season-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.season-panel h2 { margin: 0; font-family: var(--sans); font-size: 14px; font-weight: 800; }
.season-panel > p:not(.season-empty) { min-height: 1.4em; margin: 5px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.season-panel input { min-height: 44px; background: var(--surface-raised); font-size: 12px; }
.season-search-results, .season-observation-list { display: grid; gap: 7px; margin-top: 10px; }
.season-search-result, .season-observation { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.season-observation-plant { min-width: 0; min-height: 38px; flex: 1 1 auto; display: flex; align-items: center; padding: 3px 5px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; text-align: left; }
.season-observation-plant > span { min-width: 0; overflow: hidden; font-size: 11px; font-weight: 750; text-overflow: ellipsis; }
.season-observation-plant small { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-family: var(--serif); font-size: 10px; font-style: italic; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.season-add, .season-remove { min-height: 36px; flex: 0 0 auto; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--blue); background: var(--surface-raised); font-size: 10px; font-weight: 750; }
.season-add.is-recorded { border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); }
.season-remove { width: 36px; display: grid; place-items: center; padding: 0; color: var(--muted); }
.season-remove .ui-icon { width: 15px; height: 15px; }
.season-empty { margin: 0; padding: 13px 6px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.season-note { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.feature-layout { display: grid; grid-template-columns: .9fr 1.1fr; align-items: stretch; gap: 16px; }
.picker-card { padding: clamp(20px, 3vw, 32px); }
.botanist-game { width: min(680px, 100%); margin: 0 auto; padding: clamp(18px, 3vw, 30px); }
.botanist-score { margin: 0 0 14px; color: var(--blue); font-size: 12px; font-weight: 800; text-align: center; }
.botanist-photo-wrap { width: min(100%, 520px); aspect-ratio: 4 / 3; overflow: hidden; margin: 0 auto 18px; border-radius: 18px; background: var(--surface-raised); }
.botanist-photo-wrap img { width: 100%; height: 100%; display: block; object-fit: cover; animation: search-empty-appear .35s ease both; }
.botanist-photo-wrap img[hidden] { display: none; }
.botanist-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.botanist-answer { min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--surface); font-size: 12px; font-weight: 700; transition: transform .18s, border-color .18s, background .18s; }
.botanist-answer:not(:disabled):hover { transform: translateY(-2px); border-color: var(--blue); }
.botanist-answer:disabled { cursor: default; }
.botanist-answer.is-correct { border-color: #4e9b69; color: #287243; background: rgba(78,155,105,.13); }
.botanist-answer.is-incorrect { border-color: #cc5c65; color: #a93642; background: rgba(204,92,101,.13); }
.botanist-feedback { min-height: 20px; margin: 13px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.random-pick-card { width: min(900px, 100%); margin: 0 auto; padding: clamp(16px, 3vw, 28px); }
.random-pick-plant { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(18px, 3vw, 32px); align-items: center; margin-bottom: 20px; }
.random-pick-photo { min-height: 260px; position: relative; overflow: hidden; border-radius: 18px; background: var(--surface-raised); }
.random-pick-photo img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.random-pick-photo .flower-tag { position: absolute; top: 12px; left: 12px; }
.random-pick-placeholder { min-height: 260px; display: grid; place-items: center; color: var(--blue); }
.random-pick-placeholder .ui-icon { width: 54px; height: 54px; }
.random-pick-info h2 { margin: 8px 0 4px; font-family: var(--serif); font-size: clamp(26px, 4vw, 38px); }
.random-pick-description { margin: 14px 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.random-pick-info > .button { margin-top: 18px; }
.random-pick-card > #random-pick-again { display: flex; align-items: center; justify-content: center; gap: 8px; margin-inline: auto; }
.recommendation { overflow: hidden; }
.recommendation-cover { height: 300px; overflow: hidden; background: var(--surface-raised); }
.recommendation-cover img { width: 100%; height: 100%; object-fit: cover; }
.recommendation-copy { padding: 20px 23px 24px; }
.recommendation-copy p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.picker-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 15px; }
.picker-fields .field:last-child { grid-column: 1/-1; }
.picker-result { padding: 13px; border-radius: 12px; background: var(--surface-raised); }
.about-banner { padding: clamp(22px, 4vw, 38px); }
.about-banner h2 { font-size: 29px; }
.about-banner p { max-width: 900px; margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.about-banner .project-credit { color: var(--ink); font-weight: 700; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 15px; }
.guide-card { padding: 20px; }
.guide-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 13px; color: #fff; background: var(--gradient); box-shadow: 0 6px 15px color-mix(in srgb, var(--blue) 18%, transparent); }
.guide-icon .ui-icon { width: 20px; height: 20px; }
.guide-card h3 { font-size: 13px; }
.guide-card p { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.site-footer {
  position: relative;
  margin-top: 28px;
  padding: 17px 0 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.footer-brand .brand-mark { flex: 0 0 auto; }
.footer-brand strong { font-size: 15px; letter-spacing: -.02em; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 16px;
}
.footer-links button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  transition: color .18s, transform .18s;
}
.footer-links button:hover { transform: translateX(2px); color: var(--blue); }
.footer-bottom { padding-top: 9px; border-top: 1px solid var(--line); font-size: 9px; }

.floating-companion {
  width: 44px;
  height: 44px;
  position: fixed;
  z-index: 6;
  right: max(24px, calc((100vw - 1340px) / 2));
  bottom: 118px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  color: white;
  background: var(--gradient);
  box-shadow: 0 9px 24px rgba(76,113,229,.26);
  animation: companion-float 3.3s ease-in-out infinite;
}
.floating-companion span { font-size: 22px; }
.floating-companion i { position: absolute; top: -6px; right: -3px; color: #f5a6c0; font-size: 15px; font-style: normal; }
@keyframes companion-float { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-9px) rotate(7deg); } }
.bottom-dock {
  width: min(610px, calc(100% - 28px));
  min-height: var(--dock-h);
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 14px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 23px;
  background: var(--surface-glass);
  box-shadow: 0 14px 45px rgba(31,47,91,.2);
  backdrop-filter: blur(22px) saturate(1.4);
}
.dock-tab {
  min-width: 0;
  flex: 1 1 0;
  min-height: 50px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 5px 3px;
  border: 0;
  border-radius: 15px;
  color: var(--muted);
  background: transparent;
  transition: color .2s, background .2s, transform .2s;
}
.dock-tab:hover { transform: translateY(-2px); color: var(--blue); }
.dock-tab[aria-current="page"] { color: var(--blue); background: rgba(87,121,245,.1); }
.dock-icon { width: 22px; height: 22px; display: grid; place-items: center; }
.dock-icon .ui-icon { width: 19px; height: 19px; }
.dock-label { font-size: 9px; font-weight: 700; line-height: 1.15; text-align: center; }

dialog#flower-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: min(88vh, 900px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(15,25,48,.34);
}
dialog#flower-dialog::backdrop { background: rgba(18,28,50,.58); backdrop-filter: blur(5px); }
.dialog-content { position: relative; padding: 24px; }
.dialog-close { width: 34px; height: 34px; position: absolute; z-index: 2; top: 13px; right: 13px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; color: #fff; background: rgba(22,31,52,.55); }
.detail-photo { width: 100%; max-height: 300px; object-fit: cover; border-radius: 15px; }
.detail-no-photo { min-height: 155px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; border-radius: 15px; color: var(--muted); background: var(--surface-raised); font-size: 11px; text-align: center; }
.detail-no-photo .ui-icon { width: 34px; height: 34px; color: var(--blue); }
.detail-text { color: var(--muted); font-size: 12px; line-height: 1.8; }
.detail-section { margin-top: 18px; }
.detail-section h3 { margin: 0 0 8px; color: var(--ink); font-family: var(--sans); font-size: 13px; font-weight: 800; }
.detail-section .detail-text { margin: 0; }
.plant-notes {
  margin: 18px 0 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-raised);
}
.plant-notes-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--blue); }
.plant-notes-heading .ui-icon { width: 18px; height: 18px; }
.plant-notes-heading h3 { font-size: 13px; }
.plant-note-input {
  width: 100%;
  min-height: 108px;
  display: block;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 12px;
  line-height: 1.6;
}
.plant-note-input::placeholder { color: var(--muted); }
.plant-notes-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.plant-note-status { flex: 1 1 auto; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.plant-notes .plant-note-save { min-height: 38px; flex: 0 0 auto; }
.flower-facts { display: flex; flex-wrap: wrap; gap: 7px; }
.fact-chip { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-raised); font-size: 9px; }
.photo-credit-detail { color: var(--muted); font-size: 10px; line-height: 1.7; }
.photo-credit-detail a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 1000px) {
  .flower-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 600px); }
  .topline { min-height: 31px; font-size: 8px; letter-spacing: .1em; }
  .header-inner { min-height: 63px; flex-wrap: wrap; justify-content: center; gap: 8px; padding-block: 8px; }
  .header-actions { width: 100%; justify-content: flex-end; gap: 5px; }
  .palette-select { width: 92px; min-width: 0; min-height: 40px; padding-inline: 7px; font-size: 10px; }
  .header-actions .icon-button { width: 38px; height: 40px; flex: 0 0 38px; border-radius: 11px; }
  .brand { gap: 6px; font-size: 14px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 18px; }
  .botanist-header-button { min-height: 40px; margin-left: auto; padding-inline: 11px; }
  .main-content { padding-top: 18px; }
  .hero-card { grid-template-columns: 1fr; border-radius: 21px; }
  .hero-copy { padding: 27px 23px; }
  .hero-art { min-height: 245px; }
  .hero-orbit { width: 86px; height: 86px; top: 16px; right: 16px; font-size: 12px; }
  h1 { font-size: clamp(34px, 9vw, 46px); }
  .home-facts { gap: 8px; margin-top: 10px; }
  .home-fact { align-items: flex-start; flex-direction: column; gap: 7px; padding: 12px; }
  .home-fact > .ui-icon { width: 17px; height: 17px; }
  .home-fact strong { font-size: 11px; }
  .home-fact small { font-size: 9px; }
  .feature-layout { grid-template-columns: 1fr; gap: 11px; margin-top: 11px; }
  .home-widget { min-height: auto; padding: 18px; }
  .quick-links { grid-template-columns: 1fr; gap: 8px; }
  .quick-link { min-height: 49px; }
  .page-title-row { align-items: flex-start; flex-direction: column; gap: 10px; margin: 7px 0 15px; }
  .page-title-row h1 { font-size: 37px; }
  .page-title-row > .button { align-self: flex-start; }
  .page-title-row > .season-open-button { width: 100%; }
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .flower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .botanist-answers { gap: 8px; }
  .botanist-answer { min-height: 44px; padding: 9px 8px; font-size: 10px; }
  .flower-photo-wrap { height: auto; aspect-ratio: 4 / 3; }
  .flower-info { min-height: 0; padding: 13px; }
  .flower-info h3 { font-size: 13px; }
  .taxonomy-line { font-size: 8px; }
  .flower-card-actions { margin-top: 10px; }
  .flower-card-actions .button { padding-inline: 9px; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .guide-card { padding: 15px; }
  .recommendation-cover { height: 230px; }
  .bottom-dock { bottom: 9px; min-height: 68px; padding: 6px; border-radius: 20px; }
  .dock-tab { min-height: 52px; padding: 6px 3px; }
  .dock-label { font-size: 9px; }
  .floating-companion { width: 38px; height: 38px; right: 18px; bottom: 91px; }
  .site-footer { margin-top: 24px; }
  .footer-main { align-items: flex-start; flex-direction: column; gap: 8px; }
  .footer-links { justify-content: flex-start; gap: 2px 14px; }
  body { padding-bottom: 98px; }
}
@media (max-width: 420px) {
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .care-filters { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .shell { width: calc(100% - 24px); }
  .header-inner { flex-wrap: wrap; justify-content: center; gap: 7px; padding-block: 8px; }
  .header-actions { width: 100%; justify-content: center; gap: 5px; }
  .botanist-header-button { margin-left: auto; }
  .palette-select { width: 92px; min-height: 40px; padding-inline: 6px; font-size: 10px; }
  .header-actions .icon-button { width: 38px; height: 40px; flex-basis: 38px; }
  .header-actions .ui-icon { width: 18px; height: 18px; }
  .random-pick-plant { grid-template-columns: 1fr; gap: 18px; }
  .random-pick-photo, .random-pick-placeholder { min-height: 0; aspect-ratio: 4 / 3; }
  .season-tracker { padding: 13px; }
  .season-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .season-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .season-month { min-height: 42px; padding-inline: 7px; font-size: 9px; }
  .season-tracker-columns { grid-template-columns: 1fr; gap: 10px; }
  .season-panel { padding: 13px; }
  .main-content { padding-top: 16px; }
  .hero-copy { padding: 23px 18px; }
  .hero-copy p { font-size: 12px; line-height: 1.7; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; min-height: 46px; }
  .home-facts { grid-template-columns: 1fr; }
  .home-fact { align-items: center; flex-direction: row; }
  .home-fact strong { font-size: 12px; }
  .flower-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .flower-photo-wrap { aspect-ratio: 4 / 3; }
  .flower-info { min-height: 0; padding: 15px; }
  .flower-info h3 { font-size: 16px; }
  .flower-description { font-size: 12px; }
  .microclimate-chip { min-height: 30px; padding: 5px 8px; font-size: 10px; }
  .microclimate-chip > .ui-icon { width: 15px; height: 15px; }
  .flower-card-actions .button { min-height: 42px; font-size: 11px; }
  .guide-grid { grid-template-columns: 1fr; gap: 11px; }
  .guide-card { padding: 17px; }
  .guide-card h3 { font-size: 15px; }
  .guide-card p { font-size: 12px; }
  .catalog-control select, .catalog-sort-label select { min-height: 44px; }
  .plant-notes { padding: 12px; }
  .plant-notes-footer { align-items: stretch; flex-direction: column; }
  .plant-notes .plant-note-save { width: 100%; min-height: 44px; }
  .detail-actions { gap: 7px; }
  .detail-action-button { min-height: 44px; gap: 6px; padding-inline: 8px; font-size: 10px; }
  .botanist-game { padding: 14px; }
  .botanist-answers { grid-template-columns: 1fr; }
  .botanist-answer { min-height: 46px; font-size: 12px; }
  .footer-links button { min-height: 36px; }
  input, select { min-height: 44px; font-size: 14px; }
}
@media (max-width: 360px) {
  .header-actions { gap: 3px; }
  .palette-select { width: 76px; min-width: 0; font-size: 9px; }
  .header-actions .icon-button { width: 34px; height: 36px; flex-basis: 34px; }
  .header-actions .ui-icon { width: 17px; height: 17px; }
  .botanist-header-button { width: 34px; min-height: 36px; flex: 0 0 34px; margin-left: auto; padding: 0; }
  .botanist-header-button span { display: none; }
  .bottom-dock { width: calc(100% - 16px); padding-inline: 4px; }
  .dock-label { font-size: 8px; }
}
@media (max-width: 390px) {
  .shell { width: calc(100% - 22px); }
  .flower-photo-wrap { height: auto; aspect-ratio: 4 / 3; }
  .flower-card-actions .button { font-size: 9px; }
  .dock-label { font-size: 7px; }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Keep surfaces calm and let the photography carry the color. */
body.dark-theme {
  --line: rgba(210, 222, 245, .09);
  --surface-glass: rgba(23, 35, 27, .88);
}
.hero-card {
  border-color: var(--line);
  border-radius: 23px;
  box-shadow: 0 18px 48px rgba(25, 42, 82, .1);
}
.surface-card, .flower-card {
  box-shadow: 0 6px 20px rgba(30, 48, 88, .045);
}
.surface-card { border-radius: 16px; }
.flower-card { border-radius: 15px; }
.flower-card { border-radius: 19px; }
.button { border-radius: 10px; box-shadow: 0 5px 14px rgba(81, 116, 231, .15); }
.button:hover { box-shadow: 0 8px 18px rgba(81, 116, 231, .2); }
.button.secondary, .button.ghost { box-shadow: none; }
.quick-link { border-radius: 12px; }
.bottom-dock {
  border-color: var(--line);
  box-shadow: 0 10px 32px rgba(20, 31, 62, .16);
}
.flower-photo-wrap {
  aspect-ratio: 4 / 3;
  height: auto;
  background: linear-gradient(120deg, #e7efe2, #e4f1e8 45%, #f9e7e4);
}
.flower-photo { background: linear-gradient(120deg, #e7efe2, #e4f1e8); }
.flower-grid .flower-card:nth-child(6n + 1) .flower-photo-wrap { background-color: #f4e9de; }
.flower-grid .flower-card:nth-child(6n + 2) .flower-photo-wrap { background-color: #e8efdf; }
.flower-grid .flower-card:nth-child(6n + 3) .flower-photo-wrap { background-color: #f5e6e7; }
@media (max-width: 720px) {
  .flower-photo-wrap { height: auto; }
  .flower-grid { gap: 11px; }
  .flower-info { min-height: 0; padding: 12px; }
}

@media (min-width: 1200px) {
  .flower-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .flower-photo-wrap { aspect-ratio: 4 / 3; height: auto; }
}

@media (hover: none) {
  .flower-card:hover { transform: none; }
  .flower-card:hover .flower-photo { transform: none; }
}

body:not(.dark-theme)[data-palette="lavender"] {
  --bg: #f6f3fa;
  --surface-raised: #f0eaf7;
  --hero-tint: #eee7f6;
  --line: rgba(91, 70, 116, .16);
  --blue: #79619b;
  --cyan: #b59bcf;
  --green: #9b83b7;
  --gradient: linear-gradient(110deg, #79619b, #b18eae);
  --glow-one: rgba(174, 148, 205, .19);
  --glow-two: rgba(219, 190, 214, .2);
  --glow-three: rgba(190, 202, 227, .17);
}
body:not(.dark-theme)[data-palette="rose"] {
  --bg: #fbf4f3;
  --surface-raised: #f8eae8;
  --hero-tint: #f6e8e5;
  --line: rgba(127, 75, 75, .15);
  --blue: #a35f67;
  --cyan: #d39a9c;
  --green: #bc7b79;
  --gradient: linear-gradient(110deg, #a35f67, #d18d88);
  --glow-one: rgba(220, 156, 151, .19);
  --glow-two: rgba(245, 203, 189, .2);
  --glow-three: rgba(207, 182, 204, .15);
}
body:not(.dark-theme)[data-palette="sand"] {
  --bg: #f8f5ed;
  --surface-raised: #f3eee1;
  --hero-tint: #f0eadb;
  --line: rgba(105, 87, 56, .16);
  --blue: #8b7549;
  --cyan: #c2aa78;
  --green: #aa9260;
  --gradient: linear-gradient(110deg, #8b7549, #c1a36d);
  --glow-one: rgba(205, 178, 124, .2);
  --glow-two: rgba(229, 207, 163, .2);
  --glow-three: rgba(215, 188, 169, .15);
}
body.dark-theme[data-palette="lavender"] {
  --bg: #181620;
  --surface: #24212d;
  --surface-raised: #302b3a;
  --surface-glass: rgba(34, 30, 42, .92);
  --line: rgba(204, 184, 224, .15);
  --blue: #b6a0d1;
  --cyan: #c4adda;
  --green: #b6a0d1;
  --gradient: linear-gradient(110deg, #786291, #9879a7);
  --hero-tint: #30283a;
  --glow-one: rgba(126, 94, 158, .24);
  --glow-two: rgba(131, 93, 135, .16);
  --glow-three: rgba(74, 91, 132, .13);
}
body.dark-theme[data-palette="rose"] {
  --bg: #1d171a;
  --surface: #2a2024;
  --surface-raised: #382a2e;
  --surface-glass: rgba(41, 30, 34, .92);
  --line: rgba(229, 176, 174, .15);
  --blue: #e2a2a0;
  --cyan: #e9b2a9;
  --green: #d79791;
  --gradient: linear-gradient(110deg, #a25e68, #ca8584);
  --hero-tint: #382629;
  --glow-one: rgba(154, 76, 84, .24);
  --glow-two: rgba(155, 102, 76, .16);
  --glow-three: rgba(117, 72, 106, .13);
}
body.dark-theme[data-palette="sand"] {
  --bg: #1d1a15;
  --surface: #2a251d;
  --surface-raised: #393225;
  --surface-glass: rgba(41, 36, 27, .92);
  --line: rgba(224, 203, 153, .16);
  --blue: #d2b77e;
  --cyan: #dfc995;
  --green: #c3a871;
  --gradient: linear-gradient(110deg, #887047, #b29863);
  --hero-tint: #342f24;
  --glow-one: rgba(133, 105, 53, .22);
  --glow-two: rgba(127, 94, 51, .15);
  --glow-three: rgba(117, 81, 58, .12);
}

dialog.welcome-dialog {
  width: min(430px, calc(100% - 32px));
  max-height: min(88vh, 620px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 25px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(34, 49, 37, .28);
}
dialog.welcome-dialog::backdrop {
  background: rgba(29, 40, 32, .38);
  backdrop-filter: blur(5px);
}
.welcome-card {
  position: relative;
  padding: 31px clamp(22px, 6vw, 36px) 24px;
  text-align: center;
}
.welcome-close {
  width: 34px;
  height: 34px;
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 21px;
  line-height: 1;
}
.welcome-flower {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 18px;
  color: white;
  background: var(--gradient);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--blue) 22%, transparent);
  font-size: 29px;
}
.welcome-flower .ui-icon { width: 30px; height: 30px; }
.welcome-card .eyebrow { font-size: 9px; }
.welcome-card h2 { margin: 9px 0; font-size: clamp(24px, 6vw, 29px); }
.welcome-description { margin: 0 auto 21px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.welcome-label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 11px; font-weight: 700; text-align: left; }
.welcome-card input { min-height: 46px; margin-bottom: 12px; border-radius: 13px; background: var(--surface-raised); text-align: left; }
.welcome-card .button { min-height: 46px; }
.welcome-note { margin: 12px 0 0; color: var(--muted); font-size: 9px; }
dialog.welcome-dialog[open] { animation: welcome-in .25s ease both; }
@keyframes welcome-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
