:root {
  --canvas: #f7f8f4;
  --surface: #fff;
  --ink: #263b33;
  --muted: #7a837b;
  --green: #214c40;
  --green-hover: #173e33;
  --lime: #dfedbe;
  --lime-soft: #edf3df;
  --line: #e5e8e0;
  --peach: #f4dfcc;
  --danger: #b54e42;
  --radius: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 3px solid #8fae64; }
button { border: 0; }
a { color: var(--green); }
svg { display: block; flex-shrink: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; }
input, select, textarea { min-width: 0; }
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
[hidden] { display: none !important; }
.icon-svg { width: 20px; height: 20px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.positive { color: var(--green); }
.negative { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 1000; padding: 14px 20px; background: var(--green); color: white; border-radius: 12px; }
.skip-link:focus { top: 16px; }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; align-self: start; height: 100dvh; display: flex; flex-direction: column; padding: 33px 20px 22px; border-right: 1px solid var(--line); background: #fcfdf9; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 11px 48px; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; }
.cosmo-logo { display: block; width: 40px; height: 40px; flex-shrink: 0; object-fit: contain; border-radius: 10px; }
.brand-copy { display: flex; flex-direction: column; }
.brand-word { font-size: 21px; font-weight: 650; letter-spacing: -.95px; white-space: nowrap; }
.brand-tag { color: #8b9184; margin-top: 4px; font-size: 10px; letter-spacing: .5px; }
.navigation { display: flex; flex-direction: column; gap: 7px; }
.nav-item { width: 100%; background: transparent; display: flex; align-items: center; gap: 13px; padding: 14px 16px; min-height: 47px; color: #7a837b; border-radius: 10px; font-size: 13px; text-align: left; transition: background .16s, color .16s; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: var(--green); background: #f0f3e9; }
.nav-item.active, .nav-item[aria-current="page"] { color: var(--green); background: #e8efdb; font-weight: 600; }
.sidebar-footer { margin-top: auto; padding: 20px 8px 0; }
.workspace-badge { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 12px; }
.workspace-badge > svg { width: 20px; height: 20px; color: #87917d; }
.workspace-badge strong { display: block; font-size: 12px; font-weight: 500; }
.workspace-badge small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.workspace-avatar { background: #e9eedf; width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.main-content { min-width: 0; }
.topbar { height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 46px; border-bottom: 1px solid var(--line); }
.breadcrumb { color: #8a9288; font-size: 12px; display: flex; align-items: center; gap: 12px; }
.breadcrumb svg { width: 15px; height: 15px; }
.breadcrumb strong { color: #49574b; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.status-dot { display: inline-block; width: 6px; height: 6px; background: #829d53; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.saved-status { font-size: 11px; color: #87907f; }
.tax-pill { font-size: 11px; color: #64725d; border: 1px solid #dfe5d6; padding: 7px 11px; border-radius: 30px; display: inline-flex; align-items: center; gap: 6px; background: #fafbf7; white-space: nowrap; }
.tax-pill svg { width: 13px; height: 13px; }
.mobile-brand { display: none; }
#main { max-width: 1550px; margin: 0 auto; padding: 37px 46px 36px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.eyebrow { color: #81916e; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: 1.7px; margin-bottom: 11px; }
h1 { font-size: clamp(26px, 2.3vw, 35px); letter-spacing: -1.15px; line-height: 1.22; }
.subtitle { color: var(--muted); margin-top: 9px; font-size: 12px; line-height: 1.6; }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 12px 17px; border-radius: 9px; font-size: 12px; font-weight: 500; line-height: 1.3; text-decoration: none; transition: background .16s, transform .16s, box-shadow .16s; }
.button svg { width: 17px; height: 17px; }
.button.primary { color: #fff; background: var(--green); border: 1px solid var(--green); box-shadow: 0 2px 3px #214c4008; }
.button.primary:hover { background: var(--green-hover); box-shadow: 0 4px 12px #214c4017; }
.button.secondary { background: var(--surface); border: 1px solid var(--line); color: #50604e; }
.button.secondary:hover { background: #f1f4e9; border-color: #d3dbc6; }
.button.danger { background: #fcf0ec; color: var(--danger); border: 1px solid #f1d6cf; }
.button.danger:hover { background: #f8e4dd; }
.button.icon, button.icon { min-width: 38px; min-height: 38px; padding: 9px; display: inline-grid; place-items: center; border-radius: 9px; background: transparent; color: #7c8776; }
.button.icon:hover, button.icon:hover { background: #edf1e6; color: var(--green); }
button.icon svg { width: 18px; height: 18px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 0; background: transparent; color: #56694b; font-size: 11px; font-weight: 500; white-space: nowrap; }
.text-button svg { width: 15px; height: 15px; }
.text-button:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

.hero { min-height: 242px; position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius); background: #eaf0db; display: flex; align-items: center; justify-content: space-between; padding: 34px 38px; margin-bottom: 25px; }
.hero::after { content: ''; position: absolute; pointer-events: none; right: -140px; top: -235px; width: 600px; height: 600px; border: 1px solid #bccc9a65; border-radius: 50%; z-index: -1; }
.hero-copy { max-width: 410px; position: relative; z-index: 1; }
.hero .eyebrow { color: #75895a; font-size: 9px; letter-spacing: 1.6px; margin-bottom: 13px; }
.hero h2 { font-size: clamp(27px, 2.7vw, 38px); line-height: 1.13; font-weight: 500; letter-spacing: -1.5px; color: #294c3a; }
.hero p { font-size: 11px; line-height: 1.8; color: #7a876c; max-width: 320px; margin-top: 12px; }
.hero-action { margin-top: 21px; color: var(--green); background: transparent; display: inline-flex; align-items: center; gap: 9px; padding: 0; font-size: 11px; font-weight: 600; }
.hero-action svg { width: 15px; height: 15px; }
.hero-action:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-art { flex: 0 0 45%; max-width: 440px; align-self: stretch; display: flex; align-items: center; justify-content: center; margin: -34px -18px -34px 0; pointer-events: none; }
.hero-art svg { width: 100%; height: 242px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 31px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 19px 21px 18px; min-width: 0; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #859078; }
.stat-label { font-size: 10px; color: #81897c; }
.stat-top svg { width: 16px; height: 16px; stroke-width: 1.5; }
.stat-value { font-size: 29px; font-weight: 500; letter-spacing: -.9px; line-height: 1.2; margin-top: 14px; color: #334b3a; font-variant-numeric: tabular-nums; }
.stat-caption { display: block; font-size: 9px; font-weight: 400; color: #91998b; letter-spacing: 0; margin-top: 7px; line-height: 1.5; }
.stat-card .positive { color: #7d985e; }
.page-section { margin-top: 29px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.section-header h2 { font-size: 17px; letter-spacing: -.35px; font-weight: 550; }
.section-header p { font-size: 10px; color: #92988c; margin-top: 6px; line-height: 1.5; }
.recipe-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.recipe-card { position: relative; padding: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 17px; overflow: hidden; text-align: left; min-width: 0; transition: border-color .2s, box-shadow .2s, transform .2s; }
.recipe-card:hover { border-color: #c7d5b5; transform: translateY(-3px); box-shadow: 0 8px 20px #214c4008; }
.recipe-art { height: 165px; position: relative; background: #f0eddf; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.recipe-card:nth-child(3n+2) .recipe-art { background: #eef0e7; }
.recipe-card:nth-child(3n+3) .recipe-art { background: #f4e9df; }
.recipe-art > svg { height: 100%; width: 100%; max-width: 320px; }
.recipe-art > .recipe-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.recipe-type { position: absolute; left: 15px; top: 14px; background: #ffffffb8; color: #6f7564; font-size: 8px; letter-spacing: .8px; text-transform: uppercase; padding: 6px 9px; border-radius: 5px; z-index: 1; backdrop-filter: blur(4px); }
.recipe-card-body { padding: 18px 19px 16px; }
.recipe-card-name { font-size: 15px; font-weight: 550; letter-spacing: -.2px; display: block; }
.recipe-card-meta { font-size: 9px; line-height: 1.5; color: #939a8c; margin-top: 6px; display: block; }
.recipe-card-metrics { border-top: 1px solid #eceee7; margin-top: 17px; padding-top: 14px; display: flex; align-items: flex-end; gap: 18px; }
.metric { display: flex; flex-direction: column; gap: 6px; }
.metric label { font-size: 8px; font-weight: 400; color: #939a8c; }
.metric strong { font-size: 13px; font-weight: 500; letter-spacing: -.2px; font-variant-numeric: tabular-nums; }
.gp-chip { margin-left: auto; background: #edf3e2; color: #6d8552; padding: 6px 8px; border-radius: 5px; font-size: 9px; white-space: nowrap; }
.gp-chip.negative { color: #b54e42; background: #fbece7; }
.demo-banner { display: flex; align-items: center; gap: 9px; margin-top: 22px; font-size: 10px; color: #969c8e; line-height: 1.6; }
.demo-banner svg { width: 14px; height: 14px; color: #929e80; }
.demo-banner button { font-size: 10px; color: #6d7f58; text-decoration: underline; text-underline-offset: 3px; padding: 0; background: none; }
.category-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 1px; }
.category-filters::-webkit-scrollbar { display: none; }
.filter { padding: 9px 14px; border: 1px solid transparent; background: transparent; color: #8b9385; border-radius: 8px; white-space: nowrap; font-size: 11px; min-height: 36px; }
.filter:hover { color: var(--green); background: #eff2e7; }
.filter.active { color: var(--green); background: #e7eed8; font-weight: 500; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 13px; background: #fff; border: 1px solid var(--line); border-radius: 9px; min-width: 200px; }
.search-field svg { width: 16px; height: 16px; color: #96a08c; }
.search-field input { width: 100%; min-height: 39px; outline: 0; background: transparent; border: 0; color: var(--ink); font-size: 11px; }
.search-field:focus-within { outline: 2px solid #a9ba8e; outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: #a2a998; opacity: 1; }
.empty-state { background: #fff; border: 1px dashed #dbe2d0; border-radius: 18px; text-align: center; padding: 55px 24px; }
.empty-state > svg { width: 40px; height: 40px; color: #a3b58e; margin: 0 auto 18px; }
.empty-state h2, .empty-state h3 { font-size: 19px; font-weight: 500; }
.empty-state p { color: var(--muted); margin: 10px auto 20px; font-size: 12px; line-height: 1.7; max-width: 330px; }
.badge { display: inline-block; border-radius: 5px; padding: 5px 8px; font-size: 9px; line-height: 1.2; color: #76866a; background: #eff3e8; white-space: nowrap; }
.panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 26px; }
.panel h2 { font-size: 17px; letter-spacing: -.3px; }
.panel > p { margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { background: #fcfdf9; color: #8a9480; font-size: 9px; letter-spacing: .5px; font-weight: 500; padding: 16px 22px; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 17px 22px; border-bottom: 1px solid #edf0e7; color: #56654e; white-space: nowrap; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdf9; }
.product-name { display: flex; align-items: center; gap: 12px; }
.product-avatar { display: grid; place-items: center; width: 37px; height: 40px; border-radius: 9px; background: #eef2e5; color: #889c71; flex-shrink: 0; }
.product-avatar svg { width: 23px; height: 27px; }
.product-details strong { color: var(--ink); font-size: 12px; font-weight: 500; }
.product-details small { display: block; font-size: 9px; color: #9aa18f; margin-top: 5px; }
.mobile-label { display: none; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.row-actions button { min-width: 34px; min-height: 36px; padding: 8px; background: transparent; border-radius: 8px; color: #96a08b; }
.row-actions button svg { width: 16px; height: 16px; }
.row-actions button:hover { color: var(--green); background: #edf2e3; }
.row-actions button[data-action*="delete"]:hover { color: var(--danger); background: #fcedea; }

.dialog { border: 1px solid #e1e7d9; border-radius: 22px; padding: 0; color: var(--ink); background: var(--canvas); width: min(720px, calc(100vw - 40px)); max-height: 90dvh; overflow: hidden; box-shadow: 0 28px 100px #122c3140; }
.dialog[open] { display: flex; flex-direction: column; animation: dialog-in .18s ease-out; }
.dialog::backdrop { background: #182f2c6b; backdrop-filter: blur(5px); }
.dialog.wide-dialog, .wide-dialog { width: min(960px,calc(100vw - 40px)); max-width: 960px; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 24px 28px 20px; flex-shrink: 0; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 22px; letter-spacing: -.6px; }
.dialog-header p { font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 7px; }
.dialog-body { overflow-y: auto; overscroll-behavior: contain; padding: 25px 28px; min-height: 0; }
.dialog-body > p.muted { font-size: 12px; line-height: 1.7; margin-bottom: 23px; }
.dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 18px 28px; border-top: 1px solid var(--line); background: #fcfdf9; flex-shrink: 0; }
.dialog-footer .danger { margin-right: auto; }
.dialog form { display: contents; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 19px 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field.full { grid-column: 1/-1; }
.field > label, .field-label { color: #67755e; font-size: 11px; font-weight: 500; }
.field small, .field .help-text, .field-hint { color: #97a08d; font-size: 10px; line-height: 1.6; }
.field input:not([type="checkbox"]), .field select, .field textarea, .input { width: 100%; padding: 12px 13px; border-radius: 9px; background: #fff; border: 1px solid #dfe5d6; color: var(--ink); min-height: 44px; outline-offset: 2px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: #a2b789; outline-color: #a2b789; }
.field textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.field input[readonly] { background: #f3f6ed; color: #88967b; }
.field select { cursor: pointer; }
.form-error { background: #f9e8e2; border: 1px solid #edcdc4; color: #a4493f; border-radius: 8px; padding: 11px 13px; font-size: 11px; line-height: 1.6; margin-top: 16px; }
.form-section-title { display: flex; justify-content: space-between; align-items: center; margin: 25px 0 12px; }
.form-section-title h3, .dialog-body h3 { font-size: 13px; font-weight: 600; }
.ingredient-row { display: grid; grid-template-columns: minmax(0,1fr) 100px 36px; gap: 9px; align-items: center; margin-bottom: 10px; }
.ingredient-row input, .ingredient-row select { width: 100%; padding: 11px 12px; border-radius: 9px; border: 1px solid #dfe5d6; background: #fff; color: var(--ink); min-height: 43px; font-size: 12px; }
.ingredient-row .button.icon { min-width: 36px; min-height: 40px; padding: 9px; }
.check-field { display: flex; flex-direction: row; align-items: flex-start; gap: 9px; font-size: 11px; color: #73816a; line-height: 1.7; }
.check-field input { margin: 3px 0 0; width: 15px; height: 15px; accent-color: var(--green); flex-shrink: 0; }
.ingredient-quantity { display: flex; align-items: center; position: relative; }
.ingredient-quantity .input { padding-right: 29px; }
.ingredient-unit { position: absolute; right: 10px; pointer-events: none; font-size: 9px; }
.ingredient-row > .button { align-self: end; margin-bottom: 1px; font-size: 20px; font-weight: 400; }
.recipe-ingredients { margin: 25px 0; padding-top: 23px; border-top: 1px solid var(--line); }
.recipe-ingredients > p { font-size: 10px; line-height: 1.6; margin: 8px 0 18px; }
.recipe-ingredients > .button { margin-top: 4px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.toggle-row label { font-size: 12px; color: #596a51; }
.toggle-row small { display: block; font-size: 10px; color: #929c87; margin-top: 6px; }
.toggle-row input { accent-color: var(--green); width: 18px; height: 18px; }

.detail-hero { display: flex; align-items: center; gap: 26px; padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 23px; }
.detail-art { width: 170px; height: 130px; background: #eef0e0; border-radius: 15px; flex-shrink: 0; overflow: hidden; }
.detail-art svg { width: 100%; height: 100%; }
.detail-art > .recipe-photo { display: block; width: 100%; height: 100%; object-fit: contain; }
.detail-heading h2, .detail-heading h3 { font-size: 26px; letter-spacing: -.8px; font-weight: 500; margin-top: 9px; }
.detail-heading p { color: var(--muted); font-size: 11px; margin-top: 8px; line-height: 1.7; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: 28px; }
.detail-cost h3, .detail-profit h3 { font-size: 13px; margin-bottom: 18px; }
.ingredient-list { margin-bottom: 20px; }
.ingredient-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid #e8ecdf; padding: 12px 0; font-size: 11px; }
.ingredient-item:first-child { padding-top: 0; }
.ingredient-item strong { font-size: 11px; font-weight: 500; }
.ingredient-item small { display: block; font-size: 9px; color: #929d86; margin-top: 5px; }
.ingredient-item > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.breakdown-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 11px; color: #7c8971; }
.breakdown-row strong { color: #435c39; font-weight: 500; font-variant-numeric: tabular-nums; }
.breakdown-row.total { padding-top: 15px; border-top: 1px solid #dfe7d4; margin-top: 7px; font-weight: 500; font-size: 13px; color: var(--ink); }
.breakdown-row.total strong { font-size: 17px; }
.detail-profit { border-radius: 15px; background: #edf3e0; padding: 23px; }
.detail-profit .field > label { color: #7c8b6b; }
.price-input { display: flex; align-items: center; border: 1px solid #d4dfc3; border-radius: 9px; background: #fff; overflow: hidden; }
.currency-prefix { font-size: 18px; color: #8c9b7b; padding-left: 14px; }
.price-input input { width: 100%; min-width: 0; border: 0 !important; min-height: 50px !important; background: transparent !important; font-size: 22px; font-weight: 500; letter-spacing: -.5px; padding: 10px !important; outline: 0 !important; color: var(--green); }
.price-input:focus-within { outline: 2px solid #a9ba8e; outline-offset: 2px; }
.input-suffix { font-size: 9px; color: #98a38e; padding-right: 12px; flex-shrink: 0; }
.profit-amount { font-size: 42px; line-height: 1.15; font-weight: 500; letter-spacing: -1.6px; color: var(--green); font-variant-numeric: tabular-nums; margin-top: 6px; }
.profit-label { font-size: 10px; color: #839573; margin-top: 22px; }
.margin-meter { height: 5px; background: #d7e4c1; border-radius: 10px; overflow: hidden; margin: 14px 0 10px; }
.margin-meter > span { display: block; background: #7e9d5a; border-radius: inherit; height: 100%; max-width: 100%; transition: width .2s; }
.margin-meter > span.negative { background: #bc7865; }
.margin-caption { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: #8a987a; }
.margin-caption strong { font-weight: 500; color: #567344; }
.tax-comparison { margin-top: 20px; padding-top: 13px; border-top: 1px solid #d7e2c5; }
.tax-comparison .breakdown-row { font-size: 10px; padding: 7px 0; }
.target-box { margin-top: 19px; background: #ffffff80; border-radius: 9px; padding: 12px; color: #7c8d6b; font-size: 10px; line-height: 1.7; }
.target-box strong { color: #4d6a3c; font-weight: 600; }
.detail-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.calculator-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; align-items: start; }
.input-panel .field { margin-top: 22px; }
.input-panel .form-grid { margin-top: 22px; }
.input-panel .form-grid .field { margin-top: 0; }
.results-panel { background: #edf3e0; border-color: #e1e8d3; }
.results-panel > .eyebrow { margin-bottom: 20px; }
.result-big { font-size: 56px; line-height: 1.15; color: var(--green); letter-spacing: -2.6px; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 11px; }
.result-big small { font-size: 18px; letter-spacing: -.5px; color: #84956d; font-weight: 400; }
.result-summary { margin: 12px 0 24px; font-size: 12px; color: #81906d; line-height: 1.7; }
.result-summary strong { font-weight: 500; color: #536d3e; }
.split-results { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px 0; border-top: 1px solid #d9e3c9; border-bottom: 1px solid #d9e3c9; margin: 20px 0; }
.split-results > div + div { border-left: 1px solid #d9e3c9; padding-left: 18px; }
.split-results label, .split-results small { display: block; font-size: 10px; color: #8a9976; margin-bottom: 8px; }
.split-results strong { display: block; color: #456236; font-size: 25px; letter-spacing: -.6px; font-weight: 500; }
.split-results p { font-size: 10px; color: #8a9976; line-height: 1.6; margin-top: 8px; }
.results-panel .breakdown-row { padding: 9px 0; }
.results-panel .info-box { background: #ffffff70; border-color: #dae4cb; }
.settings-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 24px; align-items: start; }
.settings-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.settings-heading svg { width: 19px; height: 19px; color: #859b70; }
.settings-heading h2 { font-size: 16px; }
.settings-grid .field { margin-bottom: 22px; }
.settings-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.info-box { background: #f3f6eb; border: 1px solid #e4eadb; padding: 15px 17px; border-radius: 10px; font-size: 11px; color: #859175; line-height: 1.8; margin-top: 20px; }
.info-box strong { font-weight: 500; color: #61774f; }
.info-box p + p { margin-top: 8px; }
.notice { padding: 13px 16px; margin: 18px 0; border-radius: 10px; background: #edf3e3; border: 1px solid #dfe8d1; font-size: 11px; line-height: 1.7; color: #768967; }
.notice.warning { background: #fcf1df; border-color: #f0dfba; color: #99814e; }
.toast { position: fixed; bottom: 26px; left: calc(50% + 112px); transform: translate(-50%,20px); padding: 13px 21px; background: var(--green); color: #f5f8ed; border-radius: 11px; box-shadow: 0 5px 25px #193b3925; font-size: 12px; line-height: 1.5; opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s; z-index: 200; width: max-content; max-width: calc(100vw - 40px); pointer-events: none; }
.toast.show, .toast.visible { opacity: 1; visibility: visible; transform: translate(-50%,0); }

.brand { margin-bottom: 39px; text-decoration: none; }
.brand-word { font-size: 31px; letter-spacing: -1.8px; line-height: 1; }
.brand-dot { color: #8ca567; }
.nav-caption { padding-left: 16px; font-size: 8px; letter-spacing: 1.5px; color: #a1a895; margin-bottom: 15px; }
.nav-active-dot { height: 5px; width: 5px; border-radius: 50%; background: #668550; margin-left: auto; }
.sidebar-note { margin: auto 10px 14px; padding: 21px 16px 19px; border: 1px solid #e6ebdc; border-radius: 13px; background: #f5f7ee; }
.sidebar-note-art { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #8ba26e; background: #e8eedc; margin-bottom: 13px; }
.sidebar-note-art svg { width: 16px; height: 16px; }
.sidebar-note strong { font-size: 12px; font-weight: 500; }
.sidebar-note p { font-size: 10px; color: #929d85; line-height: 1.8; margin-top: 7px; }
.sidebar-note + .sidebar-footer { margin-top: 0; padding-top: 0; }
.workspace-badge > svg:last-child { width: 13px; height: 13px; margin-left: auto; }
.breadcrumb-divider { color: #c3cbb9; margin: 0 12px; }
.save-status { font-size: 10px; color: #87907f; white-space: nowrap; }
.status-dot.warning { background: #c5a265; }
.profile-avatar { width: 31px; height: 31px; display: grid; place-items: center; color: #9c7f61; font-size: 10px; background: #eee4d7; border: 3px solid #fff; border-radius: 50%; }
#main:focus { outline: none; }
.page-footer { max-width: 1550px; padding: 0 46px 24px; margin: 0 auto; display: flex; justify-content: space-between; gap: 18px; color: #a4ab9a; font-size: 9px; }
.button.danger-ghost { color: #b77260; background: transparent; }
.button.danger-ghost:hover { background: #f8ece5; color: #a34d3b; }
.hero { background: #214c40; }
.hero::after { border-color: #8fae6b28; }
.hero .eyebrow { color: #bacf9a; display: inline-flex; align-items: center; gap: 7px; }
.hero-tiny-dot { height: 4px; width: 4px; background: #c3d7a0; border-radius: 50%; }
.hero h2 { color: #f0f4e6; }
.hero p { color: #b2c5b0; }
.hero-action { color: #d7e8b5; }
.hero-corner-label { position: absolute; bottom: 18px; right: 28px; color: #8fa789; font-size: 6px; letter-spacing: 1.5px; }
.section-header .eyebrow { font-size: 8px; letter-spacing: 1.4px; color: #9ba58d; margin-bottom: 8px; }
.count-badge { display: inline-grid; place-items: center; background: #e9eedf; border-radius: 5px; min-width: 21px; height: 19px; font-size: 9px; color: #7b8f65; margin-left: 6px; vertical-align: 2px; }
.recipe-open { position: absolute; bottom: 12px; right: 13px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff9; color: #728365; opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.recipe-open svg { width: 14px; height: 14px; }
.recipe-card:hover .recipe-open, .recipe-card:focus-visible .recipe-open { opacity: 1; transform: translateX(0); }
.gp-chip small { font-size: 7px; margin-left: 3px; }
.gp-chip.below-target { background: #f8eede; color: #ad8b56; }
.demo-banner > span { flex: 1; }
.demo-banner .text-button { margin-left: auto; text-decoration: none; }
.category-filters { margin-bottom: 23px; }
.filter > span { display: inline-grid; place-items: center; margin-left: 7px; background: #ffffff80; height: 16px; min-width: 19px; border-radius: 4px; font-size: 9px; }
.toolbar-note { color: #a0a995; font-size: 10px; }
.list-footnote { color: #9ca68f; font-size: 10px; line-height: 1.7; margin-top: 20px; }
td strong { font-weight: 500; }
.table-sub { display: block; font-size: 8px; color: #9ca58f; margin-top: 5px; }
.product-group-price { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 3px; max-width: 180px; white-space: normal; }
.product-price-action { white-space: normal; text-align: left; justify-content: flex-start; }
.product-pricing-target { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 19px; padding: 12px 15px; background: #edf3e4; border: 1px solid var(--line); border-radius: 10px; color: #607450; font-size: 11px; line-height: 1.8; }
.product-pricing-target > span { min-width: 0; }
.product-pricing-target > span > .icon-svg { width: 15px; height: 15px; vertical-align: middle; margin-right: 6px; }
.product-pricing-target .text-button { padding: 4px 0; }
.product-recommendation { white-space: normal; }
.product-recommended-price { min-width: 105px; }
.product-recommended-price > strong { display: block; font-size: 16px; color: var(--green); }
.product-recommended-price > small { display: block; margin-top: 5px; color: #7d8d6b; font-size: 9px; line-height: 1.6; }
@media (max-width: 720px) {
  .product-table td.product-recommendation { grid-column: span 2; padding: 12px; border-radius: 9px; background: #f1f6e9; }
  .product-table td.empty-recommendation { display: none; }
  .product-recommended-price > strong { font-size: 20px; }
  .product-recommended-price > small { font-size: 11px; }
  .product-pricing-target { font-size: 12px; padding: 13px 15px; }
  .product-pricing-target .text-button { min-height: 36px; }
}
.dialog-close { align-self: flex-start; }
.dialog-body > .dialog-footer { margin: 24px -28px -25px; }
.confirm-message { line-height: 1.8; font-size: 12px; color: #7d8b72; }
.field:is(label) { color: #67755e; font-size: 11px; font-weight: 500; }
.check-field.full { grid-column: 1/-1; }
.check-field small { display: block; color: #97a08d; font-size: 9px; line-height: 1.7; margin-top: 4px; }
.input-panel .check-field { align-self: end; min-height: 44px; }
.detail-cost > p { margin-bottom: 16px; }
.recipe-instructions h3 { font-size: 13px; margin-bottom: 18px; }
.recipe-instructions > p { margin-bottom: 16px; }
.recipe-notes { margin-top: 24px; border-radius: 10px; background: #eff3e7; padding: 16px; }
.recipe-notes .eyebrow { font-size: 8px; }
.recipe-notes p { color: #8a967e; font-size: 11px; line-height: 1.8; margin-top: 9px; }
.detail-edit-actions { display: flex; gap: 9px; margin-top: 22px; }
.detail-edit-actions > .button:last-child { margin-left: auto; }
.detail-profit .price-input .button { margin: 5px; min-width: 85px; min-height: 38px; padding: 8px 10px; border-radius: 6px; font-size: 10px; white-space: nowrap; }
.detail-profit #detail-results > .eyebrow { margin-top: 26px; font-size: 8px; letter-spacing: 1.1px; }
.detail-profit .result-big { font-size: 39px; letter-spacing: -1.5px; }
.detail-profit .large-gp { font-size: 24px; }
.detail-profit .result-label { font-size: 9px; }
.detail-profit .result-summary { gap: 10px; }
.breakdown-row.subtotal { border-top: 1px solid #d9e3c9; margin-top: 5px; padding-top: 13px; color: #566c47; }
.breakdown-row.subtotal strong { font-weight: 600; }
.result-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.result-label { color: #80916e; font-size: 10px; }
.large-gp { color: #4c703c; font-size: 30px; letter-spacing: -1px; font-weight: 500; white-space: nowrap; text-align: right; }
.large-gp small { font-size: 7px; letter-spacing: 1px; display: block; margin-top: 6px; color: #92a27e; }
.result-breakdown { margin-top: 22px; }
.margin-caption { justify-content: flex-start; gap: 6px; font-size: 9px; line-height: 1.7; }
.margin-caption svg { width: 13px; height: 13px; }
.tax-comparison { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding-top: 19px; }
.tax-comparison .eyebrow { font-size: 7px; letter-spacing: 1px; }
.tax-comparison h3 { font-size: 11px; margin: 7px 0 0; color: #657d52; font-weight: 500; }
.comparison-values { text-align: right; }
.comparison-values strong { display: block; font-size: 19px; font-weight: 500; letter-spacing: -.5px; color: #4a693a; }
.comparison-values > span { display: block; color: #92a07f; font-size: 10px; margin-top: 5px; }
.tax-comparison > p { grid-column: 1/-1; font-size: 9px; line-height: 1.75; color: #95a186; margin-top: 0; }
.target-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; }
.target-box > span { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.target-box > span svg { width: 15px; height: 15px; }
.target-box > strong { font-size: 21px; letter-spacing: -.5px; font-weight: 500; text-align: right; white-space: nowrap; }
.target-box small { display: block; font-size: 7px; font-weight: 400; letter-spacing: 0; margin-top: 4px; color: #a1ab94; }
.target-note { margin-top: 12px; font-size: 9px; line-height: 1.7; color: #9aa58d; }
.panel-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #eef3e4; color: #849e6a; flex-shrink: 0; }
.settings-heading p { font-size: 10px; line-height: 1.6; color: #9aa38d; margin-top: 5px; }
.settings-side { display: grid; gap: 20px; }
.settings-side > .info-box { margin-top: 0; }
.settings-grid .form-grid .field { margin-bottom: 0; }
.settings-side .panel > h3 { font-size: 12px; margin-bottom: 8px; }
.settings-side .panel > p.small { line-height: 1.8; font-size: 10px; margin-bottom: 14px; }
.settings-divider { height: 1px; background: var(--line); margin: 23px 0; }
.readonly-field { background: #f5f7f0; color: #8e9982; }
.info-box { display: flex; gap: 10px; align-items: flex-start; }
.info-box > svg { width: 16px; height: 16px; color: #97a784; margin-top: 3px; }
.install-tip { display: flex; align-items: center; gap: 22px; padding: 5px 3px; }
.install-tip .brand-word { color: #9eaf88; font-size: 32px; }
.install-tip strong { font-size: 11px; font-weight: 500; color: #7a8c69; }
.install-tip p { font-size: 10px; color: #9da791; line-height: 1.7; margin-top: 6px; }
.install-panel { min-width: 0; }
.install-panel .install-status { margin: 12px 0 0; color: var(--green); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.install-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; margin-top: 18px; }
.install-option { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #f7f9f1; }
.install-option h3 { margin-bottom: 8px; font-size: 12px; line-height: 1.5; }
.install-option p { color: #66755f; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.install-panel .install-note { margin-top: 16px; color: #66755f; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.install-button { max-width: 100%; margin-top: 16px; white-space: normal; text-align: center; }
.notice { display: flex; align-items: center; gap: 10px; }
.notice > svg { width: 17px; height: 17px; }
.notice > span { flex: 1; }
.result-big.negative, .large-gp.negative, .detail-profit .result-big.negative { color: #b56f55; }

@media (min-width: 1300px) {
  .page-section .recipe-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
  .page-section .recipe-card-body { padding-left: 16px; padding-right: 16px; }
  .page-section .recipe-card-metrics { gap: 12px; }
  .page-section .gp-chip { padding: 6px; font-size: 8px; }
}

@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (min-width: 1500px) {
  #main { padding-top: 44px; }
  .hero { min-height: 270px; }
  .hero-art svg { height: 270px; }
  .recipe-art { height: 190px; }
}

/* Keep every navigation item reachable on short desktop and landscape screens. */
@media (min-width: 721px) {
  .sidebar { overflow-y: auto; overscroll-behavior-y: contain; }
  .sidebar > *, .sidebar .nav-item { flex-shrink: 0; }
}

@media (max-width: 1180px) and (min-width: 721px) {
  .app-shell { grid-template-columns: 195px minmax(0,1fr); }
  .sidebar { padding-left: 14px; padding-right: 14px; }
  .brand { margin-left: 8px; gap: 7px; }
  .brand-word { font-size: 28px; }
  .brand-mark, .brand-mark .cosmo-logo { width: 32px; height: 32px; }
  .brand-tag { font-size: 9px; }
  .topbar { padding: 0 29px; }
  #main { padding: 30px 29px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 16px 15px; }
  .stat-value { font-size: 26px; }
  .stat-label { font-size: 9px; }
  .hero { padding: 30px; min-height: 227px; }
  .hero-copy { max-width: 55%; }
  .hero h2 { font-size: 31px; }
  .hero-art { margin-top: -30px; margin-bottom: -30px; flex-basis: 44%; }
  .hero-art svg { height: 227px; }
  .recipe-grid { gap: 14px; }
  .recipe-art { height: 145px; }
  .recipe-card-body { padding: 16px 14px; }
  .recipe-card-metrics { gap: 13px; }
  .gp-chip { font-size: 8px; padding: 6px; }
  .metric strong { font-size: 12px; }
  .toast { left: calc(50% + 97px); }
  th, td { padding-left: 15px; padding-right: 15px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .search-field { min-width: 180px; }
}

@media (max-width: 900px) and (min-width: 721px) {
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .recipe-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero h2 { font-size: 29px; }
  .heading-actions .button.secondary { display: none; }
  .calculator-grid, .settings-grid { grid-template-columns: 1fr; }
  .saved-status { display: none; }
}

@media (max-width: 720px) {
  :root { font-size: 14px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; padding: 7px 7px calc(7px + env(safe-area-inset-bottom)); background: #fcfdf9f5; backdrop-filter: blur(16px); border-top: 1px solid var(--line); border-right: 0; z-index: 40; }
  .sidebar .brand, .sidebar-footer, .sidebar-note, .nav-caption, .nav-active-dot { display: none; }
  .navigation { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 3px; }
  .nav-item { flex-direction: column; justify-content: center; gap: 6px; min-height: 54px; padding: 6px 2px; font-size: 10px; border-radius: 9px; }
  .nav-item svg { width: 20px; height: 20px; }
  .nav-item.active, .nav-item[aria-current="page"] { background: transparent; color: var(--green); }
  .nav-item.active svg, .nav-item[aria-current="page"] svg { background: #e7eed8; box-shadow: 0 0 0 5px #e7eed8; border-radius: 4px; }
  .nav-label { margin-top: 2px; }
  .topbar { height: 66px; padding: 0 21px; background: #fcfdf9; }
  .breadcrumb { display: flex; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; font-size: 18px; letter-spacing: -.7px; font-weight: 650; }
  .mobile-brand .cosmo-logo { width: 28px; height: 28px; border-radius: 7px; }
  .topbar-right { gap: 7px; }
  .topbar-right .saved-status, .topbar-right .save-status, .topbar-right > .status-dot { display: none; }
  .tax-pill { font-size: 10px; padding: 8px 10px; gap: 4px; min-height: 44px; }
  .tax-pill svg { width: 11px; height: 11px; }
  .topbar-right button.icon { min-width: 44px; min-height: 44px; padding: 10px; }
  #main { padding: 26px 20px calc(100px + env(safe-area-inset-bottom)); }
  .page-footer { display: none; }
  .page-heading { align-items: flex-start; margin-bottom: 23px; gap: 12px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.5px; margin-bottom: 9px; }
  h1 { font-size: 29px; letter-spacing: -1.05px; }
  .subtitle { font-size: 12px; line-height: 1.65; margin-top: 7px; }
  .heading-actions { gap: 7px; padding-top: 4px; }
  .heading-actions .button { font-size: 11px; min-height: 44px; padding: 11px 12px; border-radius: 8px; gap: 5px; }
  .heading-actions .button svg { width: 14px; height: 14px; }
  .heading-actions .button.secondary { display: none; }
  .page-heading:has(.eyebrow) .heading-actions { padding-top: 23px; }
  .hero { min-height: 235px; padding: 26px 23px; margin-bottom: 18px; border-radius: 17px; align-items: center; }
  .hero-copy { max-width: 65%; }
  .hero .eyebrow { font-size: 7px; letter-spacing: 1.2px; margin-bottom: 11px; }
  .hero h2 { font-size: 29px; letter-spacing: -1.25px; line-height: 1.11; }
  .hero p { font-size: 11px; line-height: 1.75; max-width: 190px; margin-top: 11px; }
  .hero-action { font-size: 10px; margin-top: 9px; gap: 6px; min-height: 44px; text-align: left; }
  .hero-action svg { width: 13px; height: 13px; }
  .hero-art { position: absolute; width: 52%; max-width: 220px; right: -13px; top: 13px; bottom: 0; margin: 0; opacity: .95; z-index: -1; }
  .hero-art svg { width: 100%; height: 100%; min-height: 208px; }
  .hero::after { width: 360px; height: 360px; right: -170px; top: -100px; }
  .hero-corner-label { display: none; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-bottom: 27px; }
  .stat-card { border-radius: 12px; padding: 16px 16px 14px; }
  .stat-label { font-size: 11px; line-height: 1.5; }
  .stat-top svg { width: 15px; height: 15px; }
  .stat-value { font-size: 27px; margin-top: 11px; }
  .stat-caption { font-size: 10px; margin-top: 6px; }
  .section-header { gap: 10px; margin-bottom: 15px; align-items: center; }
  .section-header h2 { font-size: 17px; }
  .section-header p { font-size: 11px; max-width: 240px; line-height: 1.6; }
  .text-button { font-size: 11px; gap: 4px; min-height: 44px; }
  .text-button svg { width: 13px; height: 13px; }
  .recipe-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .recipe-art { height: 140px; }
  .recipe-type { font-size: 10px; left: 10px; top: 10px; padding: 5px 7px; letter-spacing: .3px; }
  .recipe-card { border-radius: 13px; }
  .recipe-card-body { padding: 14px 12px 13px; }
  .recipe-card-name { font-size: 14px; line-height: 1.4; min-height: 39px; }
  .recipe-card-meta { font-size: 10px; margin-top: 5px; line-height: 1.6; }
  .recipe-card-metrics { margin-top: 13px; padding-top: 11px; gap: 11px; flex-wrap: wrap; align-items: center; }
  .metric { gap: 4px; }
  .metric label { font-size: 10px; }
  .metric strong { font-size: 13px; }
  .gp-chip { font-size: 11px; padding: 6px 8px; margin-left: 0; }
  .gp-chip small { font-size: 9px; }
  .demo-banner { align-items: flex-start; font-size: 11px; line-height: 1.7; gap: 7px; margin-top: 18px; flex-wrap: wrap; }
  .demo-banner > span { flex-basis: calc(100% - 25px); }
  .demo-banner .text-button { margin-left: 20px; margin-top: -5px; }
  .demo-banner svg { margin-top: 2px; width: 13px; height: 13px; }
  .demo-banner button { font-size: 11px; min-height: 44px; }
  .page-section { margin-top: 26px; }
  .toolbar { flex-direction: column-reverse; align-items: stretch; gap: 15px; margin-bottom: 20px; }
  .search-field { min-width: 0; padding: 0 12px; }
  .search-field input { min-height: 43px; font-size: 12px; }
  .category-filters { margin-left: -3px; margin-right: -20px; padding-right: 20px; gap: 4px; }
  .filter { padding: 10px 13px; font-size: 12px; min-height: 44px; }
  .panel { padding: 22px; border-radius: 16px; }
  .panel h2 { font-size: 17px; }
  .calculator-grid, .settings-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .result-big { font-size: 52px; }
  .settings-actions .button { flex: 1; }
  .settings-grid .field { margin-bottom: 20px; }
  .table-wrap { border: 0; border-radius: 0; overflow: visible; background: transparent; }
  table, tbody { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; padding: 16px; background: #fff; gap: 17px 8px; position: relative; }
  tbody tr:hover { background: #fff; }
  td { display: block; border-bottom: 0; padding: 0; font-size: 12px; white-space: normal; }
  td:first-child { grid-column: 1/-1; padding-right: 90px; }
  .mobile-label { display: block; color: #8e997f; font-size: 10px; margin-bottom: 7px; }
  td:last-child { position: absolute; top: 17px; right: 12px; }
  .product-avatar { width: 34px; height: 38px; }
  .product-details strong { font-size: 13px; }
  .product-details small { font-size: 10px; }
  .table-sub { font-size: 10px; line-height: 1.5; }
  .row-actions { gap: 0; }
  .row-actions button { min-width: 44px; min-height: 44px; padding: 12px; }
  .row-actions button svg { width: 18px; height: 18px; }
  .dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 36px); border-radius: 20px; }
  .dialog.wide-dialog, .wide-dialog { width: calc(100vw - 24px); }
  .dialog-header { padding: 20px 20px 16px; }
  .dialog-header h2 { font-size: 20px; }
  .dialog-header p { font-size: 10px; }
  .dialog-body { padding: 20px; }
  .dialog-footer { padding: 16px 20px; }
  .dialog-body > .dialog-footer { margin: 24px -20px -20px; }
  .dialog-footer .button { min-height: 43px; }
  .form-grid { gap: 18px 12px; }
  .field > label, .field-label, .field:is(label) { font-size: 12px; }
  .field input:not([type="checkbox"]), .field select, .field textarea, .input { font-size: 16px; padding: 11px 12px; }
  .field small, .field .help-text, .field-hint { font-size: 10px; }
  .ingredient-row { grid-template-columns: minmax(0,1fr) 77px 44px; gap: 6px; }
  .ingredient-row input, .ingredient-row select { font-size: 12px; padding: 11px 8px; min-height: 44px; }
  .ingredient-row .button.icon { min-width: 44px; min-height: 44px; padding: 10px; }
  .detail-hero { gap: 17px; padding-bottom: 20px; margin-bottom: 20px; }
  .detail-art { width: 113px; height: 105px; border-radius: 11px; }
  .detail-heading h2, .detail-heading h3 { font-size: 22px; margin-top: 7px; letter-spacing: -.6px; }
  .detail-heading p { font-size: 10px; margin-top: 6px; }
  .detail-grid { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .detail-profit { padding: 21px; border-radius: 14px; }
  .detail-profit .price-input .button { min-height: 44px; font-size: 11px; }
  .detail-profit .result-big { font-size: 37px; }
  .detail-profit .large-gp { font-size: 24px; }
  .detail-cost h3 { margin-bottom: 17px; }
  .detail-actions { flex-wrap: wrap; }
  .detail-actions .button { flex: 1; }
  .price-input input { font-size: 23px; }
  .result-label, .detail-profit .result-label { font-size: 10px; }
  .result-summary { gap: 14px; }
  .large-gp { font-size: 26px; }
  .large-gp small { font-size: 8px; letter-spacing: .8px; }
  .target-box > span { font-size: 11px; }
  .target-box > strong { font-size: 20px; }
  .install-tip { gap: 19px; }
  .breakdown-row, .results-panel .breakdown-row { font-size: 12px; line-height: 1.6; }
  .margin-caption, .tax-comparison > p, .target-note { font-size: 10px; }
  .comparison-values > span { font-size: 11px; }
  .target-box small { font-size: 9px; }
  .info-box { font-size: 12px; }
  .settings-heading p, .settings-side .panel > p.small, .install-tip p, .list-footnote { font-size: 11px; }
  .button, .button.icon, button.icon { min-height: 44px; }
  .button.icon, button.icon { min-width: 44px; }
  .check-field { font-size: 12px; min-height: 44px; align-items: center; }
  .check-field small { font-size: 10px; }
  .check-field input { width: 18px; height: 18px; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); left: 50%; font-size: 11px; max-width: calc(100vw - 32px); padding: 12px 17px; }
  .desktop-only { display: none !important; }
}

@media (max-width: 380px) {
  #main { padding-left: 16px; padding-right: 16px; }
  .topbar { padding-left: 17px; padding-right: 17px; }
  h1 { font-size: 26px; }
  .hero { padding-left: 20px; }
  .hero h2 { font-size: 27px; }
  .hero-copy { max-width: 66%; }
  .hero-art { right: -22px; width: 55%; }
  .recipe-card-metrics { gap: 10px; }
  .recipe-card-body { padding-left: 10px; padding-right: 10px; }
  .recipe-card-name { font-size: 13px; }
  .recipe-art { height: 125px; }
  .heading-actions .button { padding-left: 10px; padding-right: 10px; font-size: 11px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .recipe-card:hover { transform: none; }
}

/* Search results stay in the ingredient row so they can scroll inside the dialog. */
.ingredient-row .ingredient-search { font-size: 16px; min-height: 44px; padding-right: 10px; }
.ingredient-suggestions { grid-column: 1 / -1; min-width: 0; margin: 0 0 6px; border: 1px solid #dce4d2; border-radius: 11px; background: #fff; overflow: hidden; }
.ingredient-search-status { padding: 11px 13px; font-size: 11px; line-height: 1.6; color: #6b7d60; background: #f5f8ef; border-bottom: 1px solid #e5ebde; }
.ingredient-options { max-height: 220px; overflow-y: auto; overscroll-behavior: contain; padding: 5px; }
.ingredient-options:empty { display: none; }
.ingredient-option { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 48px; padding: 11px 10px; border-radius: 7px; background: #fff; text-align: left; }
.ingredient-option:hover, .ingredient-option.active { background: #eaf1de; color: #214c40; }
.ingredient-option[aria-selected="true"] { font-weight: 600; }
.ingredient-option-name { min-width: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.ingredient-option-meta { color: #7c8b70; font-size: 11px; white-space: nowrap; font-weight: 400; }

/* Shared web workspace */
.workspace-bar { max-width: 1550px; margin: 0 auto; padding: 23px 46px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.pub-switcher { display: flex; flex-direction: column; flex: 1 1 220px; max-width: 360px; min-width: 0; }
.new-group-button { align-self: flex-end; min-height: 44px; margin-right: auto; }
.group-switcher { flex-basis: 240px; }
.pub-switcher .eyebrow { margin-bottom: 7px; font-size: 9px; }
.pub-switcher select { color: var(--green); background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 15px; font-weight: 600; width: 100%; min-height: 44px; }
.role-pill { align-self: flex-end; margin-bottom: 11px; border-radius: 20px; color: #72835e; background: #ebf0e0; font-size: 10px; padding: 7px 11px; text-transform: capitalize; white-space: nowrap; }
.workspace-shortcuts { display: none; }
.account-link, .v2-link { color: #7b8c6b; font-size: 11px; text-decoration: none; }
.v2-link { display: flex; align-items: center; gap: 10px; padding: 10px 0 0; }
.v2-link svg { width: 14px; height: 14px; }
.page-footer a { color: #7d8c70; text-decoration: none; }
.cloud-start#main { max-width: 720px; margin: 10vh auto; padding: 40px 24px; }
.cloud-start .brand-word { display: flex; align-items: center; gap: 12px; color: var(--green); margin-bottom: 36px; }
.cloud-start .eyebrow { display: block; margin-bottom: 15px; }
.cloud-start h1 { margin-bottom: 18px; }
.cloud-start p { color: #73826a; line-height: 1.8; margin-bottom: 15px; }
.detail-edit-actions { flex-wrap: wrap; }
.page-heading > div:first-child { min-width: 0; }
.page-heading h1 { overflow-wrap: anywhere; }
.table-wrap { position: relative; }
@media (max-width: 1180px) and (min-width: 721px) { .workspace-bar { padding-left: 29px; padding-right: 29px; } }
@media (max-width: 720px) {
  .navigation .secondary-nav { display: none; }
  .workspace-bar { padding: 20px 20px 0; flex-wrap: wrap; gap: 9px 12px; }
  .pub-switcher { flex: 1; width: auto; }
  .group-switcher { flex: 1 1 calc(100% - 160px); max-width: none; }
  .new-group-button { flex: 0 0 auto; margin-right: 0; padding: 10px; font-size: 11px; }
  .pub-switcher select { font-size: 16px; }
  .role-pill { font-size: 9px; padding: 7px 9px; }
  .workspace-shortcuts { display: flex; gap: 6px; flex-basis: 100%; overflow-x: auto; padding-top: 9px; scrollbar-width: none; }
  .workspace-tab { color: #778869; background: #edf1e5; border-radius: 8px; white-space: nowrap; min-height: 44px; padding: 10px 12px; font-size: 11px; }
  .workspace-tab.active { color: #fff; background: var(--green); }
  .detail-edit-actions .button { font-size: 11px; }
}

/* Wine prices belong to the product; costing uses each pub's VAT settings. */
.wine-pricing-section { min-width: 0; margin: 25px 0 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--line); }
.wine-pricing-section > legend { padding: 0 8px 0 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.wine-pricing-hint { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 0 0 17px; overflow-wrap: anywhere; }
.wine-volume-hint { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #dfd7ab; border-radius: 9px; color: #78652b; background: #fffbed; font-size: 11px; line-height: 1.7; }
.wine-costing-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.wine-costing-preview > .wine-pricing-hint { grid-column: 1 / -1; margin: 0; }
.wine-costing-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9f1; }
.wine-costing-card h3 { margin: 0 0 13px; }
.wine-costing-card dl { display: grid; gap: 10px; margin: 0; }
.wine-costing-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 10px; line-height: 1.6; }
.wine-costing-row dt { color: var(--muted); }
.wine-costing-row dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wine-costing-card .wine-profit-figures { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.wine-costing-card > .wine-pricing-hint { margin: 14px 0 0; font-size: 10px; }
.wine-product-sales { display: block; max-width: 340px; margin-top: 7px; color: #65745b; font-size: 10px; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.wine-product-sales > span { display: block; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .wine-costing-preview { grid-template-columns: minmax(0, 1fr); }
  .wine-costing-card { padding: 14px; }
  .wine-costing-row { font-size: 11px; }
  .wine-product-sales { max-width: 100%; font-size: 10px; }
}

/* Bottled mixers keep purchase costs and usable bottle costs together. */
.mixer-pricing-section { min-width: 0; margin: 25px 0 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--line); }
.mixer-pricing-section > legend { padding: 0 8px 0 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.mixer-pricing-hint { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 0 0 17px; overflow-wrap: anywhere; }
.mixer-costing-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.mixer-costing-preview > .mixer-pricing-hint { grid-column: 1 / -1; margin: 0; }
.mixer-product-summary { display: block; max-width: 340px; margin-top: 7px; color: #65745b; font-size: 10px; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.mixer-product-summary > span { display: block; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .mixer-costing-preview { grid-template-columns: minmax(0, 1fr); }
  .mixer-product-summary { max-width: 100%; }
}

/* Product selling prices and live margins stay beside each venue's purchase costs. */
.product-table td { vertical-align: top; }
.product-table td.product-sales-cell { min-width: 255px; white-space: normal; }
.product-table td.product-purchase-cell { white-space: normal; }
.product-sale-form { display: grid; gap: 11px; width: 100%; min-width: 0; max-width: 330px; }
.product-sale-row { display: grid; gap: 8px; min-width: 0; }
.product-sale-row + .product-sale-row { border-top: 1px solid var(--line); padding-top: 12px; }
.product-sale-serving { font-size: 11px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.product-sale-fields { display: grid; grid-template-columns: minmax(75px, .8fr) minmax(105px, 1.2fr); align-items: end; gap: 9px; }
.product-sale-fields.fixed-serving { grid-template-columns: minmax(0, 1fr); max-width: 175px; }
.product-sale-fields label { display: grid; gap: 6px; min-width: 0; color: #7e8a73; font-size: 9px; line-height: 1.5; }
.product-sale-fields input { width: 100%; min-width: 0; min-height: 42px; padding: 9px 10px; border: 1px solid #dfe5d6; border-radius: 8px; color: var(--ink); background: #fff; font-size: 14px; }
.product-sale-fields input:focus { border-color: #a2b789; }
.product-sale-fields input[readonly] { background: #f5f7f0; }
.product-sale-input { position: relative; display: flex; align-items: center; min-width: 0; }
.product-sale-input > span { position: absolute; left: 10px; color: #8b987c; font-size: 13px; pointer-events: none; }
.product-sale-input > input { padding-left: 26px; }
.product-sale-preview { display: flex; align-items: baseline; gap: 5px 10px; flex-wrap: wrap; min-width: 0; font-size: 10px; line-height: 1.6; }
.product-sale-preview > strong { font-size: 13px; font-weight: 600; }
.product-sale-preview > span { color: #7e8a73; overflow-wrap: anywhere; }
.product-sale-tax-note { color: #8b967f; font-size: 9px; line-height: 1.6; margin: -2px 0 0; }
.product-sale-form .product-sale-save { width: fit-content; min-height: 34px; padding: 8px 12px; font-size: 10px; }
.product-sale-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product-sale-actions > .text-button { font-size: 10px; }
.product-sale-form .product-sale-error { margin: 0; font-size: 10px; padding: 9px 10px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .product-table td.product-purchase-cell { grid-column: span 1; min-width: 0; }
  .product-table td.product-sales-cell { grid-column: span 2; min-width: 0; }
  .product-table td.product-recommendation { grid-column: 1 / -1; }
  .product-sale-form { max-width: none; gap: 10px; }
  .product-sale-fields { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 7px; }
  .product-sale-fields label { font-size: 10px; }
  .product-sale-fields input { min-height: 44px; font-size: 16px; padding-left: 8px; padding-right: 7px; }
  .product-sale-input > input { padding-left: 24px; }
  .product-sale-input > span { left: 8px; }
  .product-sale-serving { font-size: 11px; }
  .product-sale-preview { gap: 2px 9px; }
  .product-sale-preview > strong { font-size: 14px; }
  .product-sale-tax-note { font-size: 10px; }
  .product-sale-form .product-sale-save { min-height: 44px; font-size: 11px; }
}

/* One supplier and rep directory shared across the group's venues. */
.supplier-heading { align-items: flex-start; }
.supplier-heading .heading-actions { padding-top: 20px; }
.supplier-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 19px; }
.supplier-toolbar .search-field { width: min(430px, 100%); }
.supplier-toolbar .search-field input { font-size: 12px; min-height: 44px; }
.supplier-readonly { color: var(--muted); font-size: 11px; line-height: 1.6; }
.supplier-result-count { color: #7a8970; font-size: 11px; margin-bottom: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.supplier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.supplier-card { min-width: 0; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); padding: 22px; }
.supplier-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; min-width: 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.supplier-card-header > div:first-child { min-width: 0; }
.supplier-name-label { color: #8b967e; font-size: 10px; line-height: 1.5; margin-bottom: 7px; }
.supplier-card h2 { color: var(--ink); font-size: 19px; font-weight: 550; letter-spacing: -.35px; line-height: 1.4; overflow-wrap: anywhere; }
.supplier-card-actions { flex-shrink: 0; margin: -4px -8px 0 0; }
.supplier-card-actions button { min-height: 40px; min-width: 38px; }
.supplier-card-actions .supplier-delete:hover { color: var(--danger); background: #fcf0ec; }
.supplier-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; margin: 21px 0 0; }
.supplier-detail { min-width: 0; }
.supplier-detail dt { color: #8b967e; font-size: 10px; line-height: 1.5; margin-bottom: 7px; }
.supplier-detail dd { margin: 0; color: #4b604f; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.supplier-detail a { text-decoration-color: #b5c5a3; text-underline-offset: 3px; }
.supplier-detail a:hover { text-decoration-color: currentColor; }
.supplier-detail-full { grid-column: 1 / -1; }
.supplier-notes dd { white-space: pre-wrap; }
.supplier-missing { color: #a0a893; }
.supplier-empty { margin-top: 8px; }
.supplier-editor .form-grid { margin-bottom: 0; }
.supplier-editor input:disabled, .supplier-editor textarea:disabled { opacity: .65; }
.supplier-editor .supplier-form-error { margin-top: 21px; }
@media (min-width: 1600px) {
  .supplier-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .supplier-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .supplier-heading { align-items: flex-start; }
  .supplier-heading .heading-actions { padding-top: 0; }
  .supplier-toolbar { flex-wrap: wrap; gap: 10px; }
  .supplier-toolbar .search-field { width: 100%; }
  .supplier-toolbar .search-field input { font-size: 16px; }
  .supplier-readonly { font-size: 11px; }
  .supplier-grid { gap: 16px; }
  .supplier-card { padding: 20px; }
  .supplier-card-header { gap: 10px; }
  .supplier-card h2 { font-size: 19px; }
  .supplier-card-actions button { min-height: 44px; min-width: 40px; }
  .supplier-details { gap: 20px 16px; }
  .supplier-detail dt, .supplier-name-label { font-size: 11px; }
  .supplier-detail dd { font-size: 14px; }
  .supplier-editor .form-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Recipes keep preparation, garnish and the group's glass library together. */
.recipe-preparation { display: grid; gap: 21px; padding-top: 24px; border-top: 1px solid var(--line); }
.recipe-preparation > h3 { margin-bottom: 0; }
.recipe-preparation textarea { resize: vertical; }
.recipe-photo-section { display: grid; gap: 14px; margin: 24px 0; padding-top: 22px; border-top: 1px solid var(--line); }
.recipe-photo-section > .field { margin: 0; }
.recipe-photo-preview { max-width: 320px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9f1; }
.recipe-photo-preview img { display: block; width: 100%; max-height: 240px; object-fit: contain; border-radius: 7px; }
.recipe-photo-section > .button { justify-self: start; }
.recipe-photo-section > p { font-size: 12px; line-height: 1.6; margin: 0; }
.recipe-glass-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px; }
.recipe-glass-section > .button { align-self: end; margin-bottom: 22px; font-size: 11px; }
.recipe-glass-preview { display: flex; align-items: center; gap: 17px; grid-column: 1 / -1; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9f1; }
.recipe-glass-photo { display: block; width: 95px; height: 110px; border-radius: 8px; object-fit: contain; background: #fff; }
.recipe-glass-preview > span { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.recipe-glass-section > .form-error { grid-column: 1 / -1; margin: 0; }
.recipe-service-details { display: grid; gap: 22px; }
.recipe-service-details .recipe-notes { margin: 0; }
.recipe-service-details .recipe-method p, .recipe-service-details .recipe-garnish p { white-space: pre-wrap; overflow-wrap: anywhere; }
.recipe-glass-image { display: block; max-width: 160px; width: auto; max-height: 180px; object-fit: contain; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.glass-manager .dialog-body { display: block; }
.glass-library-empty { color: var(--muted); font-size: 12px; line-height: 1.8; padding: 16px 18px; border: 1px dashed #cfdac0; border-radius: 12px; background: #f5f8ef; }
.glass-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.glass-type-card { min-width: 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff; }
.glass-type-image { display: flex; align-items: center; justify-content: center; height: 150px; padding: 12px; background: #f3f6ed; border-bottom: 1px solid var(--line); }
.glass-type-image img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.glass-photo-placeholder { display: grid; justify-items: center; gap: 9px; color: #91a281; font-size: 10px; }
.glass-photo-placeholder svg { width: 45px; height: 45px; stroke-width: 1.2; }
.glass-type-card-body { padding: 15px 13px; }
.glass-type-card-body > h3 { color: var(--ink); line-height: 1.6; overflow-wrap: anywhere; }
.glass-type-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.glass-type-actions .button { min-height: 38px; padding: 8px 10px; font-size: 10px; }
.glass-type-actions .danger:hover { color: var(--danger); background: #fcf0ec; }
.glass-manager-form { display: grid !important; gap: 20px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.glass-manager-form > h3 { margin-bottom: 0; }
.glass-manager-form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.glass-manager-form > .button { width: fit-content; }
.glass-image-input { width: 100%; font-size: 12px; }
.glass-image-input::file-selector-button { border: 0; border-radius: 5px; padding: 7px 10px; margin-right: 10px; background: #eaf0e0; color: var(--green); font: inherit; cursor: pointer; }

/* A venue's identity stays visible in its workspace and group card. */
.current-venue-logo { display: block; width: 44px; height: 44px; flex: 0 0 44px; align-self: flex-end; object-fit: contain; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 3px; }
.group-pub-symbol.group-pub-symbol-logo { background: #fff; border: 1px solid var(--line); overflow: hidden; }
.group-pub-logo { display: block; width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.venue-logo-input { width: 100%; font-size: 12px; }
.venue-logo-input::file-selector-button { border: 0; border-radius: 5px; padding: 7px 10px; margin-right: 10px; background: #eaf0e0; color: var(--green); font: inherit; cursor: pointer; }
.venue-logo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.venue-logo-preview { display: grid; place-items: center; width: 112px; height: 112px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.venue-logo-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.venue-logo-status { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.glass-upload-preview { display: grid; justify-items: start; }
.glass-upload-preview img { display: block; max-width: min(100%, 230px); max-height: 220px; object-fit: contain; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.glass-manager-status { margin-bottom: 20px; padding: 12px 14px; border-radius: 9px; background: #eaf1df; color: #48643f; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.glass-manager-error { margin-bottom: 20px; }
.glass-manager-readonly { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 22px; }
@media (max-width: 720px) {
  .glass-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .glass-type-image { height: 135px; padding: 10px; }
  .glass-type-actions { gap: 5px; }
  .glass-type-actions .button { min-height: 44px; font-size: 11px; }
  .glass-type-card-body { padding: 12px 10px; }
  .glass-manager-form .input { font-size: 16px; }
  .glass-image-input::file-selector-button { margin-right: 7px; padding: 7px; font-size: 12px; }
  .recipe-glass-section { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .recipe-glass-section > .button { justify-self: start; margin: 0; font-size: 12px; }
  .recipe-glass-preview { padding: 12px; }
}
@media (max-width: 380px) {
  .glass-type-actions .button { flex: 1; }
}

@media (max-width: 900px) {
  .page-heading:has([data-action="glass-manage"]) { flex-wrap: wrap; }
  .page-heading:has([data-action="glass-manage"]) .heading-actions { flex-wrap: wrap; padding-top: 0; }
  .heading-actions .button[data-action="glass-manage"] { display: inline-flex; }
}

/* ADMINs retain group-owner tools and are identified separately in the team. */
.group-role-badge.group-role-admin { color: #245142; background: #dfebc5; border: 1px solid #bdcf95; }

/* Group status pages keep administrative controls separate from private data. */
.group-lifecycle { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px 24px; margin: 0 0 26px; scroll-margin-top: 20px; }
#group-controls-slot:empty, #group-controls-shortcut-slot:empty { display: none; }
#group-controls-shortcut-slot { align-self: flex-end; }
.group-controls-shortcut { min-height: 44px; white-space: nowrap; border-color: var(--green); }
.group-access-blocked + #group-controls-slot { margin-top: 24px; }
.group-lifecycle h2 { margin: 0 0 10px; }
.group-lifecycle p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.group-lifecycle-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.group-lifecycle-hint { grid-column: 1 / -1; margin: 0; }
.group-access-blocked { padding: 34px; text-align: center; }
.group-access-blocked > svg { width: 34px; height: 34px; color: var(--green); margin-bottom: 16px; }
.group-access-blocked h2 { font-size: clamp(19px,2vw,25px); line-height: 1.5; overflow-wrap: anywhere; }
.group-access-blocked p { margin: 14px 0 0; color: var(--muted); line-height: 1.7; }
@media (max-width: 720px) {
  .group-lifecycle { grid-template-columns: minmax(0,1fr); padding: 22px; gap: 15px; }
  .group-lifecycle-actions .button { flex: 1 1 150px; }
  .group-access-blocked { padding: 26px 20px; }
}
