/* QRBAK menu theme — "Sumi"
   Concept: a hand-bound Japanese menu — washi paper, sumi ink, one vermilion seal; a vertical-text category rail,
   square photographs with small precise captions, hairline rules and a lot of air. Dark mode is ink-black paper.
   Fonts (self-hosted, via Fontsource):
     BIZ UDPMincho — Morisawa (Type Bank), SIL Open Font License 1.1
     M PLUS 1 Variable — Coji Morishita / M+ Fonts Project, SIL Open Font License 1.1 */

@font-face { font-family: 'BIZ UDPMincho'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/biz-udpmincho-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'BIZ UDPMincho'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/biz-udpmincho-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'M PLUS 1'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/static/fonts/m-plus-1-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'M PLUS 1'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/static/fonts/m-plus-1-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Palette: washi & sumi ink (light) ---------- */
html[data-theme="sumi"] {
    --primary: #C4321A !important;            /* vermilion seal */
    --primary-light: rgba(196, 50, 26, 0.08);
    --u-seal: #C4321A;                        /* seal fill (always carries white) */
    --bg-color: #F5F2EA;                      /* washi */
    --card-bg: #F5F2EA;
    --u-raised: #FBF9F4;
    --u-well: #EBE7DC;
    --text-dark: #1B1B19;                     /* sumi */
    --text-gray: #55534D;
    --text-light: #6C6961;
    --border-color: rgba(27, 27, 25, 0.15);
    --u-rule: rgba(27, 27, 25, 0.42);
    --u-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7 .95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .18 0 0 0 0 .14 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    --page-bg: #DDD9CE;
    --pressed-bg: rgba(27, 27, 25, 0.05);
    --overlay: rgba(27, 27, 25, 0.4);
    --btn-bg: #1B1B19;
    --btn-text: #F5F2EA;
    --shadow-sm: none;
    --shadow-md: none;
    --font: 'M PLUS 1', 'Hiragino Sans', 'Yu Gothic UI', 'Noto Sans JP', system-ui, -apple-system, 'Segoe UI', 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
    --u-mincho: 'BIZ UDPMincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', 'Songti SC', 'Noto Serif', 'Times New Roman', serif;
    --u-ease: cubic-bezier(0.23, 1, 0.32, 1);
    color-scheme: light;
}

/* ---------- Palette: ink-black paper, soft white (dark) ---------- */
html[data-theme="sumi"][data-mode="dark"] {
    --primary: #EB5B40 !important;
    --primary-light: rgba(235, 91, 64, 0.12);
    --bg-color: #131312;
    --card-bg: #131312;
    --u-raised: #1B1A18;
    --u-well: #22211F;
    --text-dark: #E9E6DE;
    --text-gray: #B6B2A8;
    --text-light: #908C83;
    --border-color: rgba(233, 230, 222, 0.14);
    --u-rule: rgba(233, 230, 222, 0.38);
    --u-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7 .95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .98 0 0 0 0 .92 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    --page-bg: #090908;
    --pressed-bg: rgba(233, 230, 222, 0.06);
    --overlay: rgba(0, 0, 0, 0.62);
    --btn-bg: #E9E6DE;
    --btn-text: #131312;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    html[data-theme="sumi"][data-mode="auto"] {
        --primary: #EB5B40 !important;
        --primary-light: rgba(235, 91, 64, 0.12);
        --bg-color: #131312;
        --card-bg: #131312;
        --u-raised: #1B1A18;
        --u-well: #22211F;
        --text-dark: #E9E6DE;
        --text-gray: #B6B2A8;
        --text-light: #908C83;
        --border-color: rgba(233, 230, 222, 0.14);
        --u-rule: rgba(233, 230, 222, 0.38);
        --u-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7 .95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .98 0 0 0 0 .92 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
        --page-bg: #090908;
        --pressed-bg: rgba(233, 230, 222, 0.06);
        --overlay: rgba(0, 0, 0, 0.62);
        --btn-bg: #E9E6DE;
        --btn-text: #131312;
        color-scheme: dark;
    }
}

[data-theme="sumi"] ::selection { background: var(--u-seal); color: #FFFFFF; }
[data-theme="sumi"] :focus-visible { outline: 1px solid var(--primary); outline-offset: 3px; }
[data-theme="sumi"] input:focus-visible { outline: none; }

/* ---------- Shell: one sheet of washi ---------- */
[data-theme="sumi"] .app-container { background-color: var(--bg-color); background-image: var(--u-grain); }

/* ---------- Header ---------- */
[data-theme="sumi"] .header { background: transparent; padding: 22px 22px 16px; padding-top: max(22px, env(safe-area-inset-top)); border-bottom: 1px solid var(--border-color); }
[data-theme="sumi"] .top-row { margin-bottom: 18px; gap: 16px; }
[data-theme="sumi"] .user-info .welcome { font-size: 0.625rem; font-weight: 400; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-light); margin-bottom: 6px; }
[data-theme="sumi"] .user-info .store-name { font-family: var(--u-mincho); font-size: 1.4375rem; font-weight: 400; line-height: 1.3; letter-spacing: 0.04em; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
[data-theme="sumi"] .tagline { display: block; margin-top: 5px; font-size: 0.71875rem; font-weight: 400; letter-spacing: 0.04em; color: var(--text-gray); }
[data-theme="sumi"] .store-logo { height: 38px; }

[data-theme="sumi"] .table-badge { min-height: 40px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 0; background: transparent; color: var(--text-dark); font-size: 0.71875rem; font-weight: 400; letter-spacing: 0.1em; gap: 9px; transition: background-color 0.2s var(--u-ease); }
[data-theme="sumi"] .table-badge span { font-family: var(--font); }
[data-theme="sumi"] .table-badge svg { display: none; }
[data-theme="sumi"] .table-badge::before { content: ''; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--text-light); }
[data-theme="sumi"] .app-container:has(.table-chip.active) .table-badge::before { border-color: var(--primary); background: var(--primary); }
[data-theme="sumi"] .table-badge:active { transform: none; background: var(--pressed-bg); }
[data-theme="sumi"] .table-badge.pulse { animation: sumiPulse 1.2s ease 2; }
@keyframes sumiPulse { 0%, 100% { border-color: var(--border-color); } 50% { border-color: var(--primary); } }

[data-theme="sumi"] .search-area { gap: 8px; }
[data-theme="sumi"] .search-box { min-height: 44px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 0; background: transparent; gap: 10px; transition: border-color 0.2s var(--u-ease); }
[data-theme="sumi"] .search-box:focus-within { background: transparent; border-color: var(--text-dark); box-shadow: none; }
[data-theme="sumi"] .search-box svg { width: 15px; height: 15px; flex-shrink: 0; stroke: var(--text-light); }
[data-theme="sumi"] .search-box svg path { stroke-width: 1.4; }
[data-theme="sumi"] .search-box input { font-size: 0.8125rem; font-weight: 400; letter-spacing: 0.04em; }
[data-theme="sumi"] .filter-btn { width: 44px; min-height: 44px; border: 1px solid var(--border-color); border-radius: 0; background: transparent; transition: background-color 0.2s var(--u-ease); }
[data-theme="sumi"] .filter-btn svg { width: 17px; height: 17px; stroke: var(--text-dark); stroke-width: 1.3; }
[data-theme="sumi"] .filter-btn:active { transform: none; background: var(--pressed-bg); }
[data-theme="sumi"] .filter-btn.has-filter::after { top: 7px; right: auto; inset-inline-end: 7px; width: 6px; height: 6px; border: 0; background: var(--primary); }

/* ---------- Category rail: vertical text, vermilion dot ---------- */
html[data-theme="sumi"] .sidebar { width: 50px; padding: 14px 0 28px; background: transparent; border: 0; border-inline-end: 1px solid var(--border-color); }
[data-theme="sumi"] .category { gap: 9px; padding: 12px 0 14px; min-height: 44px; }
[data-theme="sumi"] .category:focus-visible { outline: 1px solid var(--primary); outline-offset: -4px; }
[data-theme="sumi"] .cat-icon { display: none; }
html[data-theme="sumi"] .category::before { content: ''; position: static; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: transparent; transform: none; transition: background-color 0.2s var(--u-ease); }
html[data-theme="sumi"] .category.active::before { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
[data-theme="sumi"] .cat-name { writing-mode: vertical-rl; text-orientation: mixed; white-space: nowrap; max-inline-size: 15em; overflow: hidden; text-overflow: ellipsis; padding: 0; font-size: 0.71875rem; font-weight: 400; line-height: 1.6; letter-spacing: 0.24em; color: var(--text-light); overflow-wrap: normal; transition: color 0.2s var(--u-ease); } /* long names are cut after ~15em so one category cannot push the rest off the rail */
[data-theme="sumi"] .category.active .cat-name { color: var(--text-dark); font-weight: 500; }

/* ---------- The column ---------- */
[data-theme="sumi"] .menu-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 22px 6px; background: transparent; }
[data-theme="sumi"] .cat-heading { display: block; margin: 44px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--u-rule); font-family: var(--u-mincho); font-size: 1.75rem; font-weight: 400; line-height: 1.3; letter-spacing: 0.05em; color: var(--text-dark); }
[data-theme="sumi"] .cat-heading:first-child { margin-top: 30px; }
[data-theme="sumi"] .cat-heading::before { content: ''; display: block; width: 9px; height: 9px; margin-bottom: 14px; background: var(--u-seal); }

[data-theme="sumi"] .product-card { padding: 24px 0 26px; background: transparent; border-radius: 0; border-bottom: 1px solid var(--border-color); box-shadow: none; transition: opacity 0.15s var(--u-ease); }
[data-theme="sumi"] .product-card:active { opacity: 0.62; }
[data-theme="sumi"] .img-container { margin-bottom: 16px; border-radius: 0; background: var(--u-well); }
[data-theme="sumi"] .img-placeholder { background: var(--u-well); color: var(--text-light); }
[data-theme="sumi"] .img-placeholder svg { width: 26px; height: 26px; stroke-width: 1.1; }
/* The badge hangs like a paper tag, set vertically. Physical insets on purpose: the tag's own writing mode is vertical,
   so logical inline/block insets would no longer mean "left/right of the photo". */
[data-theme="sumi"] .badge { inset: 0 14px auto auto; max-width: none; max-height: 78%; padding: 12px 6px 11px; border-radius: 0; background: var(--u-seal); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; writing-mode: vertical-rl; text-orientation: mixed; font-size: 0.65625rem; font-weight: 500; line-height: 1.15; letter-spacing: 0.16em; color: #FFFFFF !important; }
[data-theme="sumi"] .product-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: baseline; }
[data-theme="sumi"] .product-title { grid-column: 1; grid-row: 1; display: block; overflow: visible; margin: 0; font-family: var(--u-mincho); font-size: 1.1875rem; font-weight: 400; line-height: 1.4; letter-spacing: 0.02em; }
[data-theme="sumi"] .price-row { grid-column: 2; grid-row: 1; margin: 0; }
[data-theme="sumi"] .price { font-size: 0.875rem; font-weight: 500; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-dark); }
[data-theme="sumi"] .product-desc { grid-column: 1 / -1; grid-row: 2; margin: 7px 0 0; font-size: 0.78125rem; font-weight: 400; line-height: 1.7; letter-spacing: 0.01em; color: var(--text-gray); -webkit-line-clamp: 3; }
[data-theme="sumi"] .product-meta { grid-column: 1 / -1; grid-row: 3; margin: 13px 0 0; gap: 6px; }
[data-theme="sumi"] .kcal-chip { margin-inline-end: 6px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 0.65625rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-light); }
[data-theme="sumi"] .allergen-badge { width: 22px; height: 22px; padding: 0; border: 1px solid var(--border-color) !important; background: none !important; color: var(--text-gray) !important; }
[data-theme="sumi"] .allergen-badge svg { width: 12px; height: 12px; }

[data-theme="sumi"] .no-results { padding: 72px 8px; font-family: var(--u-mincho); font-size: 1.0625rem; font-weight: 400; line-height: 1.7; letter-spacing: 0.04em; color: var(--text-gray); }
[data-theme="sumi"] .menu-footnote { padding: 28px 0 18px; text-align: start; font-size: 0.65625rem; line-height: 1.95; letter-spacing: 0.04em; color: var(--text-light); }
[data-theme="sumi"] .footnote-tools { justify-content: flex-start; gap: 22px; margin-top: 10px; }
[data-theme="sumi"] .link-btn { min-height: 40px; padding: 0; gap: 8px; font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.1em; color: var(--text-dark); }
[data-theme="sumi"] .link-btn svg { color: var(--primary); }
[data-theme="sumi"] .link-btn:active { color: var(--primary); }

/* ---------- QRBAK banner ---------- */
[data-theme="sumi"] .qb-banner { padding: 8px 22px; gap: 12px; background: transparent; border-top: 1px solid var(--border-color); font-size: 0.71875rem; letter-spacing: 0.01em; }
[data-theme="sumi"] .qb-banner-mark { width: 28px; height: 28px; border-radius: 0; background: var(--u-seal); color: #FFFFFF; }
[data-theme="sumi"] .qb-banner-img { border-radius: 0; }
[data-theme="sumi"] .qb-banner-text { color: var(--text-gray); font-weight: 400; }
[data-theme="sumi"] .qb-banner-text strong { font-family: var(--font); color: var(--text-dark); font-weight: 500; }
[data-theme="sumi"] .qb-banner-text span { font-family: var(--font); }
[data-theme="sumi"] .qb-banner-cta { padding: 7px 11px; border: 1px solid var(--u-rule); border-radius: 0; background: transparent; color: var(--text-dark); font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.08em; }

/* ---------- Bottom navigation ---------- */
[data-theme="sumi"] .bottom-nav { height: calc(62px + env(safe-area-inset-bottom)); background: transparent; border-top: 1px solid var(--border-color); box-shadow: none; align-items: stretch; }
[data-theme="sumi"] .nav-item { justify-content: center; gap: 6px; color: var(--text-light); transition: color 0.2s var(--u-ease); }
[data-theme="sumi"] .nav-item svg { width: 19px; height: 19px; stroke-width: 1.2; transition: none; }
[data-theme="sumi"] .nav-item span { font-family: var(--font); font-size: 0.625rem; font-weight: 400; letter-spacing: 0.12em; padding: 0; transition: none; }
[data-theme="sumi"] .nav-item.active { color: var(--text-dark); }
[data-theme="sumi"] .nav-item.active svg { fill: none; }
[data-theme="sumi"] .nav-item.active span { font-weight: 500; }
[data-theme="sumi"] .nav-item.active::before { content: ''; position: absolute; top: 0; left: 50%; width: 5px; height: 5px; margin: -3px 0 0 -2.5px; border-radius: 50%; background: var(--primary); }
[data-theme="sumi"] button.nav-item:active { transform: none; color: var(--primary); }
[data-theme="sumi"] .nav-item:focus-visible { outline-offset: -6px; }
@media (max-width: 359px) { /* four buttons on a 320 px phone */
    [data-theme="sumi"] .bottom-nav { padding-inline: 4px; }
    [data-theme="sumi"] .nav-item span { letter-spacing: 0.06em; }
}

/* ---------- Sheets ---------- */
[data-theme="sumi"] .modal-overlay { -webkit-backdrop-filter: none; backdrop-filter: none; }
[data-theme="sumi"] .modal-content { background-color: var(--u-raised); background-image: var(--u-grain); border-radius: 0; border-top: 1px solid var(--text-dark); box-shadow: none; animation: slideUp 0.3s var(--u-ease); }
[data-theme="sumi"] .modal-content.sheet { padding: 32px 22px calc(26px + env(safe-area-inset-bottom)); }
[data-theme="sumi"] .close-modal { top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border: 1px solid var(--border-color); border-radius: 0; background: var(--u-raised); color: var(--text-dark); box-shadow: none; }
[data-theme="sumi"] .close-modal svg { width: 17px; height: 17px; stroke-width: 1.2; }
[data-theme="sumi"] .close-modal:active { color: var(--primary); }
[data-theme="sumi"] .modal-img-container { border-radius: 0; aspect-ratio: 5 / 4; background: var(--u-well); }
[data-theme="sumi"] .modal-body { padding: 26px 22px 24px; }
[data-theme="sumi"] .no-img + .modal-body { padding-top: 36px; padding-inline-end: 22px; }
[data-theme="sumi"] .no-img + .modal-body .modal-title { padding-inline-end: 46px; }
[data-theme="sumi"] .modal-title { font-family: var(--u-mincho); font-size: 1.625rem; font-weight: 400; line-height: 1.35; letter-spacing: 0.03em; margin-bottom: 12px; }
[data-theme="sumi"] .sheet-title { font-size: 1.5rem; margin-bottom: 26px; padding-inline-end: 50px; }
[data-theme="sumi"] .modal-desc { font-size: 0.84375rem; font-weight: 400; line-height: 1.85; letter-spacing: 0.01em; color: var(--text-gray); margin-bottom: 20px; }
[data-theme="sumi"] .modal-allergens { gap: 6px; margin-bottom: 6px; }
[data-theme="sumi"] .modal-allergens .kcal-chip { margin: 0; padding: 6px 10px; border: 1px solid var(--border-color); }
[data-theme="sumi"] .modal-allergens .allergen-badge { width: auto; height: auto; padding: 5px 10px; border-radius: 0; }
[data-theme="sumi"] .modal-allergens .allergen-badge svg { color: var(--primary); }
[data-theme="sumi"] .modal-allergens .allergen-text { font-family: var(--font); margin-inline-start: 7px; font-size: 0.65625rem; font-weight: 400; letter-spacing: 0.08em; }
[data-theme="sumi"] .modal-footer { justify-content: flex-end; align-items: baseline; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border-color); }
[data-theme="sumi"] .modal-price { font-size: 1.25rem; font-weight: 500; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; color: var(--text-dark); }

[data-theme="sumi"] .sheet-section { margin-bottom: 26px; }
[data-theme="sumi"] .sheet-label { font-size: 0.65625rem; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-light); margin-bottom: 12px; }
[data-theme="sumi"] .sheet-hint { font-size: 0.78125rem; line-height: 1.75; letter-spacing: 0.01em; color: var(--text-gray); margin: -16px 0 24px; }
[data-theme="sumi"] .chip-row { gap: 6px; }
[data-theme="sumi"] .filter-chip { min-height: 40px; padding: 0 13px; border: 1px solid var(--border-color) !important; border-radius: 0; background: transparent; color: var(--text-gray) !important; font-size: 0.78125rem; font-weight: 400; letter-spacing: 0.03em; transition: background-color 0.2s var(--u-ease), color 0.2s var(--u-ease), border-color 0.2s var(--u-ease); }
[data-theme="sumi"] .filter-chip svg { width: 15px; height: 15px; margin-inline-end: 8px; }
[data-theme="sumi"] .filter-chip.active { background: var(--btn-bg) !important; border-color: var(--btn-bg) !important; color: var(--btn-text) !important; }
[data-theme="sumi"] .table-grid { gap: 6px; }
[data-theme="sumi"] .table-chip { min-height: 54px; padding: 8px; border-radius: 0; font-family: var(--u-mincho); font-size: 1rem; font-weight: 400; letter-spacing: 0.04em; color: var(--text-dark) !important; }
[data-theme="sumi"] .table-chip:active { transform: none; background: var(--pressed-bg); }
[data-theme="sumi"] .table-search { margin-bottom: 20px; }
[data-theme="sumi"] .seg { padding: 0; border: 1px solid var(--border-color); border-radius: 0; background: transparent; }
[data-theme="sumi"] .seg-btn { min-height: 40px; padding: 0 13px; border-radius: 0; font-size: 0.75rem; font-weight: 400; letter-spacing: 0.04em; color: var(--text-gray); gap: 7px; }
[data-theme="sumi"] .seg-btn.active { background: var(--btn-bg); color: var(--btn-text); box-shadow: none; }
[data-theme="sumi"] .lang-pick { min-height: 42px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 0; background: transparent; color: var(--text-light); gap: 8px; }
[data-theme="sumi"] .lang-pick select { font-size: 0.78125rem; font-weight: 400; letter-spacing: 0.03em; min-height: 40px; }
[data-theme="sumi"] .modal-add-btn { min-height: 52px; border-radius: 0; background: var(--btn-bg); color: var(--btn-text); font-size: 0.71875rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; transition: opacity 0.15s var(--u-ease); }
[data-theme="sumi"] .modal-add-btn:active { transform: none; opacity: 0.8; background: var(--btn-bg); color: var(--btn-text); }

/* ---------- Toast, dialog, preview ribbon ---------- */
[data-theme="sumi"] .toast-notification { bottom: calc(78px + env(safe-area-inset-bottom)); padding: 13px 20px; border-radius: 0; background: var(--btn-bg); color: var(--btn-text); box-shadow: none; font-size: 0.75rem; font-weight: 400; letter-spacing: 0.08em; transition: opacity 0.3s var(--u-ease), transform 0.3s var(--u-ease); }

[data-theme="sumi"] .qb-dialog-card { padding: 36px 24px 24px; border: 1px solid var(--u-rule); border-radius: 0; background-color: var(--u-raised); background-image: var(--u-grain); box-shadow: none; animation: dialogIn 0.25s var(--u-ease); }
[data-theme="sumi"] .qb-dialog-icon { width: 46px; height: 46px; margin-bottom: 20px; border: 1px solid currentColor; font-family: var(--u-mincho); font-size: 1.375rem; font-weight: 400; }
[data-theme="sumi"] .qb-dialog-icon.question,
[data-theme="sumi"] .qb-dialog-icon.info,
[data-theme="sumi"] .qb-dialog-icon.warning,
[data-theme="sumi"] .qb-dialog-icon.error { color: var(--primary); }
[data-theme="sumi"] .qb-dialog-icon.success { border-color: var(--u-seal); background: var(--u-seal); color: #FFFFFF; font-size: 0; }
[data-theme="sumi"] .qb-dialog-icon.success::before { content: ''; width: 16px; height: 8px; margin-top: -4px; border-inline-start: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
[dir="rtl"][data-theme="sumi"] .qb-dialog-icon.success::before { transform: rotate(45deg); }
[data-theme="sumi"] .qb-dialog-title { font-family: var(--u-mincho); font-size: 1.3125rem; font-weight: 400; line-height: 1.4; letter-spacing: 0.04em; margin-bottom: 10px; }
[data-theme="sumi"] .qb-dialog-text { font-size: 0.8125rem; font-weight: 400; line-height: 1.8; letter-spacing: 0.01em; color: var(--text-gray); }
[data-theme="sumi"] .qb-dialog-actions { gap: 6px; margin-top: 28px; flex-wrap: nowrap; }
[data-theme="sumi"] .qb-dialog-btn { flex: 1 1 0; min-width: 0; min-height: 46px; padding: 0 10px; border: 1px solid var(--btn-bg); border-radius: 0; background: var(--btn-bg); color: var(--btn-text); font-size: 0.71875rem; font-weight: 500; letter-spacing: 0.14em; }
[data-theme="sumi"] .qb-dialog-btn.confirm { background: var(--btn-bg); }
[data-theme="sumi"] .qb-dialog-btn.cancel { border-color: var(--border-color); background: transparent; color: var(--text-dark); }
[data-theme="sumi"] .qb-dialog-btn:active { transform: none; opacity: 0.75; }

[data-theme="sumi"] .preview-ribbon { background: var(--text-dark); color: var(--bg-color); font-size: 0.625rem; font-weight: 400; letter-spacing: 0.2em; padding: 6px 12px; }
