.community-demo {
  --paper: #f5efe4;
  --white: #fffaf2;
  --surface-subtle: #f7f0e9;
  --sidebar-surface: #e6daca;
  --control-surface: #fffaf5;
  --line: #ded2cb;
  --line-subtle: #ebe0d9;
  --community-support: #6b543e;
  --community-support-wash: #eee2d2;
  --gold-text: var(--accent-hover);
  --accent-wash: color-mix(in srgb, var(--accent) 9%, var(--white));
  --accent-edge: color-mix(in srgb, var(--accent) 32%, var(--line));
  margin: 0;
  min-height: 100vh;
  font: 13px/1.55 var(--font-ui);
  color: var(--ink);
}
:root[data-theme="dark"] .community-demo {
  --paper: #1b202b;
  --white: #242b37;
  --surface-subtle: #293242;
  --sidebar-surface: #161c27;
  --control-surface: #2b3443;
  --line: #414e64;
  --line-subtle: #354052;
  --community-support: #b9cee9;
  --community-support-wash: #2b374a;
  --gold-text: var(--accent);
}
.community-demo *, .community-demo *::before, .community-demo *::after { box-sizing: border-box; }
.community-demo [hidden] { display: none !important; }
.community-demo :is(h1, h2, h3, p, dl, dd) { margin: 0; }
.community-demo p { line-height: inherit; }
.community-demo a { color: inherit; }
.community-demo :is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.community-demo :is(main, article)[tabindex="-1"]:focus { outline: none; }
.community-demo .wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.community-demo .skip-link { position: absolute; inset: 8px auto auto 8px; translate: 0 -200%; }
.community-demo .skip-link:focus { translate: none; z-index: 2; background: var(--white); padding: 8px; }
.community-demo .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.community-header { background: var(--sidebar-surface); border-bottom: 1px solid var(--line); }
/* Keep the controls clear of the iOS status bar's soft edge. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 600px) and (pointer: coarse) {
    .community-demo .community-header { padding-block-start: 16px; }
  }
}
.header-row, .header-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-row { min-height: 75px; }
.community-brand { display: inline-flex; flex: 0 1 170px; min-width: 0; align-items: center; }
.community-brand img { width: 100%; height: auto; max-height: 44px; object-fit: contain; object-position: left center; }
.community-demo .community-brand .brand-logo-dark { display: none; }
:root[data-theme="dark"] .community-demo .community-brand .brand-logo-dark { display: block; }
:root[data-theme="dark"] .community-demo .community-brand .brand-logo-light { display: none; }
.community-demo .back-lab { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 12px; color: var(--text-secondary); text-decoration: none; }
.back-lab svg { rotate: 180deg; flex: 0 0 16px; }
.community-demo .icon-control {
  display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px;
  border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--white); color: var(--ink); cursor: pointer;
}
.community-demo .icon-control:not(#theme, #profile-button, #community-profile) { position: relative; height: 34px; padding-block: 0; }
.community-demo #theme {
  position: relative; isolation: isolate; border: 0; background: transparent; color: var(--text-secondary);
}
.community-demo #theme::before {
  content: ''; position: absolute; inset: 7px; z-index: -1;
  border: 1px solid var(--line-subtle); border-radius: var(--radius-control);
}
.community-demo #theme svg { width: 16px; height: 16px; }
.community-demo #theme:is(:hover, :focus-visible)::before { background: var(--soft); border-color: var(--line); }
.community-demo :is(#profile-button, #community-profile) {
  position: relative; isolation: isolate; background: transparent; border: 0; color: var(--community-support); font-size: 12px; font-weight: 700;
}
.community-demo :is(#profile-button, #community-profile)::before {
  content: ''; position: absolute; inset: 6px; z-index: -1; border-radius: 50%; background: var(--community-support-wash);
}
.community-demo :is(#profile-button, #community-profile) svg { width: 17px; height: 17px; }
.community-demo :is(#profile-button, #community-profile):hover::before { box-shadow: inset 0 0 0 1px var(--community-support); }
.community-nav { display: flex; justify-content: flex-start; gap: clamp(18px, 4vw, 28px); }
.community-demo .community-nav a {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 47px; padding: 6px 0; border-bottom: 2px solid transparent;
  color: var(--text-secondary); font-size: 13px; text-decoration: none; text-align: center;
}
.community-demo .community-nav a[aria-current] { border-color: var(--accent); color: var(--gold-text); font-weight: 650; }
.notice-count {
  display: inline-grid; place-items: center; min-width: 20px; min-height: 20px;
  padding: 1px 5px; border-radius: 99px; color: var(--accent-contrast); background: var(--accent);
  font-size: 11px; font-weight: 700;
}
.community-demo .community-view { min-height: 69vh; padding: 32px 0 56px; }
@keyframes community-page-enter {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .community-page-pending :is(#community-intro, #community-catalog) { opacity: 0; pointer-events: none; }
  .community-page-enter { animation: community-page-enter 360ms cubic-bezier(.22, 1, .36, 1); }
}
.intro { position: relative; display: grid; gap: 5px; padding-block: 6px 24px; }
.intro .kicker, .kicker { color: var(--gold-text); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.intro h1 { font: 450 clamp(29px, 2.5vw, 36px)/1.2 var(--font-ui); letter-spacing: -1.1px; overflow-wrap: anywhere; }
.intro p { margin-top: 5px; color: var(--text-secondary); max-width: 62ch; }
.community-demo dialog.community-welcome {
  position: fixed; inset: 0; margin: auto;
  width: min(430px, calc(100% - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right))));
  max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
  overflow: auto;
  padding: clamp(12px, 2.2vw, 22px);
  color: var(--ink); background: var(--accent-wash); border: 1px solid var(--accent-edge); border-radius: var(--radius-panel);
  box-shadow: var(--shadow-popover);
}
.community-demo dialog.community-welcome[open] { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.community-demo dialog.community-welcome::backdrop { background: #0a10183d; backdrop-filter: blur(3px); }
.community-welcome-copy { display: grid; gap: 7px; }
.community-demo .community-welcome h2 { font-size: clamp(17px, 2vw, 21px); }
.community-demo #community-welcome-title:focus { outline: none; }
.community-welcome p { max-width: 66ch; color: var(--text-secondary); }
.community-welcome .control { justify-self: start; margin-block-start: 5px; }
.community-demo .community-welcome [data-launch-dismiss] { background: transparent; }
.community-welcome [data-launch-dismiss] svg { width: 16px; height: 16px; }
.community-demo h2 { font-size: 17px; font-weight: 650; letter-spacing: -.025em; }
.community-demo h3 { font-size: 15px; font-weight: 650; letter-spacing: -.015em; overflow-wrap: anywhere; }
.section-row, .item-meta, .form-actions, .dialog-heading {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px;
}
.section-row { margin-block: 0 14px; }
.community-demo .muted { color: var(--text-secondary); }
.community-demo .small { font-size: 13px; }
.community-demo .quiet { color: var(--text-secondary); font-size: 12px; }
.community-demo .link-button {
  color: var(--gold-text); background: transparent; border: 0; padding: 0; min-height: 44px;
  font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.community-demo .report-action {
  align-self: center; min-height: 28px; padding-inline: 4px;
  color: var(--text-secondary); font-size: 11px; font-weight: 500; text-decoration: none;
}
.community-demo .report-action:is(:hover, :focus-visible) {
  color: var(--ink); text-decoration: underline;
}
@media (pointer: coarse) {
  .community-demo .report-action { min-height: 44px; }
}
.community-demo .control {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px;
  padding: 3px 13px; background: var(--control-surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-control); text-decoration: none; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-align: center;
}
.community-demo .control:hover, .community-demo .icon-control:hover { border-color: var(--accent); }
.community-demo .control.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.community-demo .control[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent-edge); color: var(--gold-text); }
.community-demo .control:disabled { opacity: .6; cursor: default; }
.community-demo .control svg { width: 17px; height: 17px; flex: 0 0 17px; }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 0 22px; }
.community-demo label { display: grid; align-content: start; gap: 5px; min-width: 0; font-size: 12px; font-weight: 600; }
.community-demo :is(input, select, textarea) {
  width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-control); background: var(--control-surface); color: var(--ink); font: inherit; font-size: 14px;
}
.community-demo textarea { min-height: 88px; resize: vertical; }
.community-demo input[type="file"]::file-selector-button { padding-block: 3px; }
.search-wrap { display: block; position: relative; }
.search-wrap svg { position: absolute; inset: 13px auto auto 11px; width: 18px; height: 18px; color: var(--gold-text); pointer-events: none; }
.community-demo .search-wrap input { padding-inline-start: 37px; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.community-demo .catalog-toolbar > .control { margin-inline-start: auto; }
@media (pointer: coarse) {
  .community-demo :is(.control, .icon-control:not(#theme, #profile-button))::after { content: ''; position: absolute; inset: -5px 0; }
}
.community-demo .panel-preview, .catalog-item, .review, .notice-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-panel);
}
.community-demo .catalog-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto;
  gap: 8px 10px; padding: 14px; min-width: 0; text-decoration: none;
}
.catalog-item:hover, .notice-item:hover { border-color: var(--accent); }
.catalog-card { position: relative; min-width: 0; }
.community-demo .catalog-card > .catalog-item { height: 100%; padding-inline-end: 61px; }
.catalog-actions { position: absolute; inset: 10px 9px auto auto; }
.catalog-actions[open] { z-index: 2; }
.catalog-actions summary { list-style: none; cursor: pointer; font-size: 19px; line-height: 1; }
.catalog-actions summary::-webkit-details-marker { display: none; }
.catalog-actions-panel { position: absolute; inset: calc(100% + 5px) 0 auto auto; padding: 4px;
  white-space: nowrap; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--white); }
.catalog-score { grid-area: 2 / 1 / 3 / -1; }
.score-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; color: var(--gold-text); }
.score-category { display: grid; gap: 5px; min-width: 0; }
.score-category + .score-category { border-inline-start: 1px solid var(--line); padding-inline-start: 12px; }
.score-category-label { color: var(--text-secondary); font-size: 12px; }
.score-category-value { white-space: nowrap; }
.score-category-value strong { font-size: 25px; line-height: 1.1; font-weight: 650; font-variant-numeric: tabular-nums; }
.catalog-score .score-category-value strong { font-size: 22px; }
.score-category-value > .quiet { margin-inline-start: 4px; font-size: 13px; }
.catalog-count { grid-area: 3 / 2; justify-self: end; align-self: end; white-space: nowrap; }
.catalog-heading { grid-area: 1 / 1 / 2 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; overflow-wrap: anywhere; }
.product-mark { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid var(--line-subtle); border-radius: 6px; background: var(--surface-subtle); color: var(--gold-text); }
.product-mark img { display: block; object-fit: contain; }
.catalog-item .house { color: var(--gold-text); font-size: 13px; font-weight: 650; }
.community-demo .catalog-item h3 { font-size: 16px; }
.catalog-item .details-line { grid-area: 3 / 1; align-self: end; color: var(--text-secondary); font-size: 12px; overflow-wrap: anywhere; }
.community-demo .panel-preview { padding: 18px; }
.empty-state { display: grid; justify-items: start; gap: 7px; }
.community-demo .essence-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 7px; color: var(--gold-text); font-size: 12px; text-decoration: none; text-underline-offset: 4px; }
.essence-back svg { width: 15px; height: 15px; rotate: 180deg; }
.essence-back:is(:hover, :focus-visible) span { text-decoration: underline; }
.product-intro { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 22px; }
.product-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-auto-columns: auto; align-items: start; gap: 12px; }
.product-heading h1, .product-heading p { overflow-wrap: anywhere; }
.essence-detail-score { grid-column: 1 / -1; display: grid; gap: 6px; width: min(100%, 320px); font-size: 11px; }
.essence-score-toggle {
  display: inline-flex; align-items: center; justify-self: start; gap: 4px; min-height: 24px;
  padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--text-secondary); font: inherit; cursor: pointer;
}
.essence-score-toggle svg { width: 14px; height: 14px; }
.essence-score-toggle:is(:hover, [aria-expanded="true"]) { color: var(--gold-text); }
.essence-score-help {
  display: grid; gap: 10px; margin-block-end: 20px; padding: 12px 16px; font-size: 13px;
  border: 1px solid var(--line-subtle); border-radius: var(--radius-panel); background: var(--surface-subtle);
}
.essence-score-help h2 { font-size: 14px; }
.essence-score-help p { color: var(--text-secondary); }
.essence-score-help dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 12px; }
.essence-score-help dd { color: var(--gold-text); font-weight: 650; }
@media (max-width: 420px) { .essence-score-help dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.product-heading .product-mark { width: 50px; height: 50px; margin-block-start: 3px; }
.product-heading .product-mark img { width: 40px; height: 40px; }
.product-intro .product-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--text-secondary); margin-top: 9px; font-size: 12px; }
.rating-overview {
  display: grid; gap: 12px; margin-bottom: 20px; padding: 16px 18px; background: var(--surface-subtle);
  border: 1px solid var(--line); border-radius: var(--radius-panel);
}
.rating-overview-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; line-height: 1.25; }
.rating-overview-grid > div { padding: 7px 8px; padding-inline-start: 12px; border-radius: var(--radius-control); background: var(--white); }
.rating-overview-grid dt { margin-bottom: 3px; color: var(--text-secondary); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.rating-overview-grid dd strong { color: var(--gold-text); font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rating-overview-grid dd strong.duration-value { font-size: 15px; }
.rating-overview-grid dd small { display: block; margin-top: 3px; }
.review-grid { display: grid; gap: 13px; }
.review { padding: 17px 19px; display: grid; gap: 13px; scroll-margin-top: 14px; overflow-wrap: anywhere; }
.review:target, .conversation:target { border-color: var(--accent); }
.author { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.avatar-mark { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; overflow: hidden; border-radius: 99px; background: var(--accent-wash); color: var(--gold-text); font-size: 12px; font-weight: 700; }
.avatar-mark img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.community-demo :is(#profile-button, #community-profile) .avatar-mark { width: 32px; min-width: 32px; height: 32px; background: transparent; color: inherit; }
.profile-photo-editor { margin-block: 10px 4px; }
.profile-photo-editor [role="status"]:not(:empty) { margin-top: 5px; }
.ratings { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.ratings > div { display: grid; gap: 1px; padding: 7px 8px; border: 1px solid var(--line-subtle); border-radius: var(--radius-control); }
.ratings dt { color: var(--text-secondary); font-size: 11px; }
.ratings dd { color: var(--gold-text); font-size: 14px; font-weight: 650; }
.ratings dd small { display: block; color: var(--text-secondary); font-weight: 400; }
.composition { border: 1px solid var(--line); border-radius: var(--radius-control); padding-inline: 12px; }
.composition > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 650; cursor: pointer; list-style: none; }
.composition > summary::-webkit-details-marker { display: none; }
.composition > summary svg:last-child { width: 16px; height: 16px; margin-left: auto; }
.composition[open] > summary svg:last-child { rotate: 180deg; }
.composition-content { display: grid; gap: 10px; padding: 0 0 12px; }
.composition-basis { justify-self: start; margin: 0; padding: 3px 8px; border: 1px solid var(--line-subtle);
  border-radius: var(--radius-control); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 12px; font-weight: 650; }
.context-list { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-block: 8px; border-block: 1px solid var(--line-subtle); }
.context-list dt { font-size: 11px; color: var(--text-secondary); }
.context-list dd { font-size: 13px; font-weight: 650; }
.ingredient-list { display: grid; gap: 0; }
.ingredient-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-subtle); font-size: 13px; }
.ingredient-line > span:last-child { flex: none; font-weight: 650; white-space: nowrap; }
.ingredient-line small { display: block; color: var(--text-secondary); font-size: 12px; }
.base-breakdown { margin: 5px 0 8px 10px; padding-inline-start: 10px; border-inline-start: 2px solid var(--accent-edge); }
.community-demo .base-breakdown-title { padding-block: 5px 3px; color: var(--gold-text); font-size: 13px; font-weight: 650; }
.review-actions { display: flex; flex-wrap: wrap; gap: 7px 10px; }
.review-comment-actions { display: flex; flex: 1 0 auto; min-width: 0; max-width: 100%; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.review-manage-actions { margin-inline-start: auto; }
.conversation-list { display: grid; gap: 8px; }
.comment-items { display: grid; gap: 8px; }
.conversation-list > button { justify-self: start; }
.conversation { display: grid; gap: 6px; padding: 10px 12px; background: var(--surface-subtle); border: 1px solid var(--line-subtle); border-radius: var(--radius-control); font-size: 13px; }
.reply { display: grid; gap: 3px; margin-inline-start: 10px; padding-inline-start: 11px; border-inline-start: 2px solid var(--accent-edge); }
.stream-list { display: grid; gap: 9px; }
.community-demo .notice-item { display: grid; gap: 4px; padding: 14px 16px; min-width: 0; text-decoration: none; overflow-wrap: anywhere; }
.notice-item.unread { border-inline-start: 3px solid var(--accent); }
.feed-intro, .feed-list { max-width: 720px; margin-inline: auto; }
.feed-intro { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 22px; }
.feed-list { display: grid; gap: 14px; }
.feed-entry {
  display: grid; gap: 11px; min-width: 0; padding: 16px 18px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-panel); scroll-margin-top: 16px; overflow-wrap: anywhere;
}
.feed-label {
  justify-self: start; padding: 3px 8px; border-radius: 4px; color: var(--gold-text);
  background: var(--accent-wash); font-size: 11px; font-weight: 650;
}
.post-label { color: var(--community-support); background: var(--community-support-wash); }
.feed-context { color: var(--gold-text); font-size: 12px; }
.feed-text { white-space: pre-wrap; }
.community-photo-frame { position: relative; display: grid; place-items: center; width: 100%; min-width: 0;
  aspect-ratio: var(--photo-ratio); margin-inline: auto; border-radius: var(--radius-control);
  background: var(--surface-subtle); overflow: hidden; }
.community-photo-frame > .feed-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.community-photo-frame[aria-busy="true"] > .feed-photo, .community-photo-expand:disabled { visibility: hidden; }
.community-photo-expand { position: absolute; inset: 0; padding: 0;
  background: transparent; border: 0; border-radius: inherit; cursor: zoom-in; }
.community-photo-expand:focus-visible { outline-offset: -4px; }
.community-photo-full { display: block; max-width: 100%; max-height: calc(100dvh - 32px); width: auto; height: auto;
  margin-inline: auto; object-fit: contain; border-radius: var(--radius-control); }
.community-demo :is(#community-interaction-dialog, #demo-dialog).community-photo-dialog {
  position: fixed; inset: 0; margin: auto; width: fit-content; max-width: min(960px, calc(100% - 24px));
  max-height: calc(100dvh - 24px); padding: 0; border: 0; background: transparent; overflow: visible;
}
.community-photo-dialog .dialog-heading { position: absolute; inset: 4px 4px auto auto; z-index: 1; margin: 0; }
.community-demo .community-photo-dialog .dialog-heading .icon-control {
  width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: transparent; color: #fff; isolation: isolate;
}
.community-photo-dialog .icon-control::before { content: ''; position: absolute; inset: 5px; z-index: -1; border-radius: 50%; background: #111b; }
.community-photo-dialog .icon-control svg { width: 17px; height: 17px; }
.community-photo-error { min-width: 210px; padding: 16px 52px 16px 16px; background: var(--white); color: var(--ink); }
.community-photo-frame--detail { max-width: var(--photo-max-width); }
@media (min-width: 681px) {
  .community-photo-frame { max-width: var(--photo-max-width); }
}
.feed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feed-entry .community-entry-interactions { display: grid; gap: 11px; }
.profile-summary { padding: 10px 0; }
.profile-summary .avatar-mark { width: 44px; height: 44px; color: var(--community-support); background: var(--community-support-wash); }
.community-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding-block: 14px 22px; border-top: 1px solid var(--line); color: var(--text-secondary); font-size: 12px; }
.community-demo #demo-dialog { width: min(620px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 20px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--white); overflow: auto; }
#demo-dialog::backdrop { background: #171612a0; }
.dialog-heading { flex-wrap: nowrap; align-items: start; margin-bottom: 9px; }
.community-demo .dialog-heading h2 { padding-top: 4px; font-size: 22px; }
.dialog-body-preview, .dialog-form { display: grid; gap: 12px; }
.dialog-form { margin-top: 5px; }
#profile-form > label { gap: 10px; }
.dialog-form .form-actions { justify-content: flex-end; }
.form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.community-demo fieldset { min-width: 0; margin: 0; padding: 9px 10px 11px; border: 1px solid var(--line); border-radius: var(--radius-control); }
.community-demo legend { padding-inline: 4px; color: var(--gold-text); font-size: 12px; font-weight: 650; }
.form-stack { display: grid; gap: 9px; }
.form-error { color: var(--danger); font-size: 13px; }
.community-demo .composition-mode {
  position: relative; isolation: isolate; border: 0; background: transparent; color: var(--gold-text);
}
#prep-list-status:empty, #prep-fields .choice-row:not(:has(button:not([hidden]))) { display: none; }
.composition-mode::before {
  content: ''; position: absolute; inset: 4px 0; z-index: -1;
  border: 1px solid var(--accent-edge); border-radius: var(--radius-control); background: var(--accent-wash);
}
.composition-mode:hover::before { border-color: var(--accent); }
.review-optional { border-block-start: 1px solid var(--line); }
.review-optional > summary { min-height: 44px; padding-block: 11px; font-weight: 650; cursor: pointer; }
.review-optional > .form-stack { gap: 14px; }
.review-test-fields, #base-fields > .form-pair { align-items: end; }
.community-demo .review-test-fields :is(input, select) { height: 44px; min-height: 44px; padding-block: 0; }
.community-demo #review-performance { align-items: end; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-row .control { flex: 1 1 160px; }
.selection-label { padding: 9px 11px; border: 1px solid var(--accent-edge); background: var(--accent-wash); border-radius: var(--radius-control); font-size: 13px; }
#manual-fields, #base-fields { gap: 12px; }
.community-demo #base-fields { padding: 0 0 12px; border: 0; border-block-end: 1px solid var(--line); border-radius: 0; }
#base-fields > legend { padding-inline: 0; margin-block-end: 8px; }
.base-composition-fields { display: grid; gap: 10px; }
.base-composition-fields:has(#base-lines:empty) > .quiet { display: none; }
.base-composition-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
#base-lines:empty, #extra-lines:empty { display: none; }
.manual-line { display: grid; grid-template-columns: minmax(0, 2fr) minmax(90px, .8fr) 44px; gap: 8px; align-items: end; }
.percent-label { white-space: nowrap; }
#extra-lines .manual-line { grid-template-columns: minmax(0, 2fr) minmax(72px, .8fr) minmax(136px, 1.4fr) 44px; }
.manual-line .dilution { grid-column: 1 / -1; }
#manual-fields summary { color: var(--gold-text); font-size: 12px; cursor: pointer; }
.manual-line + .manual-line { border-block-start: 1px solid var(--line); padding-block-start: 10px; }
.demo-status { position: fixed; z-index: 2; inset: auto 16px 16px auto; max-width: min(440px, calc(100% - 32px)); padding: 10px 14px; color: var(--ink); background: var(--white); border: 1px solid var(--accent-edge); border-radius: var(--radius-control); box-shadow: var(--shadow-popover); }

@media (max-width: 800px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .intro > p { font-size: 12px; }
}
@media (max-width: 540px) {
  .community-demo .wrap { width: calc(100% - 28px); }
  .header-row { min-height: 64px; gap: 8px; }
  .header-actions { gap: 6px; }
  .community-brand { flex-basis: 128px; }
  .community-demo .back-lab { text-align: center; }
  .back-lab svg { display: none; }
  .community-demo .community-nav a { font-size: 12px; gap: 4px; }
  .community-demo .community-view { padding-block: 22px 38px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .filters > label:first-child { grid-column: 1 / -1; }
  .catalog-grid, .product-intro, .feed-intro { grid-template-columns: 1fr; }
  .product-intro > .control, .feed-intro > .control { justify-self: start; }
  .feed-entry { padding: 13px; }
  #extra-lines .manual-line { grid-template-columns: minmax(0, 2fr) minmax(72px, .8fr) 44px; }
  #extra-lines .manual-line > label:is(.ingredient-type, :has([name="line-percent"])) { grid-column: span 2; }
  .ratings, .rating-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rating-overview { gap: 10px; padding: 14px 12px; }
  .rating-overview > .item-meta { column-gap: 6px; }
  .rating-overview > .item-meta > p { font-size: 11px; }
  .rating-overview-grid > div { padding-inline: 10px 4px; }
  .review, .community-demo #demo-dialog { padding: 13px; }
}
@media (max-width: 520px) {
  .intro h1 { font-size: 28px; }
  .community-demo .dialog-heading h2 { font-size: 19px; }
  .community-demo .dialog-form .form-actions > .control { font-size: 11px; }
}
@media (max-width: 360px) {
  .rating-overview-grid dt { font-size: 11px; }
}
