/* ============================================================
   FIELD ARCHIVE — editorial layer
   Loaded last. Re-themes existing components (paper / ink /
   hairlines / mono labels) and defines the new archive modules:
   masthead, plate, ledger, story, timeline, index, entries table,
   specimen label, related entries, tools shelf, colophon.
   ============================================================ */

/* ---------- base ---------- */
html { background: var(--color-paper); }
body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-primary);
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
::selection { background: #E4DCC6; }

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-mid);
}
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.rule { border: 0; border-top: 1px solid var(--color-rule); margin: var(--space-xl) 0; }
.rule--strong { border-top-color: var(--color-ink); }

/* Section heads: small mono kicker + serif title on one hairline */
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  color: var(--color-ink);
  margin-bottom: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-ink);
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.section-title .mono { font-weight: 400; }
.section-title.text-center { justify-content: flex-start; text-align: left; }

/* ---------- header ---------- */
.header {
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-ink);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header__inner { height: 56px; }
.header__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--color-ink);
  line-height: 1;
}
.header__nav-link,
.header__nav a { color: var(--color-ink); }
.header__nav-link { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; }
.header__nav-link:hover, .header__nav a:hover, .header__nav a.active { color: var(--color-primary); text-decoration: underline; }
.header__nav-link--cta {
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
}
.header__nav-link--cta:hover { background: var(--color-ink); color: var(--color-paper); text-decoration: none; }
.header__btn, .header__lang {
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  padding: 6px 12px;
}
.header__lang { border-color: var(--color-rule-strong); color: var(--color-mid); }
.header__btn:hover, .header__lang:hover { background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }
.header__hamburger span { background: var(--color-ink); }
.header__user-icon { background: var(--color-ink); color: var(--color-paper); border-radius: var(--radius-sm); }

.header__logo, .header__btn, .header__lang, .header__nav-link { white-space: nowrap; }
/* Mobile header: the primary action (+ 投稿) is visible; login lives in the menu */
.header__contribute { display: none; }
@media (max-width: 767px) {
  .header__actions .header__contribute { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }
  .header__contribute:hover { background: var(--color-green); border-color: var(--color-green); }
  #header-auth-btn { display: none !important; }
}
@media (max-width: 480px) {
  .header__logo { font-size: var(--fs-body); letter-spacing: 0.1em; }
  .header__lang { padding: 5px 8px; font-size: var(--fs-label); }
  .header__btn { padding: 5px 9px; }
  .header__actions { gap: 6px; }
}
.mobile-nav { background: var(--color-paper); top: 56px; border-top: 1px solid var(--color-ink); }
.mobile-nav a { border-bottom: 1px solid var(--color-rule); color: var(--color-ink); border-radius: 0; }
.mobile-nav a:hover, .mobile-nav a:active { background: transparent; color: var(--color-primary); }
@media (min-width: 768px) { .mobile-nav { border-left: 1px solid var(--color-ink); box-shadow: none; } }

/* ---------- buttons / chips / badges ---------- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-width: 1px;
}
.btn--primary { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }
.btn--primary:hover { background: var(--color-primary); border-color: var(--color-primary); box-shadow: none; }
.btn--secondary { background: transparent; border-color: var(--color-ink); color: var(--color-ink); }
.btn--secondary:hover { background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }
.btn--outline { border-color: var(--color-ink); color: var(--color-ink); }
.btn--outline:hover { background: var(--color-ink); color: var(--color-paper); }
.btn--danger { border-color: var(--color-rule-strong); }
.btn--sm { min-height: 40px; }
.header__btn { min-height: 0; }

.chips { gap: 0; border-bottom: 1px solid var(--color-rule); }
.chip {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  background: transparent;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-mid);
}
.chip:hover { color: var(--color-ink); border-color: var(--color-rule-strong); }
.chip.active { background: transparent; color: var(--color-ink); border-bottom-color: var(--color-ink); }
.filter-chips { border-left: 0; padding-left: 0; margin-left: var(--space-md); }
.sort-bar { gap: var(--space-md) var(--space-lg); align-items: flex-end; }

.badge, .badge--inline, .badge--type-sm {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  background: transparent;
  border: 1px solid currentColor;
  line-height: 1.5;
}
.badge--species { color: var(--badge-species-fg); background: transparent; }
.badge--hybrid { color: var(--badge-hybrid-fg); background: transparent; }
.badge--clone { color: var(--badge-clone-fg); background: transparent; }
.badge--seedling { color: var(--badge-seedling-fg); background: transparent; }
.badge--ai { color: var(--badge-ai-fg); background: transparent; border-style: dashed; }
.badge--locked { color: var(--color-mid); background: transparent; }
.badge--species, .badge--hybrid, .badge--clone, .badge--seedling, .badge--ai { border-color: currentColor; }
.genus-stat-chip {
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--color-rule-strong);
  color: var(--color-mid);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.genus-stat-chip--species, .genus-stat-chip--hybrid, .genus-stat-chip--clone { background: transparent; border-color: currentColor; }
.tier-badge { border-radius: var(--radius-sm); font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.06em; }

/* ---------- search ---------- */
.search-bar {
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-sm);
  background: var(--color-paper-2);
  box-shadow: none;
}
.search-bar:focus-within { border-color: var(--color-ink); box-shadow: 0 0 0 3px rgba(47, 93, 74, 0.15); }
.search-bar__input { font-family: var(--font-primary); }
.search-bar__input:focus { outline: none; box-shadow: none; }
.search-bar__btn { background: var(--color-ink); }
.search-bar__btn:hover { background: var(--color-primary); }

/* ---------- cards / rows / tables ---------- */
.card {
  background: var(--color-paper-2);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-sm);
  box-shadow: none;
}
.card:hover { box-shadow: none; }
.card--clickable:hover { transform: none; border-color: var(--color-ink); }
.card-img-container { border-radius: 0; }
.recent-card__placeholder { background: var(--color-paper); }

.cultivar-row { border-bottom: 1px solid var(--color-rule); padding: var(--space-md) var(--space-md); }
.cultivar-row:hover { background: rgba(30, 38, 34, 0.035); }
.cultivar-row__thumb {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  overflow: hidden;
}
.thumb-img { border-radius: 0; }
.thumb-mono {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--color-rule-strong);
  line-height: 1;
}
.cultivar-row__name { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; letter-spacing: 0.01em; margin-bottom: 2px; }
.cultivar-row__meta { font-size: var(--font-size-xs); color: var(--color-mid); gap: var(--space-sm) var(--space-md); }
.cultivar-row__cite { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.04em; color: var(--color-mid); margin-top: 3px; }
.cultivar-row__cite .year { color: var(--color-accent-warm); }

.trust { gap: var(--space-sm); }
.trust__bar { height: 3px; border-radius: 0; background: var(--color-lighter); max-width: 90px; }
.trust__fill { border-radius: 0; }
.trust__label { font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.04em; min-width: 30px; }
.trust--lg .trust__bar { height: 4px; }
.trust--lg .trust__label { font-size: var(--fs-small); }

.pagination { gap: 2px; }
.page-link { border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: var(--fs-label); color: var(--color-mid); }
.page-link.active { background: var(--color-ink); color: var(--color-paper); }

.breadcrumb { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.06em; text-transform: uppercase; }
.breadcrumb a { color: var(--color-mid); }
.breadcrumb a:hover { color: var(--color-ink); }
.breadcrumb__sep { color: var(--color-rule-strong); }

/* genus page tabs */
.genus-tabs { gap: 0; border-bottom: 1px solid var(--color-ink); margin-bottom: var(--space-lg); }
.genus-tab, .genus-tab[data-tab="seedlings"] {
  border: 0; border-bottom: 3px solid transparent; border-radius: 0; margin-bottom: -1px;
  background: transparent; color: var(--color-mid);
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; letter-spacing: 0.02em;
  padding: var(--space-sm) var(--space-md);
}
.genus-tab:hover, .genus-tab[data-tab="seedlings"]:hover { background: transparent; filter: none; color: var(--color-ink); }
.genus-tab.active, .genus-tab[data-tab="seedlings"].active { background: transparent; color: var(--color-ink); border-bottom-color: var(--color-ink); }

/* ---------- detail page ---------- */
.detail-title { font-family: var(--font-display); font-weight: 600; font-size: 2.2rem; line-height: 1.15; letter-spacing: 0.005em; }
#page-cultivar .section-title { font-size: 1.25rem; }
#page-cultivar .origin-card:first-of-type { border-left: 3px solid var(--color-ink); }

.specimen {
  margin: var(--space-md) 0 var(--space-lg);
  border-top: 1px solid var(--color-ink);
  border-bottom: 1px solid var(--color-rule);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.specimen__cell { padding: var(--space-sm) var(--space-md) var(--space-sm) 0; border-right: 1px solid var(--color-rule); }
.specimen__cell:last-child { border-right: 0; }
.specimen__cell + .specimen__cell { padding-left: var(--space-md); }
.specimen__k { display: block; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); margin-bottom: 2px; }
.specimen__v { font-size: var(--font-size-sm); color: var(--color-ink); line-height: 1.5; }
.specimen__v .year { font-family: var(--font-mono); color: var(--color-accent-warm); }
.specimen__v a { text-decoration: underline; }

.origin-card { background: var(--color-paper-2); border: 1px solid var(--color-rule); border-radius: var(--radius-sm); }
.origin-card__rank { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); font-weight: 500; }
.origin-card__body { line-height: 1.9; }
.origin-card__sources, .origin-card__footer { border-top: 1px solid var(--color-rule); }
.origin-card__sources .font-bold { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); font-weight: 500; }
.origin-card__author { color: var(--color-mid); }
.structured-section__title, .structured-field__label { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); }
.structured-fieldset__legend { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; }

.formula-box { border: 1px solid var(--color-rule); border-radius: var(--radius-sm); background: var(--color-paper); }
.formula-parent { border: 0; border-bottom: 1px solid var(--color-ink); border-radius: 0; background: transparent; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; font-weight: 600; text-decoration: none; padding: 2px 4px; }
.formula-parent:hover { background: transparent; color: var(--color-primary); }
.formula-operator { font-family: var(--font-display); font-weight: 400; color: var(--color-mid); }

.gallery__empty-glass { border-radius: var(--radius-sm); background: var(--color-paper-2); border: 1px dashed var(--color-rule-strong); box-shadow: none; }
.gallery__empty-accent { display: none; }
.vote-btn { border-radius: var(--radius-sm); }
.share-menu-popup { border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }

/* related entries */
.related { margin-top: var(--space-2xl); }
.related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-lg); }
.related__group h3 { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); font-weight: 500; margin-bottom: var(--space-sm); padding-bottom: 4px; border-bottom: 1px solid var(--color-rule); }
.related__group ul { list-style: none; margin: 0; padding: 0; }
.related__group li { padding: 5px 0; border-bottom: 1px dotted var(--color-rule); font-size: var(--font-size-sm); display: flex; justify-content: space-between; gap: var(--space-sm); }
.related__group li a { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-body); text-decoration: none; }
.related__group li a:hover { text-decoration: underline; }
.related__group li .mono { font-size: var(--fs-label); white-space: nowrap; }
.related__nav { display: flex; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-xl); padding-top: var(--space-md); border-top: 1px solid var(--color-ink); }
.related__nav a { text-decoration: none; max-width: 48%; }
.related__nav a:hover .related__nav-name { text-decoration: underline; }
.related__nav-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; display: block; }
.related__nav--next { text-align: right; margin-left: auto; }

/* ---------- affiliate → tools shelf ---------- */
.affiliate-section { background: transparent; border: 0; padding: 0; margin-top: var(--space-2xl); }
.affiliate-banner { background: transparent; border-radius: 0; padding: 0; border-top: 1px solid var(--color-ink); padding-top: var(--space-sm); }
.affiliate-banner::before, .affiliate-banner::after { display: none; }
.affiliate-banner__context { justify-content: flex-start; color: var(--color-mid); font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; }
.affiliate-banner__context-icon { display: none; }
.affiliate-banner__title { color: var(--color-ink); font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; text-align: left; margin-bottom: var(--space-md); }
.affiliate-banner__grid { gap: 1px; background: var(--color-rule); border: 1px solid var(--color-rule); }
.affiliate-card { background: var(--color-paper-2); border-radius: 0; padding: 14px 12px 12px; text-align: left; }
.affiliate-card:hover { transform: none; box-shadow: none; background: var(--color-paper); }
.affiliate-card__image { border-radius: 0; background: transparent; mix-blend-mode: multiply; max-width: 100%; height: 96px; }
.affiliate-card__category { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; }
.affiliate-card__name { color: var(--color-ink); font-weight: 600; font-size: var(--fs-small); }
.affiliate-card__badge, .affiliate-card__recommend { background: transparent; color: var(--color-accent-warm); border: 1px solid currentColor; border-radius: var(--radius-sm); font-family: var(--font-mono); letter-spacing: 0.08em; }
.affiliate-card__recommend { top: 8px; left: auto; right: 8px; }
.affiliate-card__shops { justify-content: flex-start; gap: 0; }
.affiliate-card__shop, .affiliate-card__shop--rakuten, .affiliate-card__shop--amazon, .affiliate-card__shop--yahoo {
  background: transparent; color: var(--color-mid); border-radius: 0; padding: 4px 8px 4px 0;
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.06em; text-decoration: underline;
}
.affiliate-card__shop + .affiliate-card__shop { border-left: 1px solid var(--color-rule); padding-left: 8px; }
.affiliate-card__shop:hover { color: var(--color-ink); opacity: 1; }
.affiliate-notice { text-align: left; color: var(--color-mid); }

/* Ad slots: nothing to show yet — keep them out of the reader's way */
.ad-placeholder { display: none; }

/* ---------- footer / colophon ---------- */
.footer { background: transparent; border-top: 1px solid var(--color-ink); margin-top: var(--space-3xl); padding: var(--space-xl) 0 var(--space-2xl); }
.footer__inner { text-align: left; }
.footer__links { justify-content: flex-start; }
.footer__links a { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-mid); }
.footer__copy { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-mid); }

/* ============================================================
   TOP PAGE — archive front
   ============================================================ */
.masthead {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding: var(--space-lg) 0 var(--space-xl);
  border-bottom: 1px solid var(--color-ink);
}
.masthead__kicker { margin-bottom: var(--space-md); }
.masthead__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--color-ink);
  margin: 0 0 var(--space-md);
}
/* Hierarchy: the value statement is the sentence to read; the tagline is the annotation above it */
.masthead__tagline { font-family: var(--font-display); font-size: var(--fs-body); font-weight: 500; letter-spacing: 0.1em; color: var(--color-mid); margin-bottom: var(--space-xs); }
.masthead__desc { color: var(--color-ink); font-size: var(--fs-body); line-height: 1.8; max-width: 560px; }
.masthead__kicker { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); flex-wrap: wrap; }
.masthead__lang { color: var(--color-mid); text-decoration: none; border-bottom: 1px solid var(--color-rule); padding: 6px 0; min-height: 0; }
.masthead__lang:hover { color: var(--color-green); border-color: var(--color-green); }
@media (max-width: 480px) { .masthead__desc { font-size: var(--fs-body); } }
.masthead .search-bar { margin: var(--space-lg) 0 0; max-width: 520px; }
.masthead__meta { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-md); }
.masthead__meta a { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-mid); }
.masthead__meta a:hover { color: var(--color-ink); }

.plate { position: relative; background: #0B0F0D; border: 1px solid var(--color-ink); padding: 12px; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; }
.plate img { max-width: 78%; max-height: 92%; object-fit: contain; filter: saturate(0.75) contrast(1.05); }
.plate::after {
  content: ""; position: absolute; inset: 6px; border: 1px solid rgba(244, 241, 234, 0.25); pointer-events: none;
}
.masthead__plate { margin: 0; max-width: 320px; }
@media (max-width: 899px) {
  .masthead__plate { max-width: 200px; }
  .masthead__title { font-size: clamp(3rem, 16vw, 4.6rem); }
}
.masthead__plate figcaption { margin-top: var(--space-sm); display: flex; justify-content: space-between; gap: var(--space-sm); }
.masthead__plate figcaption i { font-family: var(--font-display); font-style: italic; text-transform: none; letter-spacing: 0; font-size: var(--fs-small); color: var(--color-ink); }

.ledger { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--color-ink); margin: 0; }
.ledger > div { padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
.ledger dt { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); }
.ledger dd { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.2; margin: 2px 0 0; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.ledger dd small { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-mid); margin-left: 4px; font-weight: 400; }

@media (min-width: 900px) {
  .masthead { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 320px); grid-template-rows: auto auto; column-gap: var(--space-3xl); }
  .masthead__main { grid-row: 1 / span 2; }
  .masthead__plate { grid-column: 2; }
  .masthead__ledger { grid-column: 2; }
}

/* story of the day */
.front { display: grid; grid-template-columns: 1fr; gap: var(--space-2xl); margin-top: var(--space-xl); }
@media (min-width: 900px) { .front { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-3xl); } }

.story { border-top: 1px solid var(--color-ink); padding-top: var(--space-sm); }
.story__label { display: flex; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-md); }
.story__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 var(--space-xs); }
.story__title a { text-decoration: none; }
.story__title a:hover { text-decoration: underline; }
.story__cite { margin-bottom: var(--space-md); }
.story__cite .year { color: var(--color-accent-warm); }
.story__body { font-size: var(--font-size-base); line-height: 1.95; color: var(--color-ink); max-width: 62ch; }
.story__body--dropcap::first-letter { font-family: var(--font-display); font-size: 2.2em; line-height: 0.8; float: left; padding: 0.12em 0.12em 0 0; color: var(--color-ink); }
.story__more { display: inline-block; margin-top: var(--space-md); font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--color-ink); padding-bottom: 2px; }
.story__more:hover { color: var(--color-primary); border-color: var(--color-primary); }
/* The photo is shown whole (never cropped), mounted on a paper-2 mat */
.story__figure { margin: 0 0 var(--space-md); border: 1px solid var(--color-rule); background: var(--color-paper-2); aspect-ratio: 4 / 3; overflow: hidden; padding: 10px; }
.story__figure a { display: block; width: 100%; height: 100%; }
.story__figure img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* index (localities / people / types) */
.index { border-top: 1px solid var(--color-ink); padding-top: var(--space-sm); }
.index__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-md); }
.index__head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 0; }
.index__group + .index__group { margin-top: var(--space-lg); }
.index__group h3 { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); font-weight: 500; margin: 0 0 4px; }
.index__list { list-style: none; margin: 0; padding: 0; }
.index__item { border-bottom: 1px dotted var(--color-rule); }
.index__toggle {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-sm);
  background: transparent; border: 0; padding: 7px 0; font: inherit; color: var(--color-ink); cursor: pointer; text-align: left;
}
.index__toggle:hover .index__name { text-decoration: underline; }
.index__name { font-size: var(--font-size-sm); }
.index__count { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--color-accent-warm); font-variant-numeric: tabular-nums; }
.index__sub { display: none; list-style: none; margin: 0 0 var(--space-sm); padding: 0 0 0 var(--space-md); border-left: 1px solid var(--color-rule); }
.index__item.open .index__sub { display: block; }
.index__item.open .index__toggle .index__name { text-decoration: underline; }
.index__sub li { padding: 3px 0; font-size: var(--font-size-sm); }
.index__sub a { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-body); text-decoration: none; }
.index__sub a:hover { text-decoration: underline; }
.index__sub .mono { margin-left: 6px; font-size: var(--fs-label); }

/* timeline */
.timeline { border-top: 1px solid var(--color-ink); padding-top: var(--space-sm); margin-top: var(--space-2xl); }
.timeline__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.timeline__head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; margin: 0; }
.timeline__axis { position: relative; height: 96px; margin: 0 8px; }
.timeline__track { position: absolute; left: 0; right: 0; top: 60px; height: 1px; background: var(--color-ink); }
.timeline__tick { position: absolute; top: 56px; width: 1px; height: 9px; background: var(--color-ink); }
.timeline__tick span { position: absolute; top: 12px; left: 0; transform: translateX(-50%); font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-mid); white-space: nowrap; }
.timeline__tick--minor { height: 5px; top: 58px; background: var(--color-rule-strong); }
.timeline__dot {
  position: absolute; top: 60px; width: 11px; height: 11px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: var(--color-paper); border: 1.5px solid var(--color-ink);
  cursor: pointer; transition: background var(--transition), transform var(--transition);
}
.timeline__dot--1 { top: 46px; }
.timeline__dot--2 { top: 32px; }
.timeline__dot--1::after, .timeline__dot--2::after { content: ""; position: absolute; left: 4px; top: 9px; width: 1px; height: 14px; background: var(--color-rule-strong); }
.timeline__dot--2::after { height: 28px; }
.timeline__dot:hover, .timeline__dot:focus-visible, .timeline__dot.is-hot { background: var(--color-ink); transform: scale(1.25); z-index: 3; }
.timeline__tip {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: var(--color-ink); color: var(--color-paper); padding: 4px 8px; border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.04em; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity var(--transition); z-index: 4;
}
.timeline__tip i { font-family: var(--font-display); font-style: italic; font-size: var(--fs-small); letter-spacing: 0; }
.timeline__dot:hover .timeline__tip, .timeline__dot:focus-visible .timeline__tip, .timeline__dot.is-hot .timeline__tip { opacity: 1; }
.timeline__dot:first-child .timeline__tip { transform: none; left: -6px; }
.timeline__dot:last-child .timeline__tip { transform: none; left: auto; right: -6px; }
.timeline__list { list-style: none; margin: var(--space-xl) 0 0; padding: 0; columns: 1; column-gap: var(--space-2xl); }
@media (min-width: 700px) { .timeline__list { columns: 2; } }
@media (min-width: 1024px) { .timeline__list { columns: 3; } }
.timeline__decade { break-inside: avoid; padding: 6px 0; border-top: 1px solid var(--color-rule); display: grid; grid-template-columns: 56px 1fr; gap: var(--space-sm); }
.timeline__decade > .mono { color: var(--color-accent-warm); padding-top: 3px; }
.timeline__decade a { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-body); text-decoration: none; line-height: 1.5; }
.timeline__decade a:hover { text-decoration: underline; }
.timeline__decade a .num { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--color-mid); margin-left: 6px; }

/* entries ledger */
.ledger-table { width: 100%; border-collapse: collapse; }
.ledger-table th { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); font-weight: 500; text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--color-ink); }
.ledger-table td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--color-rule); vertical-align: middle; font-size: var(--font-size-sm); }
.ledger-table tr[role="link"] { cursor: pointer; }
.ledger-table tr[role="link"]:hover td { background: rgba(30, 38, 34, 0.035); }
.ledger-table tr[role="link"]:hover .ledger-table__name { text-decoration: underline; }
.ledger-table__no { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--color-mid); width: 44px; }
.ledger-table__name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.ledger-table__thumb { width: 36px; height: 36px; object-fit: cover; border: 1px solid var(--color-rule); display: block; }
.ledger-table__year { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--color-accent-warm); white-space: nowrap; }
.ledger-table__meta { color: var(--color-mid); font-size: var(--font-size-xs); }
.ledger-table .trust { justify-content: flex-end; }
.ledger-table th.right, .ledger-table td.right { text-align: right; padding-right: 0; }
@media (max-width: 640px) {
  .ledger-table thead { display: none; }
  .ledger-table tr { display: grid; grid-template-columns: 40px 1fr auto; grid-template-areas: "no name trust" "no meta meta"; column-gap: 8px; row-gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--color-rule); }
  .ledger-table td { display: block; padding: 0; border: 0; }
  .ledger-table__no { grid-area: no; }
  .ledger-table__cell-name { grid-area: name; }
  .ledger-table__cell-meta { grid-area: meta; }
  .ledger-table__cell-trust { grid-area: trust; }
  .ledger-table__cell-type { display: none; }
}

/* seedling notes (reuse existing card render, quieter) */
#seedling-preview-grid .card { padding: 0; }
#seedling-preview-grid .card .font-bold { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }

/* colophon */
.colophon { border-top: 1px solid var(--color-ink); padding-top: var(--space-sm); margin-top: var(--space-2xl); display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }
@media (min-width: 900px) { .colophon { grid-template-columns: 1fr 2fr; gap: var(--space-3xl); } }
.colophon h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; margin: 0; }
.colophon p { color: var(--color-ink); line-height: 1.95; max-width: 64ch; }
.colophon p + p { margin-top: var(--space-md); }
.colophon__actions { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-lg); }
.colophon dl { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--space-md); margin-top: var(--space-lg); font-size: var(--font-size-sm); }
.colophon dt { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); padding-top: 3px; }
.colophon dd { margin: 0; color: var(--color-ink); }

/* small polish */
.empty-state, .loading-text { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-mid); }
.skeleton { background: linear-gradient(90deg, var(--color-lighter) 25%, var(--color-rule) 50%, var(--color-lighter) 75%); background-size: 200% 100%; }
.toast-notification { border-radius: var(--radius-sm); background: var(--color-ink); }
.dialog-clean { border-radius: var(--radius-sm); border: 1px solid var(--color-ink); box-shadow: var(--shadow-lg); }
.about-mission { background: var(--color-ink); border-radius: var(--radius-sm); }
.login-benefits-bg { background: var(--color-paper-2); border-color: var(--color-rule); }
.legal-page h2 { border-left: 0; padding-left: 0; border-top: 1px solid var(--color-rule); padding-top: var(--space-sm); font-family: var(--font-display); font-size: 1.3rem; }
.contact-link { border-radius: var(--radius-sm); }
.contact-link__icon { border-radius: var(--radius-sm); }
.paywall-modal { border-radius: var(--radius-sm); }

/* paywall: legal confirmation block (特商法 12条の6) */
.paywall-modal__legal { border: 1px solid var(--color-rule); border-radius: var(--radius-sm); padding: var(--space-sm) var(--space-md); margin: var(--space-md) 0; text-align: left; color: var(--color-ink); line-height: 1.7; }
.paywall-modal__legal p { margin: 0 0 4px; }
.paywall-modal__legal ul { margin: 0 0 0 1.1em; padding: 0; }
.paywall-modal__legal li { margin: 2px 0; }
.paywall-modal__legal a { text-decoration: underline; }

/* ---------- design-director audit (2026-09-04) ---------- */
/* tap targets stay 44px */
.btn--sm { min-height: 44px; }
.vote-btn, .page-link { min-width: 40px; min-height: 40px; }
/* badges: keep Japanese labels legible */
.badge, .badge--inline, .badge--type-sm { font-size: var(--fs-label); }
/* empty gallery: an "unrecorded" specimen sheet, not a glass card */
.gallery__empty { background: transparent; border-radius: 0; padding: 0; }
.gallery__empty-glass { background: var(--color-paper-2); backdrop-filter: none; -webkit-backdrop-filter: none; border: 1px dashed var(--color-rule-strong); border-radius: var(--radius-sm); padding: 32px 20px; }
.gallery__empty-glass:hover { background: var(--color-paper); border-color: var(--color-ink); }
.gallery__empty-icon { color: var(--color-rule-strong); }
.gallery__empty-text { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); font-weight: 500; }
.gallery__img { background: var(--color-paper); border-radius: 0; }
.gallery__img-full { border-radius: 0; }
/* source tiers: one ink, letter carries the meaning */
.tier-badge { background: var(--color-ink) !important; color: var(--color-paper); }
/* votes */
.vote-btn { border-radius: var(--radius-sm); }
.vote-btn--active { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.vote-btn--active-down { background: transparent; border-color: var(--color-danger); color: var(--color-danger); }
.fav-remove-btn { color: var(--color-ink); background: var(--color-paper-2); border: 1px solid var(--color-rule); border-radius: var(--radius-sm); box-shadow: none; }
/* paywall */
.pricing-card { border-radius: var(--radius-sm); box-shadow: none; border: 1px solid var(--color-rule); }
.pricing-card:hover, .pricing-card.selected, .pricing-card--selected { border-color: var(--color-ink); box-shadow: none; transform: none; }
.paywall-modal__content { border-radius: var(--radius-sm); }
.paywall-modal__icon { display: none; }
/* specimen label: hairlines only between cells, no stray verticals at row ends */
.specimen { gap: 0; }
.specimen__cell { border-right: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule); margin-bottom: -1px; }
.specimen__cell:last-child { border-right: 1px solid var(--color-rule); }
.specimen__cell:nth-child(n) { padding-left: var(--space-md); }
.specimen__cell:first-child { padding-left: 0; }
/* genus sort bar: search on its own line on narrow screens */
@media (max-width: 640px) {
  .sort-bar { flex-direction: column; align-items: stretch; gap: var(--space-sm); }
  .sort-bar .search-bar--inline { max-width: none; }
  .sort-bar .chips { justify-content: flex-start; }
  .filter-chips { margin-left: 0; }
  .btn--ml-auto { margin-left: 0; }
}
/* timeline: on phones the dots overlap — keep the decade list only */
@media (max-width: 480px) {
  .timeline__axis { display: none; }
  .timeline__list { margin-top: var(--space-sm); }
}
/* profile / favorites cards inherit the sheet look */
.profile-avatar { border: 1px solid var(--color-rule); }
.contact-link__icon--instagram { background: var(--color-ink); }
/* text-gray was declared decorative-only; keep body copy readable */
.text-gray, .desc-text, .form-hint, .legal-date, .contact-link__value, .gallery-carousel__counter { color: var(--color-mid); }
/* mono labels that carry Japanese fall back to the body face — give them room */
.mono:lang(ja) { font-size: var(--fs-label); letter-spacing: 0.04em; }
/* seedling notes ledger keeps its own spacing */
#seedling-preview-grid .ledger-table { margin-bottom: var(--space-sm); }

/* ---------- people pages ---------- */
.people__intro { color: var(--color-mid); line-height: 1.9; max-width: 64ch; margin-bottom: var(--space-xl); }
.people__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
@media (min-width: 700px) { .people__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-2xl); } }
.people__group h2 { border-bottom: 1px solid var(--color-ink); padding-bottom: 4px; margin: 0 0 var(--space-sm); font-weight: 500; }
.people__list { list-style: none; margin: 0; padding: 0; }
.people__list li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: 8px 0; border-bottom: 1px dotted var(--color-rule); }
.people__list a { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; text-decoration: none; }
.people__list a:hover { text-decoration: underline; }
.people__list .mono { white-space: nowrap; font-size: var(--fs-label); }
.people__roles { margin: calc(-1 * var(--space-md)) 0 var(--space-lg); }
.people__facts { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: var(--space-2xl); margin-bottom: var(--space-2xl); }
.people__facts-small { font-size: var(--fs-body) !important; font-family: var(--font-primary) !important; padding-top: 6px; }
#page-people .section-title { font-size: 1.25rem; }
.specimen__v a { text-decoration: none; border-bottom: 1px solid var(--color-rule-strong); }
.specimen__v a:hover { border-color: var(--color-ink); }
.specimen__note { margin: calc(-1 * var(--space-sm)) 0 var(--space-lg); color: var(--color-accent-warm); }
.index__group h3 a { color: inherit; text-decoration: none; }
.index__group h3 a:hover { color: var(--color-ink); text-decoration: underline; }

/* ---------- lineage tree ---------- */
.lineage { margin-bottom: var(--space-2xl); }
.lineage__title { margin-bottom: var(--space-md); }
.lineage__row { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: var(--space-sm); }
.lineage__node { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 150px; max-width: 260px; padding: 10px 14px; border: 1px solid var(--color-rule-strong); border-radius: var(--radius-sm); background: var(--color-paper-2); text-decoration: none; color: var(--color-ink); }
a.lineage__node:hover { border-color: var(--color-ink); }
.lineage__node--self { border: 1.5px solid var(--color-ink); background: var(--color-paper); }
.lineage__node--text { border-style: dashed; color: var(--color-mid); }
.lineage__name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.lineage__meta { font-size: var(--fs-label); margin-top: 3px; }
.lineage__sub { font-size: var(--fs-label); color: var(--color-mid); margin-top: 4px; line-height: 1.4; }
.lineage__x { align-self: center; font-family: var(--font-display); font-size: 1.4rem; color: var(--color-mid); padding: 0 4px; }
.lineage__joint { width: 1px; height: 22px; margin: 0 auto; background: var(--color-ink); position: relative; }
.lineage__joint--down::after { content: ""; position: absolute; left: -3px; bottom: -1px; width: 7px; height: 7px; border-right: 1px solid var(--color-ink); border-bottom: 1px solid var(--color-ink); transform: rotate(45deg); }
.lineage__row--children .lineage__node { min-width: 130px; }
@media (max-width: 480px) { .lineage__node { min-width: 0; flex: 1 1 40%; padding: 8px 10px; } .lineage__name { font-size: var(--fs-body); } }

/* self node: parents already drawn above */
.lineage__row--parents + .lineage__joint + .lineage__row .lineage__node--self .lineage__sub { display: none; }

/* ---------- glossary ---------- */
.glossary { margin: 0 0 var(--space-lg); }
.glossary dt { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin-top: var(--space-md); color: var(--color-ink); }
.glossary dd { margin: 4px 0 0; line-height: 1.9; color: var(--color-ink); }
.glossary dd a { text-decoration: underline; }
.legal-page .breadcrumb { margin-bottom: var(--space-md); }

/* ---------- contribution form: name builder ---------- */
.name-builder__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-sm) var(--space-md); }
@media (min-width: 640px) { .name-builder__grid { grid-template-columns: 1fr 1fr; } }
.name-builder [data-for][hidden] { display: none !important; }
.name-builder__result { background: var(--color-paper); font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--color-ink); }
.name-builder__result:read-only { cursor: default; }
.name-builder .species-subcategory { margin: 0 0 var(--space-sm); }
.name-builder .chips { border-bottom: 0; gap: 4px; flex-wrap: wrap; }
.name-builder .chip { border: 1px solid var(--color-rule-strong); border-radius: var(--radius-sm); padding: 5px 10px; margin: 0; text-transform: none; letter-spacing: 0.02em; font-family: var(--font-primary); font-size: var(--fs-small); }
.name-builder .chip.active { background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }

/* glossary term links inside origin text */
a.term { text-decoration: none; border-bottom: 1px dotted var(--color-accent-warm); color: inherit; }
a.term:hover { border-bottom-style: solid; color: var(--color-primary); }
.glossary__hit { color: var(--color-primary); }

/* native dialogs stay centred (reset zeroes margins) */
dialog.dialog-clean { margin: auto; }

/* private (owner-only) records */
.badge--private { color: var(--color-accent-warm); border-color: currentColor; }
.private-toggle { border: 1px solid var(--color-rule); border-radius: var(--radius-sm); padding: var(--space-sm) var(--space-md); background: var(--color-paper); }
.private-toggle .form-radio { margin: 0; }
.private-note { color: var(--color-accent-warm); margin: calc(-1 * var(--space-sm)) 0 var(--space-md); }

/* new-entries ledger + missing parent CTA */
#new-entries-count { color: var(--color-accent-warm); }
.lineage__add { display: inline-block; margin-top: 5px; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--color-accent-warm); color: var(--color-accent-warm); }
.lineage__add:hover { color: var(--color-ink); border-color: var(--color-ink); }
.cultivar-row__state { font-size: var(--fs-label); color: var(--color-mid); }
.footer__lang { margin-top: var(--space-sm); }
.footer__lang .header__lang { border-color: var(--color-rule-strong); color: var(--color-mid); }

/* unified "unrecorded" sheet */
.sheet { border: 1px dashed var(--color-rule-strong); border-radius: var(--radius-sm); background: var(--color-paper-2); padding: var(--space-xl) var(--space-lg); text-align: center; }
.sheet__title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: 0 0 var(--space-xs); color: var(--color-ink); }
.sheet__note { margin: 0 0 var(--space-md); color: var(--color-mid); }
.sheet__cta { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--color-ink); padding-bottom: 2px; }
.sheet__cta:hover { color: var(--color-primary); border-color: var(--color-primary); }

/* mobile: 44px targets on touch devices (M-C) */
@media (pointer: coarse) {
  .chip, .page-link, .index__toggle, .genus-tab, .footer__links a, .header__hamburger, .gallery-carousel__arrow { min-height: 44px; }
  .chip, .page-link { display: inline-flex; align-items: center; }
  .gallery-carousel__arrow { min-width: 44px; }
}
/* M-B: the trust bar is noise on a narrow row — keep the number only */
@media (max-width: 640px) {
  .cultivar-row__meta .trust__bar { display: none; }
  .ledger-table .trust__bar { display: none; }
}
/* timeline axis hidden a bit earlier (design M) */
@media (max-width: 700px) { .timeline__axis { display: none; } }

/* Share menu (PC): one mono row, paper + hairline, no shadow */
.share-menu-popup { background: var(--color-paper); border: 1px solid var(--color-ink); border-radius: 2px; box-shadow: none; padding: 4px 10px; gap: 8px; align-items: center; }
.share-menu__link { font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-ink); text-decoration: none; background: none; border: 0; padding: 6px 2px; min-height: 32px; cursor: pointer; font-family: var(--font-mono); }
.share-menu__link:hover { color: var(--color-green); text-decoration: underline; text-underline-offset: 3px; }
.share-menu__sep { color: var(--color-mid); font-size: var(--fs-label); }

/* ==========================================================================
   Mobile pass (2026-09-06): tighten the phone layout without changing the
   desktop. Measured at 375px before: masthead 889, index 1084, ledger row
   ~100, detail action row 96 (2 lines), tools shelf 1160.
   ========================================================================== */

/* Masthead: plate and ledger stats sit side by side under the title */
@media (max-width: 899px) {
  .masthead {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    grid-template-areas: "main main" "plate ledger";
    column-gap: var(--space-lg);
    row-gap: var(--space-lg);
    align-items: start;
  }
  .masthead__main { grid-area: main; }
  .masthead__plate { grid-area: plate; max-width: none; }
  .masthead__plate figcaption { flex-direction: column; align-items: flex-start; gap: 2px; }
  .masthead__ledger { grid-area: ledger; grid-template-columns: 1fr; border-top: 0; align-self: stretch; }
  .masthead__ledger > div { padding: 5px 0 6px; }
  .masthead__ledger > div:first-child { padding-top: 0; }
  .masthead__ledger dd { font-size: 1.2rem; }
  .masthead__kicker { margin-bottom: var(--space-sm); }
  .masthead .search-bar { margin-top: var(--space-md); }
}

/* Index: two columns of toggles; an opened item takes the full width */
@media (max-width: 899px) {
  .index__list { columns: 2; column-gap: var(--space-lg); }
  .index__item { break-inside: avoid; }
  .index__item.open { column-span: all; }
  .index__group + .index__group { margin-top: var(--space-md); }
}

/* New-entries ledger rows: date | name | type badge / meta | trust */
@media (max-width: 640px) {
  .ledger-table tr {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas: "no name type" "no meta trust";
    align-items: baseline;
    row-gap: 4px;
  }
  .ledger-table__cell-type { display: block; grid-area: type; justify-self: end; }
  .ledger-table__cell-trust { grid-area: trust; justify-self: end; }
  .ledger-table__cell-meta { grid-area: meta; min-width: 0; }
  .ledger-table__name { font-size: var(--fs-body); line-height: 1.3; }
  .ledger-table__meta { font-size: var(--fs-label); line-height: 1.5; }
  .ledger-table__meta .text-xs { margin-top: 2px; }
}

/* Colophon actions: full-width buttons on phones */
@media (max-width: 480px) {
  .colophon__actions { flex-direction: column; gap: var(--space-sm); }
  .colophon__actions .btn { width: 100%; text-align: center; }
}

/* Footer: two tidy columns of mono links */
@media (max-width: 640px) {
  .footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px var(--space-lg); }
  .footer__links a { padding: 2px 0; }
  .footer__lang { margin-top: var(--space-lg); }
}

/* Detail page: the action row becomes one line of mono text actions */
@media (max-width: 640px) {
  #page-cultivar div:has(> #share-btn) { gap: 0 var(--space-md); border-top: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule); padding: 2px 0; margin-top: var(--space-md); }
  #page-cultivar div:has(> #share-btn) .btn {
    border: 0; background: none; padding: 10px 0; min-height: 40px; border-radius: 0;
    font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink);
  }
  #page-cultivar div:has(> #share-btn) .btn:hover { background: none; color: var(--color-green); text-decoration: underline; text-underline-offset: 3px; }
  #page-cultivar div:has(> #share-btn) .text-danger-border { color: var(--color-danger, #8b2e2e); margin-left: auto; }
  #page-cultivar .share-menu-popup { top: 100%; left: 0; }
}

/* Tools shelf on phones: two columns, smaller images */
@media (max-width: 640px) {
  .affiliate-banner__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .affiliate-card { padding: 10px 10px 10px; }
  .affiliate-card__image { height: 72px; }
  .affiliate-banner__title { font-size: 1.1rem; }
}

/* Related entries: let long names wrap without pushing the year off */
@media (max-width: 640px) {
  .related__grid { gap: var(--space-md); }
  .related__group li a { font-size: var(--fs-body); min-width: 0; }
}

/* Genus page on phones: everything shares one left edge (16px), ragged right.
   Search box and add button no longer stretch to the right margin; list rows
   drop the card frame so their text lines up with the headings. */
@media (max-width: 640px) {
  .sort-bar .search-bar--inline { max-width: 280px; align-self: flex-start; width: 100%; }
  .sort-bar .btn { align-self: flex-start; width: auto; }
  #page-genus .card--no-pad { border-left: 0; border-right: 0; border-radius: 0; }
  #page-genus .cultivar-row { padding-left: 0; padding-right: 0; }
  #page-genus .cultivar-row__info { min-width: 0; }
}

/* Contribute form: a type option the chosen genus does not accept stays visible but muted */
.form-radio--disabled { opacity: 0.45; cursor: not-allowed; }
.form-radio--disabled input { cursor: not-allowed; }

/* Genus request link (masthead meta row + contribute form) and dialog input */
.genus-request-link { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-mid); text-decoration: none; border-bottom: 1px solid var(--color-rule); }
.genus-request-link:hover { color: var(--color-green); border-color: var(--color-green); }
#genus-request-dialog .form-input { margin-top: 4px; }
#genus-request-dialog .form-label { display: block; margin-top: var(--space-sm); }

/* ---------- Origin records under the photo: entries on the paper, no cards ---------- */
.record { background: transparent; border: 0; border-top: 1px solid var(--color-ink); border-radius: 0; padding: var(--space-md) 0 var(--space-lg); margin: 0; }
.record + .record { border-top: 1px solid var(--color-rule); }
.record__head { display: flex; align-items: baseline; gap: var(--space-md); flex-wrap: wrap; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); margin-bottom: var(--space-sm); }
.record__rank { color: var(--color-ink); font-weight: 500; }
.record__trust { margin-left: auto; color: var(--color-ink); font-weight: 500; }
.record__trust.trust--low { color: var(--color-danger); }
.record__body { line-height: 1.95; max-width: 68ch; }
.record__body p { margin: 0 0 0.8em; }
.record__body p:last-child { margin-bottom: 0; }
.record__body--fields .structured-section { background: transparent; border: 0; padding: 0; margin: 0 0 var(--space-sm); }
.record__body--fields .structured-fields { gap: 4px var(--space-lg); }
.record__sources { margin-top: var(--space-md); display: flex; flex-wrap: wrap; gap: 4px var(--space-md); align-items: baseline; }
.record__label { font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); }
.record__source a { color: var(--color-mid); text-decoration: underline; text-underline-offset: 3px; font-size: var(--font-size-sm); }
.record__source a:hover { color: var(--color-ink); }
.record__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); margin-top: var(--space-md); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-mid); }
.record .vote-group { display: flex; gap: 6px; }
.record .vote-btn { border: 1px solid var(--color-rule); background: transparent; color: var(--color-mid); padding: 4px 8px; min-height: 32px; min-width: 32px; }
.record .vote-btn:hover { border-color: var(--color-ink); color: var(--color-ink); }
.record .verification-details { margin-top: var(--space-sm); }
.record .verification-toggle { background: none; border: 0; border-bottom: 1px solid var(--color-rule); padding: 4px 0; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); cursor: pointer; }
.record .variation-detail { margin-top: var(--space-sm); padding: var(--space-sm) 0 0; border-top: 1px dotted var(--color-rule); font-size: var(--font-size-sm); }
#page-cultivar .structured-section { background: transparent; border-color: var(--color-rule); }

/* ---------- Individuals of a species ---------- */
.individuals { margin-top: var(--space-2xl); }
.individuals__list { list-style: none; margin: 0 0 var(--space-md); padding: 0; }
.individuals__list li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: 8px 0; border-bottom: 1px dotted var(--color-rule); }
.individuals__list a { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.individuals__list a:hover { text-decoration: underline; }
.individuals__list .mono { font-size: var(--fs-label); white-space: nowrap; }
.individuals__empty { font-size: var(--fs-label); letter-spacing: 0.06em; margin: 0 0 var(--space-md); }
.individuals__add { display: inline-block; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--color-ink); padding: 8px 12px; color: var(--color-ink); min-height: 36px; }
.individuals__add:hover { background: var(--color-ink); color: var(--color-paper); }
.cultivar-row__individuals { font-size: var(--fs-label); letter-spacing: 0.08em; color: var(--color-mid); margin-top: 2px; }
/* compact add form: replaces the full form while the page carries .contribute--individual */
#individual-form { display: none; }
.contribute--individual #individual-form { display: block; }
.contribute--individual .container > .card, .contribute--individual #contribute-submit-btn, .contribute--individual .container > form { display: none !important; }
.individual-form { border-top: 1px solid var(--color-ink); padding-top: var(--space-md); max-width: 560px; }
.individual-form__row { display: flex; gap: var(--space-md); align-items: baseline; margin-bottom: var(--space-md); }
.individual-form__k { font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); }
.individual-form__species { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; font-style: italic; }
.individual-form__preview { font-size: var(--fs-label); margin: 6px 0 0; color: var(--color-mid); min-height: 1em; }
.individual-form__grid { display: grid; grid-template-columns: 1fr 120px; gap: var(--space-md); }
.individual-form__actions { display: flex; gap: var(--space-sm); margin-top: var(--space-md); }

/* ---------- record gate: drafts folded, state labels, sheet on the detail page ---------- */
.record--draft { border-top: 1px solid var(--color-rule); padding: 0; }
.record--draft > summary { list-style: none; cursor: pointer; padding: 12px 0; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); }
.record--draft > summary::-webkit-details-marker { display: none; }
.record--draft > summary:hover { color: var(--color-ink); }
.record--draft[open] > summary { border-bottom: 1px dotted var(--color-rule); }
.record--draft .record__inner { border-top: 0; padding-top: var(--space-md); opacity: 0.85; }
.cultivar-row__state--none, .ledger-table__state { color: var(--color-mid); }
.cultivar-row__state--unrecorded { color: var(--color-accent-warm); }
.sheet--gate { margin: 0 0 var(--space-lg); }
#record-gate.d-none { display: none; }

/* disputed parentage flag on the specimen label; people authority extras */
.specimen__flag { display: block; margin-top: 4px; font-size: var(--fs-label); letter-spacing: 0.08em; color: var(--color-accent-warm); }
.people__abbr { font-size: var(--fs-label); margin-left: 6px; color: var(--color-mid); }
.people__note { color: var(--color-mid); max-width: 64ch; margin: calc(-1 * var(--space-sm)) 0 var(--space-lg); line-height: 1.8; }

/* search-zero sheet: two mono actions */
.sheet__actions { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; }
.sheet__cta--done { color: var(--color-green); border-color: var(--color-green); pointer-events: none; }

/* one-time share band after a registration */
.share-band { border-top: 1px solid var(--color-ink); border-bottom: 1px solid var(--color-rule); padding: var(--space-sm) 0 var(--space-md); margin: var(--space-md) 0; }
.share-band__title { font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-green); margin: 0 0 6px; }
.share-band__text { font-size: var(--font-size-sm); line-height: 1.7; margin: 0 0 8px; color: var(--color-ink); word-break: break-all; }
.share-band__actions { display: flex; gap: var(--space-md); align-items: center; margin: 0; }
.share-band__btn { background: none; border: 0; border-bottom: 1px solid var(--color-ink); padding: 6px 0; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink); cursor: pointer; text-decoration: none; min-height: 32px; }
.share-band__btn:hover { color: var(--color-green); border-color: var(--color-green); }
.share-band__close { margin-left: auto; background: none; border: 0; color: var(--color-mid); font-size: var(--fs-body); cursor: pointer; }

/* ---------- Text size: three steps (every size in this project is rem-based) ---------- */
html[data-textsize="large"] { font-size: 18px; }
html[data-textsize="xlarge"] { font-size: 20.5px; }
/* the plate and the masthead title are viewport-scaled, so give them a nudge too */
html[data-textsize="large"] .masthead__title { font-size: clamp(3.2rem, 9vw, 6.4rem); }
html[data-textsize="xlarge"] .masthead__title { font-size: clamp(3.4rem, 9vw, 6.4rem); }

.textsize { display: flex; align-items: center; gap: 6px; margin-top: var(--space-sm); }
.textsize__label { font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); margin-right: 2px; }
.textsize__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; min-height: 34px; padding: 0 8px;
  border: 1px solid var(--color-rule-strong); border-radius: 2px; background: transparent;
  color: var(--color-mid); font-family: var(--font-display); font-weight: 600; line-height: 1; cursor: pointer;
}
.textsize__btn--1 { font-size: 0.8rem; }
.textsize__btn--2 { font-size: 1rem; }
.textsize__btn--3 { font-size: 1.25rem; }
.textsize__btn:hover { color: var(--color-ink); border-color: var(--color-ink); }
.textsize__btn.is-active { background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* inside the mobile menu the row sits on the paper, not on the dark header */
.textsize--nav { margin: var(--space-sm) 0; }
.textsize--nav .textsize__btn { min-width: 44px; min-height: 44px; }
@media (pointer: coarse) { .textsize__btn { min-width: 40px; min-height: 40px; } }

/* ---------- T27a: detail page reading order ---------- */
.detail-standard { font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-mid); margin: 0 0 6px; }
.detail-badges { display: none !important; }
.detail-head { margin-bottom: var(--space-md); }
.detail-actions { margin: var(--space-md) 0 var(--space-lg); }
#page-cultivar .affiliate-section { display: none; } /* until T34 limits it to species with habitat context */
.plate-policy { font-size: var(--fs-label); letter-spacing: 0.08em; color: var(--color-mid); margin: var(--space-sm) 0 0; }
.sheet--plate { padding: var(--space-lg); text-align: left; }
.gallery__empty { background: transparent; border: 0; padding: 0; }
.record-add { background: none; border: 0; border-bottom: 1px solid var(--color-ink); padding: 8px 0; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-ink); cursor: pointer; min-height: 36px; }
.record-add:hover { color: var(--color-green); border-color: var(--color-green); }
#add-origin-section { border-top: 1px solid var(--color-rule); padding-top: var(--space-sm); }
.record-add__details { margin: var(--space-md) 0; }
.record-add__details > summary { cursor: pointer; list-style: none; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); padding: 6px 0; border-bottom: 1px dotted var(--color-rule); }
.record-add__details > summary::-webkit-details-marker { display: none; }
.record-add__details[open] > summary { color: var(--color-ink); margin-bottom: var(--space-md); }
.related__exit { margin-top: var(--space-lg); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); display: flex; flex-wrap: wrap; gap: 6px 10px; }
.related__exit a { color: var(--color-ink); text-decoration: none; border-bottom: 1px solid var(--color-rule); }
.related__exit a:hover { color: var(--color-green); border-color: var(--color-green); }
.related__exit-sep { color: var(--color-rule-strong); }
.detail-colophon { margin-top: var(--space-2xl); padding-top: var(--space-sm); border-top: 1px solid var(--color-ink); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-mid); }
.detail-colophon a { color: var(--color-ink); text-decoration: none; text-transform: none; letter-spacing: 0.04em; }
.detail-colophon__sep { margin: 0 8px; color: var(--color-rule-strong); }

/* ---------- T46: tools catalogue (/tools/) ---------- */
.tools-lead { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.7; color: var(--color-ink); max-width: 40em; margin: 0 0 var(--space-sm); }
.pr-line { font-size: var(--fs-label); line-height: 1.7; letter-spacing: 0.04em; color: var(--color-mid); border-top: 1px solid var(--color-rule); padding-top: 6px; margin: 0 0 var(--space-lg); max-width: 64em; }
.tools-index { margin-bottom: var(--space-lg); }
.tools-index__code { display: inline-block; min-width: 5.6em; font-size: var(--fs-label); letter-spacing: 0.1em; color: var(--color-mid); }
.tools-index .index__item.is-current .index__name { text-decoration: underline; text-underline-offset: 3px; }
.tools-index .index__item.is-current .tools-index__code { color: var(--color-green); }
.tools-sortbar { margin-bottom: var(--space-md); }
.tools-ledger__name { color: var(--color-ink); text-decoration: none; }
.tools-ledger__summary { font-size: var(--font-size-xs); color: var(--color-mid); margin-top: 2px; line-height: 1.5; }
.ledger-table__genre { font-size: var(--fs-label); letter-spacing: 0.1em; color: var(--color-mid); }
.ledger-table__price { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--color-accent-warm); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- T46: one tool (/tools/<slug>/) ---------- */
.tool-cite { font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-mid); margin: calc(-1 * var(--space-sm)) 0 var(--space-md); }
.tool-head { display: grid; gap: var(--space-lg); margin-bottom: var(--space-lg); }
@media (min-width: 900px) { .tool-head { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: var(--space-xl); } }
.tool-plate { margin: 0; border: 1px solid var(--color-rule); background: var(--color-paper-2); aspect-ratio: 4 / 5; max-width: 340px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-md); position: relative; }
.tool-plate a { display: flex; align-items: center; justify-content: center; width: 100%; flex: 1; min-height: 0; }
.tool-plate img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.tool-plate figcaption { position: absolute; left: 10px; bottom: 8px; font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-mid); }
.tool-plate--none p { font-size: var(--fs-label); letter-spacing: 0.1em; color: var(--color-mid); margin: 0; }
@media (max-width: 899px) { .tool-plate { max-width: none; aspect-ratio: 4 / 3; } }
.tool-section { margin-bottom: var(--space-lg); }
.tool-body { font-size: var(--font-size-md); line-height: 1.9; max-width: 34em; }
.tool-body p { margin: 0 0 1em; }
.tool-species { font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-mid); margin: 0 0 var(--space-lg); }
.tool-species span:first-child { text-transform: uppercase; letter-spacing: 0.1em; margin-right: 6px; }
.tool-species a { color: var(--color-ink); text-decoration: none; border-bottom: 1px solid var(--color-rule); font-family: var(--font-display); font-size: var(--fs-body); letter-spacing: 0; }
.tool-buy { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 var(--space-lg); border-top: 1px solid var(--color-ink); border-bottom: 1px solid var(--color-rule); }
.tool-buy a { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.08em; color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; padding: 0 var(--space-md) 0 0; }
.tool-buy a + a { border-left: 1px solid var(--color-rule); padding-left: var(--space-md); }
.tool-buy a:hover { color: var(--color-green); }
.tool-imp { position: absolute; width: 1px; height: 1px; border: 0; opacity: 0; }
#page-tools .detail-colophon { margin-top: var(--space-lg); }
/* a store thumbnail is small: the frame fits it instead of leaving an empty board */
.tool-plate--store { aspect-ratio: auto; max-width: 260px; padding: var(--space-lg) var(--space-md) calc(var(--space-lg) + 14px); }
@media (max-width: 899px) { .tool-plate--store { aspect-ratio: auto; max-width: none; } }
@media (max-width: 899px) { .tools-index__code { display: block; min-width: 0; margin-bottom: 1px; } .tools-index .index__toggle { align-items: flex-end; } }

/* ---------- Tools catalogue as a shop (owner, 2026-10-02): departments, image cards, store links ---------- */
.shop-search { display: flex; gap: 8px; margin: var(--space-md) 0; }
.shop-search .search-bar__input { flex: 1; min-width: 0; border: 1px solid var(--color-ink); border-radius: 2px; padding: 10px 12px; background: var(--color-paper); font-size: var(--font-size-md); }
.shop-sort { border: 1px solid var(--color-rule-strong); border-radius: 2px; background: var(--color-paper); padding: 0 8px; font-size: var(--font-size-sm); color: var(--color-ink); }
.shop-layout { display: grid; gap: var(--space-lg); }
@media (min-width: 900px) { .shop-layout { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } .shop-depts { position: sticky; top: 80px; } }
.shop-depts__title { font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-mid); margin: 0 0 6px; }
.shop-depts ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-ink); }
.shop-dept { width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "code count" "name count"; align-items: center; gap: 0 8px; padding: 8px 0; background: none; border: 0; border-bottom: 1px solid var(--color-rule); color: var(--color-ink); text-align: left; cursor: pointer; font: inherit; }
.shop-dept__code { grid-area: code; font-size: var(--fs-label); letter-spacing: 0.1em; color: var(--color-mid); }
.shop-dept__name { grid-area: name; font-size: var(--font-size-sm); }
.shop-dept__count { grid-area: count; font-size: var(--fs-label); color: var(--color-accent-warm); }
.shop-dept:hover .shop-dept__name { text-decoration: underline; }
.shop-dept.is-current { border-bottom-color: var(--color-ink); }
.shop-dept.is-current .shop-dept__name { font-weight: 700; }
.shop-dept.is-current .shop-dept__code { color: var(--color-green); }
.shop-dept.is-empty { cursor: default; color: var(--color-mid); }
.shop-dept.is-empty .shop-dept__count { color: var(--color-mid); }
@media (max-width: 899px) {
  .shop-depts ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; border-top: 0; }
  .shop-dept { grid-template-columns: 1fr; grid-template-areas: "code" "name" "count"; min-height: 64px; padding: 8px; border: 1px solid var(--color-rule); border-radius: 2px; align-content: start; }
  .shop-dept.is-current { border-color: var(--color-ink); background: var(--color-paper-2); }
  .shop-dept__name { font-size: var(--fs-small); line-height: 1.35; }
}
.shop-count { font-size: var(--fs-label); letter-spacing: 0.1em; color: var(--color-mid); margin: 0 0 8px; }
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1100px) { .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.shop-card { display: flex; flex-direction: column; border: 1px solid var(--color-rule); border-radius: 2px; background: var(--color-paper); min-width: 0; }
.shop-card:hover { border-color: var(--color-ink); }
.shop-card__img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: var(--color-paper-2); border-bottom: 1px solid var(--color-rule); overflow: hidden; }
.shop-card__img img { width: 88%; height: 88%; object-fit: contain; mix-blend-mode: multiply; }
.shop-card__noimg { font-size: var(--fs-label); letter-spacing: 0.1em; color: var(--color-mid); }
.shop-badge { position: absolute; top: 6px; left: 6px; background: var(--color-green); color: var(--color-paper); font-size: var(--fs-label); letter-spacing: 0.08em; padding: 2px 6px; border-radius: 2px; }
.shop-card__body { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 10px; flex: 1; }
.shop-card__dept { font-size: var(--fs-label); letter-spacing: 0.1em; color: var(--color-mid); margin: 0; }
.shop-card__name { font-family: var(--font-body, inherit); font-size: var(--fs-small); font-weight: 600; line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card__name a { color: var(--color-ink); text-decoration: none; }
.shop-card__name a:hover { text-decoration: underline; }
.shop-card__maker { font-size: var(--fs-label); color: var(--color-mid); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-card__price { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--color-ink); margin: auto 0 0; font-variant-numeric: tabular-nums; }
.shop-card__shops { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 0; }
.shop-card__shops a { flex: 1 1 auto; text-align: center; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.04em; color: var(--color-ink); border: 1px solid var(--color-ink); border-radius: 2px; padding: 6px 4px; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.shop-card__shops a:first-child { background: var(--color-ink); color: var(--color-paper); }
.shop-card__shops a:hover { background: var(--color-green); border-color: var(--color-green); color: var(--color-paper); }
@media (pointer: coarse) { .shop-card__shops a { min-height: 40px; } }
.shop-item { display: grid; gap: var(--space-lg); margin-bottom: var(--space-xl); }
@media (min-width: 900px) { .shop-item { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: var(--space-xl); } }
.shop-item__img { position: relative; margin: 0; aspect-ratio: 1 / 1; max-width: 460px; width: 100%; display: flex; align-items: center; justify-content: center; background: var(--color-paper-2); border: 1px solid var(--color-rule); }
.shop-item__img a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.shop-item__img img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }
.shop-item__summary { font-size: var(--font-size-md); line-height: 1.7; margin: 0 0 var(--space-sm); }
.shop-item__price { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; margin: 0 0 var(--space-sm); font-variant-numeric: tabular-nums; }
.shop-item__price .mono { display: block; font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 400; letter-spacing: 0.06em; color: var(--color-mid); }
.shop-buttons { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.shop-btn { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--color-ink); border-radius: 2px; font-family: var(--font-mono); font-size: var(--fs-small); letter-spacing: 0.06em; color: var(--color-ink); text-decoration: none; background: var(--color-paper); }
.shop-btn--primary { background: var(--color-ink); color: var(--color-paper); }
.shop-btn:hover { background: var(--color-green); border-color: var(--color-green); color: var(--color-paper); }
.shop-credit { font-size: var(--fs-label); color: var(--color-mid); margin: var(--space-sm) 0; }
.shop-credit a { color: var(--color-mid); }
.shop-main .pr-line { margin-top: var(--space-lg); }

/* membership sign-up closed: one notice in the paywall */
.paywall-closed { text-align: left; border-top: 1px solid var(--color-ink); padding-top: var(--space-sm); margin: var(--space-sm) 0; }
.paywall-closed__title { font-size: var(--fs-label); letter-spacing: 0.1em; color: var(--color-accent-warm); margin: 0 0 6px; }
.paywall-closed__text { font-size: var(--font-size-sm); line-height: 1.8; margin: 0 0 var(--space-sm); }

/* T49: menu and footer links rule display:flex/inline, so the hidden state has to win there */
.mobile-nav .d-none, .footer .d-none { display: none !important; }

/* T51: a shared link never shows the top page first; crawler link lists stay off screen */
html[data-boot="deep"] #page-top { display: none !important; }
#static-seo-links { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* a name that is not recorded: only the title and the sheet */
#page-cultivar.is-unrecorded .container > *:not(.breadcrumb):not(.detail-head):not(#detail-unrecorded) { display: none !important; }
#page-cultivar.is-unrecorded .detail-standard { display: none; }
#detail-unrecorded .sheet__actions, #page-notfound .sheet__actions { display: flex; flex-wrap: wrap; gap: 8px 20px; }
#detail-unrecorded .sheet__cta, #page-notfound .sheet__cta { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- T52: cultivar page actions, votes, record head, tap targets ---------- */
.detail-actions { gap: 0 4px; align-items: center; }
.detail-actions > .btn, .detail-more__items .btn, .detail-more__items a.btn {
  background: none; border: 0; border-bottom: 1px solid var(--color-ink); border-radius: 0; padding: 0 2px; margin-right: 14px;
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-ink); min-height: 44px; display: inline-flex; align-items: center;
}
.detail-actions > .btn:hover, .detail-more__items .btn:hover { color: var(--color-green); border-color: var(--color-green); background: none; }
.detail-more { display: inline-block; }
.detail-more > summary { list-style: none; cursor: pointer; font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-mid); min-height: 44px; display: inline-flex; align-items: center; border-bottom: 1px solid var(--color-rule); }
.detail-more > summary::-webkit-details-marker { display: none; }
.detail-more[open] > summary { color: var(--color-ink); }
.detail-more__items { display: flex; flex-wrap: wrap; align-items: center; padding: 4px 0 8px; }
.detail-more__items #detail-delete-request-btn { color: var(--color-accent-warm); border-color: var(--color-accent-warm); }
.vote-btn { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.04em; background: none; border: 0; border-bottom: 1px solid var(--color-rule); border-radius: 0; padding: 0 2px; min-height: 44px; color: var(--color-mid); cursor: pointer; }
.vote-btn svg { display: none; }
.vote-btn__badge { background: none !important; color: inherit !important; border-radius: 0 !important; padding: 0 !important; min-width: 0 !important; font-variant-numeric: tabular-nums; }
.vote-btn--active, .vote-btn--active-down { color: var(--color-ink); border-color: var(--color-ink); }
.record__date { margin-left: auto; color: var(--color-mid); }
.record__head { flex-wrap: wrap; gap: 0 8px; }
.gallery__img { aspect-ratio: 4 / 5; }
.gallery__img-full { width: 100%; height: 100%; object-fit: contain; }
@media (pointer: coarse) {
  /* standalone links only: a row of text (timeline, related lists, names with sp.) keeps its normal flow */
  .related__exit a, .story__more, .record-add, .header__contribute, .header__lang { min-height: 44px; display: inline-flex; align-items: center; }
}
/* votes as words: undo the round icon button */
.vote-btn { width: auto !important; height: auto !important; border-radius: 0 !important; border: 0 !important; border-bottom: 1px solid var(--color-rule) !important; background: none !important; transform: none !important; gap: 4px; }
.vote-btn__badge { position: static !important; top: auto !important; right: auto !important; font-size: inherit !important; line-height: inherit !important; height: auto !important; }
.vote-btn--active, .vote-btn--active-down { border-bottom-color: var(--color-ink) !important; color: var(--color-ink) !important; }
/* specimen label, 2 columns on phones: the left column starts at the edge in every row */
@media (max-width: 640px) { .specimen__cell:nth-child(odd) { padding-left: 0; } .specimen__cell:nth-child(even) { padding-left: var(--space-md); } }

/* ---------- T54: top page first screen (phones first) and the genus list ---------- */
/* the plate image has no confirmed source: not used; the story of the day carries the first photo */
.masthead__plate { display: none !important; }
@media (max-width: 640px) {
  .masthead { gap: var(--space-sm); }
  .masthead__title { font-size: 2.3rem !important; line-height: 1.05; margin: 4px 0; }
  .masthead__title br { display: none; }
  .masthead__tagline { font-size: var(--fs-small); margin: 0 0 4px; }
  .masthead__desc { font-size: var(--fs-body); line-height: 1.6; margin: 0 0 var(--space-sm); }
  .masthead__meta { display: none; }
  /* the four numbers as one mono line */
  .masthead__ledger { display: flex !important; flex-wrap: wrap; gap: 2px 14px; border: 0 !important; padding: 0; margin: 2px 0 0; }
  .masthead__ledger > div { display: flex; align-items: baseline; gap: 4px; border: 0 !important; padding: 0 !important; }
  .masthead__ledger dt { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-mid); }
  .masthead__ledger dd { font-family: var(--font-mono); font-size: var(--fs-small); margin: 0; }
  .masthead__ledger dd small { font-size: var(--fs-label); margin-left: 1px; }
  .front { margin-top: var(--space-md); }
}
/* genus list: the same ruled rows as the ledger, not cards */
.genus-content .card.card--no-pad { background: transparent; border: 0; border-top: 1px solid var(--color-ink); border-radius: 0; box-shadow: none; }
.genus-content .cultivar-row { background: transparent; border: 0; border-bottom: 1px solid var(--color-rule); border-radius: 0; box-shadow: none; padding: 10px 0; }
.genus-content .cultivar-row:hover { background: rgba(30, 38, 34, 0.035); }
.genus-content .cultivar-row__thumb { width: 48px; height: 48px; border-radius: 0; border: 1px solid var(--color-rule); background: var(--color-paper-2); }
.genus-content .cultivar-row__thumb img { object-fit: cover; }
.genus-content .cultivar-row__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.genus-content .sort-bar .search-bar { flex: 1 1 100%; max-width: none; }
.genus-stat-chip { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.06em; background: none !important; border: 0 !important; color: var(--color-mid) !important; padding: 0 10px 0 0 !important; }
.genus-stat-chip + .genus-stat-chip::before { content: '·'; margin-right: 10px; color: var(--color-rule-strong); }
.badge { text-transform: none !important; }

/* T55: pricing summary and the 特商法 notice */
.pricing-summary, .legal-notice { font-family: var(--font-mono); font-size: var(--fs-small); letter-spacing: 0.04em; border-top: 1px solid var(--color-ink); border-bottom: 1px solid var(--color-rule); padding: 8px 0; margin: 0 0 var(--space-lg); }

/* T26: verification */
.specimen__cell--wide { grid-column: 1 / -1; }
.specimen__cell--verify .specimen__v { font-size: var(--fs-label); letter-spacing: 0.02em; }
.verified-mark { margin-left: 4px; color: var(--color-green); font-weight: 700; font-size: var(--fs-small); }

/* T56: names use lining numerals ('HR1' must not read 'HRı'); italics come from sciNameHtml */
h1, h2, h3, .ledger-table__name, .cultivar-row__name, .story__title, .related__nav-name, .index__sub a, .shop-card__name { font-variant-numeric: lining-nums; }
.cultivar-row__name i, .ledger-table__name i, h1 i, .story__title i { font-style: italic; }

/* T57: plain first screen of a stub (before the scripts run). The real pages are hidden behind it on a deep link. */
.static-entry { padding-top: var(--space-lg); padding-bottom: var(--space-xl); }
.static-entry .detail-title { font-family: var(--font-display); font-weight: 600; font-size: 2rem; line-height: 1.15; margin: 0 0 6px; }
.static-entry__cite { font-size: var(--fs-label); letter-spacing: 0.06em; color: var(--color-mid); margin: 0 0 6px; }
.static-entry__aliases { font-size: var(--font-size-sm); color: var(--color-mid); margin: 0 0 var(--space-md); }
.static-entry__plate { margin: 0 0 var(--space-md); border: 1px solid var(--color-rule); background: var(--color-paper-2); aspect-ratio: 4 / 5; max-width: 460px; display: flex; align-items: center; justify-content: center; }
.static-entry__plate img { max-width: 100%; max-height: 100%; object-fit: contain; }
.static-entry__text { font-size: var(--font-size-md); line-height: 1.9; max-width: 36em; }
.static-entry__related { font-size: var(--fs-label); color: var(--color-mid); }
html[data-boot="deep"] #static-entry ~ .page { display: none !important; }

/* ---------- T58: tools catalogue on phones — one item per row, image on the left; outlined 44px store links ---------- */
.shop-card__shops a { min-height: 44px; font-size: var(--fs-label); background: transparent !important; color: var(--color-ink) !important; border: 1px solid var(--color-ink); }
.shop-card__shops a:hover { background: var(--color-ink) !important; color: var(--color-paper) !important; }
.shop-btn--primary { background: transparent; color: var(--color-ink); border-width: 2px; }
.shop-btn--primary:hover { background: var(--color-ink); color: var(--color-paper); }
.tools-lead + .pr-line { margin-top: 0; margin-bottom: var(--space-md); }
@media (max-width: 640px) {
  .shop-grid { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--color-ink); }
  .shop-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); border: 0; border-bottom: 1px solid var(--color-rule); border-radius: 0; padding: 10px 0; gap: 12px; }
  .shop-card__img { aspect-ratio: 1 / 1; border: 1px solid var(--color-rule); align-self: start; }
  .shop-card__body { padding: 0; }
  .shop-card__name { font-size: var(--fs-small); }
  .shop-card__price { font-size: 1.05rem; margin: 2px 0 0; }
  .shop-card__shops a { flex: 0 1 auto; padding: 0 12px; }
}

/* T33: 取扱店 — PR (one line per shop, the whole line is the link) */
.shops { margin-top: var(--space-xl); }
.shops__note { font-size: var(--fs-label); color: var(--color-mid); margin: 0 0 6px; }
.shops__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-ink); }
.shops__list li { border-bottom: 1px solid var(--color-rule); }
.shops__list a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-height: 44px; padding: 10px 0; color: var(--color-ink); text-decoration: none; }
.shops__list a:hover .shops__name { text-decoration: underline; }
.shops__name { font-weight: 600; }
.shops__blurb { font-size: var(--font-size-sm); color: var(--color-mid); }

/* ===== UNIFIED LAYER 2026-10-07 (board 7: one set of rules) =====
   Six text sizes (--fs-*), one job per typeface, one job per colour, three kinds of button,
   four-sided boxes only for the label, the photo mount, inputs, outlined buttons/badges and the
   unrecorded sheet. Everything above is the older layer; this block wins on purpose. */

/* -- type roles: no uppercase anywhere; Japanese words in the sans; mono for figures only -- */
body *:not(.header__logo) { text-transform: none !important; }
.mono { letter-spacing: 0.02em; }
.specimen__k, .badge, .badge--inline, .badge--type-sm, .chip, .genus-tab, .record-add, .story__more, .sheet__cta,
.share-band__btn, .share-band__title, .related__exit, .detail-more > summary, .record-add__details > summary,
.header__nav-link, .header__lang, .header__btn, .footer__links a, .footer__title, .shops__note, .specimen__flag,
.detail-actions > .btn, .detail-more__items .btn, .detail-more__items a.btn {
  font-family: var(--font-primary); letter-spacing: 0.02em;
}

/* -- headings: three steps -- */
.detail-title, .page h1.section-title, h1.section-title, .legal-page h1, .static-entry .detail-title, .profile-name {
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h1); line-height: var(--lh-head); letter-spacing: 0.005em; color: var(--color-ink);
}
#page-cultivar .section-title, #page-people .section-title { font-size: var(--fs-h1); }
h2.section-title, #page-cultivar h2.section-title, #page-people h2.section-title, .legal-page h2, .section-heading,
.index__head h2, .timeline__head h2, .colophon h2, h2.text-lg.font-bold, .story__title {
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h2); line-height: 1.3; color: var(--color-ink);
}
h2.section-title, .legal-page h2, .section-heading, h2.text-lg.font-bold {
  border-left: 0; border-top: 1px solid var(--color-ink); padding: var(--s2) 0 0; margin: var(--s5) 0 var(--s3);
}
.legal-page h1 { letter-spacing: 0.005em; }
.glossary dt, .cultivar-row__name, .genus-content .cultivar-row__name, .ledger-table__name, .related__group li a, .lineage__name,
.related__nav-name, .timeline__decade a, .people__list a, .individuals__list a, .sheet__title, .name-builder__result {
  font-size: var(--fs-h3); line-height: 1.35;
}
@media (max-width: 640px) {
  .masthead__title { font-size: 2.25rem !important; }
  .ledger-table__name { font-size: var(--fs-h3); }
}

/* -- body / small / label -- */
.story__body, .record__body, .glossary dd, .legal-page p, .legal-page li, .people__note, .static-entry__text, .masthead__desc, .tools-lead {
  font-family: var(--font-primary); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--color-ink);
}
.text-sm, .legal-date, .legal-page .legal-date, .shops__blurb, .shop-card__maker, .pricing-summary, .legal-notice,
.specimen__cell--verify .specimen__v, .specimen__v {
  font-size: var(--fs-small);
}
.legal-date, .legal-page .legal-date, .shops__blurb, .shop-card__maker, .legal-notice { color: var(--color-mid); }
.mono, .badge, .badge--inline, .badge--type-sm, .specimen__k, .breadcrumb, .record__head, .ledger-table__meta, .ledger-table__no,
.index__count, .masthead__ledger dt, .masthead__ledger dd, .footer__copy, .genus-stat-chip, .shops__note, .specimen__flag, .pr-line {
  font-size: var(--fs-label);
}
.specimen__k { margin-bottom: var(--s1); }

/* -- colour roles: ink for reading, mid for small/label only, green = "sure", ochre = publication year -- */
.breadcrumb [aria-current], .breadcrumb span:last-child { color: var(--color-mid); }
.index__count, .masthead__ledger dd, .masthead__ledger dd small { color: var(--color-mid); }
.badge, .badge--inline, .badge--type-sm, .badge--species, .badge--hybrid, .badge--clone, .badge--seedling, .badge--ai, .badge--locked, .badge--private {
  color: var(--color-ink); background: transparent; border: 1px solid var(--color-rule-strong); font-weight: 500;
}
.specimen__note, .specimen__flag { color: var(--color-ink); }
.share-band__title { color: var(--color-ink); }
.pr-line { color: var(--color-mid); }

/* -- buttons: primary (one per screen), secondary (outlined), text link, tabs -- */
.btn--primary, .header__actions .header__contribute {
  min-height: var(--tap); font-family: var(--font-primary); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.02em; border-radius: var(--radius-sm);
}
.btn--secondary, .btn--outline, .shop-card__shops a, .textsize__btn, .footer__lang button {
  min-height: var(--tap); font-family: var(--font-primary); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.02em;
}
.header__lang, .header__btn { min-height: var(--tap); font-size: var(--fs-label); }
.header__contribute:hover { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-paper); }
.header__hamburger { min-width: var(--tap); min-height: var(--tap); }

/* text links: real underline, same size everywhere, 44px tall */
.story__more, .record-add, #ledger-all-link, .related__exit a, .sheet__cta, .share-band__btn, .index__group h3 a,
.detail-actions > .btn, .detail-more__items .btn, .detail-more__items a.btn, .detail-more > summary,
#page-cultivar div:has(> #share-btn) .btn {
  font-family: var(--font-primary); font-size: 0.9375rem; font-weight: 500; color: var(--color-ink); background: none;
  border: 0; border-radius: 0; padding: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em;
  min-height: var(--tap); display: inline-flex; align-items: center;
}
.detail-actions > .btn, .detail-more__items .btn, .detail-more__items a.btn, #page-cultivar div:has(> #share-btn) .btn { margin-right: var(--s3); }
.story__more:hover, .record-add:hover, #ledger-all-link:hover, .related__exit a:hover, .sheet__cta:hover, .share-band__btn:hover,
.detail-actions > .btn:hover, .detail-more__items .btn:hover, #page-cultivar div:has(> #share-btn) .btn:hover { color: var(--color-primary); background: none; }
.detail-more > summary { color: var(--color-ink); }
.detail-more__items #detail-delete-request-btn { color: var(--color-danger); }
.related__exit { font-family: var(--font-primary); font-size: var(--fs-small); color: var(--color-mid); gap: 0 var(--s3); }

/* tabs: sans, mid, the active one ink with a 2px underline */
.chip, .genus-tab { font-family: var(--font-primary); font-size: 0.9375rem; letter-spacing: 0.02em; color: var(--color-mid); min-height: var(--tap); }
.chip.active, .genus-tab.active { color: var(--color-ink); border-bottom-color: var(--color-ink); }

/* -- rules and boxes -- */
.index__item { border-bottom-style: solid; border-bottom-color: var(--color-rule); }
.front > .rule--strong + .section-title, .rule--strong + h2.section-title { border-top: 0; }
.genus-content .card--no-pad, .cultivar-row { background: transparent; }
.thumb-mono { color: transparent !important; background: transparent !important; border: 1px dashed var(--color-rule-strong) !important; }

/* -- small screens -- */
@media (max-width: 640px) {
  .specimen { grid-template-columns: 1fr !important; }
  .specimen__cell, .specimen__cell:nth-child(n), .specimen__cell:first-child {
    display: grid; grid-template-columns: 5.5em 1fr; column-gap: var(--s2); align-items: baseline;
    border-right: 0 !important; padding: var(--s2) 0 !important;
  }
  .specimen__k { margin: 0; }
  .mobile-nav a { padding-left: var(--s3) !important; padding-right: var(--s3) !important; }
}

/* -- T62: one list line for every list (new entries, people, places, genus list) -- */
.entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-rule); }
.entry { border-bottom: 1px solid var(--color-rule); }
.entry__link { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s2) 0; color: var(--color-ink); text-decoration: none; }
.entry__link:hover .entry__name, .cultivar-row:hover .entry__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.entry__thumb { flex: 0 0 48px; width: 48px; height: 48px; overflow: hidden; background: var(--color-paper-2); }
.entry__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry__thumb--empty, .genus-content .cultivar-row__thumb.entry__thumb--empty { border: 1px dashed var(--color-rule-strong); background: transparent; }
.entry__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.entry__name, .genus-content .entry__name { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.entry__sub { font-family: var(--font-primary); font-size: var(--fs-small); color: var(--color-mid); line-height: 1.5; font-variant-numeric: lining-nums tabular-nums; }
.entry__sub .year { color: var(--color-accent-warm); font-family: inherit; }
.entry__state { flex: 0 0 auto; margin-left: auto; align-self: flex-start; padding-top: 3px; font-family: var(--font-primary); font-size: var(--fs-small); color: var(--color-mid); text-align: right; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.entry__state--pct { color: var(--color-ink); font-weight: 500; }
.entry__state .verified-mark { color: var(--color-primary); margin: 0; }
.cultivar-row:has(.entry__sub) { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; min-height: 64px; }
.cultivar-row:has(.entry__sub) .cultivar-row__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cultivar-row:has(.entry__sub) .cultivar-row__thumb { flex: 0 0 48px; width: 48px; height: 48px; }

/* -- T63: top page — one stats line, then today's leaf, new entries, index, timeline (folded on phones) -- */
.masthead { grid-template-areas: none !important; grid-template-columns: 1fr !important; border-bottom: 0; padding-bottom: 0; }
.masthead__stats { margin: var(--s3) 0 0; font-family: var(--font-primary); font-size: var(--fs-small); color: var(--color-mid); font-variant-numeric: lining-nums tabular-nums; }
.masthead__stats .num { color: var(--color-ink); font-weight: 500; }
.front-new { margin-top: var(--s5); }
.front-new .section-title { margin-top: 0; }
.front-new__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s3); margin: var(--s2) 0 0; font-size: var(--fs-small); color: var(--color-mid); }
.front-new__foot #ledger-all-link { margin-left: auto; }
.timeline__fold > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: var(--tap); font-size: 0.9375rem; font-weight: 500; color: var(--color-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.timeline__fold > summary::-webkit-details-marker { display: none; }
.timeline__fold[open] > summary { display: none; }
.timeline__decade .mono, .timeline__decade .num { color: var(--color-mid); }
.timeline__decade > .mono { color: var(--color-accent-warm); }
@media (max-width: 899px) {
  /* phones: today's leaf → new entries → index → timeline → about */
  #page-top > .container { display: flex; flex-direction: column; }
  #page-top .front { display: contents; }
  #page-top .masthead { order: 0; }
  #page-top .story { order: 1; margin-top: var(--s4); }
  #page-top .front-new { order: 2; }
  #page-top .index { order: 3; margin-top: var(--s5); }
  #page-top .timeline { order: 4; }
  #page-top .colophon { order: 5; }
}
.front-new__foot #new-entries-count { color: var(--color-mid); }
.masthead { padding-top: var(--s4); }

/* -- T64: plant page — one entrance to add a record (the action row), record head in the sans -- */
#add-origin-toggle { display: none !important; }
.record__head { font-family: var(--font-primary); font-size: var(--fs-small); color: var(--color-mid); letter-spacing: 0.02em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); }
.record__head .record__trust { color: var(--color-ink); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.record__head .record__rank { color: var(--color-ink); font-weight: 600; }
.detail-standard { font-family: var(--font-primary); font-size: var(--fs-small); color: var(--color-mid); letter-spacing: 0.02em; margin-bottom: var(--s1); }
.specimen__cell--verify .verified-mark { color: var(--color-primary); }
.specimen__note { font-size: var(--fs-small); margin-top: var(--s2); }
.lineage__title { font-family: var(--font-primary); font-size: var(--fs-small); color: var(--color-mid); font-weight: 500; }
.lineage__meta { font-family: var(--font-primary); font-size: var(--fs-label); color: var(--color-mid); }
.related__group li .num { margin-left: var(--s2); color: var(--color-mid); font-size: var(--fs-label); }
.plate-policy { font-family: var(--font-primary); font-size: var(--fs-label); }

/* -- T65: genus list header — lead, one count line, one tab row, two selects, add as a text link -- */
.genus-lead { font-size: var(--fs-small); color: var(--color-mid); margin: 0 0 var(--s2); max-width: 36em; }
.genus-stats { margin: 0 0 var(--s3); }
.genus-stats__chips { display: flex; flex-wrap: wrap; gap: 0 var(--s2); }
.genus-stat-chip, .genus-stat-chip--species, .genus-stat-chip--hybrid, .genus-stat-chip--clone { font-family: var(--font-primary) !important; font-size: var(--fs-small) !important; color: var(--color-mid) !important; border: 0 !important; padding: 0 !important; background: none !important; letter-spacing: 0.02em; }
.genus-stat-chip b { color: var(--color-ink); font-weight: 600; }
.genus-stat-chip + .genus-stat-chip::before { content: '·'; margin-right: var(--s2); color: var(--color-mid); }
.genus-hits:empty { display: none; }
.genus-content .sort-bar .chips { display: none; }
.sort-selects { display: flex; gap: var(--s2); flex-wrap: wrap; }
.sort-select, .filter-select { min-height: var(--tap); padding: 0 32px 0 12px; border: 1px solid var(--color-rule-strong); border-radius: var(--radius-sm); background: var(--color-paper-2); color: var(--color-ink); font-family: var(--font-primary); font-size: 0.9375rem; }
.genus-add-link { display: inline-flex; align-items: center; min-height: var(--tap); font-size: 0.9375rem; font-weight: 500; color: var(--color-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; margin-left: auto; }
.genus-content .sort-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s3); }
.genus-content .sort-bar .search-bar { flex: 1 1 100%; max-width: none; }
.genus-stat-chip b { margin: 0 0.25em; }
.genus-content .sort-bar { justify-content: flex-start; }
@media (max-width: 640px) { .specimen__cell, .specimen__cell:nth-child(n), .specimen__cell:first-child { grid-template-columns: 6.5em 1fr; } }

/* -- T67: tools catalogue, pricing and legal pages on the same rules -- */
.tools-lead { font-family: var(--font-primary); font-weight: 400; }
.pr-line { font-family: var(--font-primary); font-size: var(--fs-label); line-height: 1.6; }
.shop-depts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s4); border-top: 1px solid var(--color-rule); }
.shop-dept, .shop-dept:hover { display: flex !important; align-items: center; justify-content: space-between; gap: var(--s2); min-height: var(--tap); padding: 0 !important; border: 0 !important; border-bottom: 1px solid var(--color-rule) !important; border-radius: 0 !important; background: none !important; color: var(--color-ink); font-family: var(--font-primary); font-size: 0.9375rem; text-align: left; }
.shop-dept.is-current { font-weight: 700; }
.shop-dept__count { font-size: var(--fs-label); color: var(--color-mid); font-variant-numeric: lining-nums tabular-nums; font-family: var(--font-primary); }
.shop-count { font-family: var(--font-primary); font-size: var(--fs-small); color: var(--color-mid); }
.shop-card__price, .shop-item__price { font-family: var(--font-primary) !important; font-variant-numeric: lining-nums tabular-nums; font-weight: 600; color: var(--color-ink); }
.shop-card__price { font-size: var(--fs-body) !important; }
.shop-item__price { font-size: var(--fs-h2) !important; }
.shop-item__price .mono { font-family: var(--font-primary); font-size: var(--fs-label); font-weight: 400; color: var(--color-mid); margin-left: var(--s2); }
.shop-card__maker .badge, .tool-cite .badge { margin-right: var(--s1); }
.shop-card__shops a { min-height: var(--tap); display: inline-flex; align-items: center; }
.shop-btn { min-height: var(--tap); display: flex; align-items: center; justify-content: center; font-family: var(--font-primary); font-size: 0.9375rem; font-weight: 500; border: 1px solid var(--color-ink); border-radius: var(--radius-sm); background: transparent; color: var(--color-ink); text-decoration: none; }
.shop-btn--primary { background: var(--color-ink); color: var(--color-paper); }
.tool-cite { font-family: var(--font-primary); font-size: var(--fs-small); color: var(--color-mid); margin-top: var(--s3); }
.shop-credit { font-family: var(--font-primary); font-size: var(--fs-label); }
@media (max-width: 640px) {
  .shop-item__img { max-height: 240px; display: flex; justify-content: center; }
  .shop-item__img img { max-height: 240px; width: auto; max-width: 100%; object-fit: contain; }
}
.pricing-summary { font-family: var(--font-primary); font-size: var(--fs-body); line-height: 1.7; color: var(--color-ink); border-top: 1px solid var(--color-ink); border-bottom: 1px solid var(--color-rule); padding: var(--s2) 0; }
.tokushoho-table th { font-family: var(--font-primary); font-size: var(--fs-label); font-weight: 500; color: var(--color-mid); vertical-align: top; }
.tokushoho-table td { font-size: var(--fs-small); color: var(--color-ink); }
.terms-fold { margin: var(--s3) 0; }
.terms-fold > summary { cursor: pointer; display: inline-flex; align-items: center; min-height: var(--tap); font-size: 0.9375rem; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.legal-page .breadcrumb { margin-bottom: var(--s3); }
.genus-content .sort-bar { flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; }

/* -- T71: distribution — four regions, the rest behind a text button -- */
.dist-more { display: inline; padding: 12px 2px; font-size: var(--fs-small); color: var(--color-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; cursor: pointer; white-space: nowrap; }
.dist-more:hover { color: var(--color-primary); }
.specimen__v a.dist-more { border-bottom: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }

/* -- T72: names short of a record, folded at the end of the genus list -- */
.genus-short { border-top: 1px solid var(--color-ink); margin-top: var(--s4); }
.genus-short > summary { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: var(--tap); font-size: 0.9375rem; font-weight: 500; color: var(--color-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.genus-short > summary::-webkit-details-marker { display: none; }
.genus-short[open] > summary { text-decoration: none; color: var(--color-mid); }

/* -- T73: aliases under the name -- */
.detail-aliases { margin: var(--s1) 0 var(--s3); font-size: var(--fs-small); color: var(--color-mid); }
.record__body i, .story__body i { font-family: inherit; font-style: italic; }

/* -- T74: contribute form on the same rules; 44px tap areas for small links -- */
#page-contribute h2.text-lg.font-bold { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h2); border-top: 1px solid var(--color-ink); padding-top: var(--s2); margin: var(--s5) 0 var(--s3); }
.contribute-login__title { margin: 0 0 var(--s1); font-size: var(--fs-body); font-weight: 600; }
.btn--danger-outline { margin-top: var(--s3); background: transparent; color: var(--color-danger); border: 1px solid var(--color-danger); min-height: var(--tap); }
.btn--danger-outline:hover { background: var(--color-danger-bg); color: var(--color-danger); }
#page-contribute .btn { min-height: var(--tap); font-family: var(--font-primary); }
/* inline links: the padding widens the tap area to 44px without moving the text */
.breadcrumb a { display: inline-block; padding: 12px 4px; margin: -12px -4px; }
.footer__links a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* -- board 8 D2: rows of links stay in the text flow; 44px from padding -- */
.timeline__decade > div { display: flex; flex-wrap: wrap; column-gap: var(--s3); }
.timeline__decade a, .related__group li a { display: block; padding-block: 10px; }
.related__nav a { display: flex; flex-direction: column; min-height: var(--tap); }
.related__group li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }

/* -- board 8 D3: list second lines and the genus count line break between parts, never inside one -- */
.entry__seg, .genus-stat-chip { white-space: nowrap; }
.genus-stat-chip + .genus-stat-chip::before { content: none; }
.genus-stat-chip:not(:last-child)::after { content: ' ·'; margin-left: var(--s2); color: var(--color-mid); }

/* -- T78: why a field is empty; unsourced parentage -- */
.absent { color: var(--color-mid); }
.absent--none { font-size: var(--fs-small); }
.lineage__row--unconfirmed .lineage__node { border-style: dashed; }
.lineage__note { text-align: center; font-size: var(--fs-label); color: var(--color-mid); margin: var(--s1) 0 0; }

/* -- T80 / D7: people and place facts as rows (label 12px, value in the body size, lining figures) -- */
.people__facts { display: block !important; margin: 0 0 var(--s4); border-top: 1px solid var(--color-rule); }
.people__facts > div { display: grid; grid-template-columns: 7em 1fr; column-gap: var(--s2); align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--color-rule); }
.people__facts dt { font-family: var(--font-primary); font-size: var(--fs-label); color: var(--color-mid); letter-spacing: 0.02em; }
.people__facts dd { margin: 0; font-family: var(--font-primary) !important; font-size: var(--fs-body) !important; font-weight: 400; color: var(--color-ink); font-variant-numeric: lining-nums tabular-nums; }
.people__list .num { margin-left: var(--s2); font-size: var(--fs-small); color: var(--color-mid); }

/* -- T85: what a contributor gets, said first -- */
.contribute-note { font-size: var(--fs-small); color: var(--color-ink); border-left: 2px solid var(--color-rule-strong); padding: var(--s1) 0 var(--s1) var(--s3); margin: 0 0 var(--s4); }

/* -- T87: board 8 design leftovers -- */
:root { color-scheme: only light; }                                       /* I8: no forced dark */
#page-genus .genus-content .card--no-pad, #page-genus .genus-content .card { background: transparent !important; border: 0 !important; box-shadow: none !important; } /* D5 */
@media (max-width: 640px) { .masthead { display: block !important; } .masthead__main { min-width: 0; } }  /* D6 */
#page-cultivar .detail-more > summary { font-family: var(--font-primary); font-size: 0.9375rem; color: var(--color-ink); }  /* D11 */
.record .vote-btn, .vote-btn { min-height: var(--tap) !important; font-family: var(--font-primary) !important; font-size: var(--fs-small) !important; letter-spacing: 0.02em; } /* D12 */
.record__head { justify-content: flex-start !important; }               /* D13 */
.record__head .record__trust { font-weight: 500; }
div:has(> .gallery-carousel .gallery__empty) > .plate-policy { display: none; }  /* D14 */
.specimen__v a, .record__source a, .record__sources a { padding: 12px 0; margin: -12px 0; }   /* D15: tap area without moving text */
.mobile-nav { padding-left: 0 !important; padding-right: 0 !important; } /* D17 */
.mobile-nav a { padding-left: var(--s3) !important; padding-right: var(--s3) !important; }
.textsize__btn--1 { font-size: 14px !important; } .textsize__btn--2 { font-size: 17px !important; } .textsize__btn--3 { font-size: 20px !important; } /* D18 */
.legal-page h1 { letter-spacing: 0.02em !important; }                   /* D19 */
.legal-page p a, .legal-page td a, .legal-page li a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
#page-contribute label:has(> input[type="radio"]), #page-contribute .form-radio { min-height: var(--tap); display: inline-flex; align-items: center; gap: var(--s2); } /* D23 */
.related__pos { margin-left: var(--s3); font-size: var(--fs-small); color: var(--color-mid); }  /* I5 */

/* -- T91: new entries under one date heading per day -- */
.entries__day { list-style: none; padding: var(--s3) 0 var(--s1); font-family: var(--font-primary); font-size: var(--fs-label); color: var(--color-mid); border-bottom: 1px solid var(--color-rule); }
.entries__day:first-child { padding-top: var(--s2); }
.entries__day .num { color: var(--color-ink); font-weight: 600; }
/* -- T90: no photo on a phone = one dashed band, so the record starts on the first screen; photos capped at 70svh -- */
@media (max-width: 640px) {
  .gallery:has(> .gallery__empty) { aspect-ratio: auto !important; min-height: 0 !important; height: auto !important; }
  .gallery-carousel:has(.gallery__empty) .gallery-carousel__viewport { aspect-ratio: auto !important; height: auto !important; min-height: 0 !important; }
  .gallery__empty .sheet--plate { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s3) !important; margin: 0; }
  .gallery__empty .sheet--plate .sheet__note { display: none; }
  .gallery__empty .sheet--plate .sheet__title { margin: 0; font-size: var(--fs-small); color: var(--color-mid); }
  .gallery__empty .sheet--plate .sheet__cta { margin: 0; min-height: var(--tap); }
  .gallery__img, .gallery__img-full { max-height: 70svh; }
  .gallery__img { aspect-ratio: auto; }
  .gallery__img-full { object-fit: contain; }
}

/* -- T92: the contribute form as one column of ruled sections -- */
#page-contribute .card { background: transparent !important; border: 0 !important; border-top: 1px solid var(--color-ink) !important; border-radius: 0 !important; box-shadow: none !important; padding: var(--s3) 0 0 !important; }
#page-contribute .structured-fieldset { border: 0 !important; padding: 0 !important; margin: 0 0 var(--s3) !important; background: transparent !important; }
#page-contribute .structured-fieldset__legend { font-family: var(--font-primary); font-size: var(--fs-label); color: var(--color-mid) !important; padding: 0 !important; margin: 0 0 var(--s2); }
#page-contribute .form-input, #page-contribute .form-select, #page-contribute .form-textarea { width: 100%; max-width: none; font-size: var(--fs-body); min-height: var(--tap); }
#page-contribute .form-label { font-size: var(--fs-small); color: var(--color-ink); font-weight: 500; }
#page-contribute .upload-area__text, #page-contribute .upload-area__hint { color: var(--color-mid) !important; font-size: var(--fs-small) !important; }
#page-contribute .form-radio-group { display: flex; flex-direction: column; gap: 0; }
#page-contribute .form-radio { display: grid !important; grid-template-columns: auto 1fr; column-gap: var(--s2); align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--color-rule); min-height: var(--tap); }
#page-contribute .type-def { grid-column: 2; font-size: var(--fs-small); color: var(--color-mid); line-height: 1.5; }
.contribute-fold { margin: var(--s2) 0 var(--s3); }
.contribute-fold > summary { cursor: pointer; min-height: var(--tap); display: inline-flex; align-items: center; font-size: 0.9375rem; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
@media (max-width: 640px) { #page-contribute .container, #page-contribute .container--narrow { padding-left: var(--s3); padding-right: var(--s3); } #page-contribute .structured-form-grid { grid-template-columns: 1fr !important; } }

/* -- T93: keep the page still while data arrives (reserve the space the lists and the label will take) -- */
.genus-content .card--no-pad:empty, #people-body:has(> .loading-text), #locality-body:has(> .loading-text) { min-height: 70vh; }
#recently-updated-grid:has(> .loading-text) { min-height: 560px; }
#story-body:has(> .loading-text) { min-height: 520px; }
#archive-index-body:has(> .loading-text) { min-height: 360px; }
#detail-actions { min-height: var(--tap); }
.loading-text { color: transparent; }

/* -- T94: today's leaf → Instagram -- */
.story__share { display: flex; flex-wrap: wrap; gap: 0 var(--s3); margin: var(--s2) 0 0; }
.story__copy, .story__img { background: none; border: 0; padding: 0; min-height: var(--tap); display: inline-flex; align-items: center; font: inherit; font-size: var(--fs-small); color: var(--color-mid); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; cursor: pointer; }
/* D13: the record head reads as one line — 出典 S · 95% · 2026.04.02 */
.record__head .record__trust, .record__head .record__date { margin-left: 0 !important; }
.record__head > span + span::before { content: '·'; margin-right: var(--s2); color: var(--color-mid); font-weight: 400; }
.record__trust.trust--low { color: var(--color-ink); }

/* -- T100: genus name origin; the glossary term someone came for -- */
.genus-origin { font-size: var(--fs-small); color: var(--color-mid); margin: 0 0 var(--s2); max-width: 36em; }
.genus-origin a { color: var(--color-mid); }
.glossary dt.is-target { background: var(--color-paper-2); box-shadow: -8px 0 0 var(--color-paper-2), 8px 0 0 var(--color-paper-2); }

/* -- T105: glossary contents; a shorter footer; plate numbers -- */
.glossary-toc ul { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s4); border-top: 1px solid var(--color-rule); }
.glossary-toc li a { display: flex; align-items: center; min-height: var(--tap); border-bottom: 1px solid var(--color-rule); font-size: 0.9375rem; color: var(--color-ink); text-decoration: none; }
.glossary-toc li a:hover { text-decoration: underline; }
.glossary-toc__back { margin: var(--s3) 0 0; font-size: var(--fs-small); }
.glossary-toc__back a { color: var(--color-mid); }
.footer { margin-top: var(--s5) !important; padding: var(--s4) 0 var(--s4) !important; }
@media (max-width: 640px) {
  .footer__links { gap: 0 var(--s4) !important; }
  .footer__links a { font-size: var(--fs-small); }
  .page > .container { padding-bottom: 0; }
}
.gallery-carousel__counter { font-family: var(--font-primary); font-size: var(--fs-label); color: var(--color-mid); }
.glossary dt, .legal-page > h2, .glossary-toc, #archive-timeline { scroll-margin-top: 72px; }

/* -- T99: name-confusion pages -- */
.names__lead { font-size: var(--fs-body); line-height: var(--lh-body); margin: 0 0 var(--s4); }
.names__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-ink); counter-reset: names; }
.names__item { padding: var(--s3) 0; border-bottom: 1px solid var(--color-rule); }
.names__name { margin: 0 0 var(--s1); font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); }
.names__kind { margin-left: var(--s2); font-family: var(--font-primary); font-weight: 400; font-size: var(--fs-label); color: var(--color-mid); }
.names__text { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); }
.names__src { margin: var(--s1) 0 0; font-size: var(--fs-label); color: var(--color-mid); }
.names__summary { margin: var(--s4) 0 0; font-size: var(--fs-body); line-height: var(--lh-body); }
.names__index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-rule); }
.names__index a { display: flex; align-items: center; min-height: var(--tap); border-bottom: 1px solid var(--color-rule); color: var(--color-ink); text-decoration: none; font-size: var(--fs-h3); font-family: var(--font-display); font-weight: 600; }
.names-note { margin: var(--s4) 0 0; font-size: var(--fs-small); color: var(--color-mid); }

/* -- T98: the stub's first screen is the plant page's layout; it stays until the page has drawn -- */
html[data-boot="entry"] #page-cultivar { display: none !important; }
.static-entry { padding-top: var(--s4); padding-bottom: var(--s4); }
.static-entry .breadcrumb { margin-bottom: var(--s3); }
.static-entry .specimen { margin-top: var(--s3); }
.static-entry__actions { min-height: 60px; margin: var(--space-md) 0 var(--space-lg); border-top: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule); }
.static-entry__plate { max-width: none; width: 100%; max-height: 70svh; aspect-ratio: auto; border: 1px solid var(--color-rule); }
.static-entry__plate img { width: auto; max-width: 100%; max-height: 70svh; }
.static-entry__links { font-size: var(--fs-small); color: var(--color-mid); margin-top: var(--s4); }
#genus-sections-container:has(> .text-center), #page-genus .genus-content:not(:has(.cultivar-row)) { min-height: 100vh; }

/* -- 2026-10-08 app-ux deploy 1: notices, login sheet, draft line -- */
#toast-container { position: fixed; left: 16px; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: var(--s2); pointer-events: none; }
#toast-container .toast-notification { position: static; left: auto; transform: translateY(8px); width: 100%; max-width: 480px; box-sizing: border-box; display: flex; align-items: center; gap: var(--s3); padding: 12px 16px; border-radius: 2px; box-shadow: none; background: var(--color-ink); color: var(--color-paper); font-family: var(--font-primary); font-size: var(--fs-small); font-weight: 400; line-height: 1.5; }
#toast-container .toast-notification.show { transform: none; }
#toast-container .toast-notification.toast-error { background: var(--color-danger); }
#toast-container .toast--actionable { pointer-events: auto; }
.toast__msg { flex: 1; }
.toast__action, .toast__close { background: none; border: 0; color: inherit; font: inherit; min-height: var(--tap); padding: 0 var(--s1); cursor: pointer; }
.toast__action { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.toast__close { font-size: var(--fs-body); }
.login-sheet { max-width: 420px; }
.login-sheet .dialog-actions { flex-wrap: wrap; }
.draft-note { font-size: var(--fs-small); color: var(--color-mid); margin: 0 0 var(--s3); }
.draft-note__clear { background: none; border: 0; padding: 0 var(--s1); min-height: var(--tap); font: inherit; color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#add-origin-section { scroll-margin-top: 72px; }
.pwa-install-banner { box-shadow: none; border-top: 1px solid var(--color-rule-strong, var(--color-ink)); border-radius: 0; }

/* -- 2026-10-08 app-ux deploy 2 (preview html.app-ui): bar, sheets, steps, 自分の記録 -- */
.appbar { display: none; }
.sheet-dialog, .login-sheet { box-shadow: none; }
.sheet-dialog { width: min(100% - 32px, 480px); max-width: 480px; padding: var(--s4); }
.sheet-dialog::backdrop { background: rgba(30, 38, 34, 0.35); }
.sheet-dialog__kind { font-size: var(--fs-label); color: var(--color-mid); margin: 0 0 var(--s1); }
.sheet-rows { list-style: none; margin: var(--s3) 0 0; padding: 0; border-top: 1px solid var(--color-rule); }
.sheet-rows--more { border-top: 2px solid var(--color-ink); margin-top: var(--s3); }
.sheet-rows li { border-bottom: 1px solid var(--color-rule); }
.sheet-rows button { display: flex; justify-content: space-between; width: 100%; min-height: var(--tap); padding: var(--s2) 0; background: none; border: 0; font: inherit; font-size: var(--fs-body); color: var(--color-ink); text-align: left; cursor: pointer; }
.photo-sheet__plates { display: flex; gap: var(--s2); margin: var(--s3) 0; }
.photo-sheet__plates figure { flex: 1; margin: 0; border: 1px solid var(--color-rule); background: var(--color-paper-2); aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.photo-sheet__plates img { max-width: 100%; max-height: 100%; object-fit: contain; }
.photo-sheet__note { font-size: var(--fs-small); color: var(--color-mid); margin: var(--s3) 0; }
.mypost-counts { font-size: var(--fs-label); color: var(--color-mid); margin: 0 0 var(--s2); }
.mypost-list .entry { flex-wrap: wrap; }
.mypost-acts { margin: 0 0 var(--s2) 60px; font-size: var(--fs-small); color: var(--color-mid); display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s1); }
.mypost-acts__meta { margin-right: var(--s2); }
.mypost-acts button { background: none; border: 0; padding: 0 var(--s1); min-height: var(--tap); font: inherit; color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cstep-off { display: none !important; }
.cstep-head { margin: 0 0 var(--s3); }
.cstep-head__label { font-size: var(--fs-label); color: var(--color-mid); margin: 0 0 var(--s1); }
.cstep-head__ticks { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.cstep-head__ticks li { flex: 1; height: 2px; background: var(--color-rule); }
.cstep-head__ticks li.is-done { background: var(--color-ink); }
.cstep-bar { display: none; }
.contribute--stepped .cstep-bar { display: flex; gap: var(--s2); position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: var(--s2) 16px calc(var(--s2) + env(safe-area-inset-bottom)); background: var(--color-paper); border-top: 1px solid var(--color-rule-strong, var(--color-ink)); }
.contribute--stepped .cstep-bar .btn { min-height: var(--tap); }
.contribute--stepped .cstep-bar #cstep-next { flex: 2; }
.contribute--stepped .cstep-bar #cstep-back { flex: 1; }
.contribute--stepped { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.contribute--stepped #login-benefits-card, .contribute--stepped .contribute-note { display: none; }
.cstep-review .specimen__v { display: flex; justify-content: space-between; gap: var(--s2); }
.cstep-fix { font-size: var(--fs-small); white-space: nowrap; }
.cstep-review__scope { font-size: var(--fs-small); color: var(--color-mid); margin: var(--s3) 0; }
@media (max-width: 640px) {
  html.app-ui .appbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; background: var(--color-paper); border-top: 1px solid var(--color-rule-strong, var(--color-ink)); padding-bottom: env(safe-area-inset-bottom); }
  html.app-ui .appbar__item { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 2px; background: none; border: 0; border-top: 2px solid transparent; font-family: var(--font-primary); font-size: var(--fs-label); color: var(--color-mid); text-decoration: none; text-align: center; cursor: pointer; }
  html.app-ui .appbar__item[aria-current="page"] { color: var(--color-ink); border-top-color: var(--color-ink); }
  html.app-ui .appbar__post { background: var(--color-ink); color: var(--color-paper); font-weight: 500; }
  html.app-ui body { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
  html.app-ui body.appbar-hidden .appbar, html.app-ui body.kb-open .appbar { display: none; }
  html.app-ui #toast-container { bottom: calc(52px + 12px + env(safe-area-inset-bottom)); }
  html.app-ui body.appbar-hidden #toast-container { bottom: calc(76px + env(safe-area-inset-bottom)); }
  html.app-ui .header { position: static; }
  html.app-ui .header__contribute, html.app-ui .header__hamburger, html.app-ui .header__auth-btn { display: none !important; }
  html.app-ui .mobile-nav { top: 0; bottom: calc(52px + env(safe-area-inset-bottom)); overflow-y: auto; }
  html.app-ui .pwa-install-banner { bottom: calc(52px + env(safe-area-inset-bottom)); }
  html.app-ui .sheet-dialog { margin: auto auto 0; width: 100%; max-width: 100%; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom)); max-height: 90svh; overflow-y: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  html.app-ui .sheet-dialog[open] { animation: sheet-up 180ms ease-out; }
  @keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.mypost-acts__meta { flex-basis: 100%; }

/* -- 2026-10-08 375px audit (design): underlines on the words, 44px rows, sans for Japanese, bottom bar -- */
/* 1–2: the underline sits on the word, not at the bottom of the 44px tap area */
.specimen__v a { border-bottom: 0; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--color-rule-strong); text-underline-offset: 0.25em; }
.vote-btn { border-bottom: 0 !important; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--color-rule-strong); text-underline-offset: 0.3em; }
.vote-btn--active, .vote-btn--active-down { text-decoration-color: var(--color-ink); }
/* 3: index rows (people, places) 44px high */
.people__list li { padding: 0; border-bottom: 1px solid var(--color-rule); align-items: center; }
.people__list a { display: flex; align-items: center; min-height: var(--tap); flex: 1; }
.people__list .mono, .people__list .num { font-family: var(--font-primary); font-size: var(--fs-small); color: var(--color-mid); font-variant-numeric: lining-nums tabular-nums; }
/* 4: related groups */
.related__group h3 { font-family: var(--font-primary); text-transform: none; letter-spacing: 0.02em; }
.related__group h3 a { display: inline-flex; align-items: center; min-height: var(--tap); }
.related__group li { padding-block: 0; }
.timeline__decade a, .related__group li a { padding-block: 0; min-height: var(--tap); display: flex; align-items: center; }
/* 7–8: action row on one line, the genus exit aligned */
.detail-actions > .btn, #page-cultivar div:has(> #share-btn) .btn { margin-right: 0; }
#share-btn { justify-content: flex-start; }
.related__exit { align-items: center; }
/* 9–10 */
.header__logo { display: inline-flex; align-items: center; min-height: var(--tap); }
.glossary-toc__back a { display: inline-flex; align-items: center; min-height: var(--tap); }
#page-glossary > .container { padding-top: 0; }
/* 11: Japanese in the sans; only numbers keep the mono */
.breadcrumb, .record__label, .detail-colophon, .story__cite, .story__label .mono, .masthead__ledger dt, .textsize__label,
.related__nav .mono, .people__roles, .people__group h2, .genus-request-link, #page-locality span.num {
  font-family: var(--font-primary); letter-spacing: 0.02em; text-transform: none;
}
/* 12: the seedling tab like the others */
.genus-tab[data-tab="seedlings"] { font-family: var(--font-primary); font-size: 0.9375rem; letter-spacing: 0.02em; }
/* 13: form controls in ink; a back button that cannot be used looks so */
#page-contribute input[type=radio], #page-contribute input[type=checkbox], .photo-sheet input[type=checkbox] { accent-color: var(--color-ink); }
#cstep-back:disabled { color: var(--color-mid); border-color: var(--color-rule); }
/* 19: the facts table starts where the specimen label does */
.people__facts > div { grid-template-columns: 6.5em 1fr; }
/* 20: install banner */
.pwa-install-banner__close { min-width: var(--tap); min-height: var(--tap); }
body:has(.pwa-install-banner--visible) { padding-bottom: 64px; }
@media (max-width: 640px) {
  /* 14 + H3: the space under the page is a fixed amount (53px bar + 35px home-indicator), not env(), which moves while Safari's toolbar does */
  html.app-ui body { padding-bottom: 88px; }
  html.app-ui body.appbar-hidden { padding-bottom: 0; }
  /* 6: while typing, the step bar sits under the form instead of over the field */
  html.app-ui body.kb-open .contribute--stepped .cstep-bar { position: static; padding-bottom: var(--s2); }
  /* H1: the bar slides away while scrolling down (Safari's toolbar does the same), back on the way up */
  html.app-ui .appbar { padding-bottom: max(env(safe-area-inset-bottom), var(--s2)); transition: transform 200ms ease, visibility 200ms; }
  html.app-ui body.appbar-away .appbar { transform: translateY(100%); visibility: hidden; }
  html.app-ui body.appbar-away #toast-container { bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) and (display-mode: standalone) { html.app-ui body.appbar-away .appbar { transform: none; visibility: visible; } }
@media (prefers-reduced-motion: reduce) { html.app-ui .appbar { transition: none; } }
/* the update notice: Japanese in the sans, 44px buttons, above the bottom bar */
#sw-update-banner { font-family: var(--font-primary) !important; font-size: var(--fs-small) !important; letter-spacing: 0.02em !important; bottom: calc(12px + env(safe-area-inset-bottom)) !important; }
#sw-update-banner button { min-height: var(--tap); min-width: var(--tap); }
@media (max-width: 640px) {
  html.app-ui body:not(.appbar-away):not(.appbar-hidden) #sw-update-banner { bottom: calc(53px + 12px + env(safe-area-inset-bottom)) !important; }
}

/* -- board 9 deploy B (T114): R1–R8 and the six visual changes -- */
/* visual 2: the state ends the second line */
.entry__sub .entry__state { display: inline; margin-left: var(--s2); padding-top: 0; align-self: auto; float: none; }
.entry__sub .entry__state--pct { color: var(--color-primary); }
/* visual 5: index rows wrap only when they do not fit */
.people__list li { flex-wrap: wrap; }
.people__list a { flex: 1 1 auto; }
.people__list li > span.mono, .people__list li > .num { margin-left: auto; }
/* R5: the step bar is no wider than the form on a desktop */
.contribute--stepped .cstep-bar { padding-inline: max(16px, calc((100% - 536px) / 2)); }
/* R3: the form's own submit button hides while stepped (the bar records) */
.contribute--stepped #contribute-submit-btn { display: none !important; }
/* R6: no repeated intro, card headings or a one-option select inside the steps */
.contribute--stepped .card > h2, .contribute--stepped .cstep-one-genus > label, .contribute--stepped .cstep-one-genus > select { display: none; }
.cstep-genus { margin: 0; font-size: var(--fs-small); color: var(--color-mid); }
.contribute--stepped #clone-image-hint { display: none !important; }
/* R7: the photo sheet's actions 1:2; small action links 44px wide */
.photo-sheet .dialog-actions, #photo-sheet .dialog-actions { display: flex; gap: var(--s2); }
#photo-sheet .dialog-actions .btn { min-height: var(--tap); }
#photo-sheet #photo-sheet-cancel { flex: 1; }
#photo-sheet #photo-sheet-send { flex: 2; }
#photo-sheet-title:focus { outline: none; }
.mypost-acts button { min-width: var(--tap); }
.mypost-login { margin: var(--s3) 0; }
/* R8: hover colours only where there is a hover; no duplicate + 投稿 in the desktop header */
@media (hover: none) { .btn--primary:hover { background: var(--color-ink); border-color: var(--color-ink); } }
@media (min-width: 641px) { .header__nav-link--cta { display: none !important; } }
html.app-ui .mobile-nav [data-i18n="nav_contribute_mobile"] { display: none !important; }
.mobile-nav .mobile-nav__divider { padding-left: var(--s3); padding-right: var(--s3); }
@media (max-width: 640px) {
  /* visual 3: no dashed frames in lists on a phone (the space keeps names aligned); the plate band stays */
  .entry__thumb--empty, .genus-content .cultivar-row__thumb.entry__thumb--empty { border-color: transparent; }
  /* visual 4: the bar in the small size */
  html.app-ui .appbar__item { font-size: var(--fs-small); }
  /* visual 6: today's leaf in a portrait frame */
  .story__figure { aspect-ratio: 4 / 5; max-height: 60svh; }
}

/* board 9 T111: the review step */
.cstep-tag { font-size: var(--fs-label); color: var(--color-mid); border: 1px solid var(--color-rule); padding: 0 var(--s1); margin-left: var(--s1); white-space: nowrap; }
.cstep-words { display: block; white-space: pre-wrap; }
.cstep-note { display: block; font-size: var(--fs-label); color: var(--color-mid); margin-top: var(--s1); }
.type-def--hint { font-size: var(--fs-small); color: var(--color-mid); margin: var(--s2) 0 0; }
.cstep-review .specimen__v { align-items: flex-start; }

/* board 9 T112: photo sheet — per-photo dates, plant kind, own-photo confirmation */
.photo-sheet__plates figure { flex-direction: column; }
.photo-sheet__date { font-size: var(--fs-label); color: var(--color-mid); padding: var(--s1) 0; text-align: center; }
.photo-sheet__kind { border: 0; padding: 0; margin: var(--s3) 0 0; }
.photo-sheet__kind .form-radio { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); }
.photo-sheet__own { display: flex; gap: var(--s2); align-items: flex-start; font-size: var(--fs-small); margin: var(--s3) 0 0; min-height: var(--tap); }
.photo-sheet__own input { margin-top: 4px; accent-color: var(--color-ink); }
#photo-sheet input[type=radio] { accent-color: var(--color-ink); }

/* board 9 T113: the three choices */
.sheet-rows button > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.sheet-rows__t { font-size: var(--fs-body); color: var(--color-ink); }
.sheet-rows__d { font-size: var(--fs-small); color: var(--color-mid); }
.sheet-rows button { align-items: center; padding: var(--s2) 0; }
/* board 9 D6: the band after recording — four actions, 44px, the main one filled */
.share-band__actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.share-band__btn { min-height: var(--tap); padding: 0 var(--s2); border: 1px solid var(--color-ink); border-radius: 2px; font-family: var(--font-primary); font-size: var(--fs-small); letter-spacing: 0.02em; text-transform: none; display: inline-flex; align-items: center; }
.share-band__btn--main { background: var(--color-ink); color: var(--color-paper); }
.share-band__note { font-size: var(--fs-label); color: var(--color-mid); margin: var(--s2) 0 0; }
.share-band__close { min-width: var(--tap); min-height: var(--tap); margin-left: auto; }

/* board 9 T122: 「← 戻る」 when opened from the home screen */
.header__back { background: none; border: 0; padding: 0 var(--s2) 0 0; min-height: var(--tap); font: inherit; font-size: var(--fs-small); color: var(--color-ink); cursor: pointer; }

/* board 9 T124: 「前回から」 */
.since-line { font-size: var(--fs-small); color: var(--color-mid); margin: var(--s3) 0 0; }
.mypost-updates__head { font-size: var(--fs-label); color: var(--color-mid); margin: 0 0 var(--s1); }
.mypost-updates { list-style: none; margin: 0 0 var(--s3); padding: 0; border-top: 1px solid var(--color-rule); }
.mypost-updates li { font-size: var(--fs-small); padding: var(--s2) 0; border-bottom: 1px solid var(--color-rule); }

/* board 9 T126: adding a record — hints, and the full-screen sheet on a phone */
.ao-hint { display: block; font-size: var(--fs-label); color: var(--color-mid); margin: 0 0 var(--s1); }
.record-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.record-sheet__close { background: none; border: 0; min-width: var(--tap); min-height: var(--tap); font-size: var(--fs-h3); cursor: pointer; color: var(--color-ink); }
@media (max-width: 640px) {
  html.app-ui .sheet-dialog--full, .sheet-dialog--full { margin: 0; width: 100%; max-width: 100%; height: 100svh; max-height: 100svh; border: 0; border-radius: 0; padding: var(--s3) 16px calc(var(--s4) + env(safe-area-inset-bottom)); overflow-y: auto; }
  #record-sheet #add-origin-form { display: block !important; }
}

/* board 9 T128: the stand-in and the photos being sent */
.gallery__item--sending .gallery__img img { opacity: 0.6; }
.gallery__item--standin .gallery__actions, .gallery__item--sending .gallery__actions { display: none; }

/* board 11: the breadcrumb keeps 「トップ」 on one line; a long name ends in … */
.breadcrumb { flex-wrap: nowrap; min-width: 0; }
.breadcrumb > a:first-child, .breadcrumb__sep { flex-shrink: 0; white-space: nowrap; }
.breadcrumb > :last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* board 11 T147: /ig/ — three plates a row, the plate number under each */
.ig-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.ig-grid a { display: block; text-decoration: none; color: inherit; }
.ig-grid__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; background: var(--color-plate, #EDE9E0); overflow: hidden; }
.ig-grid__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-grid__name { font-size: var(--fs-label); padding: var(--s1); text-align: center; line-height: 1.3; }
.ig-grid__no { display: block; font-size: var(--fs-label); color: var(--color-mid); margin-top: var(--s1); }

/* board 11 T148 (preview only, ?preview=plate): the empty plate as one label line, no second 「写真を追加」 */
.sheet__pv { display: none; }
html.pv-plate .sheet--plate { border: 0; border-top: 1px solid var(--color-rule-strong); border-bottom: 1px solid var(--color-rule-strong); border-radius: 0; background: transparent; padding: var(--s3) 0; }
html.pv-plate .sheet--plate > :not(.sheet__pv) { display: none; }
html.pv-plate .sheet__pv { display: block; margin: 0; font-size: var(--fs-small); color: var(--color-mid); }
html.pv-plate .sheet__pv-k { font-family: var(--font-display); font-size: var(--fs-body); color: var(--color-ink); }
html.pv-plate .sheet__pv a { display: inline-block; min-height: var(--tap); line-height: var(--tap); }

/* board 11 T153: the preview label lines up with its rules; /ig/ number box */
html.pv-plate .gallery__empty .sheet--plate { padding: var(--s3) 0 !important; display: block; }
.ig-find { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); }
.ig-find label { font-size: var(--fs-small); color: var(--color-mid); }
.ig-find input { width: 6em; min-height: var(--tap); font-size: var(--fs-body); }
.ig-find .btn { min-height: var(--tap); }

/* board 12: 読みもの — until the owner's OK the links and the plant-page section show with ?preview=reading only */
html:not(.pv-reading) .pv-reading-link, html:not(.pv-reading) #reading-for-section { display: none !important; }
.reading-list .entry__main { display: block; }
.reading-item { padding: var(--s3) 0; }
.reading-item__title { display: inline; font-size: var(--fs-body); }
.reading-item__summary { margin: var(--s2) 0 0; font-size: var(--fs-body); }
.reading-item__plants { margin: var(--s2) 0 0; }
.reading-tabs { margin: 0 0 var(--s3); }
.reading-item .reading-item__title { display: block; }
.reading-item .entry__sub { display: block; margin-top: var(--s1); }
