:root {
  color-scheme: light;
  --paper: #f3f5ed;
  --surface: #fffdf8;
  --ink: #1c3227;
  --muted: #53675c;
  --green: #285741;
  --green-dark: #173a2d;
  --red: #972f2a;
  --danger: #9b2f2b;
  --gold: #806225;
  --line: #dedfd2;
  --shadow: 0 10px 32px rgba(30, 52, 38, .07);
  --glass-border: #ffffffd9;
  --glass-surface: linear-gradient(145deg, #fffefaeb, #f8faf0b8);
  --glass-shadow: 0 0 0 1px #284b3720, 0 12px 32px #31483912, inset 0 1px 0 #fff;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[v-cloak] { display: none; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  font: 15px/1.65 var(--sans);
  color: var(--ink);
  background:
    radial-gradient(ellipse 54rem 36rem at 0% 9rem, #bfd9c9 0%, transparent 82%),
    radial-gradient(ellipse 49rem 39rem at 100% 23rem, #f0dbb4 0%, transparent 83%),
    radial-gradient(ellipse 55rem 28rem at 30% 56rem, #d4e7dd 0%, transparent 87%),
    var(--paper);
}
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--red); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
::selection { color: white; background: var(--green); }
:focus-visible { outline: 3px solid #926321; outline-offset: 3px; }
.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 300;
  padding: .7rem 1rem;
  color: white;
  background: var(--green-dark);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fffdf8;
  border-bottom: 1px solid #315a3822;
  box-shadow: 0 4px 22px #22352c0c;
}
.nav-inner, .container, .footer-inner {
  width: min(calc(100% - 64px), 1240px);
  margin-inline: auto;
}
.nav-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); flex: 0 0 auto; }
.brand-icon {
  display: block;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 11px;
  box-shadow: 0 5px 13px #173b2b35;
}
.brand-text { display: grid; line-height: 1.35; }
.brand-text strong { font-size: 16px; letter-spacing: .08em; }
.brand-text > span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.nav-links { display: flex; align-items: center; gap: 3px; margin-inline-start: auto; }
.nav-item {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 11px;
  border-radius: 7px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
  transition: background .2s ease, color .2s ease;
}
.nav-item:hover, .nav-item[aria-current="page"] { background: #e9ede2; color: var(--green-dark); }
.nav-item[aria-current="page"] { font-weight: 700; }
.account-link { border: 1px solid var(--line); margin-inline-start: 5px; }
.container { min-height: 56vh; padding: 30px 0 48px; }
main:focus { outline: none; }

.auth-layout {
  position: relative;
  isolation: isolate;
  width: min(100%, 1080px);
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  min-height: 540px;
  margin: clamp(12px, 3vw, 32px) auto;
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  overflow: hidden;
  background: var(--green-dark);
  box-shadow: 0 23px 58px #183a2c32;
}
.auth-visual, .hero-figure {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--green-dark);
  color: #fffdf5;
}
.auth-visual img, .hero-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 37%;
}
.auth-visual::after, .hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #11292396, transparent 38%);
  pointer-events: none;
}
.auth-visual figcaption, .hero-figure figcaption {
  position: absolute;
  bottom: clamp(17px, 2.3vw, 29px);
  right: clamp(17px, 2.3vw, 29px);
  z-index: 1;
  padding: 5px 12px;
  background: #20372e;
  border: 1px solid #ffffff65;
  border-radius: 999px;
  color: #fffdf5;
  font-size: 12px;
  letter-spacing: .05em;
}
.auth-panel {
  position: relative;
  align-self: center;
  min-width: 0;
  padding: clamp(24px, 3.4vw, 44px);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 16px 42px #152c2545, inset 0 1px 0 #fff;
}
.auth-team { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; margin-bottom: 12px; color: #314e3e; font-size: 13px; }
.auth-team strong { color: #842e25; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f3e1d6; }
.auth-title { color: var(--green-dark); font: 700 clamp(30px, 4vw, 45px)/1.2 var(--serif); letter-spacing: .035em; }
.auth-lede { margin: 11px 0 20px; color: var(--muted); font-size: 14px; }
.auth-form { display: grid; gap: 13px; min-width: 0; }
.auth-form .form-item > input { width: 100%; border-radius: 10px; background: #ffffffe0; }
.auth-form .form-item > input:focus { background: white; }
.auth-form .auth-primary {
  width: 100%;
  margin-top: 4px;
  min-height: 46px;
  border-radius: 10px;
  background: linear-gradient(125deg, #316d53, #1c4839);
  box-shadow: 0 5px 12px #1c483935, inset 0 1px 0 #fff3;
}
.auth-form .auth-primary:hover { background: linear-gradient(125deg, #26583f, #14382b); }
.field-hint { color: var(--muted); font-size: 12px; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
.auth-back { justify-self: start; }
.auth-links button:disabled, .auth-back:disabled { opacity: .55; cursor: wait; }
.auth-alert { margin: 10px 0 15px; padding: 8px 11px; border: 1px solid #b3c2a9; border-radius: 7px; background: #edf2e7; color: var(--green-dark); overflow-wrap: anywhere; }
.auth-alert.error { border-color: #d8afa9; background: #faece8; color: var(--danger); }
.auth-loading { display: grid; min-height: 44vh; place-items: center; color: var(--muted); }
.recovery-slip { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 12px; border: 1px dashed #aab6a3; border-radius: 8px; background: #eef1e7; }
.recovery-slip code { flex: 1 1 100%; min-width: 0; color: var(--green-dark); font: 600 14px/1.5 Consolas, monospace; overflow-wrap: anywhere; user-select: all; }

.account-page { max-width: 750px; }
.account-page > .page-title { margin-bottom: 20px; }
.account-page .card h2 { color: var(--green-dark); font: 700 21px/1.3 var(--serif); }
.account-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.account-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.account-details dt { color: var(--muted); font-size: 13px; }
.account-details dd { margin-top: 3px; font-weight: 700; overflow-wrap: anywhere; }
.account-number { font-variant-numeric: tabular-nums; }
.account-help { margin: 10px 0 13px; color: var(--muted); }
.account-form { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; }
.account-form .form-item { flex: 1 1 14rem; max-width: 25rem; }
.account-username-form { margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.account-password-form { max-width: 26rem; margin-top: 14px; }
.account-password-form .btn { justify-self: start; }
.account-action { white-space: nowrap; }
.admin-table-heading { margin-bottom: 14px; }
.admin-table-heading h2 { color: var(--green-dark); font: 700 21px/1.3 var(--serif); }
.herb-efficacy-field { min-width: 0; margin: 0; padding: 4px 0 0; border: 0; }
.herb-efficacy-field legend { margin-bottom: 3px; color: var(--muted); font-size: 13px; font-weight: 600; }
.herb-efficacy-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 1px 8px; max-height: 150px; padding: 6px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; }
.herb-efficacy-options > label { display: flex; align-items: center; gap: 7px; min-height: 31px; padding: 3px; cursor: pointer; }
.herb-efficacy-options input { accent-color: var(--green); margin: 0; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 525px) minmax(0, 1fr);
  min-height: 408px;
  padding: clamp(18px, 3.3vw, 44px);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  background: var(--green-dark);
  box-shadow: 0 18px 40px #173a2d2f;
}
.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3.4vw, 45px);
  border: 1px solid #edf5df85;
  border-radius: 23px;
  color: #fffdf5;
  background: #173a2d;
  box-shadow: 0 14px 34px #10292143, inset 0 1px 0 #fff3;
}
.hero-course {
  margin-bottom: 14px;
  color: #f0dba8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
}
.hero h1 {
  font: 700 clamp(37px, 5.2vw, 68px)/1.12 var(--serif);
  letter-spacing: .06em;
}
.hero-lede { margin-top: 17px; max-width: 36ch; font-size: clamp(15px, 1.4vw, 18px); color: #ebf0e6; }
.hero-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { background: #f6e6bc; color: #273e31; border-radius: 10px; }
.hero-actions .btn:hover { background: #fff2d5; color: #183326; }
.hero-actions .btn.ghost { background: #ffffff12; color: white; border-color: #f4f7e18c; }
.hero-actions .btn.ghost:hover { background: #ffffff18; color: white; }
.hero-actions .btn:focus-visible { outline-color: #ffe3a0; }
.hero-figure img { object-position: center 25%; }
.dashboard { margin-top: 32px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 14px; flex-wrap: wrap; }
.section-heading h2 { font: 700 clamp(21px, 2.4vw, 29px)/1.25 var(--serif); }
.section-heading p, .section-heading a { font-size: 14px; }
.section-heading p { color: var(--muted); }
.section-heading.compact { justify-content: flex-start; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-grid.is-public { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-inline-start: 3px solid var(--green);
  border-radius: 15px;
  padding: 18px 20px;
  box-shadow: var(--glass-shadow);
}
.stat-card:nth-child(2) { border-inline-start-color: #71815a; }
.stat-card:nth-child(3) { border-inline-start-color: #ad823a; }
.stat-card:nth-child(4) { border-inline-start-color: var(--red); }
.stat-card .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-card .num { margin-top: 4px; color: var(--green-dark); font-size: clamp(23px, 3.4vw, 40px); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-card small { color: var(--muted); font-size: 13px; font-weight: 500; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.chart-grid .card { margin: 0; }
.chart-box { height: 280px; width: 100%; min-width: 0; overflow: hidden; }
.chart-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 8px; }
.chart-heading h3 { margin: 0; }
.chart-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chart-controls select { max-width: 100%; }
.chart-geo-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.chart-geo-filters label { min-width: 0; display: grid; gap: 3px; color: var(--muted); font-size: 13px; }
.chart-geo-filters select { width: 100%; }
.chart-hint { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.chart-scroll { max-height: 350px; min-width: 0; overflow: auto; overscroll-behavior: contain; }
.zone-quick-links { margin-top: 4px; }
.chart-list { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.chart-list summary { color: var(--green-dark); font-size: 13px; cursor: pointer; }
.chart-list ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.chart-list button { width: 100%; display: flex; justify-content: space-between; gap: 8px; text-align: start; }
.chart-list button span { color: var(--muted); }

.card {
  min-width: 0;
  margin-bottom: 18px;
  padding: clamp(17px, 2.3vw, 27px);
  border: 1px solid var(--glass-border);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--glass-shadow);
}
.card h3 { font-size: 16px; line-height: 1.4; margin-bottom: 12px; }
.page-title { font: 700 clamp(29px, 4vw, 43px)/1.2 var(--serif); letter-spacing: .04em; margin: 5px 0 9px; }
.page-desc { color: var(--muted); margin-bottom: 21px; max-width: 58rem; }
.btn, .site-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: white;
  background: var(--green);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--green-dark); color: white; }
.btn:active { transform: translateY(1px); }
.btn.ghost, .site-nav-toggle { color: var(--green); background: transparent; border-color: #aeb9aa; }
.btn.ghost:hover, .site-nav-toggle:hover { color: var(--green-dark); background: #edf0e5; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #7c201d; }
.btn.sm { min-height: 36px; padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.text-button { border: 0; padding: 3px 0; background: none; color: var(--green); text-decoration: underline; text-underline-offset: .2em; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 16px; }

input, select, textarea {
  min-width: 0;
  min-height: 43px;
  padding: 8px 11px;
  border: 1px solid #bfc8b9;
  border-radius: 7px;
  color: var(--ink);
  background: #fcfbf5;
}
input::placeholder, textarea::placeholder { color: #617166; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--green); background: white; }
textarea { resize: vertical; min-height: 96px; }
.filter-bar, .search-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.keyword-field { flex: 1 1 14rem; }
.filter-bar select { max-width: 100%; }
.search-row { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-item { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 13px; font-weight: 600; color: var(--muted); }
.req { color: var(--danger); }

.herb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.herb-card, .article-item {
  min-width: 0;
  width: 100%;
  padding: 18px;
  text-align: start;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.herb-card:hover, .article-item:hover { border-color: #84977b; box-shadow: var(--shadow); transform: translateY(-2px); }
.herb-card { display: flex; flex-direction: column; align-items: stretch; overflow: hidden; padding: 0; }
.herb-picture { display: grid; width: 100%; aspect-ratio: 16 / 9; max-height: 230px; overflow: hidden; place-items: center; background: #e9ede2; }
.herb-picture img { width: 100%; height: 100%; object-fit: cover; }
.herb-picture-empty, .herb-detail-no-photo { color: var(--muted); font-size: 13px; }
.herb-card-body { display: block; padding: 14px 17px; }
.herb-card .name, .a-title { display: block; font: 700 20px/1.4 var(--serif); color: var(--green-dark); }
.herb-card .origin, .a-meta { display: block; margin: 6px 0; font-size: 13px; color: var(--muted); }
.herb-card .summary, .a-summary { display: block; margin-bottom: 8px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.herb-card .summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.tag {
  display: inline-block;
  margin: 0 5px 5px 0;
  padding: 2px 9px;
  border-radius: 5px;
  background: #e8efe3;
  color: #31553e;
  font-size: 12px;
}
.tag.gold { background: #f4ead2; color: #6b4e1c; }
.tag.red { background: #f9e6e0; color: #8d2723; }
.article-item + .article-item { margin-top: 9px; }
.tab {
  min-height: 36px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f7f7ef;
  font-size: 14px;
}
.tab:hover, .tab.active { background: #e4ebdf; color: var(--green-dark); border-color: #a3b5a2; }
.tab.active { font-weight: 700; }
.tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px; margin-top: 19px; }
.pager .info, .empty { color: var(--muted); font-size: 14px; }
.empty { padding: 32px 10px; text-align: center; }
.table-wrap, .result-table-wrap { overflow-x: auto; max-width: 100%; }
.result-table-wrap { margin-top: 9px; }
.data { width: 100%; border-collapse: collapse; font-size: 13px; }
.data td, .data th { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.data th { background: #eef1e7; color: var(--green-dark); }
.data tr:hover td { background: #f7f7ef; }
.status-pending { color: #775919; }
.status-approved { color: #275c3b; }
.status-rejected { color: var(--danger); }

.province-name { color: var(--muted); font-size: 14px; margin: 8px 0 10px; }
.tree-zone { border-top: 1px solid var(--line); padding: 9px 0; }
.tree-zone-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.zone-name { border: 0; color: var(--green-dark); background: none; padding: 4px 0; font-weight: 700; }
.zone-name small { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.tree-city { padding: 5px 0 5px 18px; }
.city-name { font-weight: 650; font-size: 14px; }
.tree-counties { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tree-counties button {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 9px;
  background: #f6f7ef;
  color: var(--green);
  font-size: 13px;
}
.tree-counties button:hover { border-color: #a1b198; background: #e9efe2; }
.tree-counties .county-count { margin-left: 5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tree-counties button.is-empty { border-style: dashed; background: var(--surface); }

.chat-box { min-height: 250px; max-height: 480px; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f5f7ee; }
.msg { display: flex; margin-bottom: 10px; }
.msg.user { justify-content: flex-end; }
.bubble { max-width: 85%; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .bubble { background: #e2eee0; color: #234734; }
.chat-details { margin-top: 9px; white-space: normal; }
.chat-details summary { color: var(--green); font-size: 13px; font-weight: 650; cursor: pointer; }
.chat-sources { margin: 8px 0 0; padding-inline-start: 18px; color: var(--muted); font-size: 13px; }
.chat-sources li + li { margin-top: 7px; }
.chat-input { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chat-input input { flex: 1 1 11rem; }

.modal-mask { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: #182a22a6; }
.modal { position: relative; width: min(100%, 720px); max-height: 86vh; overflow: auto; overscroll-behavior: contain; padding: 24px; background: var(--surface); border-radius: 12px; box-shadow: 0 18px 68px #142d2d50; animation: arrive .2s ease both; }
.close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 7px; background: #f7f7ee; color: var(--ink); font-size: 22px; line-height: 1; }
.close:hover { color: var(--danger); background: #f6e3dd; }
.detail-title { padding-right: 38px; font: 700 27px/1.4 var(--serif); color: var(--green-dark); }
.herb-detail-photo { margin: 12px 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #eef0e7; }
.herb-detail-photo img { display: block; width: 100%; max-height: 330px; object-fit: contain; }
.herb-detail-photo figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 7px 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.herb-detail-photo figcaption a { text-decoration: underline; text-underline-offset: 2px; }
.herb-detail-no-photo { margin: 11px 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 15px 0; }
.detail-grid .item { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.detail-grid .item b { display: block; font-size: 12px; color: var(--muted); }
.detail-section, .article-content { margin: 12px 0; line-height: 1.85; overflow-wrap: anywhere; }
.article-content { white-space: pre-wrap; }
.toast { position: fixed; left: 50%; bottom: clamp(18px, 5vh, 44px); transform: translateX(-50%); z-index: 200; width: max-content; max-width: calc(100% - 32px); padding: 10px 18px; color: white; background: var(--green-dark); border-radius: 7px; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.toast.err { background: var(--danger); }

.yau-footer { background: #e6eee4; border-top: 2px solid var(--red); }
.footer-inner { min-height: 108px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; padding: 21px 0; }
.yau-name { color: var(--green-dark); font: 700 23px/1.3 var(--serif); }
.yau-name span { margin-left: 6px; font: 600 10px/1.4 var(--sans); letter-spacing: .12em; }
.yau-motto { font: 700 19px/1.4 var(--serif); letter-spacing: .14em; color: var(--red); }
.yau-meta { margin-top: 4px; color: var(--muted); font-size: 12px; }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media not (prefers-reduced-transparency: reduce) {
    .nav {
      background: #fffdf5d6;
      -webkit-backdrop-filter: blur(18px) saturate(145%);
      backdrop-filter: blur(18px) saturate(145%);
    }
    .auth-visual figcaption, .hero-figure figcaption {
      background: #122d24b8;
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
    }
    .auth-panel {
      background: linear-gradient(144deg, #fffdf5e3, #e9f6ecd1);
      -webkit-backdrop-filter: blur(22px) saturate(140%);
      backdrop-filter: blur(22px) saturate(140%);
    }
    .hero-copy {
      background: linear-gradient(135deg, #163f33f0, #102c23c2);
      -webkit-backdrop-filter: blur(18px) saturate(125%);
      backdrop-filter: blur(18px) saturate(125%);
    }
    .card, .stat-card { background: var(--glass-surface); }
    .dashboard .card, .stat-card {
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
    }
  }
}

.route-view { min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .route-view {
    --page-rise: 14px;
    --page-exit: -6px;
  }
  .page-enter-active {
    transition: opacity .22s ease-out, transform .24s cubic-bezier(.22, .68, .28, 1);
  }
  .page-leave-active {
    pointer-events: none;
    transition: opacity .1s ease-in, transform .1s ease-in;
  }
  .page-enter-from { opacity: 0; transform: translateY(var(--page-rise)); }
  .page-leave-to { opacity: 0; transform: translateY(var(--page-exit)); }
}
@media (max-width: 640px) {
  .route-view { --page-rise: 9px; --page-exit: -4px; }
}
.reveal.in { animation: arrive .32s ease both; }
@keyframes arrive {
  from { opacity: .35; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 940px) {
  .nav-inner, .container, .footer-inner { width: calc(100% - 36px); }
  .hero { min-height: 310px; }
  .herb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nav-inner, .container, .footer-inner { width: calc(100% - 28px); }
  .nav-inner { min-height: 66px; }
  .container { padding-top: 16px; }
  .hero {
    --hero-image-band: clamp(166px, 42vw, 214px);
    grid-template-columns: minmax(0, 1fr);
    padding: var(--hero-image-band) 12px 12px;
    border-radius: 22px;
  }
  .hero-copy { padding: 22px 15px; border-radius: 16px; }
  .hero-course { font-size: 12px; margin-bottom: 10px; }
  .hero h1 { font-size: clamp(35px, 10vw, 50px); }
  .hero-lede { margin-top: 12px; }
  .hero-actions { margin-top: 16px; }
  .hero-figure img { object-position: 77% center; }
  .hero-figure figcaption {
    top: calc(var(--hero-image-band) - 42px);
    right: 12px;
    bottom: auto;
  }
  .dashboard { margin-top: 23px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { padding: 10px 11px; }
  .chart-grid, .herb-grid, .form-grid, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-box { height: 264px; }
  .tree-zone-content { grid-template-columns: minmax(0, 1fr); }
  .modal { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
