:root { --qr-sticky-height: 90px; --qr-bottom-height: 90px; }
.qr-sticky-header {
    position: sticky; top: 0; z-index: 1030;
    background: var(--page-bg, #fff); isolation: isolate;
}
.qr-category-navigation { padding-top: 2px; padding-bottom: 5px; }
.qr-category-frame { border: 1px solid var(--border, #ddd); border-radius: 15px; padding: 5px 6px; background: var(--surface, #fff); }
.qr-category-navigation .root-menu-switcher { margin: 0; padding: 0; }
.qr-category-navigation .group-switcher { margin: 5px 0 0 !important; padding: 5px 0 0; border-top: 1px solid var(--border, #ddd); }
.qr-category-navigation .group-switcher:first-child { border: 0; margin-top: 0 !important; padding-top: 0; }
.qr-category-navigation .category-header-wrapper { margin: 0 0 5px; }
.qr-category-navigation .group-chip {
    flex: 0 0 auto; min-height: 40px; max-width: min(185px, 65vw); padding: 7px 11px;
    white-space: normal; overflow-wrap: break-word; word-break: normal; hyphens: none;
    text-align: center; justify-content: center; font-size: .84rem; line-height: 1.25; gap: 5px; cursor: pointer;
}
.root-menu-switcher, .group-switcher, .qr-flow-sidebar, .qr-root-panel { scrollbar-width: none !important; -ms-overflow-style: none; }
.root-menu-switcher::-webkit-scrollbar, .group-switcher::-webkit-scrollbar,
.qr-flow-sidebar::-webkit-scrollbar, .qr-root-panel::-webkit-scrollbar { display: none; width: 0; height: 0; }
.qr-menu-label { flex: 0 1 auto; min-width: 0; }
.qr-menu-chevron { display: block; width: 8px; height: 6px; flex: 0 0 8px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[aria-expanded="true"] > .qr-menu-chevron { transform: rotate(180deg); }
.qr-menu-all-arrow { flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.qr-root-panel[hidden] { display: none; }
.qr-root-panel {
    position: fixed; z-index: 1040; width: min(290px, calc(100vw - 24px)); overflow-y: auto;
    overscroll-behavior: contain; border: 1px solid var(--border, #ddd); border-radius: 14px;
    background: var(--surface, #fff); color: var(--text, #222); box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
    background-color: var(--page-bg, #fff);
}
.qr-root-panel a { display: flex; align-items: center; min-height: 44px; padding: 11px 15px; color: inherit; text-decoration: none; white-space: normal; overflow-wrap: break-word; line-height: 1.3; font-size: .88rem; cursor: pointer; }
.qr-root-panel .qr-root-all { justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border, #ddd); font-weight: 500; color: var(--muted, #6c757d); }
.qr-root-panel a:hover, .qr-root-panel a:focus-visible, .qr-root-panel [aria-current="page"] { color: var(--accent, #0d6efd); background: var(--page-bg, #f7f7f7); }
.qr-root-panel a:focus-visible { outline: 2px solid var(--accent, #0d6efd); outline-offset: -3px; }
@media (hover: hover) and (pointer: fine) {
    .root-menu-switcher, .group-switcher, .qr-flow-sidebar { cursor: grab; user-select: none; }
    .root-menu-switcher a, .root-menu-switcher button, .group-switcher a, .qr-flow-sidebar a { -webkit-user-drag: none; }
    .qr-is-dragging, .qr-is-dragging * { cursor: grabbing !important; }
}
.qr-design-flow .qr-category-navigation { display: none; }
.qr-design-all .qr-menu-flow { display: block; }
.qr-design-all .qr-sticky-header[data-qr-first-strip] { margin-bottom: 56px; }
.qr-design-all .root-menu-switcher, .qr-design-all .group-switcher { display: flex; gap: 8px; overflow-x: auto; min-height: 48px; }
.qr-design-all .qr-category-frame { position: relative; }
.qr-design-all .group-switcher[data-flow-strip] {
    position: absolute; top: calc(100% - 5px); inset-inline: -1px;
    margin: 0 !important; padding: 5px 6px;
    border: 1px solid var(--border, #ddd); border-radius: 0 0 15px 15px;
    background: var(--surface, #fff);
}
.qr-design-all .group-switcher[hidden] { display: none; }
.qr-design-all .qr-category-navigation .group-chip { display: inline-flex; align-items: center; min-height: 48px; border: 1px solid var(--border, #ddd); border-radius: 999px; background: var(--surface, #fff); color: var(--text, #222); text-decoration: none; font-weight: 700; }
.qr-design-all .qr-category-navigation .group-chip.active { background: var(--accent, #0d6efd); border-color: var(--accent, #0d6efd); color: #fff; }
.qr-flow-root-title { padding: 8px 12px; margin-top: 10px; background: var(--surface, #f5f5f5); border-left: 3px solid var(--accent, #0d6efd); color: var(--text, #222); font-size: 1rem; font-weight: 800; }
.qr-menu-flow { display: grid; grid-template-columns: clamp(112px, 27vw, 190px) minmax(0, 1fr); gap: 14px; align-items: start; }
.qr-flow-sidebar {
    position: sticky; top: calc(var(--qr-sticky-height) + 6px);
    max-height: calc(100vh - var(--qr-sticky-height) - var(--qr-bottom-height) - 12px);
    max-height: calc(100dvh - var(--qr-sticky-height) - var(--qr-bottom-height) - 12px);
    overflow-y: auto; overscroll-behavior-y: contain;
    border-right: 1px solid var(--border, #ddd);
}
.qr-flow-link {
    display: flex; align-items: center; min-height: 48px; padding: 12px 10px;
    border-left: 3px solid transparent; text-decoration: none;
    color: var(--muted, #6c757d); font-size: .83rem; font-weight: 700;
    line-height: 1.3; white-space: normal; overflow-wrap: break-word; word-break: normal; hyphens: none;
}
.qr-flow-link.active {
    color: var(--accent, #0d6efd); background: var(--surface, #f8f9fa);
    border-left-color: var(--accent, #0d6efd);
}
.qr-flow-link:focus-visible { outline: 2px solid var(--accent, #0d6efd); outline-offset: -3px; }
.qr-flow-branch { border: 1px solid #dc3545; border-radius: 9px; margin: 4px 2px 8px 0; overflow: hidden; }
.qr-flow-toggle {
    display: flex; align-items: center; justify-content: flex-start; gap: 5px; width: 100%; min-height: 44px;
    border: 0; border-bottom: 1px solid rgba(220, 53, 69, .3); padding: 9px 7px;
    background: var(--surface, #fff); color: var(--text, #222); font: inherit; font-size: .8rem; font-weight: 800;
    text-align: left; line-height: 1.3; white-space: normal; overflow-wrap: break-word; cursor: pointer;
}
.qr-flow-toggle .qr-menu-label { flex: 1; }
.qr-flow-toggle[aria-expanded="false"] { border-bottom-color: transparent; }
.qr-flow-toggle:focus-visible { outline: 2px solid #dc3545; outline-offset: -3px; }
.qr-flow-branch.is-current > .qr-flow-toggle { color: #dc3545; }
.qr-flow-children { padding-left: 4px; }
.qr-flow-children[hidden] { display: none; }
.qr-flow-children .qr-flow-link { font-size: .78rem; padding-left: 7px; padding-right: 5px; }
.qr-flow-root-link { border: 1px solid #dc3545; border-left-width: 3px; border-radius: 8px; margin: 4px 2px 8px 0; }
.qr-flow-content { min-width: 0; }
.qr-flow-section { scroll-margin-top: calc(var(--qr-sticky-height) + 12px); padding-bottom: 28px; }
.qr-flow-title { margin: 10px 0 18px; color: var(--accent, #0d6efd); font-size: clamp(1.1rem, 3.4vw, 1.6rem); font-weight: 800; overflow-wrap: anywhere; }
.qr-flow-banner { width: 100%; height: clamp(130px, 32vw, 240px); object-fit: cover; border-radius: 14px; margin: 0 0 14px; }
.qr-menu-flow .qr-flow-products { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.qr-menu-flow .product-list-card {
    display: flex !important; flex-direction: row !important; min-width: 0;
    align-items: flex-start; padding: 10px !important; gap: 10px;
}
.qr-menu-flow .product-info { min-width: 0; flex: 1; padding: 0; }
.qr-menu-flow .product-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
.qr-menu-flow .product-name { min-width: 0; flex: 1; font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; padding-right: 0; }
.qr-menu-flow .product-price { flex-shrink: 0; font-size: .95rem; white-space: nowrap; }
.qr-menu-flow .product-image-btn { width: 64px; height: 64px; flex: 0 0 64px; margin: 0; padding: 0; }
.qr-menu-flow .product-list-img { width: 100%; height: 100%; object-fit: cover; }
.qr-menu-flow .product-short-desc { overflow-wrap: anywhere; margin-top: 5px; font-size: .8rem; }
.qr-menu-flow .product-meta-list { gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.qr-menu-flow .nutrition-chip, .qr-menu-flow .allergen-chip { font-size: .7rem; white-space: normal; }
@media (max-width: 540px) {
    .qr-menu-flow { gap: 8px; grid-template-columns: clamp(112px, 30vw, 136px) minmax(0, 1fr); }
    .qr-flow-link { padding: 11px 7px; font-size: .75rem; }
    .qr-flow-toggle { font-size: .75rem; }
    .qr-flow-children .qr-flow-link { font-size: .73rem; }
    .qr-menu-flow .product-line { flex-wrap: wrap; gap: 4px 8px; }
    .qr-menu-flow .product-name { flex-basis: 100%; font-size: .87rem; }
    .qr-menu-flow .product-price { font-size: .87rem; margin-left: auto; }
    .qr-menu-flow .product-list-card { gap: 7px; padding: 8px !important; }
    .qr-menu-flow .product-image-btn { width: 44px; height: 44px; flex-basis: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
    .qr-flow-link { transition: color 120ms ease, background-color 120ms ease; }
}
