:root {
  --community-container: 1440px;
  --community-ink: #17211d;
  --community-muted: #5f6d66;
  --community-line: #d8e1db;
  --community-soft: #f3f6f4;
  --community-paper: #ffffff;
  --community-green: #126b4e;
  --community-blue: #1d5e86;
  --community-orange: #9a5a18;
  --community-shadow: 0 8px 22px rgba(23, 33, 29, .07);
}

html[data-community-navigating="true"]::before {
  animation: community-navigation-progress 1.1s ease-in-out infinite;
  background: var(--community-green);
  content: "";
  height: 3px;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  transform-origin: left center;
  z-index: 200;
}
@keyframes community-navigation-progress {
  0% { opacity: .65; transform: scaleX(.08); }
  55% { opacity: 1; transform: scaleX(.72); }
  100% { opacity: .75; transform: scaleX(.96); }
}
@media (prefers-reduced-motion: reduce) {
  html[data-community-navigating="true"]::before { animation: none; transform: scaleX(.55); }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #f6f8f7; color: var(--community-ink); font-family: "Noto Sans JP", system-ui, sans-serif; }
body { margin: 0; min-width: 320px; background: #f6f8f7; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { background: #fff; left: 8px; padding: 8px 12px; position: absolute; top: -100px; z-index: 60; }
.skip-link:focus { top: 8px; }
.community-header { align-items: center; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--community-line); display: flex; gap: 24px; justify-content: space-between; min-height: 70px; padding: 12px clamp(18px, 4vw, 64px); position: sticky; top: 0; z-index: 20; }
.community-brand { color: var(--community-ink); font-family: Inter, system-ui, sans-serif; font-size: 22px; font-weight: 800; letter-spacing: 0; text-decoration: none; white-space: nowrap; }
.community-nav { display: flex; gap: 18px; margin-left: auto; }
.community-nav a { color: var(--community-muted); font-size: 14px; text-decoration: none; }
.community-nav a:hover, .community-nav a:focus-visible, .community-nav a.is-active { color: var(--community-green); font-weight: 800; }
.community-actions { align-items: center; display: flex; gap: 10px; }
.community-actions a, .community-button { border: 1px solid var(--community-line); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 15px; text-decoration: none; cursor: pointer; }
.community-actions .community-primary, .community-button.community-primary { background: var(--community-green); border-color: var(--community-green); color: #fff; }
.community-button.community-secondary { background: #fff; color: var(--community-ink); }
.community-button:disabled { cursor: wait; opacity: .58; }
.community-button.is-processing { gap: 7px; min-width: 7em; }
.community-button.is-processing::before { animation: community-button-spin .7s linear infinite; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; display: inline-block; flex: 0 0 12px; height: 12px; width: 12px; }
@keyframes community-button-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .community-button.is-processing::before { animation: none; } }
.community-main { margin: 0 auto; max-width: var(--community-container); padding: 42px clamp(22px, 3vw, 48px) 80px; }
.community-toolbar { background: var(--community-paper); border: 1px solid var(--community-line); box-shadow: var(--community-shadow); padding: clamp(24px, 4vw, 48px); }
.community-hero-grid { align-items: stretch; display: grid; gap: clamp(24px, 5vw, 72px); grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr); }
.community-hero-copy { align-self: center; }
.community-discovery-snapshot { align-self: stretch; background: var(--community-soft); border-left: 3px solid var(--community-green); padding: 18px 20px; }
.community-snapshot-grid { display: grid; gap: 1px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.community-snapshot-grid > div { background: #fff; display: grid; gap: 2px; min-height: 76px; padding: 12px 14px; }
.community-snapshot-grid strong { color: var(--community-green); font-size: 24px; line-height: 1; }
.community-snapshot-grid span { color: var(--community-muted); font-size: 12px; }
.community-kicker { color: var(--community-green); font-size: 12px; font-weight: 800; letter-spacing: .08em; margin: 0 0 8px; }
.community-toolbar h1 { font-size: 40px; line-height: 1.3; margin: 0; }
.community-toolbar p { color: var(--community-muted); margin: 12px 0 0; }
.community-discovery-layout { align-items: start; display: grid; gap: 26px; grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); margin-top: 26px; }
.community-discovery-sidebar { background: var(--community-paper); border: 1px solid var(--community-line); padding: 20px; position: sticky; top: 92px; z-index: 5; }
.community-sidebar-heading h2 { font-size: 20px; margin: 0; }
.community-discovery-sidebar .community-tabs { border: 1px solid var(--community-line); display: grid; gap: 0; margin: 16px 0 20px; overflow: visible; }
.community-discovery-sidebar .community-tab { border-bottom: 1px solid var(--community-line); border-left: 3px solid transparent; padding: 12px 13px; text-align: left; }
.community-discovery-sidebar .community-tab:last-child { border-bottom: 0; }
.community-discovery-sidebar .community-tab.is-active { background: var(--community-soft); border-bottom-color: var(--community-line); border-left-color: var(--community-green); }
.community-discovery-sidebar .community-search { display: grid; grid-template-columns: 1fr; margin-top: 0; }
.community-discovery-sidebar .community-search-filters { display: grid; grid-template-columns: 1fr; }
.community-discovery-sidebar .community-search-actions { display: grid; grid-template-columns: 1fr; }
.community-discovery-sidebar .community-auth-state { margin-top: 16px; }
.community-discovery-results { margin-top: 0; min-width: 0; }
.community-search { display: grid; gap: 10px; grid-template-columns: minmax(200px, 1fr) 170px 170px auto; margin-top: 28px; }
.community-field { display: grid; gap: 6px; }
.community-field label { color: var(--community-muted); font-size: 12px; font-weight: 700; }
.community-field input, .community-field select, .community-field textarea { background: #fff; border: 1px solid #cbd8d0; border-radius: 5px; color: var(--community-ink); min-height: 42px; padding: 9px 11px; width: 100%; }
.community-field textarea { min-height: 110px; resize: vertical; }
.community-inline-fields { display: grid; gap: 8px; grid-template-columns: 1fr 110px; }
.community-field small { color: var(--community-muted); font-size: 12px; line-height: 1.5; }
.community-readonly { background: var(--community-soft); border: 1px solid var(--community-line); color: var(--community-ink); min-height: 42px; padding: 10px 11px; }
.community-image-preview { background: var(--community-soft); border: 1px dashed #bdcec3; display: grid; min-height: 46px; margin-top: 5px; place-items: center; overflow: hidden; }
.community-image-preview:empty { display: none; }
.community-image-preview img { display: block; max-height: 160px; max-width: 100%; object-fit: contain; }
.profile-picker-field.is-owner-fixed { opacity: .82; }
.community-search .community-button { align-self: end; }
.community-tabs { border-bottom: 1px solid var(--community-line); display: flex; gap: 4px; margin-top: 24px; overflow-x: auto; }
.community-tab { background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--community-muted); cursor: pointer; padding: 11px 15px; white-space: nowrap; }
.community-tab.is-active { border-bottom-color: var(--community-green); color: var(--community-ink); font-weight: 800; }
.community-section { margin-top: 34px; }
.community-discovery-shortcuts { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
.community-discovery-shortcuts a { background: #fff; border: 1px solid var(--community-line); display: grid; gap: 4px; min-height: 88px; padding: 16px; text-decoration: none; }
.community-discovery-shortcuts a:hover, .community-discovery-shortcuts a:focus-visible { border-color: var(--community-green); }
.community-discovery-shortcuts strong { font-size: 15px; }
.community-discovery-shortcuts span { color: var(--community-muted); font-size: 12px; line-height: 1.5; }
.community-section-head { align-items: baseline; display: flex; gap: 14px; justify-content: space-between; margin-bottom: 14px; }
.community-section-head h2 { font-size: 22px; margin: 0; }
.community-count, .community-status { color: var(--community-muted); font-size: 13px; }
.community-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.community-card { background: var(--community-paper); border: 1px solid var(--community-line); display: flex; flex-direction: column; min-width: 0; padding: 20px; }
.community-card:hover { box-shadow: var(--community-shadow); }
.community-card-media { background: var(--community-soft); height: 130px; margin: -20px -20px 17px; overflow: hidden; }
.community-card-media img { height: 100%; object-fit: cover; width: 100%; }
.community-card-label { color: var(--community-blue); font-size: 12px; font-weight: 800; margin: 0 0 7px; }
.community-card h3 { font-size: 18px; line-height: 1.45; margin: 0; }
.community-card h3 a { text-decoration: underline; text-decoration-color: #b8cec0; text-underline-offset: 3px; }
.community-card h3 a:hover { color: var(--community-green); }
.community-card p { color: var(--community-muted); font-size: 14px; line-height: 1.7; margin: 9px 0 0; }
.community-meta { color: var(--community-muted); display: flex; flex-wrap: wrap; font-size: 12px; gap: 7px 14px; margin-top: 15px; }
.community-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.community-tag { background: var(--community-soft); color: #3c564a; font-size: 11px; padding: 4px 7px; }
.community-card-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; margin-top: auto; padding-top: 18px; }
.community-card-actions .community-button { min-height: 36px; padding: 0 11px; }
.community-status { align-items: center; border: 1px solid var(--community-line); color: var(--community-muted); display: inline-flex; min-height: 36px; padding: 0 11px; }
.community-status-ready { background: #e6f4ed; border-color: #9ed2b6; color: #0b684d; font-weight: 800; }
.community-status-activity { background: #edf5f4; border-color: #a7d2cc; color: #176f69; font-weight: 700; }
.community-status-viewable { background: #f0f4f7; border-color: #c5d2dc; color: #465d6b; }
.community-status-registered { background: #f4f6f5; border-color: #cdd7d3; color: #4d625a; }
.community-status-pending { background: #fff7e5; border-color: #e3ca8c; color: #805d11; }
.community-detail-nav { border-top: 1px solid var(--community-line); display: flex; gap: 6px; margin-top: 24px; overflow-x: auto; padding-top: 12px; scrollbar-width: none; }
.community-detail-nav::-webkit-scrollbar { display: none; }
.community-detail-nav a { color: var(--community-muted); flex: 0 0 auto; font-size: 13px; padding: 7px 10px; text-decoration: none; white-space: nowrap; }
.community-detail-nav a:hover, .community-detail-nav a:focus-visible { background: var(--community-soft); color: var(--community-ink); }
.community-detail-nav a.is-active { background: var(--community-soft); color: var(--community-ink); font-weight: 800; }
.community-detail-nav a span { color: var(--community-muted); font-size: 12px; margin-left: 3px; }
.community-profile-overview-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.community-profile-overview-grid a { background: var(--community-soft); border: 1px solid var(--community-line); display: grid; gap: 4px; min-height: 132px; padding: 18px; text-decoration: none; }
.community-profile-overview-grid a:hover, .community-profile-overview-grid a:focus-visible { border-color: var(--community-green); box-shadow: var(--community-shadow); }
.community-profile-overview-grid strong { color: var(--community-green); font-size: 28px; line-height: 1; }
.community-profile-overview-grid span { font-size: 16px; font-weight: 800; }
.community-profile-overview-grid small { color: var(--community-muted); font-size: 12px; line-height: 1.5; }
.community-empty { align-items: center; background: #fff; border: 1px dashed #bdcec3; color: var(--community-muted); display: flex; flex-direction: column; gap: 14px; padding: 30px 20px; text-align: center; }
.community-empty p { margin: 0; }
.community-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.community-footer { border-top: 1px solid var(--community-line); color: var(--community-muted); display: flex; gap: 18px; justify-content: space-between; padding: 20px clamp(18px, 4vw, 64px); }
.community-footer a { font-size: 13px; text-decoration: none; }
.community-auth-state { background: #f8fbf9; border: 1px solid var(--community-line); color: var(--community-muted); font-size: 13px; margin-top: 24px; padding: 11px 13px; }
.community-auth-state:empty { display: none; }
.community-modal[hidden] { display: none; }
.community-modal { align-items: center; background: rgba(24,33,30,.46); display: flex; inset: 0; justify-content: center; padding: 18px; position: fixed; z-index: 50; }
.community-modal-panel { background: #fff; max-height: min(760px, 94vh); max-width: 560px; overflow: auto; padding: 26px; width: 100%; }
.community-modal-head { align-items: start; display: flex; gap: 18px; justify-content: space-between; }
.community-modal-head h2 { font-size: 21px; margin: 0; }
.community-close { background: transparent; border: 0; color: var(--community-muted); cursor: pointer; font-size: 22px; line-height: 1; padding: 2px 5px; }
.community-form { display: grid; gap: 14px; margin-top: 20px; }
.community-form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 3px; }
.community-guest-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.community-dashboard-layout { display: block; }
.community-dashboard-page { min-height: 460px; }
.community-dashboard-nav { align-items: center; background: transparent; border-bottom: 1px solid var(--community-line); display: flex; gap: 4px; margin: 0 0 24px; overflow-x: auto; padding: 0 0 3px; position: static; scrollbar-width: none; }
.community-dashboard-nav::-webkit-scrollbar { display: none; }
.community-dashboard-nav a { border-bottom: 3px solid transparent; border-left: 0; border-radius: 6px 6px 0 0; color: var(--community-muted); flex: 0 0 auto; font-size: 13px; padding: 11px 16px; text-decoration: none; white-space: nowrap; }
.community-dashboard-nav a:hover, .community-dashboard-nav a:focus-visible { background: var(--community-soft); color: var(--community-ink); }
.community-dashboard-nav a.is-active { background: var(--community-soft); border-bottom-color: var(--community-green); color: var(--community-ink); font-weight: 800; }
.community-dashboard-content { min-width: 0; }
.community-dashboard-page-head { align-items: end; display: flex; gap: 24px; justify-content: space-between; }
.community-dashboard-page-head h1 { font-size: clamp(25px, 3.2vw, 32px); margin: 0; }
.community-dashboard-page-head .community-button { flex: 0 0 auto; }
.community-dashboard-page-content { margin-top: 24px; }
.community-dashboard-page-content .community-dashboard-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.dashboard-auth-panel { margin-top: 0; }
.community-consultation-list { display: grid; gap: 10px; }
.community-consultation-list .community-history-item p { color: var(--community-ink); line-height: 1.6; margin: 7px 0 0; white-space: pre-wrap; }
.community-page-context { color: var(--community-muted); font-size: 13px; margin: 6px 0 0; }
.invite-share-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.invite-qr { background: #fff; border: 1px solid var(--community-line); margin-top: 14px; max-width: 240px; padding: 10px; }
.community-message { color: var(--community-muted); font-size: 13px; min-height: 20px; }
.community-login-options { background: var(--community-paper); border: 1px solid var(--community-line); padding: 16px 18px; }
.community-login-options summary { color: var(--community-ink); cursor: pointer; font-weight: 700; }
.community-login-options .community-form-actions { justify-content: flex-start; margin-top: 14px; }
.auth-entry-actions { justify-content: flex-start; margin-top: 24px; }
.community-detail { margin: 0 auto; max-width: var(--community-container); padding: 42px clamp(22px, 3vw, 48px) 80px; }
.community-detail-header { background: #fff; border: 1px solid var(--community-line); padding: clamp(24px, 5vw, 52px); }
.community-detail-header h1 { font-size: clamp(27px, 4vw, 43px); margin: 0; }
.community-detail-header .community-meta { font-size: 13px; }
.community-detail-body { background: #fff; border: 1px solid var(--community-line); border-top: 0; padding: clamp(22px, 4vw, 42px); }
.community-detail-body p { line-height: 1.9; white-space: pre-wrap; }
.community-role-details { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--community-line); }
.community-role-detail-group { margin-top: 16px; padding: 16px; border: 1px solid var(--community-line); border-radius: 8px; background: #fbfcfc; }
.community-role-detail-group h3 { margin: 0 0 8px; font-size: 16px; }
.community-role-detail-group .community-spec-list { margin: 0; }
.community-detail-back {
  align-items: center;
  color: var(--community-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
}
.community-detail-back > span { font-size: 12px; }
.community-detail-back > a:not(.community-button) { color: var(--community-muted); font-size: 13px; }
.community-detail-loading { min-height: 180px; }
.community-detail-loading .community-message { align-items: center; display: flex; gap: 10px; }
.community-detail-loading .community-message::before { animation: community-button-spin .7s linear infinite; border: 2px solid var(--community-line); border-right-color: var(--community-green); border-radius: 50%; content: ""; display: inline-block; flex: 0 0 14px; height: 14px; width: 14px; }
@media (prefers-reduced-motion: reduce) { .community-detail-loading .community-message::before { animation: none; } }
.community-spec-list { display: grid; grid-template-columns: minmax(130px, 180px) 1fr; margin: 0; }
.community-spec-list dt, .community-spec-list dd { border-top: 1px solid var(--community-line); margin: 0; padding: 12px 0; }
.community-spec-list dt { color: var(--community-muted); font-size: 13px; font-weight: 700; }
.community-spec-list dd { line-height: 1.7; white-space: pre-wrap; }
.community-condition-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.community-condition-grid > div { background: var(--community-soft); border: 1px solid var(--community-line); padding: 12px 14px; }
.community-condition-grid dt { color: var(--community-muted); font-size: 12px; font-weight: 700; }
.community-condition-grid dd { line-height: 1.7; margin: 4px 0 0; }
.community-season-list { display: grid; gap: 14px; margin-top: 12px; }
.community-season { border-top: 2px solid var(--community-line); padding-top: 8px; }
.community-season h3 { font-size: 16px; margin: 0 0 4px; }
.community-manage-layout { align-items: start; display: grid; gap: 20px; grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); }
.community-manage-nav { background: #fff; border: 1px solid var(--community-line); display: flex; flex-direction: column; gap: 3px; padding: 8px; position: sticky; top: 92px; }
.community-manage-nav button { background: transparent; border: 0; border-left: 3px solid transparent; color: var(--community-muted); cursor: pointer; padding: 12px 13px; text-align: left; width: 100%; }
.community-manage-nav button[data-count]::after { background: var(--community-soft); border: 1px solid var(--community-line); border-radius: 999px; color: var(--community-muted); content: attr(data-count); float: right; font-size: 11px; font-weight: 700; line-height: 1.35; min-width: 20px; padding: 1px 5px; text-align: center; }
.community-manage-nav button.is-active[data-count]::after { background: #fff; color: var(--community-green); }
.community-manage-nav button:focus-visible { outline: 2px solid var(--community-green); outline-offset: -2px; }
.community-manage-nav button.is-active { background: var(--community-soft); border-left-color: var(--community-green); color: var(--community-ink); font-weight: 800; }
.community-manage-panel { background: #fff; border: 1px solid var(--community-line); padding: clamp(20px, 4vw, 34px); }
.community-manage-panel h1 { font-size: 26px; margin: 0; }
.community-manage-panel h2 { font-size: 18px; margin: 28px 0 12px; }
.community-manage-readiness { background: #fbfdfc; border: 1px solid var(--community-line); margin: 0 0 24px; padding: 15px 16px 16px; }
.community-manage-readiness .community-section-head { align-items: center; margin-bottom: 10px; }
.community-manage-readiness h3 { font-size: 16px; margin: 0; }
.community-readiness-bar { background: #e6efeb; border-radius: 999px; height: 5px; overflow: hidden; }
.community-readiness-bar span { background: var(--community-green); border-radius: inherit; display: block; height: 100%; transition: width .2s ease; width: 0; }
.community-readiness-list { display: grid; gap: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
.community-readiness-item { align-items: center; border-top: 1px solid var(--community-line); display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; padding: 10px 8px 0 0; }
.community-readiness-item > div { display: grid; gap: 3px; min-width: 0; }
.community-readiness-item strong { font-size: 13px; overflow-wrap: anywhere; }
.community-readiness-item small, .community-readiness-note { color: var(--community-muted); font-size: 11px; }
.community-readiness-state { color: #9a6b13; font-size: 11px; font-weight: 800; white-space: nowrap; }
.community-readiness-item.is-complete .community-readiness-state { color: var(--community-green); }
.community-readiness-item .community-button { grid-column: 1 / -1; justify-self: start; min-height: 31px; padding: 0 10px; }
@media (max-width: 720px) { .community-readiness-list { grid-template-columns: 1fr; } .community-readiness-item { padding-right: 0; } }
.community-manage-record { align-items: center; border-top: 1px solid var(--community-line); display: flex; gap: 12px; justify-content: space-between; padding: 14px 0; }
.community-manage-record strong { display: block; }
.community-manage-record small { color: var(--community-muted); }
.community-inquiry-record { align-items: flex-start; }
.community-inquiry-record p { color: var(--community-ink); line-height: 1.6; margin: 8px 0; white-space: pre-wrap; }
.community-inquiry-record select { min-height: 36px; }
.community-inline-field { align-items: center; display: flex; gap: 6px; }
.community-inline-field span { color: var(--community-muted); font-size: 12px; white-space: nowrap; }
.community-inline-field input { min-height: 36px; min-width: 120px; }
.community-inquiry-record textarea { border: 1px solid #cbd8d0; border-radius: 5px; display: block; margin-top: 10px; min-height: 84px; padding: 9px 11px; resize: vertical; width: min(100%, 620px); }
.community-field-note { color: var(--community-muted); font-size: 12px; line-height: 1.6; margin: 7px 0; }
.community-field-label { color: var(--community-ink); display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.community-filter-options { border: 0; display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; }
.community-filter-options label { align-items: center; background: var(--community-soft); border: 1px solid var(--community-line); color: var(--community-ink); cursor: pointer; display: inline-flex; font-size: 12px; gap: 5px; padding: 7px 9px; }
.community-filter-options label:has(input:checked) { background: #e6f2e9; border-color: #8dbba0; font-weight: 700; }
.community-filter-options input { accent-color: var(--community-green); margin: 0; }
.community-filter-tags { display: grid; gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.community-filter-tags label { justify-content: space-between; min-width: 0; }
.community-filter-tags label small { color: var(--community-muted); font-size: 11px; }
.community-history-item.is-unread { border-left: 3px solid var(--community-green); }
.community-match-candidates { border: 1px solid var(--community-line); display: grid; gap: 8px; margin: 14px 0 0; padding: 12px; }
.community-match-candidates legend { color: var(--community-ink); font-size: 13px; font-weight: 800; padding: 0 5px; }
.community-match-candidate { align-items: flex-start; background: var(--community-soft); border: 1px solid transparent; cursor: pointer; display: flex; gap: 9px; padding: 10px; }
.community-match-candidate:has(input:checked) { background: #edf7f0; border-color: #8dbba0; }
.community-match-candidate input { flex: 0 0 auto; margin-top: 3px; }
.community-match-candidate span { display: grid; gap: 3px; min-width: 0; }
.community-match-candidate strong { font-size: 13px; line-height: 1.4; }
.community-match-candidate small { color: var(--community-muted); line-height: 1.45; }
.community-match-add { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; margin-top: 8px; }
.community-match-add select { background: #fff; border: 1px solid #cbd8d0; border-radius: 5px; min-height: 38px; min-width: 0; padding: 7px 9px; }
.community-match-message-panel { border-top: 1px solid var(--community-line); display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; }
.community-match-message-panel textarea { border: 1px solid #cbd8d0; border-radius: 5px; min-height: 72px; padding: 9px 11px; resize: vertical; width: min(100%, 620px); }
.community-message-item { background: var(--community-soft); border: 1px solid var(--community-line); margin-top: 8px; padding: 10px 12px; }
.community-message-item strong { display: inline-block; margin-right: 8px; }
.community-message-item small { color: var(--community-muted); }
.community-message-item p { margin: 6px 0 0; }
.community-history-list { margin-top: 26px; }
.community-dashboard-section { border-top: 1px solid var(--community-line); margin-top: 28px; padding-top: 24px; }
.community-dashboard-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.community-dashboard-section > .community-section-head { margin-bottom: 8px; }
.community-dashboard-section h2 { font-size: 20px; margin: 0; }
.community-dashboard-stat-grid { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 16px; }
.community-dashboard-stat { background: var(--community-soft); border: 1px solid var(--community-line); display: grid; gap: 5px; min-height: 128px; padding: 16px; text-decoration: none; }
.community-dashboard-stat:hover, .community-dashboard-stat:focus-visible { border-color: var(--community-green); box-shadow: var(--community-shadow); }
.community-dashboard-stat strong { color: var(--community-green); font-size: 28px; line-height: 1; }
.community-dashboard-stat span { font-size: 14px; font-weight: 800; }
.community-dashboard-stat small { color: var(--community-muted); font-size: 12px; line-height: 1.45; }
.community-profile-summary-grid { display: grid; gap: 1px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.community-profile-summary-grid > div { background: var(--community-soft); border: 1px solid var(--community-line); display: grid; gap: 5px; min-height: 72px; padding: 12px 14px; }
.community-profile-summary-grid small { color: var(--community-muted); font-size: 12px; }
.community-profile-summary-grid strong, .community-profile-summary-grid p { line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.community-settings-section { border-top: 1px solid var(--community-line); margin-top: 30px; padding-top: 26px; }
.community-settings-section h2 { font-size: 20px; margin: 0; }
.community-auth-summary { align-items: flex-start; background: var(--community-soft); border: 1px solid var(--community-line); display: flex; flex-direction: column; gap: 5px; margin: 8px 0 14px; padding: 13px 15px; }
.community-auth-summary span { color: var(--community-muted); font-size: 13px; overflow-wrap: anywhere; }
.community-identity-list { display: grid; gap: 8px; margin: 0 0 14px; }
.community-identity-row { align-items: center; background: var(--community-soft); border: 1px solid var(--community-line); display: flex; gap: 12px; justify-content: space-between; min-width: 0; padding: 11px 13px; }
.community-identity-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
.community-identity-row strong, .community-identity-row small { overflow-wrap: anywhere; }
.community-identity-row small { color: var(--community-muted); font-size: 12px; }
.community-identity-row > div:last-child { align-items: center; display: flex; flex: 0 0 auto; }
.community-identity-row .community-button { margin: 0; min-height: 34px; padding: 6px 11px; }
.community-identity-state { color: var(--community-green); font-size: 12px; font-weight: 800; white-space: nowrap; }
.community-identity-registration-row { background: var(--community-soft); border: 1px solid var(--community-line); }
.community-identity-registration-row + .community-identity-registration-row { margin-top: 8px; }
.community-identity-registration-row > .community-identity-row { border: 0; }
.community-identity-accounts { border-top: 1px solid var(--community-line); padding: 10px 13px 11px; }
.community-identity-accounts-head { align-items: center; color: var(--community-muted); display: flex; font-size: 12px; justify-content: space-between; margin-bottom: 6px; }
.community-identity-account-row { align-items: center; border-top: 1px solid var(--community-line); display: flex; gap: 10px; justify-content: space-between; padding: 8px 0 0; }
.community-identity-account-row > div { display: grid; gap: 3px; min-width: 0; }
.community-identity-account-row .community-button { flex: 0 0 auto; min-height: 32px; padding: 5px 10px; }
.community-account-registration-party { color: var(--community-ink); font-weight: 800; overflow-wrap: anywhere; text-decoration: none; }
.community-account-registration-party:hover { text-decoration: underline; }
.community-identity-account-row small { color: var(--community-muted); font-size: 12px; overflow-wrap: anywhere; }
.community-identity-accounts-empty { color: var(--community-muted); font-size: 12px; }
.community-message[data-error="true"] { color: #a43d35; }
.community-history-list h2 { font-size: 19px; margin: 0 0 12px; }
.community-history-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.community-managed-list { display: grid; gap: 10px; }
.community-managed-row { background: var(--community-soft); border: 1px solid var(--community-line); display: grid; gap: 16px; padding: 18px 20px; }
.community-managed-main { align-items: center; display: flex; gap: 22px; justify-content: space-between; min-width: 0; }
.community-managed-title { display: grid; gap: 4px; min-width: 0; }
.community-managed-title .community-card-label { margin: 0; }
.community-managed-title strong { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.community-managed-title small { color: var(--community-muted); font-size: 12px; line-height: 1.5; }
.community-managed-state { align-items: center; display: flex; flex: 0 0 auto; }
.community-managed-state .community-button { min-width: 112px; }
.community-managed-row .community-card-actions { border-top: 1px solid var(--community-line); margin: 0; padding-top: 14px; }
.community-history-item { background: var(--community-soft); border: 1px solid var(--community-line); color: inherit; display: flex; flex-direction: column; gap: 5px; min-height: 64px; padding: 12px 14px; text-decoration: none; }
.community-history-item:hover, .community-history-item:focus-visible { border-color: var(--community-green); }
.community-history-item small { color: var(--community-muted); font-size: 12px; }
.community-party-select { margin: 0 0 20px; max-width: 440px; }
.community-notice { background: #fff9ed; border: 1px solid #ead3a4; color: #6e5225; padding: 12px 14px; }
.community-consult-lines { display: grid; gap: 12px; }
.community-consult-line { background: var(--community-soft); border: 1px solid var(--community-line); display: grid; gap: 10px; padding: 14px; }
.community-consult-line > .community-button { justify-self: start; }
.community-line-advanced { border-top: 1px solid var(--community-line); padding-top: 8px; }
.community-line-advanced summary { color: var(--community-muted); cursor: pointer; font-size: 13px; font-weight: 700; }
.community-line-advanced[open] summary { color: var(--community-ink); margin-bottom: 10px; }
.community-structured-group { border: 1px solid var(--community-line); margin: 0; padding: 10px; }
.community-structured-group legend { color: var(--community-muted); font-size: 12px; font-weight: 700; padding: 0 5px; }
.community-tag-options { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.community-tag-options label { align-items: center; color: var(--community-ink); display: inline-flex; font-size: 12px; gap: 4px; }
.community-tag-options input { accent-color: var(--community-green); min-height: auto; width: auto; }
.community-offering-season { background: var(--community-soft); border: 1px solid var(--community-line); display: grid; gap: 10px; margin-top: 10px; padding: 12px; }
.community-offering-season .community-section-head { margin: 0; }
.community-offering-season h4 { font-size: 15px; margin: 0; }
.community-season-structured { border-top: 1px solid var(--community-line); padding-top: 9px; }
.community-season-structured summary { color: var(--community-muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.community-season-structured[open] summary { color: var(--community-ink); margin-bottom: 9px; }
.community-season-structured-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 920px) {
  .community-header { flex-wrap: wrap; gap: 10px 14px; }
  .community-nav { display: flex; flex-basis: 100%; gap: 4px 16px; margin-left: 0; max-width: 100%; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .community-nav::-webkit-scrollbar { display: none; }
  .community-nav a { flex: 0 0 auto; padding: 6px 0; white-space: nowrap; }
  .community-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-search .community-field:first-child { grid-column: 1 / -1; }
  .community-search .community-button { width: 100%; }
  .community-hero-grid { grid-template-columns: 1fr; }
  .community-discovery-snapshot { border-left: 0; border-top: 3px solid var(--community-green); }
  .community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-discovery-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-dashboard-layout { grid-template-columns: 1fr; }
  .community-dashboard-nav { display: flex; flex-direction: row; overflow-x: auto; position: static; }
  .community-dashboard-nav-group, .community-manage-nav-group { display: flex; flex: 0 0 auto; gap: 3px; }
  .community-dashboard-nav-group + .community-dashboard-nav-group, .community-manage-nav-group + .community-manage-nav-group { border-left: 1px solid var(--community-line); border-top: 0; margin: 0 0 0 4px; padding: 0 0 0 4px; }
  .community-dashboard-nav-group > span, .community-manage-nav-group > span { display: none; }
  .community-dashboard-nav a { border-bottom: 3px solid transparent; border-left: 0; flex: 0 0 auto; white-space: nowrap; }
  .community-dashboard-nav a.is-active { border-bottom-color: var(--community-green); border-left: 0; }
  .community-manage-layout { grid-template-columns: 1fr; }
  .community-manage-nav { display: flex; overflow-x: auto; position: static; }
  .community-manage-nav button { border-bottom: 3px solid transparent; border-left: 0; white-space: nowrap; }
  .community-manage-nav button.is-active { border-bottom-color: var(--community-green); border-left: 0; }
}
@media (max-width: 600px) {
  .community-header { align-items: center; display: grid; gap: 10px 12px; grid-template-columns: minmax(0, 1fr) auto; padding: 10px 14px; }
  .community-brand { grid-column: 1; grid-row: 1; }
  .community-actions { grid-column: 2; grid-row: 1; max-width: none; }
  .community-nav { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .community-actions a { min-height: 36px; padding: 0 9px; }
  .community-actions a:not(.community-primary):not([data-community-auth]) { display: none; }
  .community-actions a[data-community-auth] { display: inline-flex; }
  .community-main { padding: 22px 14px 58px; }
  .community-toolbar { padding: 22px 17px; }
  .community-hero-grid { gap: 24px; }
  .community-snapshot-grid strong { font-size: 21px; }
  .community-search { grid-template-columns: 1fr; }
  .community-search .community-field:first-child { grid-column: auto; }
  .community-grid { grid-template-columns: 1fr; }
  .community-discovery-shortcuts { grid-template-columns: 1fr; }
  .community-section-head { align-items: start; flex-direction: column; gap: 5px; }
  .community-dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-footer { flex-direction: column; margin-top: 61px; padding: 18px 14px; }
  .community-spec-list { grid-template-columns: 1fr; }
  .community-condition-grid { grid-template-columns: 1fr; }
  .community-spec-list dt { border-top: 0; padding-bottom: 3px; }
  .community-spec-list dd { padding-top: 3px; }
  .community-history-grid { grid-template-columns: 1fr; }
  .community-profile-summary-grid { grid-template-columns: 1fr; }
  .community-profile-overview-grid { grid-template-columns: 1fr; }
  .community-managed-main { align-items: flex-start; flex-direction: column; gap: 12px; }
  .community-managed-state { width: 100%; }
  .community-managed-state .community-button { width: 100%; }
  .community-match-add { grid-template-columns: 1fr; }
}

/* Discovery scale: keep search controls and result scanning stable as the
   public catalog grows. Detail pages continue using the existing card rules. */
.community-search-enhanced {
  align-items: end;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) auto;
}
.community-search-filters {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.community-search-actions {
  display: flex;
  gap: 8px;
}
.community-filter-toggle { display: none; }
.community-result-toolbar { align-items: end; margin-bottom: 10px; }
.community-result-toolbar > div:first-child { display: flex; align-items: baseline; gap: 12px; }
.community-result-controls { align-items: end; display: flex; gap: 12px; }
.community-sort-control { align-items: center; color: var(--community-muted); display: flex; font-size: 13px; gap: 7px; white-space: nowrap; }
.community-sort-control select { background: #fff; border: 1px solid var(--community-line); border-radius: 5px; color: var(--community-ink); min-height: 38px; padding: 6px 9px; }
.community-view-switch { border: 1px solid var(--community-line); display: inline-flex; }
.community-view-switch button { background: #fff; border: 0; color: var(--community-muted); cursor: pointer; min-height: 38px; padding: 0 12px; }
.community-view-switch button + button { border-left: 1px solid var(--community-line); }
.community-view-switch button.is-active { background: var(--community-soft); color: var(--community-ink); font-weight: 800; }
.community-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; margin: 0 0 12px; }
.community-filter-chip { background: var(--community-soft); border: 1px solid var(--community-line); border-radius: 999px; color: var(--community-ink); cursor: pointer; font-size: 13px; padding: 6px 10px; }
.community-filter-chip span { color: var(--community-muted); margin-left: 4px; }
.community-results-list.is-list { display: grid; gap: 8px; grid-template-columns: 1fr; }
.community-results-list.is-card { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.community-result-row { align-items: center; background: var(--community-paper); border: 1px solid var(--community-line); display: flex; gap: 18px; justify-content: space-between; min-width: 0; padding: 14px 16px; }
.community-result-row:hover { border-color: #9dbbad; box-shadow: 0 4px 14px rgba(23, 33, 29, .06); }
.community-result-row-main { align-items: center; display: flex; gap: 13px; min-width: 0; }
.community-result-row-media { background: var(--community-soft); flex: 0 0 60px; height: 60px; overflow: hidden; }
.community-result-row-media img { height: 100%; object-fit: cover; width: 100%; }
.community-result-row-copy { min-width: 0; }
.community-result-row-copy .community-card-label { margin-bottom: 3px; }
.community-result-row-copy h3 { font-size: 17px; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.community-result-row-copy h3 a { text-decoration: underline; text-decoration-color: #b8cec0; text-underline-offset: 3px; }
.community-result-row-copy > p { color: var(--community-muted); font-size: 14px; line-height: 1.55; margin: 4px 0 0; max-width: 72ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-result-row .community-meta { font-size: 13px; gap: 5px 14px; margin-top: 5px; }
.community-result-row-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.community-result-row-actions .community-button { min-height: 34px; padding: 0 10px; }
.community-pagination { align-items: center; display: flex; gap: 14px; justify-content: center; margin-top: 22px; }
.community-pagination span { color: var(--community-muted); font-size: 13px; min-width: 110px; text-align: center; }
.community-pagination .community-button { min-height: 44px; min-width: 84px; }
.community-card-label { font-size: 13px; }
.community-meta { font-size: 13px; }
.community-tag { font-size: 12px; }
@media (max-width: 920px) {
  .community-discovery-layout { grid-template-columns: 1fr; }
  .community-discovery-sidebar { position: static; }
  .community-search-enhanced { grid-template-columns: 1fr auto; }
  .community-search-enhanced > .community-field:first-child { grid-column: 1 / -1; }
  .community-search-filters { grid-column: 1 / -1; }
  .community-search-actions { grid-column: 2; }
  .community-filter-toggle { display: inline-flex; }
  .community-results-list.is-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-result-toolbar { align-items: flex-start; flex-direction: column; }
  .community-result-controls { width: 100%; justify-content: space-between; }
}
@media (max-width: 600px) {
  .community-toolbar h1 { font-size: 28px; }
  .community-search-enhanced { display: grid; grid-template-columns: 1fr auto; }
  .community-discovery-sidebar { padding: 16px; }
  .community-discovery-sidebar .community-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-discovery-sidebar .community-tab { border-bottom: 1px solid var(--community-line); border-left: 0; border-right: 1px solid var(--community-line); min-height: 44px; }
  .community-discovery-sidebar .community-tab:nth-child(even) { border-right: 0; }
  .community-discovery-sidebar .community-tab.is-active { border-bottom-color: var(--community-line); border-left: 0; box-shadow: inset 0 -3px 0 var(--community-green); }
  .community-search-filters { display: grid; grid-template-columns: 1fr; }
  .community-search-filters[hidden] { display: none; }
  .community-search-actions { grid-column: 1 / -1; justify-content: stretch; }
  .community-search-actions .community-button { flex: 1; }
  .community-result-controls { align-items: stretch; flex-direction: column; gap: 8px; }
  .community-sort-control { justify-content: space-between; }
  .community-sort-control select { flex: 1; }
  .community-view-switch { width: 100%; }
  .community-view-switch button { flex: 1; }
  .community-results-list.is-card { grid-template-columns: 1fr; }
  .community-result-row { align-items: stretch; flex-direction: column; gap: 12px; padding: 13px; }
  .community-result-row-actions { justify-content: stretch; }
  .community-result-row-actions .community-button { flex: 1; }
  .community-result-row-copy > p { white-space: normal; }
  .community-result-row-media { flex-basis: 52px; height: 52px; }
}

/* The public site has one shared session area on every public page. */
.community-account-state {
  align-items: flex-start;
  background: var(--community-soft);
  border-color: var(--community-line) !important;
  color: var(--community-ink);
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  justify-content: center;
  line-height: 1.2;
  max-width: 210px;
  min-height: 40px;
  overflow: hidden;
  text-align: left;
}
.community-account-state span,
.community-account-state small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-account-state span { font-size: 12px; font-weight: 800; }
.community-account-state small { color: var(--community-muted); font-size: 10px; }
.community-management-link { color: var(--community-green); font-weight: 800; }
.community-logout-link { color: var(--community-muted); }
@media (max-width: 920px) {
  .community-account-state { max-width: 180px; }
}
@media (max-width: 600px) {
  .community-actions { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 90px); }
  .community-account-state { max-width: 150px; }
  .community-actions a.community-account-state { display: inline-flex; }
  .community-actions a.community-management-link { display: inline-flex; }
  .community-account-state small,
  .community-actions a.community-logout-link { display: none !important; }
}

/* SupplyFlow public surface: one catalog, one community shell, one visual rhythm. */
:root {
  --community-container: 1480px;
  --community-ink: #1d2a2d;
  --community-muted: #607176;
  --community-line: #d7e2e0;
  --community-soft: #eef4f2;
  --community-paper: #ffffff;
  --community-green: #0f766e;
  --community-blue: #315c96;
  --community-orange: #b45309;
  --community-shadow: 0 12px 28px rgba(25, 50, 52, .06);
}

html, body { background: #f1f5f4; color: var(--community-ink); }
.community-header { min-height: 64px; padding: 10px clamp(18px, 4vw, 64px); background: rgba(255,255,255,.94); box-shadow: 0 1px 0 rgba(28, 54, 55, .04); }
.community-brand { font-size: 21px; letter-spacing: 0; }
.community-nav { gap: 22px; }
.community-nav a { font-size: 13px; }
.community-actions a, .community-button { min-height: 38px; border-radius: 7px; font-size: 13px; }
.community-actions .community-primary, .community-button.community-primary { background: var(--community-green); border-color: var(--community-green); box-shadow: 0 2px 0 rgba(7, 78, 70, .12); }
.community-main, .community-detail { padding-top: 32px; }
.community-toolbar { border: 0; border-bottom: 1px solid var(--community-line); box-shadow: none; background: transparent; padding: 20px 0 30px; }
.community-hero-grid { gap: 48px; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
.community-toolbar h1 { max-width: 760px; font-size: clamp(30px, 4vw, 46px); letter-spacing: 0; }
.community-toolbar p { max-width: 760px; font-size: 14px; }
.community-discovery-snapshot { border: 1px solid var(--community-line); border-left: 4px solid var(--community-green); background: rgba(255,255,255,.78); padding: 16px; }
.community-snapshot-grid > div { min-height: 68px; }
.community-snapshot-grid strong { font-size: 22px; }
.community-discovery-layout { gap: 32px; margin-top: 28px; grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); }
.community-discovery-sidebar, .community-manage-nav { border-color: var(--community-line); border-radius: 9px; box-shadow: 0 4px 14px rgba(25, 50, 52, .035); }
.community-discovery-sidebar { padding: 16px; top: 80px; }
.community-sidebar-heading h2 { font-size: 18px; }
.community-discovery-sidebar .community-tabs { margin: 12px 0 16px; border-radius: 7px; }
.community-discovery-sidebar .community-tab { padding: 10px 12px; font-size: 13px; }
.community-field input, .community-field select, .community-field textarea { border-color: #c7d7d3; border-radius: 7px; min-height: 40px; }
.community-filter-options label { border-radius: 5px; }
.community-filter-tags { max-height: 260px; overflow-y: auto; padding-right: 3px; }
.community-search-actions { gap: 6px; }
.community-search-actions .community-button { flex: 1; }
.community-result-toolbar { padding-bottom: 8px; border-bottom: 1px solid var(--community-line); }
.community-section-head h2 { font-size: 20px; letter-spacing: 0; }
.community-result-row { border-color: var(--community-line); border-radius: 8px; background: rgba(255,255,255,.92); padding: 13px 15px; }
.community-result-row:hover { border-color: #85b8ae; box-shadow: 0 5px 16px rgba(25, 50, 52, .07); }
.community-result-row-copy h3 { font-size: 16px; }
.community-result-row-actions .community-button { min-height: 33px; }
.community-card, .community-detail-header, .community-detail-body, .community-manage-panel { border-color: var(--community-line); border-radius: 9px; box-shadow: none; }
.community-card { padding: 17px; }
.community-card-media { margin: -17px -17px 15px; }
.community-card h3 { font-size: 17px; }
.community-card-actions { padding-top: 14px; }
.community-tag { border: 1px solid #d7e5e1; border-radius: 999px; }
.community-footer { background: rgba(255,255,255,.62); border-color: var(--community-line); padding-top: 17px; padding-bottom: 17px; }
.community-detail { min-height: 0; }
.community-detail-header { padding: clamp(26px, 5vw, 48px); }
.community-detail-header h1 { letter-spacing: 0; }
.community-detail-header .community-manage-login-title { font-size: clamp(25px, 3.2vw, 32px); letter-spacing: 0; margin: 0; }
.community-detail-body { border-top: 1px solid var(--community-line); margin-top: 16px; }
.community-dashboard-layout, .community-manage-layout { gap: 28px; }
.community-dashboard-nav a, .community-manage-nav button { border-radius: 6px; }
.community-dashboard-nav a.is-active, .community-manage-nav button.is-active { background: #e4f1ee; border-bottom-color: var(--community-green); color: #0b5e58; }
.community-dashboard-nav-group, .community-manage-nav-group { display: grid; gap: 3px; }
.community-dashboard-nav-group + .community-dashboard-nav-group, .community-manage-nav-group + .community-manage-nav-group { border-top: 1px solid var(--community-line); margin-top: 7px; padding-top: 7px; }
.community-dashboard-nav-group > span, .community-manage-nav-group > span { color: var(--community-muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 4px 12px 2px; }
.community-manage-nav-group button { text-align: left; }
.community-manage-panel { padding: clamp(22px, 4vw, 38px); }
.community-manage-record { padding: 12px 0; }
.community-pagination { margin-top: 18px; }

/* Empty/guest states should communicate the next action without leaving a blank page. */
body:has(#communityAccessTitle) .community-detail { display: grid; align-content: start; }
body:has(#communityAccessTitle) .community-detail-header { min-height: 0; }
body:has(#communityMemberPanel[hidden]) .community-detail-header { max-width: 860px; }
body:has(#profilePanel[hidden]) .community-detail-header { max-width: 860px; }
body:has(#communityAccessTitle) .community-detail-header .community-form-actions { justify-content: flex-start; margin-top: 20px; }
body:has(#communityAccessTitle) .community-detail-header .community-guest-actions { margin-top: 12px; }

/* Empty and unauthenticated pages should size to their available content.
   Populated detail pages naturally grow with their body sections. */
.community-detail:has(#communityDetail > .community-detail-header:only-child),
.community-detail:has(#profilePanel[hidden]),
.community-detail:has(#consultApp[hidden]),
.community-detail:has(#pageFormPanel[hidden]),
.community-detail:has(#claimPreview[hidden]) {
  max-width: 980px;
}

body:has(#manageLogin:not([hidden])) .community-main {
  max-width: 980px;
  padding-bottom: 32px;
}

@media (max-width: 920px) {
  .community-toolbar { padding-top: 10px; }
  .community-discovery-sidebar { box-shadow: none; }
  .community-filter-tags { max-height: none; overflow: visible; }
}

@media (max-width: 600px) {
  .community-header { min-height: 60px; }
  .community-main, .community-detail { padding-top: 20px; }
  .community-toolbar { padding-bottom: 22px; }
  .community-toolbar h1 { font-size: 28px; letter-spacing: 0; }
  .community-discovery-snapshot { padding: 12px; }
  .community-discovery-layout { margin-top: 18px; }
  .community-discovery-sidebar { padding: 13px; }
  .community-detail-header { padding: 22px 18px; }
  .community-detail-header h1 { font-size: 30px; }
  .community-detail-header .community-manage-login-title { font-size: 26px; }
  .community-detail-body { padding: 18px; }
  .community-footer { gap: 10px; }
  .community-dashboard-page-head { align-items: start; flex-direction: column; gap: 12px; }
  .community-dashboard-page-head .community-button { width: 100%; }
}

/* Responsive rules are repeated after the design-system overrides so the
   public catalog cannot inherit its desktop two-column tracks on mobile. */
@media (max-width: 920px) {
  .community-hero-grid { grid-template-columns: 1fr; }
  .community-discovery-layout { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-discovery-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-search-enhanced { grid-template-columns: 1fr auto; }
  .community-search-enhanced > .community-field:first-child { grid-column: 1 / -1; }
  .community-search-filters { grid-column: 1 / -1; }
  .community-search-actions { grid-column: 2; }
  .community-result-toolbar { align-items: flex-start; flex-direction: column; }
  .community-result-controls { width: 100%; justify-content: space-between; }
}

@media (max-width: 600px) {
  .community-search-enhanced { grid-template-columns: 1fr auto; }
  .community-search-enhanced > .community-field:first-child { grid-column: auto; }
  .community-search-filters { grid-template-columns: 1fr; }
  .community-search-actions { grid-column: 1 / -1; }
  .community-result-controls { align-items: stretch; flex-direction: column; width: 100%; }
  .community-sort-control { justify-content: space-between; width: 100%; }
  .community-sort-control select { flex: 1; min-width: 0; }
  .community-grid, .community-discovery-shortcuts { grid-template-columns: 1fr; }
  .community-season-structured-grid { grid-template-columns: 1fr; }
}

/* Public headings should support scanning on both desktop and mobile. */
.community-toolbar h1 { font-size: clamp(27px, 3.2vw, 34px); }
.community-detail-header h1 { font-size: clamp(25px, 3.2vw, 32px); }
.community-manage-panel h1 { font-size: 24px; }
.community-section-head h2 { font-size: 18px; }

@media (max-width: 600px) {
  .community-toolbar h1 { font-size: 26px; }
  .community-detail-header h1 { font-size: 26px; }
}

/* Final responsive corrections for the public catalog. Checkbox controls must
   keep their native dimensions even though text fields use a larger height. */
.community-filter-options input[type="checkbox"],
.community-filter-options input[type="radio"],
.community-match-candidate input[type="checkbox"],
.community-tag-options input[type="checkbox"] {
  flex: 0 0 auto;
  height: 16px;
  min-height: 16px;
  min-width: 16px;
  padding: 0;
  width: 16px;
}

.community-filter-options label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.community-result-row-copy > p {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

@media (min-width: 601px) and (max-width: 920px) {
  .community-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
  }

  .community-nav {
    grid-column: 2;
    flex-basis: auto;
    justify-content: flex-end;
    margin-left: 0;
    max-width: none;
    overflow: visible;
    padding-bottom: 0;
  }

  .community-actions {
    grid-column: 3;
    min-width: max-content;
  }
}

/* Keep content-section headings subordinate to the page title. */
.community-section-head h2,
.community-dashboard-section h2,
.community-settings-section h2,
.community-manage-panel h2 {
  font-size: 17px;
  line-height: 1.4;
}

.community-sidebar-heading h2 {
  font-size: 18px;
  line-height: 1.4;
}

/* Discovery is split by user intent: the root page is an entry point and
   each catalog owns its own filters and result layout. */
.community-discovery-intro,
.community-home-hero {
  align-items: end;
  background: var(--community-paper);
  border: 1px solid var(--community-line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 42px);
}

.community-discovery-intro h1,
.community-home-hero h1 {
  font-size: 30px;
  line-height: 1.3;
  margin: 0;
}

.community-discovery-intro p:last-child,
.community-home-hero p:last-child {
  color: var(--community-muted);
  margin: 10px 0 0;
  max-width: 72ch;
}

.community-home-section {
  margin-top: 28px;
}

.community-entry-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.community-entry-card {
  background: var(--community-paper);
  border: 1px solid var(--community-line);
  display: grid;
  gap: 7px;
  min-height: 150px;
  padding: 20px;
  text-decoration: none;
}

.community-entry-card.is-metric {
  min-height: 112px;
  padding: 16px;
}

.community-entry-card.is-metric:hover {
  border-color: var(--community-green);
  box-shadow: var(--community-shadow);
}

.community-entry-card:hover,
.community-entry-card:focus-visible {
  border-color: var(--community-green);
  box-shadow: var(--community-shadow);
}

.community-entry-card strong {
  font-size: 17px;
}

.community-entry-card.is-metric span {
  color: var(--community-green);
  font-size: 12px;
  font-weight: 700;
}

.community-entry-card span {
  color: var(--community-muted);
  font-size: 13px;
  line-height: 1.6;
}

.community-entry-card small {
  align-self: end;
  color: var(--community-green);
  font-size: 12px;
}

.community-entry-card small b {
  font-size: 21px;
  margin-right: 3px;
}

.community-home-note {
  background: var(--community-soft);
  border: 1px solid var(--community-line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  padding: 20px;
}

.community-home-note h2 {
  font-size: 17px;
  margin: 0;
}

.community-home-note p {
  color: var(--community-muted);
  margin: 0;
}

.community-home-note .community-form-actions {
  grid-column: 2;
  justify-content: flex-start;
  margin: 0;
}

@media (max-width: 760px) {
  .community-discovery-intro,
  .community-home-hero {
    align-items: start;
    flex-direction: column;
  }

  .community-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-home-note {
    grid-template-columns: 1fr;
  }

  .community-home-note .community-form-actions {
    grid-column: auto;
  }
}

/* Public discovery uses full-width lists; filters live on the dedicated search page. */
.community-discovery-list-page .community-discovery-layout {
  display: block;
  margin-top: 24px;
}
.community-discovery-list-page .community-discovery-sidebar {
  display: none;
}
.community-discovery-list-page .community-discovery-results {
  width: 100%;
}
.community-discovery-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.community-discovery-search-page .community-discovery-layout {
  display: block;
  margin-top: 24px;
}
.community-discovery-search-page .community-discovery-sidebar {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  position: static;
}
.community-discovery-search-page .community-sidebar-heading {
  align-items: baseline;
  display: flex;
  gap: 12px;
}
.community-discovery-search-page .community-sidebar-heading .community-kicker {
  margin: 0;
}
.community-discovery-search-page .community-tabs {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
}
.community-discovery-search-page .community-tab,
.community-discovery-search-page .community-tab:last-child {
  border: 1px solid var(--community-line);
  border-left: 1px solid var(--community-line);
  padding: 9px 14px;
  text-align: center;
}
.community-discovery-search-page .community-tab.is-active {
  background: var(--community-soft);
  border-color: var(--community-green);
  box-shadow: inset 0 -2px 0 var(--community-green);
}
.community-discovery-search-page .community-search-enhanced,
.community-discovery-search-page .community-search-filters {
  grid-template-columns: 1fr;
}
.community-discovery-search-page .community-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}
.community-discovery-search-page .community-filter-toggle {
  display: inline-flex;
}
.community-discovery-search-page .community-auth-state[data-empty="true"] {
  display: none;
}
.community-discovery-search-page .community-discovery-results {
  margin-top: 32px;
  width: 100%;
}
@media (max-width: 760px) {
  .community-discovery-search-page .community-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .community-discovery-search-page .community-tab,
  .community-discovery-search-page .community-tab:last-child {
    width: 100%;
  }
  .community-discovery-intro-actions .community-button {
    width: 100%;
  }
}

/* Keep the mobile filter panel collapsed before JavaScript runs. Desktop
   starts expanded, so neither viewport needs a post-paint layout correction. */
@media (max-width: 920px) {
  .community-discovery-search-page #communitySearchFilters[data-filter-state="collapsed"] {
    display: none;
  }
}

/* Keep the five discovery types on one compact mobile row so every action
   remains visible without relying on horizontal scrolling. */
@media (max-width: 600px) {
  .community-discovery-search-page .community-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 10px 0 14px;
    overflow: visible;
  }

  .community-discovery-search-page .community-tab,
  .community-discovery-search-page .community-tab:last-child {
    flex: 1 1 0;
    font-size: 12px;
    min-width: 0;
    padding: 9px 6px;
    width: auto;
  }

  .community-discovery-search-page .community-result-controls {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-discovery-search-page .community-result-controls .community-view-switch {
    grid-column: 1 / -1;
  }
}

@media (max-width: 460px) {
  .community-discovery-intro h1,
  .community-home-hero h1 {
    font-size: 25px;
  }

  .community-entry-grid {
    grid-template-columns: 1fr;
  }
}

/* Compact discovery rows keep comparison fields visible; full descriptions remain on detail pages. */
.community-results-list.is-list .community-result-row {
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 9px 12px;
}
.community-results-list.is-list .community-result-row-main {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, .72fr) minmax(170px, 1.2fr) minmax(0, 1.8fr);
  min-width: 0;
  width: 100%;
}
.community-results-list.is-list .community-result-row-main .community-card-label {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.community-results-list.is-list .community-result-row-kind {
  border-radius: 4px;
  display: inline-flex;
  max-width: 100%;
  padding: 4px 7px;
  width: max-content;
}
.community-results-list.is-list .community-kind-default {
  background: #eef2f1;
  color: #3c5650;
}
.community-results-list.is-list .community-kind-producer {
  background: #e5f2e8;
  color: #246b42;
}
.community-results-list.is-list .community-kind-manufacturing {
  background: #e9eef8;
  color: #2c568c;
}
.community-results-list.is-list .community-kind-packaging {
  background: #fff2df;
  color: #8a5b16;
}
.community-results-list.is-list .community-kind-logistics {
  background: #e8f2f2;
  color: #176a6e;
}
.community-results-list.is-list .community-kind-warehouse {
  background: #eee9f7;
  color: #63448b;
}
.community-results-list.is-list .community-kind-export {
  background: #f7e9ee;
  color: #8a3f5d;
}
.community-results-list.is-list .community-kind-inspection {
  background: #f1efe5;
  color: #665c2f;
}
.community-results-list.is-list .community-kind-community {
  background: #e8f4f2;
  color: #17665f;
}
.community-results-list.is-list .community-kind-other {
  background: #f0f1f4;
  color: #4e5663;
}
.community-results-list.is-list .community-result-row-title,
.community-results-list.is-list .community-result-row-meta {
  min-width: 0;
}
.community-results-list.is-list .community-result-row-title h3 {
  font-size: 15px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.community-results-list.is-list .community-result-row-spec {
  color: var(--community-muted);
  display: -webkit-box;
  font-size: 11px;
  line-height: 1.35;
  margin: 2px 0 0;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.community-results-list.is-list .community-result-row-meta {
  align-items: center;
  display: flex;
  gap: 5px 14px;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.community-results-list.is-list .community-result-row-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.community-results-list.is-list .community-result-row-actions {
  gap: 5px;
}
.community-results-list.is-list .community-result-row-actions .community-button {
  font-size: 12px;
  min-height: 32px;
  padding: 0 9px;
  white-space: nowrap;
}
/* Keep long discovery lists responsive without changing their compact row layout. */
.community-results-list.is-list > .community-result-row {
  content-visibility: auto;
  contain-intrinsic-size: 78px;
}
.community-results-list.is-card > .community-card {
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}
@media (max-width: 760px) {
  .community-results-list.is-list > .community-result-row {
    contain-intrinsic-size: 132px;
  }
  .community-results-list.is-list .community-result-row {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
  .community-results-list.is-list .community-result-row-main {
    gap: 6px 10px;
    grid-template-columns: minmax(88px, .7fr) minmax(0, 1.3fr);
  }
  .community-results-list.is-list .community-result-row-meta {
    grid-column: 1 / -1;
    min-height: 20px;
  }
  .community-results-list.is-list .community-result-row-actions {
    justify-content: flex-end;
  }
}

/* Discovery rows show only comparison fields; details stay on the linked title. */
.community-results-list.is-list .community-result-row-main {
  gap: 10px;
  grid-template-columns: minmax(84px, .55fr) minmax(0, 1.45fr) minmax(150px, .8fr);
}
.community-results-list.is-list .community-result-row-title h3 {
  font-size: 14px;
}
.community-results-list.is-list .community-result-row-spec {
  -webkit-line-clamp: 1;
  font-size: 10px;
  line-height: 1.35;
}
.community-results-list.is-list .community-result-row-meta {
  font-size: 11px;
  gap: 4px 10px;
}
.community-results-list.is-list .community-result-row-actions .community-button {
  font-size: 11px;
  min-height: 30px;
  padding: 0 8px;
}
.community-results-list.is-loading {
  min-height: 118px;
}
.community-results-list.is-loading .community-empty {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 118px;
}
.community-results-list.is-refreshing {
  opacity: .66;
  pointer-events: none;
  transition: opacity .16s ease;
}
@media (prefers-reduced-motion: reduce) {
  .community-results-list.is-refreshing {
    transition: none;
  }
}
@media (max-width: 760px) {
  .community-results-list.is-list .community-result-row-main {
    gap: 5px 9px;
    grid-template-columns: minmax(76px, .6fr) minmax(0, 1.4fr);
  }
  .community-results-list.is-list .community-result-row-spec {
    -webkit-line-clamp: 2;
  }
}

/* Unified public UI scale. Keep discovery, community and detail pages on the
   same reading rhythm; page-specific rules above only define behavior. */
:root {
  --community-container: 1320px;
  --community-space-1: 6px;
  --community-space-2: 10px;
  --community-space-3: 16px;
  --community-space-4: 24px;
  --community-space-5: 32px;
  --community-control-height: 40px;
}

html,
body {
  font-size: 15px;
  line-height: 1.55;
}

.community-main,
.community-detail {
  max-width: var(--community-container);
  padding: var(--community-space-5) clamp(18px, 3vw, 40px) 64px;
}

.community-toolbar,
.community-discovery-intro,
.community-home-hero {
  border: 1px solid var(--community-line);
  border-radius: 8px;
  background: var(--community-paper);
  padding: clamp(24px, 4vw, 36px);
}

.community-toolbar h1,
.community-discovery-intro h1,
.community-home-hero h1 {
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.32;
}

.community-toolbar p,
.community-discovery-intro p,
.community-home-hero p {
  font-size: 15px;
  line-height: 1.7;
}

.community-section {
  margin-top: var(--community-space-5);
}

.community-section-head {
  margin-bottom: var(--community-space-3);
}

.community-section-head h2,
.community-dashboard-section h2,
.community-settings-section h2,
.community-manage-panel h2 {
  font-size: 20px;
  line-height: 1.4;
}

.community-button,
.community-actions a,
.community-view-switch button,
.community-sort-control select {
  min-height: var(--community-control-height);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.2;
}

.community-button,
.community-actions a {
  padding: 0 14px;
  font-weight: 700;
}

.community-field label,
.community-field-label {
  font-size: 13px;
}

.community-field input,
.community-field select,
.community-field textarea,
.community-readonly {
  min-height: var(--community-control-height);
  border-radius: 6px;
  font-size: 15px;
}

.community-card,
.community-result-row,
.community-entry-card,
.community-detail-header,
.community-detail-body,
.community-manage-panel,
.community-discovery-sidebar {
  border-radius: 8px;
  box-shadow: none;
}

.community-card {
  padding: 18px;
}

.community-card h3,
.community-result-row-copy h3 {
  font-size: 17px;
  line-height: 1.45;
}

.community-card p,
.community-result-row-copy > p {
  line-height: 1.65;
}

.community-meta,
.community-card-label,
.community-tag {
  font-size: 12px;
}

.community-entry-grid {
  gap: var(--community-space-3);
}

.community-entry-card {
  min-height: 128px;
  padding: 18px;
}

.community-entry-card strong {
  font-size: 16px;
}

.community-entry-card small b {
  font-size: 20px;
}

.community-home-metrics {
  transition: opacity .18s ease;
}

.community-home-metrics[aria-busy="true"] {
  opacity: .72;
}

.community-home-metrics[data-count-state="unavailable"] {
  opacity: .86;
}

.community-home-metric-status {
  color: var(--community-muted);
  font-size: 12px;
  margin: 8px 0 0;
}

.community-home-note {
  gap: var(--community-space-4);
  margin-top: var(--community-space-5);
  padding: 20px 22px;
}

.community-pagination {
  margin-top: var(--community-space-4);
}

.community-pagination .community-button {
  min-width: 80px;
}

@media (max-width: 760px) {
  .community-main,
  .community-detail {
    padding: 20px 14px 56px;
  }

  .community-toolbar,
  .community-discovery-intro,
  .community-home-hero {
    padding: 22px 18px;
  }

  .community-toolbar h1,
  .community-discovery-intro h1,
  .community-home-hero h1 {
    font-size: 28px;
  }

  .community-button,
  .community-actions a,
  .community-view-switch button,
  .community-sort-control select {
    min-height: 42px;
  }

  .community-inquiry-record .community-form-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .community-inline-field input,
  .community-inquiry-record .community-form-actions select,
  .community-inquiry-record .community-form-actions button {
    width: 100%;
  }

  /* Keep every mobile action reachable with a thumb. Inline footer links and
     card titles are still visually compact, but their hit areas are not. */
  .community-footer span:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .community-footer a {
    align-items: center;
    display: inline-flex;
    min-height: 40px;
    padding: 8px 2px;
  }

  .community-card-actions .community-button,
  .community-result-row-actions .community-button {
    min-height: 44px;
  }

  .community-card h3 a,
  .community-result-row-copy h3 a,
  .community-result-row-title h3 a {
    align-items: center;
    display: inline-flex;
    min-height: 40px;
  }

  /* The compact list view has a more specific desktop rule. Keep its
     controls thumb-sized after the list collapses to a mobile column. */
  .community-results-list.is-list .community-result-row-actions .community-button {
    min-height: 44px;
    padding: 0 10px;
    font-size: 13px;
  }
}

/* Catalog introductions are always read top-to-bottom. This prevents the
   legacy flex rule from squeezing the kicker and title into narrow columns. */
.community-discovery-intro {
  align-items: start;
  display: block;
}

.community-discovery-intro .community-kicker {
  margin-bottom: 8px;
}

.community-discovery-intro h1 {
  max-width: none;
}

.community-discovery-intro > p:last-child {
  max-width: 760px;
}

.community-button:focus-visible,
.community-actions a:focus-visible,
.community-tab:focus-visible,
.community-view-switch button:focus-visible,
.community-result-row a:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .28);
  outline-offset: 2px;
}
