        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html,
        body {
            font-family: 'Helvetica', sans-serif;
            overflow: hidden;
            background: #000;
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        #container {
            position: relative;
            width: 100%;
            height: 100%;
            display: block;
            overflow: hidden;
            line-height: 0;
        }

        #container > * {
            position: absolute;
            display: block;
            user-select: none;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            animation: fadeIn 1.2s;
        }

        canvas {
            display: block;
            position: absolute;
            top: 0;
            left: 0;
        }

        #container > video {
            object-fit: cover;
            object-position: 50% 50%;
        }

        #splash {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #000;
            opacity: 1;
        }

        #overlay {
            position: absolute;
            font-size: 16px;
            z-index: 2;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            background: rgba(0, 0, 0, 0.5);
        }

        #overlay::before{
            position: absolute;
            width: 100%;
            white-space: pre-wrap;
            content: "Please allow access \A to your camera.";
            top:calc(50% + 50px);
            text-align: center;
            color: #949494;
        }

        #overlay button {
            background: transparent;
            border: 1px solid rgb(255, 255, 255);
            border-radius: 4px;
            color: #ffffff;
            padding: 12px 18px;
            text-transform: uppercase;
            cursor: pointer;
        }

        @keyframes fadeIn {
            0% {
                opacity: 0;
            }
            50% {
                opacity: 0.6;
            }
            100% {
                opacity: 1;
            }
        }

        @media screen and (max-device-width: 480px) and (orientation: landscape) {
            #container {
                display: none;
            }

            body::before {
                content: "Rotate device to portrait mode.";
                color: white;
            }
        }

        @media screen and (max-device-width: 480px) and (orientation: portrait) {
            #container {
                display: block;
            }

            body::before {
                content: none;
            }
        }

.ar-ui {
    position: absolute;
    top: 40px;
    left: 20px;
    width: auto;
    color: white;
    background: rgba(0,0,0,0.7);
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    display: block;
    z-index: 100;
}

.exit-button {
    position: absolute;
    top: 40px;
    right: 25px;
    background: rgba(244, 67, 54, 0.8);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: none;
    z-index: 100;
}

.send-viewer-button {
    position: absolute;
    top: 40px;
    right: 25px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.9), rgba(30, 136, 229, 0.95));
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: block;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.send-viewer-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.95), rgba(25, 118, 210, 1));
}
.send-viewer-button:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.3);
}
.send-viewer-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 3px;
}

.clear-objects {
    position: absolute;
    top: 100px;
    right: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.clear-button {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    text-align: center;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 100;
}
.clear-button:hover {
    transform: translateY(-2px) rotate(-15deg);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    background: none;
}
.clear-button:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
.clear-button:focus {
    outline: 2px solid rgba(255,255,255,0.6);
    outline-offset: 3px;
}
.clear-text {
    color: white;
    font-size: 14px;
    text-align: center;
    z-index: 100;
}

.reset-hit {
    position: absolute;
    top: 180px;
    right: 22px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.reset-button {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    text-align: center;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 100;
}
.reset-button:hover {
    transform: translateY(-2px) rotate(-15deg);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    background: none;
}
.reset-button:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
.reset-button:focus {
    outline: 2px solid rgba(255,255,255,0.6);
    outline-offset: 3px;
}
.reset-text {
    color: white;
    font-size: 14px;
    text-align: center;
    z-index: 100;
}

.hidden {
    display: none !important;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

/* カテゴリ表示のためのスタイル */
.menu-category {
    grid-column: 1 / -1; /* グリッド内で全幅を使用 */
    margin-top: 5px;
    margin-bottom: 5px;
    position: relative;
    text-align: center;
}

.category-title {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    padding-bottom: 8px;
    position: relative;
    display: inline-block;
    margin-left: 5px;
    font-family: "Yu Mincho", "MS Mincho", serif; /* より和風なフォント */
    letter-spacing: 1px;
}

.menu-category::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, #888, transparent);
}

/* モバイル用メニュースタイル */
.menu-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(245, 245, 245, 0.95);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transition: all 0.3s ease-out;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
}

.menu-container.mobile-view.collapsed {
    height: 120px;
}

.menu-container.mobile-view.expanded {
    height: 80vh;
    overflow-y: auto;
}

/* デスクトップ用メニュースタイル */
.menu-container.desktop-view {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: 420px; /* 幅を広げて2列表示に対応 */
    height: 100vh;
    border-radius: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    transform: translateX(0);
    transition: transform 0.3s ease-out;
    overflow-y: auto; /* 縦スクロールを常に可能に */
}

.menu-container.desktop-view.desktop-collapsed {
    transform: translateX(100%);
}

.menu-container.desktop-view.desktop-expanded {
    transform: translateX(0);
}

.menu-toggle {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    position: relative;
    background-color: rgba(245, 245, 245, 0.95); /* 背景色を追加して内容が透けないように */
    /* 追加: 固定表示 */
    position: sticky;
    top: 0;
    z-index: 10;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.menu-toggle:after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
}

/* デスクトップでのメニュートグルボタンスタイル変更 */
.desktop-view .menu-toggle {
    text-align: left;
    padding-left: 20px;
}

.desktop-view .menu-toggle:after {
    display: none;
}

.tab-navigation {
    display: flex;
    justify-content: flex-start;
    padding: 10px 15px;
    overflow-x: auto;
    white-space: nowrap;
    background-color: #f5f5f5;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    /* 追加: 固定表示 */
    position: sticky;
    top: 50px; /* menu-toggleの高さに合わせて調整 */
    z-index: 9;
    cursor: grab; /* カーソルをつかめる形状に */
}

.tab-navigation:active {
    cursor: grabbing; /* ドラッグ中のカーソル */
}

/* Chrome、Safari、Edgeのスクロールバーを非表示 */
.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 12px 20px;
    margin-right: 10px;
    background-color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn.active {
    background-color: #333;
    color: #fff;
}

.menu-content {
    padding: 5px 15px 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    overflow-y: auto; /* コンテンツ部分のスクロールを可能に */
}

.menu-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.menu-item-image {
    width: 100%;
    height: 120px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    object-fit: cover; /* 追加：画像を適切に表示 */
}

.menu-item-info {
    padding: 10px;
}

.menu-item-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 3px;
}

.menu-item-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.menu-item-price {
    font-size: 14px;
    font-weight: bold;
}

.view-item-btn {
    background-color: #f5f5f5;
    border: none;
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.view-item-btn:hover {
    background-color: #e0e0e0;
}

/* モデル選択ボタンのスタイル */
.load-model-btn {
    background-color: #333;
    color: white;
}

.load-model-btn:hover {
    background-color: #555;
}

/* デスクトップ表示用のトグルボタン */
.menu-toggle-desktop {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 150px;
    height: 50px;
    border-radius: 90px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 99;
}

/* ローディングインジケーター */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #888;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.loading-text {
    color: white;
    font-size: 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ガイド用インジケーター */
.guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.guide-overlay.visible {
    opacity: 0.8;
    pointer-events: all;
}

.guide-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #888;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.guide-text {
    color: white;
    font-size: 25px;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 詳細パネル フェードインアニメーション */
@keyframes detailFadeIn {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* メディアクエリ */
@media (min-width: 768px) {
    .menu-toggle-desktop {
        display: flex;
    }
    
    /* デスクトップ表示ではメニュー内のコンテンツレイアウトを調整 */
    .desktop-view .menu-content {
        grid-template-columns: repeat(2, 1fr); /* デスクトップでは2列表示 */
        padding-bottom: 50px; /* スクロールの余白 */
    }
    
    /* モデル選択アイテムの幅を調整 */
    .desktop-view .model-item {
        width: 100%;
    }
}

/* 大きい画面サイズのデスクトップ表示 */
@media (min-width: 1400px) {
    .menu-container.desktop-view {
        width: 480px; /* より大きい画面ではさらに幅を広げる */
    }
}

/* スマホ横向き対応 */
@media (max-height: 500px) and (orientation: landscape) {
    .menu-container.mobile-view.expanded {
        height: 90vh; /* 横向きのときは高さを調整 */
    }
    
    .menu-content {
        grid-template-columns: repeat(3, 1fr); /* 横向きのときは3列にする */
    }
}

/* モデル選択アイテムのホバー効果 */
.model-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.model-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 商品カードのホバー効果 */
.menu-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.detail {
    display: block;
    min-width: 200px;
    max-width: 260px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(30, 30, 36, 0.88);
    border: 1px solid #f5f5f5;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    backdrop-filter: blur(4px);
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    visibility: visible;
    animation: detailFadeIn 0.3s ease-out;
}
.panel__name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: .01em;
}
.panel__desc {
    font-size: 16px;
    line-height: 1.5;
    margin: 5px 0 8px 0;
    color: rgba(255,255,255,.85);
    white-space: pre-wrap;
}
.panel__price {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-weight: 500;
}
.panel__price-currency {
    opacity: .9;
    font-size: 12px;
}
.panel__price-value {
    margin-left: auto;
    font-size: 18px;
}
/* ダーク以外の背景にも合う薄い枠（任意） */
.food-panel { outline: 1px solid rgba(255,255,255,.08); }