        :root {
            --bg: #111518;
            --bg-soft: #191e22;
            --panel: #1e2428;
            --line: #38424a;
            --text: #f0f3f5;
            --muted: #b4bdc4;
            --accent: #3ec3ff;
            --ok: #28c76f;
            --warn: #ff8a2a;
            --danger: #ff5b5b;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
            overscroll-behavior-x: none;
        }

        body {
            font-family: 'Noto Sans JP', sans-serif;
            color: var(--text);
            background:
                radial-gradient(1200px 500px at -10% -20%, #1a2e38 0%, transparent 55%),
                radial-gradient(900px 400px at 110% -10%, #1a2a1a 0%, transparent 50%),
                var(--bg);
            min-height: 100vh;
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
            overscroll-behavior-x: none;
            touch-action: pan-y pinch-zoom;
        }

        /* ── ログイン画面 ── */
        #loginScreen {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 24px;
            text-align: center;
        }

        #loginScreen h1 {
            font-size: 28px;
            font-weight: 800;
            color: var(--accent);
            margin-bottom: 8px;
        }

        #loginScreen p {
            color: var(--muted);
            margin-bottom: 32px;
        }

        #accountRestrictedScreen {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 24px;
            text-align: center;
            gap: 16px;
        }

        #accountRestrictedScreen[hidden] {
            display: none !important;
        }

        #accountRestrictedScreen h1 {
            font-size: 24px;
            font-weight: 800;
            color: var(--danger, #e74c3c);
            margin: 0;
        }

        #accountRestrictedScreen .account-restricted-message {
            color: var(--text);
            max-width: 420px;
            line-height: 1.6;
            margin: 0;
        }

        #accountRestrictedScreen .account-restricted-state {
            color: var(--muted);
            font-size: 13px;
            margin: 0;
        }

        #accountAppealLink {
            display: inline-block;
            margin-top: 8px;
        }

        /* ── ヘッダー ── */
        header {
            position: sticky;
            top: 0;
            z-index: 10;
            background: rgba(17, 21, 24, 0.94);
            backdrop-filter: blur(8px);
            border-bottom: 1px solid var(--line);
            padding: 10px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            flex-wrap: wrap;
        }

        header h1 {
            font-size: 16px;
            font-weight: 800;
            color: var(--accent);
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .user-name {
            font-size: 12px;
            color: var(--muted);
            max-width: 140px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .profile-wrap {
            position: relative;
            flex-shrink: 0;
        }

        .profile-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 4px 8px 4px 4px;
            border: 1px solid transparent;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.04);
            color: var(--text);
            cursor: pointer;
            font: inherit;
            max-width: 160px;
            transition: border-color 0.15s ease, background 0.15s ease;
        }

        .profile-btn:hover,
        .profile-btn[aria-expanded="true"] {
            border-color: var(--line);
            background: rgba(255, 255, 255, 0.08);
        }

        .profile-btn__icon {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: rgba(62, 195, 255, 0.14);
            border: 1px solid rgba(62, 195, 255, 0.28);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            color: #9edcff;
        }

        .profile-btn__icon svg {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }

        .profile-btn__name {
            font-size: 13px;
            font-weight: 700;
            color: #e8eef4;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .profile-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            min-width: 180px;
            padding: 6px;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: #1a2128;
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
            z-index: 30;
        }

        .profile-menu[hidden] {
            display: none !important;
        }

        .profile-menu__item {
            width: 100%;
            padding: 10px 12px;
            border: 0;
            border-radius: 8px;
            background: transparent;
            color: var(--text);
            text-align: left;
            font: inherit;
            font-size: 13px;
            cursor: pointer;
        }

        .profile-menu__item:hover {
            background: rgba(255, 255, 255, 0.06);
        }

        .profile-menu__item--danger {
            color: #ffb4a8;
        }

        .staff-top-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            width: 100%;
            min-height: 48px;
            padding: 8px 16px;
            background: rgba(17, 21, 24, 0.96);
            backdrop-filter: blur(8px);
            border-bottom: 1px solid var(--line);
            flex-shrink: 0;
            box-sizing: border-box;
            position: relative;
            z-index: 100;
        }

        .staff-top-bar[hidden] {
            display: none !important;
        }

        .staff-top-bar__title {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            font-weight: 800;
            color: var(--accent);
            letter-spacing: 0.02em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
            flex-shrink: 0;
        }

        .staff-top-bar__version {
            font-size: 11px;
            font-weight: 600;
            color: var(--muted);
            letter-spacing: 0;
            flex-shrink: 0;
        }

        .staff-top-bar__badges {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            min-width: 0;
            flex-wrap: wrap;
        }

        .staff-top-bar__badges[hidden] {
            display: none !important;
        }

        .staff-top-bar__actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
            margin-left: auto;
        }

        body.staff-shell-active .app {
            min-height: 0;
            flex: 1;
        }

        .notifications-wrap {
            position: relative;
            flex-shrink: 0;
        }

        .staff-notifications-bar {
            position: relative;
            flex-shrink: 0;
        }

        .staff-notifications-bar[hidden] {
            display: none !important;
        }

        .panel-head--session-list {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(140px, 36%) minmax(0, 1fr);
            align-items: center;
            gap: 8px;
            min-height: 36px;
        }

        .panel-head--session-list .panel-title {
            grid-column: 1;
            justify-self: start;
            min-width: 0;
        }

        .panel-head--session-list .panel-action {
            grid-column: 3;
            justify-self: end;
        }

        .session-list-live-bar {
            grid-column: 2;
            width: 100%;
            min-width: 120px;
            max-width: 320px;
            justify-self: center;
            display: flex;
            align-items: center;
            height: 8px;
            flex-shrink: 0;
        }

        .session-list-live-bar__track {
            display: block;
            width: 100%;
            height: 3px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            overflow: hidden;
            position: relative;
        }

        .session-list-live-bar__slider {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            width: 42%;
            border-radius: inherit;
            background: linear-gradient(90deg, transparent, rgba(62, 195, 255, 0.35), transparent);
            animation: session-list-live-slide 1.55s ease-in-out infinite;
            opacity: 0.55;
        }

        .session-list-live-bar.is-syncing .session-list-live-bar__slider {
            background: linear-gradient(90deg, transparent, var(--primary-bright), transparent);
            animation-duration: 0.95s;
            opacity: 1;
        }

        @keyframes session-list-live-slide {
            from {
                transform: translateX(-120%);
            }

            to {
                transform: translateX(320%);
            }
        }

        .staff-status-rail {
            display: none !important;
        }

        .notifications-btn {
            position: relative;
            width: 38px;
            height: 38px;
            border-radius: 999px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.04);
            color: #f0c040;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: border-color 0.15s ease, background 0.15s ease;
        }

        .notifications-btn:hover,
        .notifications-btn[aria-expanded="true"] {
            border-color: rgba(240, 192, 64, 0.45);
            background: rgba(240, 192, 64, 0.08);
        }

        .notifications-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            min-width: 18px;
            height: 18px;
            padding: 0 4px;
            border-radius: 999px;
            background: #e74c3c;
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            line-height: 18px;
            text-align: center;
            box-shadow: 0 0 0 2px #12151a;
        }

        .notifications-badge[hidden] {
            display: none !important;
        }

        .notifications-panel {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: min(360px, calc(100vw - 24px));
            max-height: min(420px, calc(100vh - 120px));
            overflow: auto;
            padding: 10px;
            border-radius: 14px;
            border: 1px solid var(--line);
            background: #171b22;
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
            z-index: 120;
        }

        .notifications-panel[hidden] {
            display: none !important;
        }

        .notifications-panel__title {
            margin: 0 0 8px;
            padding: 4px 6px 8px;
            font-size: 13px;
            font-weight: 700;
            color: var(--muted);
            border-bottom: 1px solid var(--line);
        }

        .notifications-empty {
            margin: 0;
            padding: 18px 8px;
            text-align: center;
            color: var(--muted);
            font-size: 13px;
        }

        .staff-notification-card {
            padding: 12px;
            margin-bottom: 8px;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.03);
        }

        .staff-notification-card--readonly {
            cursor: pointer;
        }

        .staff-notification-card--readonly:hover {
            border-color: rgba(255, 255, 255, 0.18);
            background: rgba(255, 255, 255, 0.05);
        }

        .staff-notification-card__message {
            margin: 0 0 10px;
            font-size: 14px;
            line-height: 1.55;
            color: var(--text);
            word-break: break-word;
        }

        .staff-notification-card--readonly .staff-notification-card__message {
            margin-bottom: 0;
        }

        .staff-notification-card__actions {
            display: flex;
            gap: 8px;
        }

        .staff-notification-btn {
            flex: 1;
            min-height: 38px;
            border-radius: 10px;
            border: 1px solid transparent;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
        }

        .staff-notification-btn--allow {
            background: rgba(46, 204, 113, 0.18);
            border-color: rgba(46, 204, 113, 0.55);
            color: #8ef0b0;
        }

        .staff-notification-btn--allow:hover {
            background: rgba(46, 204, 113, 0.28);
        }

        .staff-notification-btn--deny {
            background: rgba(231, 76, 60, 0.16);
            border-color: rgba(231, 76, 60, 0.55);
            color: #ffb4a8;
        }

        .staff-notification-btn--deny:hover {
            background: rgba(231, 76, 60, 0.26);
        }

        body.staff-shell-active {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        body.staff-shell-active #shopSelectScreen,
        body.staff-shell-active #profileEditScreen {
            flex: 1;
            min-height: 0;
        }

        body.staff-shell-active:has(#app.visible) #shopSelectScreen,
        body.staff-shell-active:has(#app.visible) #profileEditScreen {
            display: none !important;
        }

        /* ── レイアウト ── */
        .app {
            display: none;
            flex-direction: column;
            min-height: 100vh;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: hidden;
        }

        .app.visible {
            display: flex;
        }

        .app > .tabs {
            flex-shrink: 0;
        }

        .page {
            margin: 0 auto;
            padding: 16px;
            width: 100%;
            max-width: min(900px, 100%);
            min-width: 0;
            flex: 1;
            min-height: 0;
            overflow-x: hidden;
        }

        .page.page--wide {
            max-width: none;
            padding: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .panel {
            background: linear-gradient(160deg, #1e262c 0%, #191f24 100%);
            border: 1px solid var(--line);
            border-radius: 14px;
            padding: 14px;
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: hidden;
        }

        .panel+.panel {
            margin-top: 16px;
        }

        .billing-step-panel {
            position: relative;
        }

        .billing-step-head {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
        }

        .billing-step-code {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 36px;
            height: 28px;
            padding: 0 8px;
            border-radius: 8px;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.06em;
            color: var(--accent);
            background: rgba(111, 216, 154, 0.12);
            border: 1px solid rgba(111, 216, 154, 0.35);
        }

        .billing-plan-current {
            display: grid;
            gap: 8px;
            margin-bottom: 12px;
            padding: 12px;
            border-radius: 10px;
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid var(--line);
            font-size: 13px;
            line-height: 1.5;
        }

        .billing-plan-current strong {
            font-size: 16px;
            color: var(--text);
        }

        .billing-usage-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 8px;
            margin-top: 4px;
        }

        .billing-usage-item {
            padding: 8px 10px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--line);
            font-size: 12px;
        }

        .billing-usage-item span {
            display: block;
            color: var(--muted);
            font-size: 10px;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            margin-bottom: 4px;
        }

        .billing-plan-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 12px;
            margin-top: 12px;
        }

        .billing-plan-card {
            padding: 14px;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: rgba(0, 0, 0, 0.15);
            display: flex;
            flex-direction: column;
            gap: 10px;
            min-height: 100%;
        }

        .billing-plan-card.is-current {
            border-color: rgba(111, 216, 154, 0.55);
            background: rgba(111, 216, 154, 0.06);
            box-shadow: 0 0 0 1px rgba(111, 216, 154, 0.15);
        }

        .billing-plan-card-head {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .billing-plan-card h4 {
            margin: 0;
            font-size: 15px;
            line-height: 1.3;
        }

        .billing-plan-price {
            margin: 0;
            font-size: 18px;
            font-weight: 700;
            color: var(--text);
            letter-spacing: 0.02em;
        }

        .billing-plan-badge {
            align-self: flex-start;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            padding: 3px 8px;
            border-radius: 999px;
            color: var(--accent);
            background: rgba(111, 216, 154, 0.12);
            border: 1px solid rgba(111, 216, 154, 0.35);
        }

        .billing-plan-features {
            list-style: none;
            margin: 0;
            padding: 0;
            display: grid;
            gap: 6px;
            flex: 1;
        }

        .billing-plan-features li {
            position: relative;
            padding-left: 14px;
            font-size: 12px;
            line-height: 1.45;
            color: var(--muted);
        }

        .billing-plan-features li::before {
            content: '−';
            position: absolute;
            left: 0;
            color: var(--accent);
            font-weight: 700;
        }

        .billing-plan-card .btn-primary,
        .billing-plan-card .btn-secondary {
            width: 100%;
            margin-top: auto;
        }

        .billing-plan-card p {
            margin: 0;
            font-size: 12px;
            color: var(--muted);
            line-height: 1.45;
            flex: 1;
        }

        .billing-addon-form {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: flex-end;
            margin-top: 8px;
        }

        .billing-addon-form label {
            flex: 1 1 160px;
        }

        .billing-addon-hint {
            margin: 8px 0 0;
            font-size: 12px;
            color: var(--muted);
            text-align: left;
        }

        .billing-price-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
            font-size: 12px;
        }

        .billing-price-table th,
        .billing-price-table td {
            border: 1px solid var(--line);
            padding: 6px 8px;
            text-align: left;
        }

        .billing-price-table th {
            color: var(--muted);
            font-weight: 600;
            font-size: 10px;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .billing-quote-box {
            margin-top: 10px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid rgba(111, 216, 154, 0.35);
            background: rgba(111, 216, 154, 0.08);
            font-size: 13px;
            line-height: 1.5;
        }

        .billing-quote-box strong {
            font-size: 15px;
            color: var(--accent);
        }

        .billing-quote-lines {
            margin: 6px 0 0;
            padding-left: 18px;
            color: var(--muted);
            font-size: 11px;
        }

        .billing-quote-source {
            margin-top: 6px;
            font-size: 10px;
            color: var(--muted);
        }

        .panel-title {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--muted);
            margin-bottom: 0;
        }

        .panel-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
        }

        .panel-action {
            width: auto;
            flex-shrink: 0;
        }

        .panel-head-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .order-sort-group {
            display: flex;
            gap: 4px;
        }

        .order-sort-btn.active {
            border-color: var(--accent);
            color: var(--accent);
            background: rgba(111, 216, 154, 0.12);
        }

        /* ── 店舗選択バー ── */
        .shop-bar {
            display: flex;
            gap: 8px;
            align-items: center;
            padding: 10px 16px;
            border-bottom: 1px solid var(--line);
            background: var(--bg-soft);
        }

        .shop-bar label {
            font-size: 12px;
            color: var(--muted);
            flex-shrink: 0;
        }

        .shop-bar input {
            width: 100px;
        }

        /* ── タブ ── */
        .tabs {
            display: flex;
            flex-wrap: wrap;
            border-bottom: 1px solid var(--line);
            background: var(--bg-soft);
            padding: 0 16px;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: hidden;
        }

        .tab {
            padding: 12px 16px;
            font-size: 14px;
            font-weight: 700;
            color: var(--muted);
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: color 0.15s ease, border-color 0.15s ease;
            background: none;
            border-top: 0;
            border-left: 0;
            border-right: 0;
            font-family: inherit;
        }

        .tab.active {
            color: var(--accent);
            border-bottom-color: var(--accent);
        }

        .tab-panel {
            display: none;
        }

        .tab-panel.active {
            display: block;
        }

        .tab-panel.shop-control-panel {
            padding: 0;
            flex: 1;
            min-height: 0;
            overflow: hidden;
        }

        .tab-panel.shop-control-panel.active {
            display: flex;
            flex-direction: column;
        }

        /* ── 商品管理（Google Drive 風） ── */
        .drive-product-manage {
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 0;
            overflow: hidden;
            background: #202124;
            color: #e8eaed;
            --drive-list-cols: minmax(0, 1fr) 76px 52px 20px;
            --drive-list-gap: 6px;
            --drive-list-pad-x: 12px;
        }

        .drive-catalog-unpublished {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin: 12px 16px 0;
            padding: 10px 14px;
            border-radius: 10px;
            background: rgba(255, 183, 77, 0.16);
            border: 1px solid rgba(255, 183, 77, 0.45);
            color: #ffcc80;
            font-size: 0.92rem;
        }

        .tab-unpublished-badge {
            display: inline-block;
            width: 8px;
            height: 8px;
            margin-left: 6px;
            border-radius: 50%;
            background: #ff9800;
            vertical-align: middle;
        }

        .drive-toolbar {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 10px;
            padding: 12px 16px;
            border-bottom: 1px solid #3c4043;
            background: #202124;
            position: sticky;
            top: 0;
            z-index: 2;
            flex-shrink: 0;
        }

        .drive-toolbar-row {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .drive-toolbar-filters {
            display: grid;
            grid-template-columns: repeat(3, minmax(152px, 1fr));
            gap: 10px;
            flex: 1 1 auto;
            min-width: min(100%, 480px);
        }

        .drive-toolbar-filters select {
            width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }

        .drive-stock-reset-btn {
            flex-shrink: 0;
            align-self: stretch;
            min-width: 108px;
            white-space: nowrap;
        }

        .drive-stock-reset-btn:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .drive-list-row.is-bulk-selected,
        .drive-grid-card.is-bulk-selected {
            box-shadow: inset 3px 0 0 #34a853;
            background: #2a332c;
        }

        .drive-bulk-reset-overlay {
            position: fixed;
            inset: 0;
            z-index: 1200;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(0, 0, 0, 0.58);
        }

        .drive-bulk-reset-overlay[hidden] {
            display: none !important;
        }

        .drive-bulk-reset-card {
            width: min(100%, 360px);
            background: #292a2d;
            border: 1px solid #3c4043;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
        }

        .drive-bulk-reset-card h3 {
            margin: 0 0 12px;
            font-size: 1rem;
            line-height: 1.45;
            color: #e8eaed;
        }

        .drive-bulk-reset-body {
            margin: 0 0 16px;
            white-space: pre-line;
            color: #bdc1c6;
            font-size: 0.9375rem;
            line-height: 1.5;
        }

        .drive-bulk-reset-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        .drive-bulk-reset-actions .btn-primary,
        .drive-bulk-reset-actions .btn-secondary {
            min-width: 88px;
        }

        .drive-toolbar-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-shrink: 0;
            margin-left: auto;
        }

        .drive-search-wrap {
            width: 100%;
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 8px;
            background: #303134;
            border: 1px solid #5f6368;
            border-radius: 8px;
            padding: 0 12px;
            height: 40px;
        }

        .drive-search-wrap input {
            flex: 1;
            min-width: 0;
            border: 0;
            background: transparent;
            color: #e8eaed;
            font: inherit;
            outline: none;
        }

        .drive-toolbar select {
            height: 40px;
            border-radius: 8px;
            border: 1px solid #5f6368;
            background: #303134;
            color: #e8eaed;
            padding: 0 10px;
            font: inherit;
        }

        .drive-view-toggle {
            display: inline-flex;
            border: 1px solid #5f6368;
            border-radius: 8px;
            overflow: hidden;
        }

        .drive-view-toggle button {
            width: 40px;
            height: 38px;
            border: 0;
            background: #303134;
            color: #9aa0a6;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            line-height: 0;
        }

        .drive-view-toggle button svg {
            width: 18px;
            height: 18px;
            display: block;
            flex-shrink: 0;
        }

        .drive-list[hidden],
        .drive-grid[hidden],
        .drive-list-header[hidden] {
            display: none !important;
        }

        .drive-view-toggle button.is-active {
            background: #8ab4f8;
            color: #202124;
        }

        .drive-count {
            font-size: 12px;
            color: #9aa0a6;
            white-space: nowrap;
        }

        .drive-list-header {
            display: grid;
            grid-template-columns: var(--drive-list-cols);
            gap: var(--drive-list-gap);
            padding: 8px var(--drive-list-pad-x);
            border-bottom: 1px solid #3c4043;
            background: #202124;
            position: static;
            top: auto;
            flex-shrink: 0;
            z-index: 1;
            box-sizing: border-box;
            width: 100%;
            max-width: 100%;
        }

        .drive-list-head-cell {
            border: 0;
            background: transparent;
            color: #9aa0a6;
            font-size: 12px;
            font-weight: 500;
            text-align: left;
            cursor: pointer;
            padding: 4px 0;
        }

        .drive-list-head-cell.is-sorted {
            color: #8ab4f8;
        }

        .drive-sort-mark {
            margin-left: 4px;
        }

        .drive-body {
            display: flex;
            flex: 1;
            flex-direction: column;
            min-height: 0;
            overflow: hidden;
        }

        .drive-body-list {
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 0;
            min-width: 0;
            overflow: hidden;
        }

        .drive-body-detail {
            display: none;
        }

        .drive-detail-empty {
            display: none;
            flex: 1;
            align-items: center;
            justify-content: center;
            padding: 32px 24px;
            text-align: center;
            color: #9aa0a6;
            font-size: 14px;
            background: #292a2d;
        }

        .drive-scroll {
            flex: 1;
            overflow-x: hidden;
            overflow-y: auto;
            min-height: 240px;
            min-width: 0;
        }

        .drive-list {
            display: flex;
            flex-direction: column;
        }

        .drive-list-row {
            display: grid;
            grid-template-columns: var(--drive-list-cols);
            gap: var(--drive-list-gap);
            align-items: center;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            border: 0;
            border-bottom: 1px solid #3c4043;
            background: transparent;
            color: inherit;
            text-align: left;
            padding: 10px var(--drive-list-pad-x);
            cursor: pointer;
            font: inherit;
        }

        .drive-list-row:hover {
            background: #28292c;
        }

        .drive-list-row.is-selected {
            background: #323336;
            box-shadow: inset 3px 0 0 #8ab4f8;
        }

        .drive-list-row.is-sold-out {
            opacity: 0.72;
        }

        .drive-col-name {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }

        .drive-item-title {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .drive-thumb {
            width: 32px;
            height: 32px;
            border-radius: 4px;
            object-fit: cover;
            flex-shrink: 0;
            background: #3c4043;
        }

        .drive-thumb--grid {
            width: 100%;
            height: 100%;
            border-radius: 0;
        }

        .drive-thumb--placeholder {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            color: #e8eaed;
        }

        .drive-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 11px;
            color: #fff;
        }

        .drive-badge--muted {
            background: #5f6368;
        }

        .drive-tag {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            flex-shrink: 0;
        }

        .drive-tag--danger {
            background: rgba(255, 91, 91, 0.2);
            color: #ff8a8a;
        }

        .drive-col-price,
        .drive-col-stock {
            font-size: 13px;
            color: #bdc1c6;
            font-variant-numeric: tabular-nums;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .drive-col-actions {
            color: #9aa0a6;
            text-align: center;
        }

        .drive-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
            gap: 12px;
            padding: 16px;
        }

        .drive-grid-card {
            border: 0;
            padding: 0;
            background: #303134;
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            color: inherit;
            text-align: left;
            font: inherit;
        }

        .drive-grid-card:hover {
            background: #3c4043;
        }

        .drive-grid-card.is-sold-out {
            opacity: 0.75;
        }

        .drive-grid-card--no-image .drive-grid-title {
            padding-top: 12px;
        }

        .drive-grid-card--no-image .drive-grid-meta {
            padding-top: 4px;
        }

        .drive-grid-preview,
        .drive-grid-thumb {
            display: block;
            aspect-ratio: 1 / 1;
            background: #202124;
            overflow: hidden;
        }

        .drive-grid-thumb .drive-thumb,
        .drive-grid-thumb .drive-thumb--grid,
        .drive-grid-thumb .drive-thumb--placeholder {
            width: 100%;
            height: 100%;
        }

        .drive-grid-meta {
            display: block;
            padding: 10px 10px 12px;
        }

        .drive-grid-title {
            display: block;
            font-size: 13px;
            font-weight: 500;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .drive-grid-sub {
            display: block;
            margin-top: 4px;
            font-size: 11px;
            color: #9aa0a6;
        }

        .drive-state {
            padding: 48px 16px;
            text-align: center;
            color: #9aa0a6;
        }

        .drive-list .drive-state--empty,
        .drive-grid .drive-state--empty {
            padding: 24px 16px;
        }

        .drive-grid .drive-state--empty {
            grid-column: 1 / -1;
        }

        .drive-detail-modal {
            position: fixed;
            inset: 0;
            z-index: 220;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 16px;
            overflow-x: hidden;
            overflow-y: auto;
            overscroll-behavior: contain;
            background: rgba(0, 0, 0, 0.58);
        }

        .drive-detail-modal:not([hidden]) {
            display: flex;
        }

        .tab-panel:not(.active) .drive-detail-modal {
            display: none !important;
        }

        .drive-detail-backdrop {
            position: absolute;
            inset: 0;
            background: transparent;
            border: 0;
            padding: 0;
            cursor: default;
        }

        .drive-product-detail-card {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: min(100%, 520px);
            min-width: 0;
            max-height: 88vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            background: #151b20;
            border: 1px solid #3a4550;
            border-radius: 14px;
            box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
        }

        .drive-product-detail-card > .drive-detail-subview:not([hidden]) {
            flex: 1 1 0;
            min-height: 0;
            overflow: hidden;
        }

        .drive-detail-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 16px;
            border-bottom: 1px solid #3c4043;
            flex-shrink: 0;
        }

        .drive-detail-header h2 {
            font-size: 16px;
            font-weight: 700;
        }

        .drive-detail-body {
            flex: 1;
            min-height: 0;
            overflow: auto;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .drive-detail-media,
        .drive-detail-form {
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-width: 0;
        }

        .drive-detail-section-label {
            margin: 0;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-sub);
            letter-spacing: 0.02em;
        }

        .drive-detail-form--global {
            margin-top: 4px;
            padding-top: 16px;
            border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
        }

        .drive-detail-hero {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            min-width: 0;
        }

        .drive-detail-image {
            aspect-ratio: 1 / 1;
            width: min(100%, 200px);
            max-width: 200px;
            background: #202124;
            border-radius: 8px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .drive-detail-image--empty {
            border: 2px dashed #5f6368;
            background: transparent;
        }

        .drive-detail-image-placeholder {
            width: 100%;
            height: 100%;
            min-height: 0;
            box-sizing: border-box;
        }

        .drive-list-add-row {
            border-bottom: 1px dashed #3c4043;
        }

        .drive-list-add-row:hover {
            background: #28292c;
        }

        .drive-col-add {
            color: #8ab4f8;
        }

        .drive-add-icon {
            width: 32px;
            height: 32px;
            border: 2px dashed #5f6368;
            border-radius: 4px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            font-weight: 400;
            line-height: 1;
            color: #8ab4f8;
            flex-shrink: 0;
        }

        .drive-add-label {
            font-size: 13px;
            color: #bdc1c6;
        }

        .drive-col-menu-limit {
            grid-column: 2 / 4;
            font-size: 12px;
            color: #9aa0a6;
            text-align: right;
            white-space: nowrap;
            align-self: center;
            font-variant-numeric: tabular-nums;
            padding-right: 2px;
        }

        .drive-col-menu-limit.is-at-limit {
            color: #ff8a8a;
        }

        .drive-grid-add-card {
            border: 2px dashed #5f6368;
            background: transparent;
            min-height: 148px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .drive-grid-add-card:hover {
            background: #28292c;
        }

        .drive-grid-add-card .drive-add-icon {
            width: 48px;
            height: 48px;
            font-size: 28px;
        }

        .drive-detail-image--clickable {
            cursor: pointer;
        }

        .drive-detail-image--clickable:hover {
            outline: 2px solid rgba(62, 195, 255, 0.45);
        }

        .drive-detail-image img,
        .drive-detail-image__img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .drive-detail-no-image {
            color: #9aa0a6;
            font-size: 13px;
        }

        .drive-detail-meta {
            font-size: 12px;
            color: #9aa0a6;
        }

        .drive-detail-field label:not(.drive-check-item) {
            display: block;
            font-size: 12px;
            color: #9aa0a6;
            margin-bottom: 4px;
        }

        .drive-detail-field-head {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 4px;
        }

        .drive-detail-field-head label {
            margin-bottom: 0;
        }

        .drive-field-count {
            font-size: 11px;
            color: #9aa0a6;
            white-space: nowrap;
        }

        .drive-field-count.is-invalid {
            color: #f28b82;
            font-weight: 600;
        }

        .drive-detail-field input:not([type="checkbox"]),
        .drive-detail-field textarea {
            width: 100%;
            border: 1px solid #5f6368;
            border-radius: 8px;
            background: #202124;
            color: #e8eaed;
            padding: 10px 12px;
            font: inherit;
        }

        .drive-detail-field input.is-invalid,
        .drive-detail-field textarea.is-invalid {
            border-color: #ea4335;
            background: rgba(234, 67, 53, 0.1);
            box-shadow: 0 0 0 1px rgba(234, 67, 53, 0.35);
        }

        .drive-detail-field textarea {
            min-height: 72px;
            resize: vertical;
        }

        .drive-detail-field-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            min-width: 0;
        }

        .drive-detail-field-row .drive-detail-field {
            min-width: 0;
        }

        .drive-detail-memo-row {
            margin-top: 4px;
        }

        @media (max-width: 640px) {
            .drive-detail-field-row {
                grid-template-columns: 1fr;
            }
        }

        .drive-detail-footer {
            padding: 16px;
            border-top: 1px solid #3c4043;
            display: flex;
            gap: 8px;
            flex-shrink: 0;
        }

        .drive-detail-footer--stack {
            flex-direction: column;
        }

        .drive-detail-footer--row {
            flex-direction: row;
        }

        .drive-detail-footer--row .btn-primary,
        .drive-detail-footer--row .btn-danger {
            flex: 1;
        }

        .drive-detail-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 4px;
        }

        .drive-detail-stock {
            display: flex;
            flex: 1;
            flex-direction: column;
            gap: 10px;
            min-width: 0;
            margin-top: 0;
            padding: 10px 12px;
            border: 1px solid #3c4043;
            border-radius: 8px;
            background: #202124;
        }

        .drive-detail-stock[hidden] {
            display: none !important;
        }

        .drive-stock-section {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .drive-stock-label {
            font-size: 0.8125rem;
            color: #9aa0a6;
        }

        .drive-stock-stepper {
            display: grid;
            grid-template-columns: 40px 1fr 40px;
            align-items: center;
            gap: 8px;
        }

        .drive-stock-stepper button {
            min-height: 36px;
            border-radius: 6px;
            border: 1px solid #5f6368;
            background: #303134;
            color: #e8eaed;
            font-size: 1.125rem;
            line-height: 1;
            cursor: pointer;
        }

        .drive-stock-stepper button:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .drive-stock-value {
            width: 100%;
            min-width: 0;
            min-height: 36px;
            box-sizing: border-box;
            text-align: center;
            font-size: 1.125rem;
            font-variant-numeric: tabular-nums;
            color: #e8eaed;
            border: 1px solid #5f6368;
            border-radius: 6px;
            background: #202124;
            padding: 6px 4px;
            -moz-appearance: textfield;
            appearance: textfield;
        }

        .drive-stock-value::-webkit-outer-spin-button,
        .drive-stock-value::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .drive-stock-value:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .drive-stock-value:focus {
            outline: none;
            border-color: #8ab4f8;
        }

        #driveDetailStockApplyBtn {
            width: 100%;
        }

        #driveDetailStockApplyBtn.is-cooldown,
        #driveDetailStockApplyBtn:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .drive-stock-cooldown {
            margin: 0;
            font-size: 0.75rem;
            color: #9aa0a6;
            text-align: center;
        }

        .drive-stock-cooldown[hidden] {
            display: none !important;
        }

        .drive-product-detail-card {
            position: relative;
        }

        .drive-detail-discard-overlay {
            position: absolute;
            inset: 0;
            z-index: 6;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(0, 0, 0, 0.58);
            border-radius: inherit;
        }

        .drive-detail-discard-overlay[hidden] {
            display: none !important;
        }

        .drive-detail-discard-card {
            width: min(100%, 320px);
            background: #292a2d;
            border: 1px solid #5f6368;
            border-radius: 14px;
            padding: 20px;
            text-align: center;
        }

        .drive-detail-discard-card p {
            margin: 0 0 16px;
            font-size: 15px;
            font-weight: 600;
            color: #e8eaed;
        }

        .drive-detail-discard-actions {
            display: flex;
            gap: 10px;
        }

        .drive-detail-discard-actions button {
            flex: 1;
            border-radius: 8px;
            padding: 10px 12px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
        }

        .drive-detail-discard-discard {
            border: 1px solid #5f6368;
            background: #202124;
            color: #e8eaed;
        }

        .drive-detail-discard-save {
            border: none;
            background: #34a853;
            color: #fff;
        }

        .drive-detail-subview {
            display: flex;
            flex-direction: column;
            flex: 1 1 0;
            min-height: 0;
            overflow: hidden;
            position: relative;
        }

        .drive-detail-subview[hidden] {
            display: none !important;
        }

        .drive-detail-subheader {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 16px;
            border-bottom: 1px solid #3c4043;
            flex-shrink: 0;
        }

        .drive-detail-subheader h3 {
            font-size: 15px;
            font-weight: 600;
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .drive-check-scroll {
            flex: 1 1 0;
            min-height: 0;
            overflow-x: hidden;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            padding: 12px 16px;
            display: block;
        }

        .drive-check-scroll > .drive-check-item + .drive-check-item {
            margin-top: 6px;
        }

        .drive-check-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 8px;
            background: #202124;
            border: 1px solid #3c4043;
            cursor: pointer;
            font-size: 14px;
        }

        .drive-check-item:hover {
            background: #28292c;
        }

        .drive-check-item:not(.drive-check-item--takeout) input {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            accent-color: #8ab4f8;
            cursor: pointer;
        }

        .drive-check-item:not(.drive-check-item--takeout) span {
            flex: 1;
            min-width: 0;
        }

        .drive-detail-field--takeout {
            margin-top: 2px;
        }

        .drive-check-item--takeout {
            position: relative;
            display: grid;
            grid-template-columns: 20px 1fr;
            column-gap: 12px;
            align-items: center;
            margin: 0;
            min-height: 20px;
            padding: 12px 14px;
            border-radius: 10px;
            background: linear-gradient(180deg, #25282c 0%, #202124 100%);
            border: 1px solid #3c4043;
            cursor: pointer;
            font-size: 14px;
            color: #e8eaed;
            transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
        }

        .drive-check-item--takeout:hover {
            border-color: #5f6368;
            background: #28292c;
        }

        .drive-check-item--takeout:has(input:checked) {
            border-color: rgba(138, 180, 248, 0.55);
            background: rgba(138, 180, 248, 0.08);
            box-shadow: inset 0 0 0 1px rgba(138, 180, 248, 0.18);
        }

        .drive-check-item--takeout input[type="checkbox"] {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            opacity: 0;
            appearance: none;
            -webkit-appearance: none;
            border: 0;
            background: transparent;
            cursor: pointer;
            z-index: 1;
        }

        .drive-check-item--takeout .drive-check-box {
            grid-column: 1;
            grid-row: 1;
            width: 20px;
            height: 20px;
            border-radius: 6px;
            border: 2px solid #5f6368;
            background: #1a1d21;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
            transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
        }

        .drive-check-item--takeout:hover .drive-check-box {
            border-color: #8ab4f8;
        }

        .drive-check-item--takeout input:checked + .drive-check-box {
            border-color: #8ab4f8;
            background: #8ab4f8;
            transform: scale(1.03);
        }

        .drive-check-item--takeout input:checked + .drive-check-box::after {
            content: '';
            display: block;
            width: 5px;
            height: 9px;
            border: solid #1a1d21;
            border-width: 0 2.5px 2.5px 0;
            transform: rotate(45deg) translateY(-1px);
        }

        .drive-check-item--takeout input:focus-visible + .drive-check-box {
            outline: 2px solid #8ab4f8;
            outline-offset: 2px;
        }

        .drive-check-item--takeout .drive-check-item__label {
            grid-column: 2;
            grid-row: 1;
            align-self: center;
            margin: 0;
            padding: 0;
            font-size: 14px;
            font-weight: 500;
            line-height: 20px;
            color: #e8eaed;
            pointer-events: none;
        }

        .drive-check-meta {
            font-size: 11px;
            color: #9aa0a6;
            flex-shrink: 0;
        }

        .drive-topping-groups {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .drive-topping-group-card {
            border: 1px solid #3c4043;
            border-radius: 12px;
            background: #202124;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .drive-topping-group-card.is-linked {
            border-color: #5f7ec7;
            box-shadow: inset 0 0 0 1px rgba(138, 180, 248, 0.25);
        }

        .drive-topping-group-head {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            align-items: center;
            gap: 12px;
            padding: 16px 16px;
            border-bottom: 1px solid #3c4043;
            cursor: pointer;
        }

        .drive-topping-group-head input {
            width: 18px;
            height: 18px;
            margin-top: 0;
            flex-shrink: 0;
            accent-color: #8ab4f8;
            cursor: pointer;
        }

        .drive-topping-group-title {
            flex: 1;
            min-width: 0;
        }

        .drive-topping-group-title strong {
            display: block;
            font-size: 14px;
            font-weight: 600;
        }

        .drive-topping-group-title span {
            display: block;
            margin-top: 4px;
            font-size: 11px;
            color: #9aa0a6;
        }

        .drive-topping-group-menus {
            padding: 0 14px 10px 42px;
            font-size: 11px;
            color: #bdc1c6;
            line-height: 1.45;
        }

        .drive-topping-items {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 10px 12px 12px;
        }

        .drive-topping-item-card {
            border: 1px solid #3c4043;
            border-radius: 10px;
            padding: 10px 12px;
            min-height: 72px;
            background: #292a2d;
            display: flex;
            flex-direction: column;
            justify-content: center;
            min-width: 0;
        }

        .drive-topping-item-card-head {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: center;
        }

        .drive-topping-item-name {
            font-size: 14px;
            font-weight: 600;
            line-height: 1.3;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-width: 0;
        }

        .drive-topping-item-price {
            font-size: 1.125rem;
            font-weight: 700;
            line-height: 1.1;
            color: #8ab4f8;
            font-variant-numeric: tabular-nums;
            flex-shrink: 0;
            letter-spacing: 0.01em;
        }

        .drive-topping-item-desc {
            margin-top: 6px;
            font-size: 12px;
            color: #bdc1c6;
            line-height: 1.45;
        }

        .drive-topping-item-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 8px;
        }

        .drive-topping-chip {
            font-size: 10px;
            padding: 3px 8px;
            border-radius: 999px;
            background: #3c4043;
            color: #e8eaed;
        }

        .drive-topping-chip--link {
            background: rgba(138, 180, 248, 0.18);
            color: #8ab4f8;
        }

        .drive-topping-chip--stock {
            background: rgba(129, 201, 149, 0.16);
            color: #81c995;
        }

        .drive-topping-list-toolbar {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            padding-bottom: 12px;
        }

        .drive-topping-list-toolbar .btn-secondary.is-active {
            border-color: #8ab4f8;
            background: rgba(138, 180, 248, 0.12);
            color: #8ab4f8;
        }

        .drive-category-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .drive-category-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 8px;
            background: #202124;
            border: 1px solid #3c4043;
        }

        .drive-category-color-btn {
            flex: 0 0 20px;
            width: 20px;
            height: 20px;
            padding: 0;
            border-radius: 5px;
            border: 1px solid rgba(255, 255, 255, 0.28);
            cursor: pointer;
            background: #5f6368;
        }

        .drive-category-color-btn:hover,
        .drive-category-color-btn:focus-visible {
            outline: 2px solid #8ab4f8;
            outline-offset: 2px;
        }

        .drive-category-color-picker {
            position: fixed;
            z-index: 12000;
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 8px;
            padding: 12px;
            border-radius: 999px;
            background: #2b2f33;
            border: 1px solid #5f6368;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
        }

        .drive-category-color-picker__swatch {
            width: 28px;
            height: 28px;
            padding: 0;
            border: 2px solid transparent;
            border-radius: 50%;
            cursor: pointer;
        }

        .drive-category-color-picker__swatch:hover,
        .drive-category-color-picker__swatch:focus-visible {
            border-color: rgba(255, 255, 255, 0.85);
            outline: none;
        }

        .drive-category-color-picker__swatch.is-selected {
            border-color: #e8eaed;
            box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
        }

        .drive-category-name-input {
            flex: 1 1 auto;
            min-width: 0;
            padding: 4px 6px;
            border: 1px solid transparent;
            border-radius: 6px;
            background: transparent;
            color: #e8eaed;
            font-size: 14px;
        }

        .drive-category-name-input:hover,
        .drive-category-name-input:focus {
            border-color: #5f6368;
            background: #28292c;
            outline: none;
        }

        .drive-category-delete-btn {
            flex: 0 0 auto;
            width: 32px;
            height: 32px;
            padding: 0;
            border: 1px solid #5f6368;
            border-radius: 6px;
            background: transparent;
            color: #f28b82;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
        }

        .drive-category-delete-btn:hover {
            background: rgba(242, 139, 130, 0.12);
            border-color: #f28b82;
        }

        .drive-category-role-wrap {
            position: relative;
        }

        .drive-category-role-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
            min-height: 32px;
        }

        .drive-category-role-tag {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            max-width: 100%;
            padding: 5px 8px 5px 6px;
            border-radius: 4px;
            border: 1px solid;
            font-size: 13px;
            font-weight: 500;
            line-height: 1.2;
            cursor: pointer;
            user-select: none;
            transition: filter 0.15s ease, box-shadow 0.15s ease;
        }

        .drive-category-role-tag:hover {
            filter: brightness(1.08);
        }

        .drive-category-role-tag.is-primary {
            box-shadow: 0 0 0 1px currentColor;
        }

        .drive-category-role-tag__dot {
            flex: 0 0 10px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        .drive-category-role-tag__name {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .drive-category-role-tag__remove {
            flex: 0 0 auto;
            margin-left: 2px;
            padding: 0 2px;
            border: none;
            background: transparent;
            color: inherit;
            font-size: 15px;
            line-height: 1;
            opacity: 0.75;
            cursor: pointer;
        }

        .drive-category-role-tag__remove:hover {
            opacity: 1;
        }

        .drive-category-role-tag--add,
        .drive-category-role-tag--more {
            justify-content: center;
            min-width: 28px;
            padding: 5px 10px;
            border: 1px dashed #5f6368;
            background: rgba(255, 255, 255, 0.04);
            color: #9aa0a6;
            font-size: 14px;
            font-weight: 600;
        }

        .drive-category-role-tag--add:hover,
        .drive-category-role-tag--more:hover {
            border-color: #8ab4f8;
            color: #8ab4f8;
            background: rgba(138, 180, 248, 0.08);
        }

        .drive-category-role-picker {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            z-index: 30;
            min-width: 200px;
            max-width: min(320px, 100%);
            max-height: 220px;
            overflow-y: auto;
            padding: 6px;
            border-radius: 8px;
            border: 1px solid #3c4043;
            background: #2b2d31;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
        }

        .drive-category-role-picker__item {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            padding: 8px 10px;
            border: none;
            border-radius: 4px;
            background: transparent;
            color: #e8eaed;
            font-size: 14px;
            text-align: left;
            cursor: pointer;
        }

        .drive-category-role-picker__item:hover {
            background: rgba(138, 180, 248, 0.12);
        }

        .drive-category-role-picker__empty {
            margin: 0;
            padding: 8px 10px;
            color: #9aa0a6;
            font-size: 13px;
        }

        .drive-detail-field--categories .drive-detail-meta {
            margin-bottom: 8px;
        }

        .drive-topping-edit-mode .drive-topping-group-title.is-editable {
            cursor: pointer;
        }

        .drive-topping-edit-mode .drive-topping-group-title.is-editable strong {
            text-decoration: underline;
            text-decoration-color: rgba(138, 180, 248, 0.45);
            text-underline-offset: 3px;
        }

        .drive-topping-item-card.is-editable {
            cursor: pointer;
        }

        .drive-topping-item-card.is-editable:hover,
        .drive-topping-item-card.is-editable:focus-visible {
            border-color: #8ab4f8;
            background: #323336;
            outline: none;
        }

        .drive-topping-group-add-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            padding: 0;
            border: 1px solid #5f6368;
            border-radius: 8px;
            background: #292a2d;
            color: #8ab4f8;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
            flex-shrink: 0;
            align-self: center;
        }

        .drive-topping-group-add-btn:hover {
            background: #323336;
            border-color: #8ab4f8;
        }

        .drive-topping-group-head-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .drive-topping-group-delete-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 52px;
            height: 36px;
            padding: 0 10px;
            border: 1px solid #7f3333;
            border-radius: 8px;
            background: #4a2020;
            color: #ffdada;
            font-size: 12px;
            font-weight: 600;
            line-height: 1;
            cursor: pointer;
            flex-shrink: 0;
            align-self: center;
        }

        .drive-topping-group-delete-btn:hover {
            background: #5c2828;
            border-color: #a94444;
        }

        .drive-topping-editor-scroll {
            flex: 1 1 0;
            min-height: 0;
            overflow-y: auto;
            padding: 12px 16px;
        }

        .drive-topping-link-section {
            margin-top: 8px;
        }

        .drive-topping-link-section label {
            display: block;
            font-size: 12px;
            color: #9aa0a6;
            margin-bottom: 8px;
        }

        .drive-topping-link-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
            gap: 10px;
        }

        .drive-topping-link-card {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 6px;
            padding: 8px;
            border: 1px solid #3c4043;
            border-radius: 10px;
            background: #202124;
            color: inherit;
            cursor: pointer;
            text-align: left;
            font: inherit;
            min-width: 0;
        }

        .drive-topping-link-card:hover {
            background: #28292c;
        }

        .drive-topping-link-card.is-selected {
            border-color: #8ab4f8;
            box-shadow: inset 0 0 0 1px rgba(138, 180, 248, 0.35);
        }

        .drive-topping-link-card__thumb {
            aspect-ratio: 1 / 1;
            border-radius: 6px;
            overflow: hidden;
            background: #3c4043;
        }

        .drive-topping-link-card__thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .drive-topping-link-card__name {
            font-size: 12px;
            font-weight: 600;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .drive-topping-link-card__price {
            font-size: 11px;
            color: #8ab4f8;
        }

        @media (min-width: 960px) {
            .drive-toolbar {
                flex-direction: row;
                flex-wrap: nowrap;
                align-items: center;
                gap: 12px;
                padding: 12px 20px;
            }

            .drive-search-wrap {
                flex: 1 1 280px;
                width: auto;
            }

            .drive-toolbar-row {
                flex: 1 1 520px;
                min-width: 480px;
            }

            .drive-toolbar-filters {
                max-width: none;
                flex: 1 1 540px;
                min-width: 480px;
                grid-template-columns: repeat(3, minmax(168px, 1fr));
            }

            .drive-body {
                flex-direction: row;
                flex: 1 1 0;
                height: 0;
                overflow: hidden;
            }

            .drive-body-list {
                flex: 0 0 min(36%, 400px);
                max-width: 440px;
                border-right: 1px solid #3c4043;
                min-height: 0;
                height: 100%;
                overflow: hidden;
            }

            .drive-body-detail {
                display: flex;
                flex: 1 1 0;
                flex-direction: column;
                min-width: 0;
                min-height: 0;
                height: 100%;
                overflow: hidden;
                background: #292a2d;
            }

            .drive-scroll {
                flex: 1 1 0;
                min-height: 0;
            }

            .drive-product-manage:not(.drive-has-selection) .drive-detail-empty {
                display: flex;
            }

            .drive-product-manage.drive-has-selection .drive-detail-empty {
                display: none;
            }

            .drive-product-manage:not(.drive-has-selection) .drive-detail-modal {
                display: none !important;
            }

            .drive-detail-modal {
                position: static;
                inset: auto;
                flex: 1 1 0;
                min-height: 0;
                width: 100%;
                padding: 0;
                background: transparent;
                z-index: auto;
                overflow: hidden;
            }

            .drive-detail-modal:not([hidden]) {
                display: flex !important;
                flex-direction: column;
                align-items: stretch;
                justify-content: flex-start;
            }

            .drive-detail-backdrop {
                display: none;
            }

            .drive-product-detail-card {
                flex: 1 1 0;
                width: 100%;
                max-width: none;
                max-height: none;
                min-height: 0;
                height: auto;
                border: 0;
                border-radius: 0;
                box-shadow: none;
                background: #292a2d;
            }

            .drive-detail-header {
                padding: 12px 20px;
            }

            .drive-detail-header h2,
            .drive-detail-header .detail-title {
                font-size: 17px;
            }

            .drive-detail-body {
                display: grid;
                grid-template-columns: minmax(200px, 2fr) minmax(280px, 3fr);
                gap: 12px 20px;
                align-items: start;
                padding: 4px 20px 12px;
            }

            .drive-detail-media {
                position: static;
                top: auto;
            }

            .drive-detail-hero {
                gap: 16px;
            }

            .drive-detail-image {
                aspect-ratio: 1 / 1;
                width: min(100%, 240px);
                max-width: 240px;
                max-height: none;
            }

            .drive-detail-image-placeholder {
                min-height: 0;
            }

            .drive-detail-field textarea {
                min-height: 64px;
            }

            .drive-detail-field label:not(.drive-check-item) {
                font-size: 12px;
            }

            .drive-detail-field input:not([type="checkbox"]),
            .drive-detail-field textarea {
                padding: 8px 10px;
                font-size: 13px;
            }

            .drive-detail-actions {
                flex-direction: column;
                margin-top: 0;
                gap: 6px;
            }

            .drive-detail-actions .btn-secondary {
                padding: 8px 12px;
                font-size: 13px;
            }

            .drive-detail-footer {
                padding: 10px 20px 14px;
            }

            .drive-detail-subheader {
                padding: 12px 20px;
            }

            .drive-check-scroll {
                padding: 10px 20px 16px;
            }

            .drive-topping-groups {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 12px;
                align-items: start;
            }

            .drive-topping-group-head {
                padding: 12px;
            }

            .drive-topping-group-menus {
                padding: 0 12px 8px 38px;
            }

            .drive-topping-items {
                --drive-topping-item-h: 72px;
                display: flex;
                flex-direction: column;
                gap: 8px;
                padding: 8px 10px 10px;
                max-height: calc(var(--drive-topping-item-h) * 3 + 8px * 2 + 18px);
                overflow-x: hidden;
                overflow-y: auto;
                overscroll-behavior: contain;
            }

            .drive-topping-item-card {
                height: var(--drive-topping-item-h);
                min-height: var(--drive-topping-item-h);
                flex-shrink: 0;
                padding: 8px 12px;
                overflow: hidden;
            }

            .drive-topping-item-card-head {
                flex-direction: row;
                align-items: center;
                gap: 8px;
            }

            .drive-topping-item-price {
                font-size: 1.0625rem;
            }

            .drive-topping-item-desc {
                display: none;
            }

            .drive-topping-item-meta {
                margin-top: 4px;
                gap: 4px;
                flex-wrap: nowrap;
                overflow: hidden;
            }

            .drive-topping-chip {
                font-size: 9px;
                padding: 2px 6px;
                max-width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            .drive-grid {
                display: none !important;
            }

            .drive-view-toggle {
                display: none;
            }
        }

        @media (min-width: 1280px) {
            .drive-body-list {
                flex-basis: 380px;
            }

            .drive-detail-body {
                grid-template-columns: minmax(240px, 5fr) minmax(320px, 7fr);
                gap: 14px 28px;
                padding: 6px 28px 14px;
            }

            .drive-topping-items {
                --drive-topping-item-h: 76px;
            }
        }

        @media (max-width: 959px) {
            .page.page--wide:has(.drive-has-selection),
            .page.page--wide:has(.drive-has-selection) .tab-panel.shop-control-panel,
            .page.page--wide:has(.drive-has-selection) .drive-product-manage,
            .page.page--wide:has(.drive-has-selection) .drive-body {
                overflow: visible;
            }

            .drive-body-detail {
                display: block;
                height: 0;
                overflow: visible;
                flex: 0;
            }

            .drive-detail-empty {
                display: none !important;
            }

            .drive-detail-modal:not([hidden]) {
                z-index: 1200;
                padding: 0;
                align-items: stretch;
                justify-content: flex-start;
            }

            .drive-product-detail-card {
                width: 100%;
                max-width: none;
                height: 100%;
                max-height: none;
                min-height: 100%;
                border: 0;
                border-radius: 0;
                box-shadow: none;
                background: #202124;
            }

            .drive-product-detail-card > .drive-detail-subview:not([hidden]) {
                flex: 1 1 auto;
                min-height: 0;
            }

            .drive-detail-body {
                flex: 1 1 auto;
                min-height: 0;
                -webkit-overflow-scrolling: touch;
            }
        }

        @media (max-width: 720px) {
            .drive-product-manage {
                --drive-list-cols: minmax(0, 1fr) 68px 56px 18px;
                --drive-list-pad-x: 10px;
            }
        }

        /* ── ショップ情報ダッシュボード ── */
        .shop-dashboard {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        #shopDashboardContent {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        #shopDashboardContent > .panel + .panel {
            margin-top: 0;
        }

        .mp-bar-panel {
            padding: 18px 16px 16px;
        }

        .mp-bar-title {
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.08em;
            color: var(--muted);
            text-align: center;
            margin-bottom: 10px;
        }

        .mp-bar-outer {
            height: 18px;
            border: 2px solid #111;
            border-radius: 2px;
            background: #1f1f1f;
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.08),
                0 0 0 1px #4a4a4a;
            overflow: hidden;
        }

        .mp-bar-fill {
            height: 100%;
            width: 0;
            max-width: 100%;
            min-width: 0;
            transition: width 0.35s ease;
            background-image: repeating-linear-gradient(90deg,
                    rgba(0, 0, 0, 0.12) 0,
                    rgba(0, 0, 0, 0.12) 4px,
                    transparent 4px,
                    transparent 8px);
        }

        .mp-bar-fill.tier-full {
            background-color: #28c76f;
        }

        .mp-bar-fill.tier-mid {
            background-color: #ff8a2a;
        }

        .mp-bar-fill.tier-low {
            background-color: #ff5b5b;
        }

        .mp-bar-fill.tier-empty {
            width: 0 !important;
            background-color: transparent;
        }

        .mp-bar-fill.tier-bonus {
            background-color: #ffd166;
        }

        .mp-bar-value {
            margin-top: 8px;
            text-align: center;
            font-size: 15px;
            font-weight: 800;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.04em;
            color: var(--text);
        }

        .mp-bar-caption {
            margin-top: 4px;
            text-align: center;
            font-size: 11px;
            color: var(--muted);
        }

        .sales-target-panel-head {
            position: relative;
            margin-bottom: 10px;
            min-height: 36px;
        }

        .sales-target-panel-title {
            position: absolute;
            left: 50%;
            top: 0;
            transform: translateX(-50%);
            margin: 0;
            text-align: center;
            width: max-content;
        }

        .sales-target-legend {
            position: relative;
            z-index: 1;
            display: flex;
            flex-direction: column;
            gap: 6px;
            min-width: 92px;
        }

        .sales-target-legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 10px;
            color: var(--muted);
            white-space: nowrap;
        }

        .sales-target-legend-swatch {
            width: 10px;
            height: 10px;
            border-radius: 2px;
            border: 1px solid rgba(0, 0, 0, 0.35);
            flex-shrink: 0;
        }

        .sales-target-legend-swatch.archived {
            background: #28c76f;
        }

        .sales-target-legend-swatch.pre-checkout {
            background-color: #3ec3ff;
            background-image: repeating-linear-gradient(
                -45deg,
                #3ec3ff,
                #3ec3ff 2px,
                rgba(255, 255, 255, 0.92) 2px,
                rgba(255, 255, 255, 0.92) 4px
            );
        }

        .sales-target-bar-outer {
            display: flex;
            height: 18px;
            border: 2px solid #111;
            border-radius: 2px;
            background: #1f1f1f;
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.08),
                0 0 0 1px #4a4a4a;
            overflow: hidden;
        }

        .sales-target-bar-segment {
            height: 100%;
            width: 0;
            min-width: 0;
            transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
        }

        .sales-target-bar-segment.archived {
            background-color: #28c76f;
        }

        .sales-target-bar-segment.pre-checkout {
            background-color: #3ec3ff;
            background-image: repeating-linear-gradient(
                -45deg,
                #3ec3ff,
                #3ec3ff 4px,
                rgba(255, 255, 255, 0.92) 4px,
                rgba(255, 255, 255, 0.92) 8px
            );
        }

        .chart-mode-select {
            font-size: 12px;
            padding: 6px 8px;
            border-radius: 8px;
            border: 1px solid var(--line);
            background: var(--bg-soft);
            color: var(--text);
            width: 64px;
            min-width: 64px;
            max-width: 64px;
            flex-shrink: 0;
        }

        .dashboard-charts {
            display: grid;
            grid-template-columns: 1fr;
            gap: 16px;
            align-items: stretch;
        }

        .dashboard-analytics-upsell {
            padding: 24px 16px;
            text-align: center;
        }

        .dashboard-analytics-upsell p {
            margin: 0 0 12px;
            color: var(--text-sub);
        }

        .dashboard-charts>.panel+.panel {
            margin-top: 0;
        }

        @media (min-width: 720px) {
            .dashboard-charts {
                grid-template-columns: 1fr 1fr;
            }
        }

        .chart-panel {
            display: grid;
            grid-template-rows: auto minmax(220px, 220px);
            align-content: start;
            min-height: 280px;
            height: 100%;
            overflow: hidden;
        }

        .chart-panel-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
            height: 36px;
            min-height: 36px;
            flex-shrink: 0;
        }

        .chart-panel-head .panel-title {
            margin-bottom: 0;
            white-space: nowrap;
            flex: 1 1 auto;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            text-transform: none;
            letter-spacing: 0.02em;
            font-size: 12px;
            line-height: 1.2;
        }

        .chart-panel-head .chart-panel-title-left {
            flex: 0 1 auto;
            text-align: left;
        }

        .chart-panel-head--category:not(.is-drill-view) #salesChartTitle {
            overflow: visible;
            text-overflow: clip;
            flex: 0 1 auto;
        }

        .chart-panel-head--category.is-drill-view .chart-panel-controls {
            display: none;
        }

        .chart-panel-head--category.is-drill-view #salesChartTitle {
            overflow: hidden;
            text-overflow: ellipsis;
            flex: 1 1 auto;
            min-width: 0;
        }

        .chart-panel-head--category.is-drill-view #salesChartDrillBack {
            display: inline-flex;
        }

        .chart-panel-controls {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .chart-period-select {
            font-size: 12px;
            padding: 6px 8px;
            border-radius: 8px;
            border: 1px solid var(--line);
            background: var(--bg-soft);
            color: var(--text);
            width: 96px;
            min-width: 96px;
            max-width: 96px;
            flex-shrink: 0;
        }

        .chart-bars {
            display: flex;
            align-items: flex-end;
            gap: 8px;
            min-height: 180px;
            height: 180px;
            max-height: 180px;
            padding-top: 0;
            align-self: stretch;
        }

        .chart-bars.is-day-mode {
            overflow-x: auto;
            justify-content: flex-start;
            padding-bottom: 4px;
        }

        .chart-bars .empty {
            align-self: center;
            width: 100%;
            text-align: center;
        }

        .chart-bar-col {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            height: 100%;
            justify-content: flex-end;
        }

        .chart-bars.is-day-mode .chart-bar-col {
            flex: 0 0 22px;
            min-width: 22px;
        }

        .chart-bar {
            width: 100%;
            max-width: 36px;
            min-height: 2px;
            border-radius: 6px 6px 2px 2px;
            background: linear-gradient(180deg, var(--accent) 0%, #2486b8 100%);
            transition: height 0.25s ease;
        }

        .chart-bar.sales {
            background: linear-gradient(180deg, #28c76f 0%, #169652 100%);
        }

        .chart-bar-label {
            font-size: 10px;
            color: var(--muted);
            text-align: center;
            white-space: nowrap;
        }

        .combined-chart-panel {
            grid-column: 1 / -1;
            grid-template-rows: auto minmax(300px, 300px);
            min-height: 360px;
        }

        .chart-canvas-host {
            position: relative;
            width: 100%;
            min-width: 0;
            height: 220px;
            min-height: 220px;
            overflow: hidden;
        }

        .chart-canvas-host .empty {
            align-self: center;
            width: 100%;
            text-align: center;
        }

        .category-pie-layout {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            height: 100%;
            min-height: 220px;
            padding: 4px 4px 4px 16px;
            box-sizing: border-box;
        }

        .category-pie-chart-area {
            flex: 0 0 46%;
            max-width: 46%;
            min-width: 0;
            height: 200px;
            position: relative;
        }

        .category-pie-canvas-wrap {
            width: 100%;
            height: 100%;
            min-height: 200px;
        }

        .category-pie-legend {
            flex: 1 1 auto;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 7px;
            padding: 4px 8px 4px 12px;
            max-height: 220px;
            overflow-y: auto;
        }

        .category-pie-legend-row {
            display: grid;
            grid-template-columns: 10px 4.2em minmax(0, 1fr) auto;
            gap: 4px 8px;
            align-items: center;
            font-size: 11px;
            color: var(--text);
            line-height: 1.35;
        }

        .category-pie-legend-swatch {
            flex: 0 0 10px;
            width: 10px;
            height: 10px;
            border-radius: 2px;
            border: 1px solid rgba(255, 255, 255, 0.12);
        }

        .category-pie-legend-pct,
        .category-pie-legend-count {
            font-variant-numeric: tabular-nums;
            font-family: ui-monospace, 'Cascadia Mono', monospace;
            color: var(--text);
            white-space: nowrap;
        }

        .category-pie-legend-pct {
            text-align: right;
            width: 100%;
            min-width: 0;
        }

        .category-pie-legend-count {
            text-align: right;
        }

        .category-pie-legend-name {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            cursor: default;
        }

        .chart-drill-back-btn {
            display: none;
            align-items: center;
            flex-shrink: 0;
            font-size: 11px;
            padding: 4px 10px;
            border-radius: 8px;
            border: 1px solid var(--line);
            background: var(--bg-soft);
            color: var(--text);
            cursor: pointer;
            white-space: nowrap;
        }

        .chart-drill-back-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

        .chart-canvas-wrap {
            position: relative;
            width: 100%;
            height: 100%;
            min-height: 220px;
        }

        .combined-chart-body {
            min-height: 300px;
            height: 300px;
            overflow: hidden;
        }

        .combined-chart-body .chart-canvas-wrap {
            height: 100%;
            min-height: 300px;
        }

        .combined-chart-body .empty {
            text-align: center;
            padding: 72px 12px;
            color: var(--muted);
        }

        .dashboard-stats {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
        }

        @media (min-width: 560px) {
            .dashboard-stats {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        .stat-card {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 12px;
        }

        .stat-label {
            font-size: 11px;
            color: var(--muted);
            margin-bottom: 6px;
        }

        .stat-value {
            font-size: 20px;
            font-weight: 800;
            color: var(--text);
            font-variant-numeric: tabular-nums;
        }

        .manage-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-start;
            margin: 12px 16px 0;
        }

        .manage-actions button {
            width: auto;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th,
        .data-table td {
            border-bottom: 1px solid #33404b;
            padding: 8px 6px;
            font-size: 12px;
            text-align: left;
            vertical-align: top;
        }

        .member-action-cell {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
        }

        .inline-form {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 8px;
            margin-top: 10px;
        }

        /* ── フォーム ── */
        input,
        select {
            border-radius: 10px;
            border: 1px solid var(--line);
            background: #131920;
            color: var(--text);
            padding: 10px 12px;
            font: inherit;
            font-size: 15px;
            width: 100%;
        }

        input:focus,
        select:focus {
            outline: 2px solid rgba(62, 195, 255, 0.35);
            border-color: var(--accent);
        }

        button {
            border-radius: 10px;
            border: 0;
            padding: 11px 16px;
            font: inherit;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.1s ease, opacity 0.15s ease;
            font-size: 14px;
        }

        button:active {
            transform: scale(0.97);
        }

        button:disabled {
            opacity: 0.45;
            cursor: default;
        }

        .btn-primary {
            background: linear-gradient(135deg, #4dc8ff, #27a8e0);
            color: #061822;
            width: 100%;
        }

        .btn-secondary {
            background: #2b343d;
            color: var(--text);
            border: 1px solid #46545f;
            width: 100%;
        }

        .btn-ok {
            background: linear-gradient(135deg, #36d37a, #1fa354);
            color: #061208;
            width: 100%;
        }

        .btn-danger {
            background: #4a2020;
            color: #ffdada;
            border: 1px solid #7f3333;
        }

        .btn-warn {
            background: #3d2e15;
            color: #ffe5c0;
            border: 1px solid #7a5520;
        }

        .btn-sm {
            padding: 7px 14px;
            font-size: 13px;
            width: auto;
        }

        /* ── ステータス ── */
        .status {
            margin-top: 10px;
            padding: 10px 12px;
            border-radius: 10px;
            font-size: 13px;
            display: none;
        }

        .status.show {
            display: block;
        }

        .status.info {
            background: #1a3048;
            border: 1px solid #2c5070;
        }

        .status.ok {
            background: #1a3626;
            border: 1px solid #28593c;
            color: #d8ffe8;
        }

        .status.error {
            background: #3a1f1f;
            border: 1px solid #6e3535;
            color: #ffdede;
        }

        /* ── セッションカード ── */
        .table-seats-wrap .session-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
        }

        @media (min-width: 720px) {
            .table-seats-wrap .session-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        @media (min-width: 960px) {
            .table-seats-wrap .session-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
        }

        @media (max-width: 520px) {
            .table-seats-wrap .session-grid {
                grid-template-columns: 1fr;
            }
        }

        .session-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
            gap: 12px;
            width: 100%;
            min-width: 0;
        }

        .session-card {
            background: #1a2128;
            border: 1px solid #3a4550;
            border-radius: 12px;
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            transition: border-color 0.15s ease;
            min-width: 0;
            max-width: 100%;
            overflow: hidden;
        }

        .session-card-clickable {
            cursor: pointer;
        }

        .session-card:hover {
            border-color: var(--accent);
        }

        .session-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }

        .table-seat-card .table-seat-status {
            font-size: 11px;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 999px;
            border: 1px solid #3a4550;
            color: var(--muted);
            white-space: nowrap;
        }

        .table-seat-card .table-seat-status.using {
            border-color: rgba(46, 204, 113, 0.45);
            color: #7ddea8;
            background: rgba(46, 204, 113, 0.1);
        }

        .table-seat-card .table-seat-status.closed {
            border-color: rgba(154, 163, 175, 0.35);
            color: #b8bec8;
            background: rgba(154, 163, 175, 0.1);
        }

        .table-seat-card.status-active {
            border-color: rgba(46, 204, 113, 0.45);
        }

        .table-seat-card.status-closed {
            border-color: #3a4550;
        }

        .table-seat-card .table-seat-session-id {
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.06em;
            color: var(--accent);
            margin-top: 4px;
            word-break: break-all;
        }

        .table-seat-summary {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 10px;
            font-size: 12px;
            color: var(--muted);
        }

        .table-seat-summary .table-seat-filter {
            padding: 4px 10px;
            border-radius: 999px;
            border: 1px solid #3a4550;
            background: rgba(255, 255, 255, 0.03);
            color: inherit;
            font: inherit;
            font-size: 12px;
            cursor: pointer;
        }

        .table-seat-summary .table-seat-filter.active {
            border-color: var(--accent);
            color: var(--accent);
            background: rgba(212, 160, 23, 0.12);
        }

        .table-seat-card.table-seat-filter-hidden {
            display: none !important;
        }

        .table-seat-sync-hint {
            margin: 8px 0 4px;
            font-size: 12px;
            color: var(--muted);
            text-align: center;
        }

        .table-seat-seed {
            font-size: 12px;
            color: var(--muted);
            word-break: break-all;
        }

        /* 固定QR 卓カード（v2）— ダーク UI に合わせた卓席カード */
        .table-seat-card-v2 {
            padding: 0;
            overflow: hidden;
            border-width: 1px;
            border-color: #3a4550;
            background: #1a2128;
            color: var(--text);
            cursor: pointer;
            gap: 0;
            -webkit-tap-highlight-color: transparent;
        }

        .table-seat-card-v2:hover,
        .table-seat-card-v2:focus-visible {
            border-color: var(--accent);
            outline: none;
        }

        .table-seat-card-v2.status-active {
            border-color: rgba(46, 204, 113, 0.55);
            box-shadow: inset 0 0 0 1px rgba(46, 204, 113, 0.12);
        }

        .table-seat-card-v2.status-closed {
            border-color: #3a4550;
        }

        .table-seat-card-v2__bar {
            height: 4px;
            background: #4a5562;
        }

        .table-seat-card-v2.status-active .table-seat-card-v2__bar {
            background: linear-gradient(90deg, #27ae60, #2ecc71);
        }

        .table-seat-card-v2__head {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 12px 8px;
            background: transparent;
            border-bottom: 1px solid #2f3944;
        }

        .table-seat-card-v2__dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #e67e22;
            flex-shrink: 0;
            box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.18);
        }

        .table-seat-card-v2.status-active .table-seat-card-v2__dot {
            background: #2ecc71;
            box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
        }

        .table-seat-card-v2__title {
            font-size: 15px;
            font-weight: 700;
            letter-spacing: 0.02em;
        }

        .table-seat-card-v2__body {
            padding: 12px 14px 14px;
            background: transparent;
            min-height: 88px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .table-seat-card-v2__label {
            font-size: 11px;
            font-weight: 600;
            color: var(--muted);
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .table-seat-card-v2__amount {
            font-size: 26px;
            font-weight: 800;
            line-height: 1.1;
            text-align: center;
            color: #f0f4f8;
        }

        .table-seat-card-v2__elapsed {
            font-size: 13px;
            text-align: center;
            color: var(--muted);
        }

        .table-seat-card-v2__loading {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 8px 0 4px;
        }

        .table-seat-card-v2__loading-bar {
            height: 4px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            overflow: hidden;
            position: relative;
        }

        .table-seat-card-v2__loading-bar::after {
            content: '';
            position: absolute;
            inset: 0 auto 0 0;
            width: 40%;
            border-radius: inherit;
            background: linear-gradient(90deg, transparent, var(--primary-bright), transparent);
            animation: table-seat-loading-slide 1.1s ease-in-out infinite;
        }

        @keyframes table-seat-loading-slide {
            from { transform: translateX(-120%); }
            to { transform: translateX(320%); }
        }

        .table-seat-card-v2__loading--silent {
            min-height: 52px;
            justify-content: center;
            padding: 12px 0 8px;
        }

        .table-seat-card-v2__loading-label {
            font-size: 12px;
            text-align: center;
            color: var(--muted);
        }

        .table-seat-card-v2.is-checkout-pending {
            pointer-events: none;
            cursor: wait;
        }

        .table-seat-card-v2.is-checkout-pending:hover,
        .table-seat-card-v2.is-checkout-pending:focus-visible {
            border-color: rgba(46, 204, 113, 0.55);
        }

        .table-seat-card-v2__checkout-processing {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            min-height: 92px;
            padding: 8px 0 4px;
        }

        .table-seat-card-v2__checkout-ring {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 3px solid rgba(255, 255, 255, 0.12);
            border-top-color: #3ec3ff;
            border-right-color: rgba(62, 195, 255, 0.45);
            animation: table-seat-checkout-spin 0.85s linear infinite;
            flex-shrink: 0;
        }

        .table-seat-card-v2__checkout-label {
            font-size: 13px;
            font-weight: 600;
            text-align: center;
            color: #8ab4f8;
            letter-spacing: 0.04em;
        }

        @keyframes table-seat-checkout-spin {
            to {
                transform: rotate(360deg);
            }
        }

        .session-card.is-checkout-pending {
            pointer-events: none;
            cursor: wait;
            position: relative;
        }

        .session-card.is-checkout-pending::after {
            content: '処理中...';
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            background: rgba(17, 21, 24, 0.84);
            color: #8ab4f8;
            font-size: 14px;
            font-weight: 600;
            border-radius: inherit;
            z-index: 2;
        }

        .table-seat-card-v2__memo {
            font-size: 13px;
            line-height: 1.45;
            color: #c8d0d8;
            border-top: 1px dashed #3a4550;
            padding-top: 8px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .table-seat-card-v2__wait {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            gap: 4px;
            font-size: 13px;
            color: var(--muted);
            padding: 6px 0 2px;
        }

        .table-seat-card-v2__wait strong {
            font-size: 14px;
            font-weight: 700;
            color: #d5dde6;
        }

        .table-seat-card-v2 .session-qr-wrap {
            display: none !important;
        }

        .table-seat-action-card {
            max-width: 420px;
            width: min(100%, 420px);
        }

        .table-seat-action-qr[hidden] {
            display: none !important;
        }

        .table-seat-action-qr:not([hidden]) {
            display: flex;
        }

        .table-seat-action-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin: 0 0 12px;
        }

        .table-seat-action-list button {
            width: 100%;
            padding: 12px 14px;
            border-radius: 10px;
            border: 1px solid #3a4550;
            background: #1a2128;
            color: var(--text);
            font-size: 15px;
            cursor: pointer;
            text-align: left;
        }

        .table-seat-action-list button:hover {
            border-color: var(--accent);
            background: #222b34;
        }

        .table-seat-action-list button.btn-danger-action {
            border-color: rgba(231, 76, 60, 0.45);
            color: #ffb4a8;
        }

        .table-seat-action-list button.table-seat-action-btn-stacked {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
        }

        .table-seat-action-btn-main {
            font-size: 15px;
            font-weight: 600;
        }

        .table-seat-action-btn-sub {
            font-size: 12px;
            color: var(--muted);
            line-height: 1.4;
        }

        .table-seat-action-qr {
            margin-top: 8px;
            padding-top: 16px;
            border-top: 1px solid var(--line);
            text-align: center;
        }

        .table-seat-action-qr .session-qr-img {
            width: min(300px, 82vw);
            height: auto;
            margin: 0 auto;
        }

        .table-seat-action-qr--loading .session-qr-img {
            opacity: 0.15;
        }

        .table-seat-action-qr-hint {
            margin-top: 10px;
            font-size: 13px;
            color: var(--muted);
            line-height: 1.5;
        }

        .table-seat-action-passwd {
            margin-top: 8px;
            font-size: 13px;
            color: var(--muted);
            word-break: break-all;
            text-align: center;
        }

        .table-seat-action-footer {
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px solid var(--line);
        }

        .table-seat-action-footer[hidden] {
            display: none !important;
        }

        .table-seat-action-footer .session-connect-order-btn {
            width: 100%;
        }

        .card-options-wrap {
            position: relative;
            flex-shrink: 0;
        }

        .card-options-btn {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: 1px solid #3a4550;
            background: #121820;
            color: var(--text);
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
            padding: 0;
        }

        .card-options-btn:hover {
            border-color: var(--accent);
        }

        .card-options-menu {
            position: absolute;
            top: calc(100% + 4px);
            right: 0;
            min-width: 180px;
            background: #1a2128;
            border: 1px solid #3a4550;
            border-radius: 10px;
            padding: 6px;
            z-index: 20;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        }

        .card-options-menu button {
            display: block;
            width: 100%;
            text-align: left;
            border: none;
            background: transparent;
            color: var(--text);
            font-size: 13px;
            padding: 8px 10px;
            border-radius: 8px;
            cursor: pointer;
        }

        .card-options-menu button:hover {
            background: rgba(62, 195, 255, 0.12);
        }

        .session-table {
            font-size: 20px;
            font-weight: 800;
        }

        .session-table-pin {
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.1em;
            color: var(--accent);
            margin-top: 3px;
        }

        .session-meta {
            font-size: 12px;
            color: var(--muted);
            line-height: 1.5;
        }

        /* セッションIDのみ（QR は下のブロック） */
        .session-session-id {
            font-size: 15px;
            font-weight: 800;
            letter-spacing: 0.1em;
            color: var(--accent);
            background: rgba(62, 195, 255, 0.08);
            border: 1px solid rgba(62, 195, 255, 0.2);
            border-radius: 8px;
            padding: 10px 12px;
            text-align: center;
            font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
            word-break: break-all;
            overflow-wrap: anywhere;
        }

        .session-connect-order-btn {
            width: 100%;
            margin: 0;
        }

        .session-qr-wrap {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 8px 0 4px;
            min-height: 204px;
        }

        .session-qr-img {
            width: 184px;
            height: 184px;
            min-width: 184px;
            min-height: 184px;
            border-radius: 10px;
            background: #fff;
            object-fit: contain;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
        }

        .session-qr-wrap .session-qr-caption {
            font-size: 11px;
            font-weight: 600;
            color: var(--muted);
            margin-top: 2px;
        }

        .session-qr-wrap--loading .session-qr-img,
        .session-qr-wrap--loading .session-qr-caption {
            visibility: hidden !important;
        }

        .session-qr-loading {
            width: 184px;
            padding: 72px 0 68px;
            text-align: center;
        }

        .session-qr-loading-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--muted);
            margin-bottom: 10px;
        }

        .session-qr-loading-track {
            height: 4px;
            background: #2a3540;
            border-radius: 999px;
            overflow: hidden;
        }

        .session-qr-loading-bar {
            height: 100%;
            width: 38%;
            border-radius: 999px;
            background: linear-gradient(90deg, var(--accent, #38bdf8), #6ee7b7);
            animation: sessionQrLoadBar 1.1s ease-in-out infinite;
        }

        @keyframes sessionQrLoadBar {
            0% {
                transform: translateX(-110%);
            }

            100% {
                transform: translateX(320%);
            }
        }

        .session-amount {
            font-size: 18px;
            font-weight: 700;
            color: var(--warn);
        }

        .session-actions {
            display: flex;
            gap: 6px;
        }

        /* ── 注文タブ ── */
        #tab-orders {
            display: none;
            flex-direction: column;
            min-height: 0;
            padding: 0;
        }

        #tab-orders.active {
            display: flex;
        }

        .orders-tab {
            display: flex;
            flex-direction: column;
            min-height: 0;
            flex: 1;
            gap: 10px;
        }

        .orders-tab-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
            padding: 0 2px;
        }

        .orders-tab-body {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            overscroll-behavior: contain;
        }

        .orders-tab-list {
            min-height: 120px;
        }

        .order-serve-bar {
            position: sticky;
            bottom: 0;
            display: flex;
            justify-content: center;
            padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
            z-index: 40;
            pointer-events: none;
        }

        .order-serve-bar:not([hidden]) {
            pointer-events: auto;
        }

        .order-serve-bar-btn {
            min-width: 168px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
        }

        /* ── 注文カード（テーブル単位） ── */
        .order-table-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
            justify-content: start;
            align-content: start;
            gap: 12px;
            padding: 2px 0 72px;
        }

        .order-table-card {
            background: #1a2128;
            border: 1px solid #3a4550;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            min-height: 220px;
            max-height: min(72vh, 560px);
            overflow: hidden;
        }

        .order-table-card-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
            padding: 12px 12px 10px;
            border-bottom: 1px solid #2f3840;
            background: rgba(255, 255, 255, 0.02);
        }

        .order-table-card-title {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .order-table-chip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 42px;
            height: 34px;
            padding: 0 10px;
            border-radius: 8px;
            background: rgba(54, 211, 122, 0.18);
            border: 1px solid rgba(54, 211, 122, 0.35);
            color: #8ef0b8;
            font-size: 14px;
            font-weight: 800;
            flex-shrink: 0;
        }

        .order-table-meta {
            min-width: 0;
        }

        .order-table-meta strong {
            display: block;
            font-size: 14px;
            line-height: 1.3;
        }

        .order-table-meta span {
            display: block;
            margin-top: 2px;
            font-size: 11px;
            color: var(--muted);
        }

        .order-table-pending-badge {
            padding: 3px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            background: rgba(255, 138, 42, 0.15);
            color: var(--warn);
            border: 1px solid rgba(255, 138, 42, 0.3);
            white-space: nowrap;
        }

        .order-table-lines {
            flex: 1;
            overflow-y: auto;
            overscroll-behavior: contain;
        }

        .order-serve-line {
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 10px;
            align-items: start;
            padding: 10px 12px;
            border-bottom: 1px solid #2a333c;
            cursor: pointer;
            transition: background 0.12s ease, opacity 0.12s ease;
        }

        .order-serve-line:hover {
            background: rgba(255, 255, 255, 0.04);
        }

        .order-serve-line.is-serving {
            opacity: 0.55;
            pointer-events: none;
        }

        .order-serve-line.is-selected {
            outline: 2px solid var(--accent);
            outline-offset: -2px;
            background: rgba(62, 195, 255, 0.14);
        }

        .order-serve-line.is-selected:hover {
            background: rgba(62, 195, 255, 0.18);
        }

        .order-serve-qty {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 999px;
            background: rgba(54, 211, 122, 0.16);
            border: 1px solid rgba(54, 211, 122, 0.35);
            color: #9ef2c4;
            font-size: 12px;
            font-weight: 800;
        }

        .order-serve-main {
            min-width: 0;
        }

        .order-serve-name {
            font-size: 14px;
            font-weight: 700;
            line-height: 1.35;
        }

        .order-serve-toppings {
            margin-top: 4px;
            font-size: 11px;
            color: var(--muted);
            line-height: 1.45;
        }

        .order-serve-toppings span {
            display: block;
        }

        .order-serve-wait {
            text-align: right;
            font-size: 11px;
            color: var(--warn);
            font-weight: 700;
            white-space: nowrap;
        }

        .order-serve-wait small {
            display: block;
            margin-top: 2px;
            color: var(--muted);
            font-weight: 500;
        }

        .order-table-card-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 10px 12px;
            border-top: 1px solid #2f3840;
            background: rgba(0, 0, 0, 0.12);
        }

        .order-table-card-footer .order-table-summary {
            font-size: 11px;
            color: var(--muted);
        }

        /* ── 注文カード（旧・詳細用） ── */
        .order-card {
            background: #1a2128;
            border: 1px solid #3a4550;
            border-radius: 12px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .order-card+.order-card {
            margin-top: 10px;
        }

        .order-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .order-badge {
            padding: 3px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            background: rgba(255, 138, 42, 0.15);
            color: var(--warn);
            border: 1px solid rgba(255, 138, 42, 0.3);
        }

        .order-items {
            font-size: 13px;
            color: var(--muted);
            line-height: 1.7;
        }

        .order-time-live {
            color: var(--warn);
            font-weight: 700;
            margin-left: 8px;
        }

        .session-hint {
            font-size: 11px;
            color: var(--accent);
            opacity: 0.9;
        }

        .memo-panel {
            margin-bottom: 14px;
            padding: 12px;
            border-radius: 12px;
            border: 1px solid var(--line);
            background: rgba(255, 255, 255, 0.03);
        }

        .memo-panel label {
            display: block;
            font-size: 12px;
            color: var(--muted);
            margin-bottom: 6px;
        }

        .memo-panel textarea {
            width: 100%;
            min-height: 72px;
            resize: vertical;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel);
            color: var(--text);
            padding: 10px;
            font: inherit;
        }

        .memo-readonly {
            white-space: pre-wrap;
            font-size: 14px;
            color: var(--text);
        }

        .history-filters {
            display: grid;
            grid-template-columns: 1fr 1fr auto;
            gap: 10px;
            margin-bottom: 12px;
        }

        .history-filters label {
            display: flex;
            flex-direction: column;
            gap: 4px;
            font-size: 12px;
            color: var(--muted);
        }

        .history-item {
            border: 1px solid var(--line);
            border-radius: 12px;
            padding: 12px;
            margin-bottom: 10px;
            cursor: pointer;
        }

        .history-item:hover {
            border-color: var(--accent);
        }

        .history-pagination {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            margin-top: 12px;
        }

        .detail-modal {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.58);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 220;
            padding: 16px;
            overflow-x: hidden;
            overflow-y: auto;
            overscroll-behavior: contain;
        }

        .detail-modal.show {
            display: flex;
        }

        .staff-saving-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.62);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 320;
            padding: 16px;
        }

        .staff-saving-overlay[hidden] {
            display: none !important;
        }

        .staff-saving-panel {
            width: min(100%, 320px);
            background: #151b20;
            border: 1px solid #3a4550;
            border-radius: 14px;
            padding: 22px 20px;
            text-align: center;
            box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
        }

        .staff-saving-panel .session-qr-loading-track {
            margin: 0 auto 14px;
            max-width: 220px;
        }

        .staff-saving-panel p {
            margin: 0;
            font-size: 14px;
            font-weight: 600;
            color: var(--text, #e8eef3);
        }

        .detail-card {
            width: 100%;
            max-width: min(100%, 480px);
            min-width: 0;
            max-height: 88vh;
            overflow-x: hidden;
            overflow-y: auto;
            background: #151b20;
            border: 1px solid #3a4550;
            border-radius: 14px;
            padding: 14px;
            box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
        }

        .detail-head {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: flex-start;
            margin-bottom: 10px;
            min-width: 0;
        }

        .detail-title {
            font-size: 20px;
            font-weight: 800;
        }

        .detail-sub {
            margin-top: 4px;
            color: var(--muted);
            font-size: 12px;
            word-break: break-all;
            overflow-wrap: anywhere;
        }

        .detail-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
            gap: 8px;
            margin: 10px 0 12px;
            width: 100%;
            min-width: 0;
        }

        .detail-kv {
            background: #1c242c;
            border: 1px solid #34414c;
            border-radius: 10px;
            padding: 8px 10px;
        }

        .detail-k {
            font-size: 11px;
            color: var(--muted);
        }

        .detail-v {
            margin-top: 4px;
            font-size: 14px;
            font-weight: 700;
        }

        .detail-order {
            border: 1px solid #33404b;
            border-radius: 10px;
            background: #192127;
            padding: 10px;
            margin-top: 8px;
        }

        .detail-order-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 8px;
            min-width: 0;
        }

        .detail-order-items {
            display: flex;
            flex-direction: column;
            gap: 7px;
        }

        .detail-order-item {
            border-top: 1px dashed #2d3944;
            padding-top: 7px;
        }

        .detail-order-item:first-child {
            border-top: 0;
            padding-top: 0;
        }

        .item-main {
            display: flex;
            justify-content: space-between;
            gap: 8px;
            font-size: 13px;
            min-width: 0;
        }

        .item-name {
            font-weight: 700;
            color: #eff5fa;
            min-width: 0;
            flex: 1;
            overflow-wrap: anywhere;
        }

        .item-sub {
            color: var(--muted);
            font-size: 12px;
            margin-top: 2px;
        }

        .topping-list {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 6px;
        }

        .topping-chip {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 8px;
            border-radius: 999px;
            border: 1px solid rgba(62, 195, 255, 0.28);
            background: rgba(62, 195, 255, 0.12);
            font-size: 11px;
            color: #bde9ff;
        }

        .detail-actions {
            display: flex;
            justify-content: flex-end;
            margin-top: 10px;
        }

        /* ── セッション作成フォーム ── */
        .create-form {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-bottom: 8px;
        }

        .create-form label {
            display: flex;
            flex-direction: column;
            gap: 4px;
            font-size: 12px;
            color: var(--muted);
        }

        /* ── トースト ── */
        .toast-container {
            position: fixed;
            top: calc(var(--staff-chrome-stack-height, 64px) + 8px);
            right: 16px;
            z-index: 200;
            display: flex;
            flex-direction: column;
            gap: 8px;
            pointer-events: none;
        }

        .toast {
            min-width: 220px;
            max-width: 340px;
            padding: 10px 14px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            font-size: 13px;
            line-height: 1.4;
            pointer-events: auto;
            transform: translateX(120%);
            opacity: 0;
            transition: transform 0.25s ease, opacity 0.25s ease;
        }

        .toast.show {
            transform: translateX(0);
            opacity: 1;
        }

        .toast.ok {
            background: rgba(40, 199, 111, 0.95);
            color: #051508;
        }

        .toast.error {
            background: rgba(255, 91, 91, 0.95);
            color: #fff0f0;
        }

        .toast.info {
            background: rgba(62, 195, 255, 0.95);
            color: #06202e;
        }

        .toast.warning {
            background: rgba(255, 193, 7, 0.95);
            color: #2a2000;
        }

        /* ── 空状態 ── */
        .empty {
            text-align: center;
            padding: 36px 16px;
            color: var(--muted);
            font-size: 14px;
        }

        .session-load-status {
            text-align: center;
            padding: 28px 16px 32px;
            color: var(--muted);
            font-size: 14px;
            line-height: 1.55;
        }

        .session-load-status-title {
            font-size: 16px;
            font-weight: 600;
            color: #e8eaed;
            margin-bottom: 14px;
        }

        .session-load-status-current {
            font-size: 14px;
            font-weight: 600;
            color: #8ab4f8;
            margin-bottom: 6px;
        }

        .session-load-status-detail {
            font-size: 12px;
            color: var(--muted);
            margin-bottom: 16px;
            word-break: break-word;
        }

        .session-load-status-history-label {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #6b7280;
            margin-bottom: 8px;
        }

        .session-load-status-history {
            list-style: none;
            margin: 0 auto;
            padding: 0;
            max-width: 420px;
            text-align: left;
            font-size: 12px;
            color: #9aa0a6;
        }

        .session-load-status-history li {
            padding: 4px 0;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
        }

        .session-load-status-history li:first-child {
            border-top: none;
        }

        /* ── 店舗選択画面 ── */
        #shopSelectScreen {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 24px;
            text-align: center;
        }

        #shopSelectScreen h2 {
            font-size: 22px;
            font-weight: 800;
            color: var(--accent);
            margin-bottom: 8px;
        }

        #shopSelectScreen .subtitle {
            color: var(--muted);
            font-size: 14px;
            margin-bottom: 28px;
        }

        .shop-select-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 14px;
            width: 100%;
            max-width: 720px;
        }

        .shop-select-card {
            background: linear-gradient(160deg, #1e262c 0%, #191f24 100%);
            border: 1px solid var(--line);
            border-radius: 14px;
            padding: 20px;
            cursor: pointer;
            text-align: left;
            transition: border-color 0.15s ease, transform 0.1s ease;
        }

        .shop-select-card:hover {
            border-color: var(--accent);
            transform: translateY(-2px);
        }

        .shop-select-card h3 {
            font-size: 17px;
            font-weight: 800;
            margin-bottom: 6px;
        }

        .shop-select-card p {
            font-size: 12px;
            color: var(--muted);
            line-height: 1.5;
        }

        .shop-select-card--current {
            border-color: var(--accent);
            box-shadow: inset 0 0 0 1px rgba(62, 195, 255, 0.18);
        }

        .shop-select-card--create {
            border-style: dashed;
            border-color: #4a5562;
            background: rgba(255, 255, 255, 0.02);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 120px;
            gap: 8px;
            text-align: center;
        }

        .shop-select-card--create:hover {
            border-color: var(--accent);
            background: rgba(62, 195, 255, 0.06);
        }

        .shop-select-card__plus {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            border: 1px dashed #5a6672;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            font-weight: 300;
            line-height: 1;
            color: var(--accent);
        }

        .shop-select-card__create-label {
            font-size: 13px;
            font-weight: 700;
            color: var(--muted);
        }

        .create-shop-modal {
            position: fixed;
            inset: 0;
            z-index: 120;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(0, 0, 0, 0.55);
        }

        .create-shop-modal[hidden] {
            display: none !important;
        }

        .create-shop-card {
            width: min(420px, 100%);
            background: #1a2128;
            border: 1px solid var(--line);
            border-radius: 14px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .create-shop-card h3 {
            font-size: 18px;
            font-weight: 800;
        }

        .create-shop-card label {
            display: flex;
            flex-direction: column;
            gap: 6px;
            font-size: 12px;
            color: var(--muted);
        }

        .create-shop-actions {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
        }

        /* ── プロフィール編集画面 ── */
        #profileEditScreen {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 24px;
        }

        .profile-edit-card {
            width: min(480px, 100%);
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .profile-edit-card h2 {
            font-size: 22px;
            font-weight: 800;
            color: var(--accent);
            margin: 0;
        }

        .profile-edit-card .subtitle {
            margin: 0;
            color: var(--muted);
            font-size: 14px;
            line-height: 1.5;
        }

        .profile-name-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        @media (max-width: 520px) {
            .profile-name-row {
                grid-template-columns: 1fr;
            }
        }

        .profile-edit-card label {
            display: flex;
            flex-direction: column;
            gap: 6px;
            font-size: 12px;
            color: var(--muted);
        }

        .profile-fullname-preview {
            padding: 12px 14px;
            border-radius: 10px;
            border: 1px dashed #4a5562;
            background: rgba(255, 255, 255, 0.03);
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .profile-fullname-preview__label {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--muted);
        }

        #profileFullNamePreview {
            font-size: 20px;
            font-weight: 800;
            color: #f0f4f8;
        }

        .profile-edit-actions {
            display: flex;
            justify-content: space-between;
            gap: 8px;
        }

        .shop-name-badge {
            font-size: 12px;
            font-weight: 700;
            color: var(--accent);
            background: rgba(62, 195, 255, 0.1);
            border: 1px solid rgba(62, 195, 255, 0.25);
            border-radius: 8px;
            padding: 3px 10px;
            max-width: 160px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .session-mode-header-badge {
            display: inline-flex;
            align-items: stretch;
            border: 1px solid var(--line);
            border-radius: 8px;
            overflow: hidden;
            font-size: 11px;
            font-weight: 700;
            line-height: 1;
            flex-shrink: 0;
        }

        .session-mode-header-option {
            padding: 5px 10px;
            color: var(--muted);
            background: rgba(255, 255, 255, 0.03);
            white-space: nowrap;
        }

        .session-mode-header-option.active {
            color: #0d1114;
            background: var(--accent);
        }

        .session-mode-header-option.active[data-mode="TSUDO_HAKKO"] {
            color: #fff;
            background: #5a8dee;
        }

        .session-mode-header-option.active[data-mode="KITEI_QR"] {
            color: #0d1114;
            background: var(--accent);
        }

        .session-mode-header-effective-hint {
            font-size: 10px;
            font-weight: 600;
            color: #ffb347;
            white-space: nowrap;
            flex-shrink: 0;
        }

        /* ── 新規セッション結果 ── */
        .pin-result {
            display: none;
            background: rgba(62, 195, 255, 0.06);
            border: 1px solid rgba(62, 195, 255, 0.25);
            border-radius: 12px;
            padding: 16px;
            margin-top: 12px;
            text-align: center;
        }

        .pin-result.show {
            display: block;
        }

        .pin-result p {
            font-size: 13px;
            color: var(--muted);
            margin-bottom: 6px;
        }

        .pin-result .pin-value {
            font-size: 36px;
            font-weight: 800;
            letter-spacing: 0.18em;
            color: var(--accent);
        }

        .pin-result .pin-hint {
            font-size: 12px;
            color: var(--muted);
            margin-top: 6px;
        }

        @media (max-width: 480px) {
            .create-form {
                grid-template-columns: 1fr;
            }

            .session-grid {
                grid-template-columns: 1fr;
            }

            .tab {
                padding: 10px 12px;
                font-size: 13px;
            }

            .detail-modal {
                padding: 12px;
            }

            .detail-card {
                max-width: 100%;
            }
        }

        .offline-banner {
            position: sticky;
            top: 0;
            z-index: 100;
            padding: 10px 14px;
            background: rgba(255, 91, 91, 0.15);
            border-bottom: 1px solid rgba(255, 91, 91, 0.45);
            color: #ffb4a8;
            font-size: 13px;
            line-height: 1.5;
        }

        .offline-banner[hidden] {
            display: none !important;
        }
