:root {
  color-scheme: light;
  --ink: #211a1d;
  --muted: #827a7b;
  --line: #e9e3dd;
  --paper: #f6f3ee;
  --white: #fffefa;
  --wine: #6e1d37;
  --wine-dark: #4b1427;
  --rose: #f1e4e4;
  --gold: #b58b51;
  --green: #47745a;
  --green-bg: #eaf2eb;
  --shadow: 0 18px 50px rgba(55, 31, 37, .08);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; }
body[data-role="buyer"] { --paper: #f7f4fb; --wine: #713b83; --wine-dark: #40234e; --gold: #a45c9c; --rose: #f0e4f4; --line: #e6ddea; --shadow: 0 18px 48px rgba(51, 29, 62, .09); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { background: #241a1e; color: #f8f1ed; padding: 27px 17px 20px; display: flex; flex-direction: column; min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 30px; }
.brand-logo { display: block; width: 100%; max-width: 205px; height: auto; object-fit: contain; object-position: left center; }
.brand-mark { width: 34px; height: 34px; background: var(--wine); border-radius: 12px 12px 12px 4px; display: grid; place-items: center; color: #fff; font-family: Georgia, serif; font-size: 20px; }
.brand-name { font-family: "Playfair Display", Georgia, serif; font-size: 22px; font-weight: 700; letter-spacing: -.7px; }
.brand-name span { color: #d4a77c; }
.role-label { color: #a99da0; font-size: 10px; letter-spacing: 1.35px; text-transform: uppercase; margin: 0 11px 12px; }
.role-switch { position: relative; padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff; border-radius: 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; margin: 0 2px 28px; }
.role-switch small { display: block; color: #a99da0; margin-bottom: 2px; font-size: 10px; }
.role-switch strong { font-size: 13px; font-weight: 600; }
.chevron { color: #c2b5b8; font-size: 17px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { border: 0; background: transparent; color: #c7bbbe; border-radius: 10px; padding: 11px 12px; display: flex; align-items: center; gap: 12px; text-align: left; font-size: 13px; transition: background .18s ease, color .18s ease; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { color: #fff; background: #6e1d37; box-shadow: 0 7px 16px rgba(0,0,0,.16); }
.nav-icon { width: 18px; display: inline-grid; place-items: center; font-size: 17px; opacity: .9; }
.sidebar-spacer { flex: 1; }
.sidebar-note { border-top: 1px solid rgba(255,255,255,.1); margin-top: 24px; padding: 16px 9px 2px; color: #b5a9ac; font-size: 11px; line-height: 1.5; }
.sidebar-note strong { color: #e6d7d4; font-weight: 500; display: block; margin-bottom: 4px; }
.main-area { min-width: 0; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 clamp(20px, 4vw, 56px); background: rgba(255,254,250,.85); border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 15px; }
.eyebrow { font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: 1px; }
.topbar-title { font-size: 13px; font-weight: 600; margin-top: 3px; }
.search-box { display: flex; gap: 9px; align-items: center; width: min(310px, 32vw); background: #f4f0eb; color: #92898a; border-radius: 10px; padding: 10px 12px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.top-icon { position: relative; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: #55484c; display: grid; place-items: center; font-size: 16px; }
.top-icon .counter { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--wine); color: white; display: grid; place-items: center; font-size: 9px; padding: 0 4px; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: #ead9d0; color: var(--wine-dark); font-size: 11px; font-weight: 700; }
.view-root { max-width: 1440px; margin: 0 auto; padding: 29px clamp(20px, 4vw, 56px) 52px; }
.demo-banner { display: flex; align-items: center; gap: 9px; font-size: 11px; color: #746c6d; background: #fff7e9; border: 1px solid #f0e4ce; padding: 9px 12px; border-radius: 10px; margin-bottom: 20px; }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: #ca9c5d; }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 255px; border-radius: 18px; background: linear-gradient(112deg, #431629 0%, #69213a 48%, #8b4051 100%); color: white; padding: 36px clamp(24px, 4vw, 49px); display: flex; align-items: center; box-shadow: var(--shadow); }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; }
.hero::before { width: 360px; height: 360px; right: 10%; top: -180px; }
.hero::after { width: 470px; height: 470px; right: 2%; top: -180px; }
.hero-copy { max-width: 520px; position: relative; z-index: 1; }
.hero-kicker { color: #e4c8b1; text-transform: uppercase; letter-spacing: 1.6px; font-size: 10px; margin-bottom: 12px; }
.hero h1, .page-heading h1 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-weight: 600; letter-spacing: -.6px; }
.hero h1 { font-size: clamp(28px, 3vw, 39px); line-height: 1.12; }
.hero p { color: #e9dadd; font-size: 13px; line-height: 1.6; max-width: 400px; margin: 13px 0 20px; }
.hero-art { position: absolute; right: 9%; bottom: -23px; width: 215px; height: 275px; opacity: .92; filter: drop-shadow(14px 12px 18px rgba(12,0,5,.35)); transform: rotate(4deg); }
.taste-finder { margin-top: 17px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.taste-copy h2 { margin: 0; font: 600 21px "Playfair Display", Georgia, serif; }
.taste-copy p { color: var(--muted); font-size: 11px; margin: 6px 0 14px; line-height: 1.5; }
.taste-finder .hero-kicker { color: var(--gold); margin-bottom: 6px; }
.taste-input { display: flex; align-items: center; gap: 12px; max-width: 780px; padding: 13px 16px; border: 1px solid #ded4cc; border-radius: 14px; background: #fbf9f5; color: var(--gold); }
.taste-input textarea { flex: 1; min-width: 0; min-height: 25px; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.5; }
.taste-input textarea::placeholder { color: #8b7e8d; }
.taste-input small { color: #a095a2; font-size: 11px; }
.taste-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.taste-chips button { border: 1px solid var(--line); border-radius: 20px; padding: 7px 10px; background: white; color: #655b5e; font-size: 10px; }
.taste-chips button:hover { border-color: var(--wine); color: var(--wine); }
.button { border: 0; border-radius: 9px; padding: 11px 16px; color: #fff; background: var(--wine); font-weight: 600; font-size: 12px; transition: transform .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); background: var(--wine-dark); }
.button-light { background: #fffaf2; color: var(--wine-dark); }
.button-light:hover { background: #f2e6dc; }
.button-outline { background: transparent; color: var(--wine); border: 1px solid #d9c5c7; }
.button-outline:hover { background: var(--rose); }
.button-small { padding: 8px 11px; font-size: 11px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 30px 0 15px; }
.section-heading h2 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 23px; font-weight: 600; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.text-link { border: 0; background: transparent; color: var(--wine); font-size: 11px; font-weight: 600; padding: 7px 0; }
.text-link:hover { text-decoration: underline; }
.filter-row { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.filter-pill { flex: 0 0 auto; border: 1px solid var(--line); background: var(--white); color: #665d5f; padding: 8px 13px; border-radius: 24px; font-size: 11px; }
.filter-pill.active { border-color: var(--wine); color: var(--wine); background: #f7ecee; }
.wine-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.wine-card { border: 1px solid var(--line); border-radius: 14px; background: var(--white); overflow: hidden; min-width: 0; transition: transform .2s ease, box-shadow .2s ease; }
.wine-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.wine-visual { height: 158px; position: relative; display: grid; place-items: center; overflow: hidden; }
.wine-visual::before { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.34); top: 17px; right: -40px; }
.wine-visual[data-tone="rose"] { background: linear-gradient(140deg, #f3dfe0, #ead0c9); }
.wine-visual[data-tone="gold"] { background: linear-gradient(140deg, #efe6cd, #d9c39d); }
.wine-visual[data-tone="green"] { background: linear-gradient(140deg, #dce5dc, #b9c8bb); }
.wine-visual[data-tone="blue"] { background: linear-gradient(140deg, #e0e3eb, #c4c7d0); }
.wine-bottle { width: 61px; height: 142px; position: relative; z-index: 1; filter: drop-shadow(6px 9px 8px rgba(37,17,25,.22)); }
.wine-info { padding: 12px 13px 13px; }
.placement-label { display: inline-flex; margin: 0 0 7px; border-radius: 20px; padding: 4px 7px; background: #fff2de; color: #805b2d; font-size: 8px; font-weight: 600; }
.wine-origin { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wine-name { font-family: "Playfair Display", Georgia, serif; font-size: 16px; margin: 5px 0 3px; line-height: 1.22; min-height: 39px; }
.wine-meta { color: var(--muted); font-size: 10px; display: flex; align-items: center; gap: 6px; }
.rating { color: #8a6430; font-weight: 700; }
.wine-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 13px; }
.wine-price { font-weight: 700; font-size: 13px; }
.wine-price small { display: block; color: var(--muted); font-size: 9px; font-weight: 400; margin-top: 2px; }
.add-button { width: 31px; height: 31px; border-radius: 9px; border: 0; background: var(--wine); color: white; font-size: 18px; line-height: 1; }
.add-button:hover { background: var(--wine-dark); }
.favorite-button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--wine); font-size: 18px; line-height: 1; }
.favorite-button.selected { border-color: #e9c3cf; background: #fff0f4; }
.availability { display: flex; gap: 7px; align-items: center; margin-top: 10px; color: var(--green); font-size: 9px; }
.availability i { width: 6px; height: 6px; border-radius: 50%; background: #6d9b77; }
.featured-shelf { margin-top: 8px; }
.featured-shelf .section-heading { align-items: center; }
.featured-shelf .section-heading .eyebrow { margin-bottom: 5px; }
.featured-controls { display: flex; align-items: center; gap: 8px; }
.carousel-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--wine); font-size: 17px; line-height: 1; }
.carousel-button:hover { border-color: var(--wine); background: var(--rose); }
.featured-track { display: flex; gap: 17px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.featured-track::-webkit-scrollbar { display: none; }
.featured-track .wine-card { flex: 0 0 clamp(265px, 27vw, 340px); scroll-snap-align: start; }
.gosha-feature { display: flex; align-items: center; gap: 20px; margin-top: 24px; padding: 20px 23px; border: 1px solid #e7d9ce; border-radius: 15px; background: linear-gradient(110deg, #f1e6db, #fbf8f3); }
.gosha-portrait { flex: 0 0 82px; height: 100px; display: grid; place-content: center; gap: 3px; text-align: center; border-radius: 44px 44px 25px 25px; color: #fff9ef; background: linear-gradient(145deg, #6b3645, #ad8165); box-shadow: 0 8px 20px rgba(66,34,39,.16); }
.gosha-portrait span { font: 600 23px "Playfair Display", Georgia, serif; }
.gosha-portrait small { color: #f1dfc9; font-size: 8px; }
.gosha-copy { max-width: 660px; }
.gosha-copy .eyebrow { color: #8c6547; }
.gosha-copy h2 { margin: 4px 0 5px; font: 600 22px "Playfair Display", Georgia, serif; }
.gosha-copy p { margin: 0 0 3px; max-width: 620px; color: #6f6261; font-size: 11px; line-height: 1.55; }
.portal-preview { margin-top: 27px; }
.portal-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.portal-preview-grid article { min-height: 116px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,254,250,.72); }
.portal-preview-grid article > span { color: var(--wine); font-size: 16px; }
.portal-preview-grid h3 { margin: 9px 0 4px; font: 600 14px "Playfair Display", Georgia, serif; }
.portal-preview-grid p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.club-intro { display: flex; align-items: center; gap: 22px; margin: 20px 0 27px; padding: 26px clamp(20px, 4vw, 42px); border-radius: 20px; background: linear-gradient(120deg, #40234e, #85528d); color: #fff; }
.club-intro-mark { flex: 0 0 72px; height: 72px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; color: #eedbf3; font: 600 31px "Playfair Display", Georgia, serif; }
.club-intro h2 { margin: 0 0 7px; font: 600 24px "Playfair Display", Georgia, serif; }
.club-intro p { max-width: 680px; margin: 0; color: #f0e5f3; font-size: 12px; line-height: 1.6; }
.club-grid { margin-top: 17px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin: 21px 0; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: 13px; padding: 16px 17px; }
.stat-label { color: var(--muted); font-size: 10px; display: flex; align-items: center; justify-content: space-between; }
.stat-icon { color: var(--wine); background: var(--rose); width: 27px; height: 27px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; }
.stat-value { font-family: "Playfair Display", Georgia, serif; font-size: 26px; margin-top: 11px; letter-spacing: -.4px; }
.stat-foot { color: var(--muted); font-size: 10px; margin-top: 4px; }
.stat-foot.positive { color: var(--green); }
.content-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(240px,.85fr); gap: 15px; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--white); padding: 17px; min-width: 0; }
.panel-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.panel-header h2 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 18px; font-weight: 600; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 5px 8px; font-size: 9px; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: #416a50; }
.badge-warm { background: #fff2de; color: #8c6530; }
.badge-red { background: #f9e7e7; color: #9b4b52; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 9px 10px; background: #f8f5f0; color: var(--muted); text-transform: uppercase; font-size: 9px; letter-spacing: .55px; font-weight: 600; white-space: nowrap; }
td { border-bottom: 1px solid #f0ebe5; padding: 12px 10px; font-size: 11px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.table-primary { font-weight: 600; }
.table-secondary { color: var(--muted); display: block; font-size: 9px; margin-top: 3px; }
.stock-cell { font-weight: 700; }
.stock-low { color: #a55e3b; }
.store-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f0ebe5; }
.store-row:last-child { border: 0; }
.store-avatar { width: 34px; height: 34px; background: #f1e6df; color: var(--wine); display: grid; place-items: center; border-radius: 10px; font-size: 14px; }
.store-copy { flex: 1; min-width: 0; }
.store-copy strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-copy span { display: block; margin-top: 3px; font-size: 9px; color: var(--muted); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-heading h1 { font-size: 29px; }
.page-heading p { color: var(--muted); font-size: 11px; margin: 6px 0 0; }
.page-actions { display: flex; gap: 8px; align-items: center; }
.toolbar { display: flex; gap: 9px; margin-bottom: 14px; align-items: center; }
.toolbar .search-box { width: 260px; background: var(--white); border: 1px solid var(--line); }
.select-control { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: var(--white); color: #665d5f; font-size: 11px; }
.integration-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 14px 16px; margin-bottom: 10px; }
.integration-explainer { max-width: 760px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.integration-flow { display: grid; gap: 9px; }
.integration-flow article { display: flex; align-items: flex-start; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.integration-flow article > span { flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #f1e6f3; color: #694477; font-weight: 700; font-size: 10px; }
.integration-flow strong, .integration-flow small { display: block; }
.integration-flow strong { font-size: 11px; }
.integration-flow small { margin-top: 4px; max-width: 780px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.integration-disclaimer { margin-top: 13px; padding: 11px 13px; border-radius: 10px; background: #fff8ed; color: #79634c; font-size: 10px; line-height: 1.5; }
.integration-left { display: flex; align-items: center; gap: 12px; }
.integration-logo { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--wine); font-size: 15px; font-weight: 700; }
.integration-left strong { display: block; font-size: 12px; }
.integration-left small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.integration-meta { color: var(--muted); font-size: 10px; text-align: right; }
.empty-state { border: 1px dashed #d9cec7; border-radius: 13px; background: rgba(255,254,250,.6); padding: 35px; color: var(--muted); text-align: center; font-size: 12px; }
.store-welcome { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 23px 25px; border-radius: 17px; background: linear-gradient(112deg, #40234e, #744583); color: #fff; }
.store-welcome .eyebrow { color: #e0c9e5; }
.store-welcome h1 { margin: 6px 0 4px; font: 600 29px "Playfair Display", Georgia, serif; }
.store-welcome p { margin: 0; color: #f0e5f3; font-size: 11px; }
.store-welcome .button-outline { border-color: rgba(255,255,255,.55); color: white; }
.store-welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.store-welcome-actions .button:not(.button-outline) { background: #fff; color: #563764; }
.store-workflow { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px; margin: 15px 0; }
.store-workflow > div { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.workflow-step { flex: 0 0 27px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #f1e6f3; color: #694477; font-weight: 700; font-size: 10px; }
.store-workflow strong, .store-workflow small { display: block; }
.store-workflow strong { font-size: 10px; }
.store-workflow small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.store-workflow .text-link { margin-left: auto; white-space: nowrap; }
.store-workflow.compact { margin: 0; }
.store-inventory-note { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid #ebdfcd; border-radius: 12px; background: #fff9ee; }
.store-inventory-note .store-avatar { flex: 0 0 34px; }
.store-inventory-note > div { flex: 1; min-width: 0; }
.store-inventory-note strong, .store-inventory-note small { display: block; }
.store-inventory-note strong { font-size: 10px; }
.store-inventory-note small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.toolbar-spacer { flex: 1; }
.store-order-list { display: grid; gap: 10px; }
.store-order { padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.store-order-head, .store-order-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.store-order p { margin: 12px 0; color: var(--ink); font-size: 11px; }
.store-order-actions { justify-content: flex-start; flex-wrap: wrap; }
.store-order-actions .text-link { margin-left: auto; }
.order-note { color: var(--muted); font-size: 10px; }
.order-status-strip { display: flex; gap: 8px; margin: 14px 0; }
.order-status-strip span { padding: 7px 10px; border-radius: 20px; background: var(--white); border: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.settings-list { display: grid; gap: 0; margin-bottom: 14px; }
.settings-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #f0ebe5; font-size: 10px; }
.settings-list span { color: var(--muted); }
.settings-list strong { text-align: right; }
.store-settings-help { margin-top: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.order-detail-items p { margin: 8px 0 0; }
.site-footer { display: block; margin-top: 34px; padding: 23px 2px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-main { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 1fr) minmax(130px, .8fr); gap: 28px; padding-bottom: 22px; }
.footer-about, .footer-links, .footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.footer-main strong { color: var(--ink); font-size: 12px; }
.footer-about > strong { color: var(--wine); font: 700 19px Georgia, serif; }
.footer-about span { max-width: 280px; line-height: 1.55; }
.footer-about a { color: var(--wine); font-weight: 600; }
.footer-links button { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; text-align: left; cursor: pointer; }
.footer-links button:hover { color: var(--wine); }
.footer-contact small { color: #a49b93; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: #a49b93; font-size: 10px; }
.toast { position: fixed; z-index: 8; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #2a2024; color: #fff; border-radius: 10px; padding: 11px 15px; font-size: 12px; box-shadow: var(--shadow); transition: .22s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.modal-layer { position: fixed; z-index: 9; inset: 0; background: rgba(31,21,25,.42); display: grid; place-items: center; padding: 16px; }
.modal-layer[hidden] { display: none; }
.modal { width: min(420px, 100%); background: var(--white); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.modal:has(.order-detail-items), .modal:has(ol) { width: min(600px, 100%); max-height: min(84vh, 760px); overflow: auto; }
.modal.integration-wizard { width: min(620px, 100%); max-height: min(88vh, 820px); overflow: auto; }
.modal:has(.auth-method-grid) { width: min(480px, 100%); }
.auth-method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.auth-method { display: grid; gap: 5px; text-align: left; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); }
.auth-method:hover { border-color: #bc96c5; background: #fcf8fd; }
.auth-method > span { color: var(--wine); font-size: 13px; font-weight: 700; }
.auth-method strong { font-size: 10px; }
.auth-method small { color: var(--muted); font-size: 9px; }
.auth-demo-note { margin-top: 13px; padding: 10px 12px; border-radius: 9px; background: #fff8ed; color: #79634c; font-size: 9px; line-height: 1.5; }
.buyer-account-hero { padding: 32px; border-radius: 17px; color: white; background: linear-gradient(115deg, #40234e, #754480); }
.buyer-account-hero .eyebrow { color: #e4d2e9; }
.buyer-account-hero h1 { max-width: 570px; margin: 7px 0; font: 600 28px "Playfair Display", Georgia, serif; }
.buyer-account-hero p { max-width: 560px; margin: 0 0 18px; color: #f0e5f3; font-size: 11px; line-height: 1.55; }
.buyer-account-hero .button { background: white; color: #563764; }
.buyer-account-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 14px; }
.buyer-account-benefits article { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.buyer-account-benefits article > span { color: var(--wine); font-size: 18px; }
.buyer-account-benefits strong { font-size: 11px; }
.buyer-account-benefits small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.buyer-account-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.buyer-account-heading h1 { margin: 5px 0; font: 600 27px "Playfair Display", Georgia, serif; }
.buyer-account-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.buyer-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.buyer-account-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0ebe5; font-size: 10px; }
.buyer-account-row span { color: var(--muted); }
.buyer-account-row small { color: var(--muted); }
.buyer-account-empty { padding: 20px 10px; font-size: 10px; }
.buyer-profile-panel { grid-column: 1 / -1; }
.buyer-order-list { display: grid; gap: 10px; }
.buyer-order-card { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
.buyer-order-card strong, .buyer-order-card small { display: block; }
.buyer-order-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.buyer-order-card p { grid-column: 1 / -1; margin: 3px 0 0; font-size: 10px; }
.static-chips { margin: 0; }
.static-chips span { padding: 7px 10px; border-radius: 18px; background: #f7edf7; color: #684676; font-size: 9px; }
.wizard-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 15px 0 20px; }
.wizard-progress i { height: 4px; border-radius: 5px; background: #e9e2dc; }
.wizard-progress i.active { background: #744583; }
.wizard-content > p { margin-bottom: 14px; }
.wizard-callout { margin: 13px 0; padding: 12px 13px; border: 1px solid #eadfce; border-radius: 10px; background: #fff9ef; color: #75634f; font-size: 10px; line-height: 1.55; }
.wizard-callout strong, .wizard-callout span { display: block; }
.wizard-callout strong { margin-bottom: 4px; color: var(--ink); }
.wizard-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 15px; color: var(--ink); font-size: 10px; line-height: 1.5; }
.wizard-check input { margin: 1px 0 0; accent-color: #744583; }
.wizard-data-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, auto); align-items: center; gap: 9px 15px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; font-size: 10px; }
.wizard-data-list span { color: var(--muted); }
.wizard-data-list b { color: var(--ink); text-align: right; font-size: 10px; }
.wizard-data-list select { border: 1px solid var(--line); border-radius: 8px; padding: 7px; background: white; font-size: 10px; }
.telegram-role-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.telegram-role-form .field { margin: 0; }
.telegram-invites { display: grid; gap: 9px; margin-top: 12px; }
.telegram-invite { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.telegram-invite-copy { flex: 1; min-width: 0; }
.telegram-invite-copy strong, .telegram-invite-copy small { display: block; }
.telegram-invite-copy strong { font-size: 10px; }
.telegram-invite-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.telegram-invite-url { overflow-wrap: anywhere; margin-top: 8px; color: #6c536f; font-size: 9px; }
.telegram-invite-actions { display: flex; gap: 12px; margin-top: 7px; }
.telegram-invite-actions .text-link { font-size: 9px; }
.telegram-qr { flex: 0 0 120px; width: 120px; height: 120px; display: grid; place-items: center; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.telegram-qr img, .telegram-qr canvas { display: block; max-width: 100%; height: auto; }
.modal h2 { font: 600 22px "Playfair Display", Georgia, serif; margin: 0 0 7px; }
.modal p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0 0 17px; }
.field { display: grid; gap: 6px; margin: 12px 0; color: #655b5e; font-size: 10px; }
.field input, .field select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; background: white; outline-color: #b98d98; font-size: 12px; }
.modal-actions { display: flex; justify-content: end; gap: 8px; margin-top: 18px; }
.mobile-menu { display: none; }

body[data-role="buyer"] .app-shell { display: block; padding-bottom: 0; }
body[data-role="buyer"] .sidebar { display: none; }
body[data-role="buyer"] .topbar { position: sticky; top: 0; z-index: 6; height: 88px; padding: 0 clamp(18px, 4vw, 54px); gap: clamp(12px, 2vw, 28px); background: rgba(255,252,247,.96); }
.header-brand { display: inline-flex; align-items: center; flex: 0 0 auto; width: clamp(145px, 17vw, 195px); }
.header-brand img { display: block; width: 100%; max-height: 78px; object-fit: contain; }
.brand-lockup { display: grid; gap: 1px; }
.brand-tagline { color: #7c6b68; font: 500 8px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: .2px; }
.buyer-nav { display: flex; align-items: center; gap: 3px; margin-right: auto; }
.buyer-nav-item { padding: 9px 11px; border: 0; border-radius: 20px; background: transparent; color: #63565a; font-size: 11px; white-space: nowrap; }
.buyer-nav-item:hover, .buyer-nav-item.active { background: #f8e5e5; color: var(--wine); }
body[data-role="buyer"] .topbar-actions { gap: 9px; }
.demo-role-switch { padding: 8px 10px; border: 1px solid var(--line); border-radius: 18px; background: transparent; color: #7a6c6c; font-size: 9px; white-space: nowrap; }
.locale-control { display: inline-flex; align-items: center; }
.language-select { min-width: 54px; border: 1px solid var(--line); border-radius: 18px; padding: 8px 9px; background: rgba(255,255,255,.65); color: var(--wine-dark); font-size: 10px; font-weight: 700; cursor: pointer; }
.locale-control:focus-within .language-select { outline: 2px solid color-mix(in srgb, var(--wine) 35%, transparent); outline-offset: 2px; }
.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; }
body[data-role="buyer"] .view-root { max-width: 1360px; padding-top: 25px; }
body[data-role="buyer"] .demo-banner { width: fit-content; border: 0; border-radius: 18px; padding: 7px 11px; }
body[data-role="buyer"] .hero { min-height: 390px; border-radius: 25px; padding: 43px clamp(26px, 5vw, 64px); background: radial-gradient(ellipse at 91% 10%, rgba(189,135,202,.42), transparent 35%), linear-gradient(120deg, #40234e 0%, #684176 60%, #85528d 100%); color: #fff; box-shadow: 0 18px 38px rgba(51,29,62,.17); }
body[data-role="buyer"] .hero::before { width: 390px; height: 390px; right: -85px; top: -210px; border-color: rgba(255,255,255,.12); }
body[data-role="buyer"] .hero::after { display:none; }
body[data-role="buyer"] .hero-copy { max-width: 760px; width: 100%; }
body[data-role="buyer"] .hero h1 { max-width: 720px; font-size: clamp(42px, 6vw, 70px); line-height: .98; letter-spacing: -2px; }
body[data-role="buyer"] .hero-kicker { color: #e6c9ef; font-weight: 700; }
body[data-role="buyer"] .hero p { max-width: 550px; color: #f0e5f3; font-size: 15px; }
body[data-role="buyer"] .hero .taste-input { max-width: 760px; margin-top: 24px; border: 2px solid rgba(255,255,255,.7); border-radius: 17px; background: #fff; padding: 13px 16px; color: #815190; box-shadow: 0 8px 24px rgba(32,15,42,.13); }
body[data-role="buyer"] .hero .taste-input textarea { color: #35283a; font-size: 14px; }
body[data-role="buyer"] .taste-chips { margin-top: 12px; }
body[data-role="buyer"] .taste-chips button { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; }
body[data-role="buyer"] .taste-chips button:hover { border-color: #fff; background: rgba(255,255,255,.2); color: #fff; }
body[data-role="buyer"] .featured-shelf .section-heading h2 { font-size: 29px; }
body[data-role="buyer"] .featured-track .wine-card { border-radius: 19px; }
body[data-role="buyer"] .featured-track .wine-visual { height: 184px; }
body[data-role="buyer"] .placement-label { background: #f0e4f4; color: #563368; font-size: 9px; }
body[data-role="buyer"] .gosha-feature { margin-top: 27px; padding: 24px 30px; border: 0; border-radius: 22px; background: #482034; color: #fff5eb; }
body[data-role="buyer"] .gosha-portrait { flex-basis: 100px; height: 116px; border: 3px solid #c899d5; background: linear-gradient(145deg, #8c5599, #bd8ac7); color: #fff; }
body[data-role="buyer"] .gosha-portrait small { color: #f2e4f5; }
body[data-role="buyer"] .gosha-copy .eyebrow { color: #d8b3e2; }
body[data-role="buyer"] .gosha-copy h2 { font-size: 28px; }
body[data-role="buyer"] .gosha-copy p { color: #f1dfe0; font-size: 12px; }
body[data-role="buyer"] .gosha-copy .text-link { color: #e4c2eb; }
body[data-role="buyer"] .portal-preview-grid article { border-radius: 16px; background: #fffefa; transition: transform .18s ease, box-shadow .18s ease; }
body[data-role="buyer"] .portal-preview-grid article:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 218px minmax(0,1fr); }
  .wine-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-art { right: 3%; opacity: .6; }
}
@media (max-width: 980px) {
  body[data-role="buyer"] .buyer-nav-item { padding: 8px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; padding-bottom: 70px; }
  .sidebar { min-height: auto; height: 64px; padding: 0 16px; position: fixed; z-index: 5; bottom: 0; left: 0; right: 0; flex-direction: row; justify-content: space-around; border-top: 1px solid rgba(255,255,255,.1); }
  .brand, .role-label, .role-switch, .sidebar-spacer, .sidebar-note { display: none; }
  .nav-list { display: flex; align-items: center; justify-content: space-around; width: 100%; gap: 4px; }
  .nav-item { flex: 1; justify-content: center; padding: 8px 3px; gap: 4px; flex-direction: column; font-size: 9px; border-radius: 9px; }
  .nav-icon { font-size: 16px; }
  .topbar { height: 64px; padding: 0 16px; }
  .search-box { width: min(48vw, 260px); }
  .topbar-actions { gap: 8px; }
  .view-root { padding: 17px 16px 30px; }
  .buyer-account-benefits { grid-template-columns: 1fr; }
  .buyer-account-grid { grid-template-columns: 1fr; }
  .buyer-profile-panel { grid-column: auto; }
  .buyer-account-hero { padding: 24px 20px; }
  .buyer-account-hero h1 { font-size: 23px; }
  .buyer-account-heading { align-items: flex-start; }
  .auth-method-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-about { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
  .hero { min-height: 250px; padding: 27px 22px; }
  .hero-art { width: 150px; height: 220px; right: -5px; bottom: -31px; opacity: .43; }
  .hero-copy { max-width: 82%; }
  .hero p { font-size: 11px; }
  .taste-finder { padding: 17px; }
  .taste-input textarea { font-size: 12px; }
  .featured-shelf .section-heading { align-items: start; flex-direction: column; }
  .featured-track .wine-card { flex-basis: min(82vw, 340px); }
  .gosha-feature { align-items: start; gap: 13px; padding: 16px; }
  .club-intro { align-items: start; gap: 13px; padding: 19px; }
  .club-intro-mark { flex-basis: 50px; height: 50px; font-size: 23px; }
  .club-intro h2 { font-size: 19px; }
  .gosha-portrait { flex-basis: 64px; height: 82px; }
  .gosha-copy h2 { font-size: 19px; }
  .portal-preview-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .stat-card { padding: 13px; }
  .content-grid { grid-template-columns: 1fr; }
  .store-workflow { grid-template-columns: 1fr; }
  .store-workflow > div { flex-wrap: wrap; }
  .store-welcome { align-items: start; flex-direction: column; }
  .store-welcome-actions { justify-content: flex-start; }
  .telegram-role-form { grid-template-columns: 1fr; }
  .telegram-invite { align-items: flex-start; }
  .telegram-qr { flex-basis: 98px; width: 98px; height: 98px; }
  .store-welcome { align-items: start; flex-direction: column; }
  .store-inventory-note { align-items: start; flex-wrap: wrap; }
  .store-inventory-note .badge { margin-left: 44px; }
  .order-status-strip { overflow-x: auto; }
  .order-status-strip span { white-space: nowrap; }
  .settings-list > div { align-items: start; flex-direction: column; gap: 4px; }
  .settings-list strong { text-align: left; }
  .page-heading { align-items: start; flex-direction: column; }
  .page-heading h1 { font-size: 25px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .search-box { width: 100%; }
  .integration-card { align-items: start; }
  body[data-role="buyer"] .topbar { display: grid; grid-template-columns: auto 1fr; height: auto; min-height: 112px; padding: 10px 15px 7px; gap: 7px; }
  body[data-role="buyer"] .header-brand { width: 135px; }
  body[data-role="buyer"] .header-brand img { max-height: 59px; }
  body[data-role="buyer"] .buyer-nav { grid-column: 1 / -1; order: 3; width: 100%; overflow-x: auto; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 5px; }
  body[data-role="buyer"] .buyer-nav-item { padding: 7px 9px; }
  body[data-role="buyer"] .topbar-actions { justify-content: end; }
  body[data-role="buyer"] .hero { min-height: 350px; padding: 34px 21px; }
  body[data-role="buyer"] .hero h1 { font-size: clamp(42px, 11vw, 58px); }
  body[data-role="buyer"] .hero p { max-width: 85%; font-size: 13px; }
  body[data-role="buyer"] .hero .taste-input { margin-top: 20px; }
  body[data-role="buyer"] .gosha-feature { padding: 18px; }
}
@media (max-width: 430px) {
  .topbar .eyebrow { display: none; }
  .topbar-title { font-size: 12px; }
  .top-icon { width: 34px; height: 34px; }
  .avatar { width: 32px; height: 32px; }
  .wine-grid { gap: 9px; }
  .wine-visual { height: 132px; }
  .wine-bottle { transform: scale(.85); }
  .wine-info { padding: 10px; }
  .wine-name { font-size: 14px; }
  .wine-footer { align-items: end; }
  .wine-price { font-size: 11px; }
  .section-heading h2 { font-size: 20px; }
  .hero-copy { max-width: 94%; }
  .hero-art { right: -55px; opacity: .28; }
  body[data-role="buyer"] .demo-role-switch { padding: 7px 8px; }
  body[data-role="buyer"] .topbar-actions { gap: 5px; }
  body[data-role="buyer"] .demo-role-switch { width: 43px; overflow: hidden; font-size: 0; text-align: center; }
  body[data-role="buyer"] .demo-role-switch::before { content: "Демо"; font-size: 9px; }
  body[data-role="buyer"] .header-brand { width: 120px; }
  body[data-role="buyer"] .language-select { min-width: 47px; padding: 7px 6px; }
  body[data-role="buyer"] .buyer-nav-item { padding: 7px; font-size: 10px; }
}
