/* Compact, type-led directory. Workflow component sizing lives in styles.css. */
:root {
  --paper: #fff;
  --white: #fff;
  --ink: #161616;
  --green: #111;
  --green-hover: #444;
  --muted: #777;
  --border: #dedede;
  --soft: #f5f5f5;
  --lime: #ececec;
  --gold: #666;
  --red: #333;
  --directory-sidebar-width: 180px;
  --directory-font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --directory-text-size: 11px;
  --directory-text-weight: 400;
  --directory-text-leading: 1.55;
  --directory-text-spacing: normal;
  font-family: var(--directory-font-family);
  font-size: 13px;
  line-height: 1.55;
  background: #fff;
  color: #161616;
}
body { background: #fff; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #222;
  outline-offset: 3px;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.site-header {
  position: relative;
  background: #fff;
  border: 0;
  backdrop-filter: none;
}
.header-inner {
  max-width: 1140px;
  min-height: 45px;
  margin: 0 auto;
  padding: 0;
  gap: 22px;
  border-bottom: 1px solid #111;
}
.brand { gap: 9px; font-size: 13px; letter-spacing: -.4px; font-weight: 700; }
.brand-ko { display: inline; font-size: 10px; font-weight: 400; letter-spacing: 0; margin: 0; }
.directory-counts { font-size: 10px; color: #555; white-space: nowrap; }
.main-nav { margin-left: auto; gap: 23px; align-self: center; }
.main-nav a { font-size: 11px; color: #333; padding: 2px 0; gap: 4px; }
.main-nav a.active { color: #111; font-weight: 500; }
.main-nav a.active:after { height: 1px; bottom: 0; }
.main-nav a span { min-width: 0; font-size: 10px; color: #666; }
.header-actions { gap: 22px; margin-left: 0; }
.manage-link { font-size: 11px; color: #333; }
.quote-button { min-height: 0; padding: 0; gap: 5px; border: 0; border-radius: 0; background: transparent; color: #222; font-size: 11px; }
.quote-button:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.quote-button>span:last-child { border: 0; padding: 0; color: #777; font-size: 10px; }
.main-shell { max-width: 1140px; margin: auto; padding: 25px 0 48px; min-height: calc(100vh - 108px); }
.main-shell.directory-page { padding: 0 0 38px; }
.directory-layout { display: grid; grid-template-columns: var(--directory-sidebar-width) minmax(0, 1fr); gap: 24px; min-height: calc(100vh - 145px); }
.sidebar { padding: 5px 12px 24px 0; border-right: 1px solid #111; min-width: 0; }
.category-list { display: flex; flex-direction: column; gap: 0; margin: 0; }
.category-button {
  width: 100%; min-height: 24px; padding: 3px 0; gap: 8px;
  border: 0; border-bottom: 1px solid #222; border-radius: 0;
  font-size: 11px; font-weight: 400; color: #222; background: transparent;
  display: flex; align-items: center; text-align: left;
}
.category-button .count { margin-left: auto; font-size: 11px; color: #222; font-variant-numeric: tabular-nums; }
.category-button.active { background: transparent; color: #000; font-weight: 700; }
.category-button.active .count { color: #111; }
.category-button:hover { background: #f4f4f4; color: #000; }
.search-section { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 22px 0 18px; }
.search-box { padding: 0; gap: 6px; min-height: 29px; border: 0; border-bottom: 1px solid #bbb; border-radius: 0; }
.search-box svg { width: 12px; height: 12px; color: #666; }
.search-box input { font-size: 11px; padding: 6px 0; color: #222; }
.search-box input::placeholder { color: #777; }
.search-box button { font-size: 15px; color: #777; }
.search-box:focus-within { border-color: #111; box-shadow: none; }
.region-select { width: 100%; min-width: 0; max-width: none; min-height: 28px; padding: 2px 0; border: 0; border-bottom: 1px solid #bbb; border-radius: 0; font-size: 11px; color: #555; }
.sidebar-tools { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.sidebar-tools button { font-size: 10px; color: #777; }
#results { min-width: 0; padding-top: 5px; }
.directory-result-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 4px 0 18px; padding-bottom: 7px; border-bottom: 1px solid #111; }
.directory-result-head h2 { font-size: 13px; font-weight: 500; }
.directory-result-head h2 span { font-size: 12px; font-weight: 400; margin-left: 4px; }
.directory-result-head button { font-size: 10px; }
.directory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: stretch; }
.directory-column { min-width: 0; padding: 0 12px; border-right: 1px solid #222; }
.directory-column:first-child { padding-left: 0; }
.directory-column:last-child { border-right: 0; padding-right: 0; }
.directory-grid.is-empty, .directory-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.category-group { break-inside: avoid; display: inline-block; width: 100%; background: transparent; border: 0; border-radius: 0; overflow: visible; margin: 0 0 20px; vertical-align: top; }
.category-group .group-heading { display: flex; justify-content: flex-start; align-items: baseline; gap: 7px; padding: 1px 0 5px; margin-bottom: 4px; border-bottom: 1px solid #111; }
.group-heading h3 { font-size: 12px; font-weight: 500; letter-spacing: -.25px; }
.group-heading .group-count { display: inline; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; font-size: 11px; font-weight: 400; color: #222; background: transparent; }
.farm-row { display: flex; min-height: 22px; align-items: center; padding: 1px 0; gap: 4px; border: 0; }
.farm-row:hover { background: transparent; }
.farm-link { min-width: 0; flex: 1; padding: 0; text-align: left; border: 0; background: transparent; }
.farm-link strong { display: block; font-size: 11px; line-height: 1.55; font-weight: 400; color: #222; }
.farm-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.farm-row-actions { display: flex; align-items: center; gap: 3px; opacity: 0; transition: opacity .12s; }
.farm-row:hover .farm-row-actions, .farm-row:focus-within .farm-row-actions, .farm-row-actions:has([aria-pressed="true"]) { opacity: 1; }
.farm-row .favorite, .farm-info { width: 17px; height: 20px; min-width: 17px; min-height: 20px; border: 0; border-radius: 0; padding: 0; background: none; color: #777; display: grid; place-items: center; }
.farm-row .favorite svg { width: 12px; height: 12px; }
.farm-info { font-size: 13px; }
.favorite[aria-pressed="true"] { color: #111; }
.favorite[aria-pressed="true"] svg { fill: #ddd; }
.group-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; padding: 4px 0 0; background: transparent; }
.group-bottom button { border: 0; background: transparent; padding: 0; color: #888; font-size: 10px; font-weight: 400; }
.group-bottom button:hover { color: #111; text-decoration: underline; text-underline-offset: 3px; }
.site-footer { max-width: 1140px; margin: 0 auto; padding: 14px 0 22px; border-top: 1px solid #ddd; align-items: center; }
.site-footer p { margin: 0; color: #777; font-size: 10px; }
.footer-meta { gap: 20px; font-size: 10px; color: #777; }
.footer-meta .text-button { color: #555; font-size: 10px; }

/* Catalog and management screens share the same quiet, square-edged palette. */
.result-head { margin: 3px 0 17px; gap: 12px; }
.result-head h2 { color: #111; font-size: 14px; font-weight: 500; letter-spacing: -.3px; }
.result-head h2 span { color: #777; font-size: 11px; }
.result-meta { color: #777; font-size: 10px; }
.plants-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px 24px; }
.plant-card { display: flex; flex-direction: column; border: 0; border-top: 1px solid #222; border-radius: 0; overflow: visible; }
.plant-visual { display: block; height: auto; min-height: 0; padding: 0; background: transparent; }
.plant-drawing, .plant-visual .category-label { display: none; }
.plant-card .plant-visual .plant-spec { position: static; display: block; background: transparent; color: #777; border-radius: 0; padding: 7px 0 0; font-size: 10px; }
.plant-body { padding: 4px 0 12px; }
.plant-body h3 { font-size: 13px; font-weight: 500; color: #111; }
.plant-body .latin { color: #777; font-size: 9px; }
.plant-farm { margin-top: 8px; font-size: 10px; color: #666; }
.plant-farm svg { width: 12px; height: 12px; }
.plant-price { padding-top: 11px; border-top: 0; gap: 8px; }
.plant-price strong { font-size: 12px; color: #222; font-weight: 500; }
.plant-price strong small { color: #777; font-size: 9px; }
.plant-price button { font-size: 10px; padding: 4px 7px; min-height: 28px; border-color: #bbb; }
.content-heading { margin: 0 0 25px; }
.content-heading h1 { font-size: 24px; letter-spacing: -.7px; }
.content-heading p, .eyebrow { color: #777; }
.eyebrow { font-size: 9px; letter-spacing: 1px; }
.button { border-radius: 0; color: #222; background: #fff; border: 1px solid #aaa; }
.button:hover { background: #f2f2f2; border-color: #222; }
.button.primary { background: #171717; color: #fff; border-color: #171717; }
.button.primary:hover { background: #444; }
.button.secondary { background: #fff; border-color: #ccc; color: #333; }
.button.secondary:hover { background: #f5f5f5; border-color: #555; }
.text-button { color: #555; }
.farm-detail-head { background: #fff; border: 0; border-top: 1px solid #111; border-bottom: 1px solid #ddd; border-radius: 0; padding: 24px 0; }
.farm-detail-head h1 { font-size: 26px; }
.farm-avatar { background: #f4f4f4; color: #333; border: 1px solid #ccc; border-radius: 0; }
.farm-detail-head p { color: #666; }
.badge, .tag { background: #fff; border-color: #ddd; border-radius: 0; color: #666; }
.data-table-wrap { border-radius: 0; border: 0; border-top: 1px solid #222; border-bottom: 1px solid #bbb; }
.data-table th { color: #555; background: #f7f7f7; }
.data-table td { border-color: #e7e7e7; }
.data-table .latin { color: #777; }
.status, .status.pending, .status.closed { background: #f4f4f4; color: #555; border-radius: 0; }
.subtle-panel { background: #fafafa; border: 1px solid #ddd; border-radius: 0; padding: 20px; }
.subtle-panel p, .small-note, .muted { color: #777; }
.request-card, .stat { border-radius: 0; }
.request-card p, .stat .label, .stat .caption { color: #777; }
.tabs button, .dialog-tabs button { color: #777; }
.tabs button.active, .dialog-tabs button.active { color: #111; border-color: #111; }
.demo-info { background: #f7f7f7; color: #666; border-color: #ddd; border-radius: 0; }
.field input, .field select, .field textarea, .admin-top select { border-radius: 0; color: #222; }
.field label { color: #444; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #555; box-shadow: none; }
dialog { border: 1px solid #999; border-radius: 0; box-shadow: 0 12px 40px #0002; }
dialog::backdrop { background: #0004; }
.dialog-heading h2 { color: #111; font-size: 20px; }
.toast { border-radius: 0; background: #222; color: #fff; }
.empty-state { background: #fff; border-radius: 0; }
.empty-state p { color: #777; }

@media (max-width: 1190px) {
  :root { --directory-sidebar-width: 160px; }
  .header-inner, .main-shell, .site-footer { margin-left: 24px; margin-right: 24px; }
  .header-inner { padding: 0; gap: 20px; }
  .main-shell { padding-left: 0; padding-right: 0; }
  .directory-counts { display: none; }
  .manage-link { display: inline; }
  .directory-layout { gap: 20px; }
  .directory-column { padding-left: 10px; padding-right: 10px; }
  .site-footer { padding-left: 0; padding-right: 0; }
}
@media (max-width: 1000px) {
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .directory-column:nth-child(2n) { border-right: 0; padding-right: 0; }
  .directory-column:nth-child(2n+1) { padding-left: 0; }
  .plants-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .header-inner, .main-shell, .site-footer { margin-left: 16px; margin-right: 16px; }
  .header-inner { min-height: 0; padding: 12px 0 0; gap: 0; flex-wrap: wrap; }
  .brand { font-size: 13px; gap: 8px; }
  .brand-ko { display: inline; font-size: 10px; }
  .header-actions { margin-left: auto; gap: 0; }
  .manage-link { display: none; }
  .quote-button { font-size: 11px; padding: 0; gap: 5px; }
  .main-nav { width: 100%; order: 3; margin: 8px 0 0; height: auto; gap: 22px; align-items: center; }
  .main-nav a { min-height: 34px; font-size: 11px; padding: 4px 0; }
  .main-nav a.mobile-admin { display: flex; }
  .main-nav a.active:after { bottom: 4px; }
  .main-shell { padding-top: 18px; padding-bottom: 28px; min-height: calc(100vh - 145px); }
  .main-shell.directory-page { padding: 0 0 28px; }
  .directory-layout { display: block; min-height: 0; }
  .sidebar { border: 0; border-bottom: 1px solid #111; padding: 10px 0 12px; margin-bottom: 14px; }
  .category-list { flex-direction: row; flex-wrap: wrap; gap: 1px 17px; margin: 0; }
  .category-button { width: auto; min-height: 29px; padding: 3px 0; gap: 5px; font-size: 11px; border: 0; background: none; }
  .category-button.active { background: none; text-decoration: underline; text-underline-offset: 4px; }
  .category-button .count { font-size: 10px; color: #777; }
  .search-section { flex-direction: row; margin: 9px 0 0; gap: 15px; }
  .search-box { flex: 1; min-width: 0; min-height: 32px; }
  .search-box input { font-size: 16px; padding: 4px 0; }
  .region-select { width: 100px; min-height: 32px; font-size: 12px; }
  .sidebar-tools { flex-direction: row; gap: 18px; margin-top: 12px; }
  #results { padding-top: 0; }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .directory-column { padding-left: 12px; padding-right: 12px; }
  .category-group { margin-bottom: 22px; }
  .category-group .group-heading { padding: 2px 0 6px; gap: 7px; }
  .group-heading h3 { font-size: 12px; }
  .farm-row { min-height: 32px; padding: 0; gap: 2px; }
  .farm-link { min-height: 32px; }
  .farm-link strong { font-size: 11px; }
  .farm-row-actions { opacity: 1; gap: 1px; }
  .farm-row .favorite, .farm-info { width: 20px; min-width: 20px; height: 28px; min-height: 28px; }
  .farm-info { display: none; }
  .group-bottom { padding: 4px 0 0; }
  .group-bottom button { min-height: 28px; font-size: 10px; }
  .site-footer { padding-top: 12px; padding-bottom: 20px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-meta { gap: 18px; }
  .footer-meta>span:first-child { display: inline; }
  .result-head h2 { font-size: 14px; }
  .result-meta { display: block; font-size: 10px; }
  .plants-grid { gap: 20px 16px; }
  .plant-card { padding: 0; }
  .plant-visual { height: auto; }
  .plant-body { padding: 4px 0 10px; }
  .plant-body h3 { font-size: 12px; }
  .plant-price { flex-wrap: wrap; gap: 8px; }
  .plant-price button { min-height: 32px; }
  .button { min-height: 36px; }
  .farm-detail-head { padding: 18px 0; }
  .farm-detail-head h1 { font-size: 23px; }
  .dialog-inner { padding: 20px 18px; }
  .dialog-heading h2 { font-size: 19px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .content-heading h1 { font-size: 23px; }
}
@media (max-width: 380px) {
  .header-inner, .main-shell, .site-footer { margin-left: 13px; margin-right: 13px; }
  .header-inner { padding-left: 0; padding-right: 0; }
  .main-shell { padding-left: 0; padding-right: 0; }
  .main-nav { gap: 15px; }
  .main-nav a { font-size: 10px; }
  .brand-ko { display: none; }
  .category-list { gap: 1px 14px; }
  .category-button { font-size: 10px; }
  .search-box input { width: 100%; }
  .region-select { width: 86px; }
  .directory-column { padding-left: 10px; padding-right: 10px; }
  .group-heading h3 { font-size: 11px; }
  .farm-link strong { font-size: 10px; }
  .farm-row .favorite { width: 18px; min-width: 18px; }
  .directory-result-head h2 { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .farm-row-actions { transition: none; }
}
@media print {
  .sidebar, .site-header, .site-footer, .farm-row-actions, .sidebar-tools { display: none !important; }
  .main-shell { margin: 0; min-height: 0; }
  .directory-layout { display: block; min-height: 0; }
}
