:root {
    color-scheme: dark;
    --bg-dark: #0d0d0f;
    --bg-card: #1a1a1e;
    --bg-elevated: #222228;
    --primary: #d4a017;
    --primary-bright: #f0c040;
    --primary-grad: linear-gradient(135deg, #f0c040, #c8860a);
    --text-main: #f5f5f5;
    --text-sub: #9a9aa3;
    --text-muted: #6b6b75;
    --danger: #e74c3c;
    --success: #2ecc71;
    --border: #2e2e36;
    --sale: #ff5252;
    --topbar-bg: linear-gradient(to bottom, rgba(13, 13, 15, 0.98), rgba(13, 13, 15, 0.85));
    --nav-bg: rgba(13, 13, 15, 0.96);
    --setting-row-bg: rgba(255, 255, 255, 0.03);
    --toast-bg: rgba(28, 28, 34, 0.96);
    --toast-fg: #fff;
    --notice-fg: #f0c040;
    --offline-fg: #ffb4a8;
    --timesale-chip: #ffb199;
    --nameplate-bg: #2a2420;
    --nameplate-mark: rgba(243, 230, 212, 0.5);
    --connect-scan-bg: #30303a;
    --connect-scan-border: #4a4a56;
    --connect-image-bg: #2b3a4a;
    --connect-image-border: #3b5268;
    --connect-stop-bg: #5a2a2a;
    --connect-stop-border: #7a3a3a;
    --connect-manual-bg: #202830;
    --connect-manual-border: #364b5a;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: calc(130px + var(--safe-area-bottom));
}

.screen { display: none; animation: fadeIn 0.25s ease-out; }
.screen.active { display: block; }

/* /Shop/{slug}/ 閲覧時 — JS 初期化前に接続画面を出さない */
html.mo-shop-public-boot #screenConnect {
    display: none !important;
}

html.mo-shop-public-boot #screenMenu {
    display: block;
}

html.mo-shop-public-boot .bottom-nav,
html.mo-shop-public-boot .order-bar {
    display: none !important;
}

html.mo-fixed-qr-entry-boot .app-container {
    display: none !important;
}

#moFixedQrEntryRoot {
    display: none;
    min-height: 100vh;
}

html.mo-fixed-qr-entry-boot #moFixedQrEntryRoot {
    display: block;
}

html.mo-guest-connected .bottom-nav {
    display: flex !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(14px, var(--safe-area-top)) 16px 8px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--topbar-bg);
    backdrop-filter: blur(8px);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--primary-bright);
    font-size: 20px;
    cursor: pointer;
    border-radius: 10px;
}

.guest-settings-drawer {
    position: fixed;
    inset: 0;
    z-index: 120;
    pointer-events: none;
    visibility: hidden;
}

.guest-settings-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.guest-settings-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
    border: none;
    padding: 0;
    cursor: pointer;
}

.guest-settings-drawer.is-open .guest-settings-backdrop {
    opacity: 1;
}

.guest-settings-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 320px);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.guest-settings-drawer.is-open .guest-settings-panel {
    transform: translateX(0);
}

.guest-settings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: max(16px, var(--safe-area-top)) 16px 12px;
    border-bottom: 1px solid var(--border);
}

.guest-settings-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.guest-settings-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-sub);
    font-size: 22px;
    cursor: pointer;
}

.guest-settings-body {
    padding: 12px 16px;
    overflow-y: auto;
}

.guest-setting-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--setting-row-bg);
    color: var(--text-main);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.guest-setting-row + .guest-setting-row {
    margin-top: 10px;
}

.guest-setting-row.is-disabled {
    opacity: 0.42;
    filter: grayscale(1);
    cursor: default;
}

.guest-setting-row-label {
    font-weight: 600;
}

.guest-setting-row-value {
    color: var(--text-sub);
    font-size: 14px;
    white-space: nowrap;
}

.guest-lang-picker,
.guest-allergy-picker {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.guest-allergy-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: min(52vh, 420px);
    overflow-y: auto;
}

.guest-lang-picker[hidden],
.guest-allergy-picker[hidden],
.guest-allergy-hint[hidden] {
    display: none !important;
}

.guest-allergy-hint {
    margin: 10px 2px 0;
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.45;
}

.guest-lang-option {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.guest-lang-option.is-selected {
    border-color: var(--primary);
    color: var(--primary-bright);
    background: rgba(212, 160, 23, 0.12);
}

.guest-allergy-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.guest-allergy-option.is-selected {
    border-color: var(--primary);
    background: rgba(212, 160, 23, 0.12);
}

.guest-allergy-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.guest-allergy-emoji {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
}

.guest-allergy-label {
    min-width: 0;
    line-height: 1.25;
}

.shop-name {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-bright);
    margin: 0;
    letter-spacing: 0.04em;
    text-align: center;
    flex: 1;
}

.shop-name-wrap {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.shop-name-wrap .shop-name {
    flex: none;
}

.shop-seat {
    margin: 2px 0 0;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--text-sub);
}

.top-notice-bar {
    margin: 0 16px 12px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(212, 160, 23, 0.45);
    background: linear-gradient(135deg, rgba(240, 192, 64, 0.18), rgba(200, 134, 10, 0.1));
    color: var(--primary-bright);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
}

.top-notice-bar[hidden] { display: none; }

.search-wrap {
    padding: 0 16px 12px;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
}

.search-field input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 15px;
    outline: none;
}

.search-field span { color: var(--text-muted); font-size: 16px; }

.sale-banner-carousel {
    padding: 0 16px 14px;
}

.sale-banner-carousel[hidden] { display: none; }

.sbc-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    touch-action: pan-y;
}

.sbc-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.sbc-track.no-anim { transition: none; }

.sbc-slide {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 3 / 1;
    line-height: 0;
    position: relative;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.sbc-slide.is-tappable {
    cursor: pointer;
}

.sbc-slide.is-tappable:focus-visible {
    outline: 2px solid var(--accent, #3b82f6);
    outline-offset: 2px;
}

.sbc-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.sbc-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    min-height: 8px;
}

.sbc-dots:empty { display: none; }

.sbc-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
}

.sbc-dot.active {
    background: var(--primary-bright);
    transform: scale(1.25);
}

.category-scroll-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px 14px;
}

.category-scroll-wrap[hidden] { display: none !important; }

.category-scroll-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(212, 160, 23, 0.45);
    border-radius: 50%;
    background: rgba(212, 160, 23, 0.12);
    color: var(--primary-bright);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s ease, background 0.2s ease;
    padding: 0;
}

.category-scroll-btn:hover:not(.is-faded) {
    background: rgba(212, 160, 23, 0.28);
}

.category-scroll-btn.is-faded {
    opacity: 0.22;
    pointer-events: none;
    cursor: default;
}

.category-scroll {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px;
}

.category-scroll::-webkit-scrollbar { display: none; }

.chip {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(212, 160, 23, 0.45);
    background: transparent;
    color: var(--text-main);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.chip.active {
    background: var(--primary-grad);
    border-color: transparent;
    color: #1a1200;
    font-weight: 700;
}

.menu-body { padding: 0 16px 16px; }

.featured-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 18px;
    min-height: 200px;
    background: var(--bg-card);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.featured-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.15) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
}

.featured-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--primary-bright);
    margin-bottom: 4px;
}

.featured-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
}

.featured-sub {
    font-size: 12px;
    color: var(--text-sub);
    margin: 0 0 8px;
}

.featured-desc {
    font-size: 12px;
    color: #ccc;
    margin: 0 0 10px;
    line-height: 1.45;
}

.featured-price-wrap {
    margin-top: 4px;
}

.menu-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}

.menu-price-list {
    margin: 0;
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 600;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: #e53935;
    opacity: 0.88;
    line-height: 1.2;
}

.menu-price-row--sale .menu-price-sale {
    margin: 0;
    color: var(--sale);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.01em;
}

.featured-price-wrap .menu-price-row {
    gap: 8px;
}

.featured-price-wrap .menu-price-list {
    font-size: 15px;
    color: #b8c0c8;
}

.featured-price-wrap .menu-price-row--sale .menu-price-sale {
    font-size: 26px;
    color: var(--sale);
}

.featured-price-wrap .menu-price {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-bright);
}

.menu-row--time-sale {
    box-shadow: inset 0 0 0 1px rgba(255, 107, 53, 0.35);
}

.menu-row-price-wrap .menu-price-row {
    gap: 8px;
}

.menu-row-price-wrap .menu-price-list {
    font-size: 13px;
}

.menu-row-price-wrap .menu-price-row--sale .menu-price-sale {
    font-size: 20px;
    color: var(--sale);
}

.menu-row-price-wrap .menu-price {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-bright);
}

.chip.chip--time-sale {
    border-color: rgba(255, 107, 53, 0.55);
    color: var(--timesale-chip);
}

.chip.chip--time-sale.active {
    background: linear-gradient(135deg, #ff6b35, #ff4757);
    color: #fff;
    border-color: transparent;
}

.featured-card + .featured-card {
    margin-top: 14px;
}

.pinned-section-title,
.category-grid-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-sub);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}

.category-grid[hidden] { display: none !important; }

.guest-top-stack {
    display: flex;
    flex-direction: column;
}

.menu-recommend-list {
    display: flex;
    flex-direction: column;
    margin: 0 0 18px;
}

.menu-recommend-list:empty,
.menu-recommend-list[hidden] { display: none !important; }

.menu-recommend-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    min-width: 0;
    -webkit-touch-callout: none;
}

.menu-recommend-row:last-child {
    border-bottom: 0;
}

.menu-recommend-thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
    background: var(--bg-card);
    pointer-events: none;
}

.menu-recommend-info {
    flex: 1;
    min-width: 0;
}

.menu-recommend-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
}

.menu-recommend-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-recommend-push {
    flex: 0 0 auto;
    padding: 1px 8px;
    border: 1px solid var(--primary-bright);
    border-radius: 999px;
    color: var(--primary-bright);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.menu-recommend-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-bright);
}

.menu-recommend-price .menu-price-row--sale .menu-price-sale,
.menu-recommend-price .menu-price {
    color: var(--primary-bright);
    font-size: 15px;
    font-weight: 800;
}

.menu-recommend-price .menu-price-list {
    font-size: 12px;
}

.menu-recommend-chevron {
    flex: 0 0 auto;
    color: var(--primary-bright);
    font-size: 20px;
    line-height: 1;
}

.menu-recommend-row.sold-out {
    opacity: 0.58;
}

.guest-top-heading {
    margin: 4px 0 12px;
    padding: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.35;
    color: var(--text);
}

.guest-top-spotlight {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    color: inherit;
    cursor: pointer;
    text-align: left;
    -webkit-touch-callout: none;
}

.guest-top-spotlight.sold-out {
    opacity: 0.58;
}

.guest-top-spotlight-media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--bg-card);
    pointer-events: none;
}

.guest-top-spotlight-body {
    padding: 12px 14px 14px;
}

.guest-top-spotlight-caption {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-sub);
}

.guest-top-spotlight-name {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.guest-top-spotlight-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-bright);
}

.guest-top-spotlight-price .menu-price-row--sale .menu-price-sale,
.guest-top-spotlight-price .menu-price {
    color: var(--primary-bright);
    font-size: 16px;
    font-weight: 800;
}

.category-tile {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    cursor: pointer;
    min-height: 108px;
    aspect-ratio: 4 / 3;
    -webkit-touch-callout: none;
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.category-tile-label {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px 10px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
}

.featured-card.pinned-card {
    display: flex;
    min-height: 0;
    margin-bottom: 10px;
    height: 88px;
}

.featured-card.pinned-card img {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
}

.featured-card.pinned-card .featured-overlay {
    position: relative;
    inset: auto;
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    justify-content: center;
}

.featured-card.pinned-card .featured-title {
    font-size: 16px;
}

.featured-card.pinned-card .featured-desc,
.featured-card.pinned-card .featured-sub {
    display: none;
}

.featured-card.pinned-card .btn-add {
    right: 12px;
    bottom: 12px;
}

.menu-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 12px;
    position: relative;
    width: 100%;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.menu-row:not(.sold-out) {
    cursor: pointer;
}

.menu-row:not(.sold-out):active {
    opacity: 0.92;
}

.featured-card:not(.sold-out) {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#menuList {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#menuList .masterorder-ad-container {
    width: 100%;
    margin: 8px 0 16px;
    text-align: center;
}

#menuList .masterorder-ad-container iframe,
#menuList .masterorder-ad-container ins,
#menuList .masterorder-ad-container > div {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

#menuList .masterorder-menu-inline-ad {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
}

#menuList .masterorder-menu-inline-ad .admax-ads {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

#menuList .masterorder-menu-inline-ad--banner {
    min-height: 50px;
}

#menuList .masterorder-menu-inline-ad--banner .admax-ads {
    width: 728px;
    max-width: 100%;
    height: 90px;
}

#menuList .masterorder-menu-inline-ad--inline-10 {
    min-height: 90px;
}

@media (max-width: 727px) {
    #menuList .masterorder-menu-inline-ad--banner {
        display: flex;
        justify-content: center;
        min-height: calc(90px * min(1, (100vw - 32px) / 728));
    }

    #menuList .masterorder-menu-inline-ad--banner .admax-ads {
        transform: scale(min(1, (100vw - 32px) / 728));
        transform-origin: top center;
    }
}

#menuFooterAd {
    width: 100%;
    text-align: center;
    margin: 16px 0;
}

#menuFooterAd iframe,
#menuFooterAd ins,
#menuFooterAd > div {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

.menu-row.sold-out { opacity: 0.55; }

.menu-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.menu-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.menu-row--text {
    background:
        linear-gradient(90deg, rgba(243, 230, 212, 0.08), transparent 28%),
        var(--bg-card);
}

.guest-top-spotlight.featured-card--text .guest-top-spotlight-media.menu-nameplate {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background:
        radial-gradient(circle at 30% 20%, rgba(243, 230, 212, 0.16), transparent 46%),
        var(--nameplate-bg);
}

.guest-top-spotlight.featured-card--text .menu-nameplate-mark {
    font-size: 72px;
    color: var(--nameplate-mark);
}

/* 長押し「画像を保存」を抑止。タップは親カード／スライドが受ける */
.sbc-slide::after,
.menu-thumb-wrap::after,
.mo-shop-menu-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.mo-shop-menu-banner {
    position: relative;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.mo-shop-menu-banner img {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.sold-out-pill--inline {
    position: static;
    transform: none;
    display: inline-block;
    margin: 0 0 4px;
}

.featured-card--plain {
    min-height: 0;
}

.featured-card--plain .featured-overlay {
    position: static;
    background: none;
}

.sold-out-pill {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.menu-row-info { flex: 1; min-width: 0; }

.menu-row-name {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 2px;
}

.menu-row-en {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 4px;
}

.menu-row-desc {
    font-size: 11px;
    color: var(--text-sub);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-row-action {
    text-align: right;
    flex-shrink: 0;
}

.menu-row-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-bright);
    margin-bottom: 8px;
}

.btn-add {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--primary-grad);
    color: #1a1200;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.btn-add:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

.order-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(68px + var(--safe-area-bottom));
    max-width: 448px;
    margin: 0 auto;
    background: var(--primary-grad);
    border-radius: 16px;
    padding: 14px 18px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    z-index: 90;
    cursor: pointer;
}

.order-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #1a1200;
    font-size: 14px;
}

.order-bar-center {
    font-weight: 700;
    color: #1a1200;
    font-size: 14px;
}

.order-bar-total {
    font-weight: 800;
    color: #1a1200;
    font-size: 16px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + var(--safe-area-bottom));
    background: var(--nav-bg);
    border-top: 1px solid var(--border);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding-bottom: var(--safe-area-bottom);
    z-index: 100;
}

.nav-item {
    flex: 1;
    text-align: center;
    color: var(--text-muted);
    font-size: 10px;
    text-decoration: none;
    cursor: pointer;
    padding: 6px 0;
}

.nav-item.active { color: var(--primary-bright); }

.nav-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 2px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    padding: 16px 16px 0;
    color: var(--primary-bright);
}

.panel { padding: 0 16px 16px; }

.auth-card {
    margin: 24px 16px;
    background: var(--bg-card);
    border-radius: 18px;
    padding: 24px;
    border: 1px solid var(--border);
}

.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    color: var(--text-sub);
    font-size: 13px;
    margin-bottom: 6px;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 16px;
}

.btn-primary, .btn-secondary, .btn-connect {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
}

.btn-primary {
    background: var(--primary-grad);
    color: #1a1200;
}

/* 暗い塗りつぶしの接続操作。金色ボタン用の #1a1200 を載せると文字が消える */
.btn-primary.btn-dark {
    color: var(--text-main);
}

.btn-connect-scan,
.btn-connect-image,
.btn-connect-stop,
.btn-connect-manual {
    margin-top: 10px;
}

.btn-connect-image {
    display: block;
    text-align: center;
    border-style: solid;
}

.btn-connect-scan {
    background: var(--connect-scan-bg);
    border: 1px solid var(--connect-scan-border);
}

.btn-connect-image {
    background: var(--connect-image-bg);
    border: 1px solid var(--connect-image-border);
}

.btn-connect-stop {
    background: var(--connect-stop-bg);
    border: 1px solid var(--connect-stop-border);
}

.btn-connect-manual {
    background: var(--connect-manual-bg);
    border: 1px solid var(--connect-manual-border);
}

.guest-theme-setting {
    margin-top: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--setting-row-bg);
}

.guest-theme-setting + .guest-setting-row {
    margin-top: 10px;
}

.guest-theme-setting .theme-switch {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.theme-switch button {
    flex: 1;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-dark);
    color: var(--text-main);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

html[data-theme="dark"] .theme-switch button[data-guest-theme="dark"],
html[data-theme="light"] .theme-switch button[data-guest-theme="light"] {
    border-color: var(--primary);
    color: var(--primary-bright);
    background: rgba(212, 160, 23, 0.12);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-bright);
}

.btn-secondary:disabled,
.btn-primary:disabled {
    opacity: 0.5;
    cursor: default;
}

.btn-connect {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-bright);
    margin-top: 8px;
}

.history-staff-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.history-staff-actions .btn-primary,
.history-staff-actions .btn-secondary {
    flex: 1 1 140px;
    width: auto;
    min-width: 140px;
}

.list-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 10px;
}

.order-history-card {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 10px;
    border: 0;
    border-radius: 14px;
    background: var(--bg-card);
    overflow: hidden;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.order-history-card:disabled {
    cursor: default;
}

.order-history-card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    font-size: 14px;
}

.order-history-card-lines {
    flex: 1;
    min-width: 0;
}

.order-history-card-time {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 4px;
}

.order-history-card-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.45;
    word-break: break-word;
}

.order-history-line {
    display: block;
}

.order-history-card-total {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--primary-bright);
}

.order-history-card.is-cancelled {
    opacity: 0.55;
    filter: grayscale(0.35);
}

.order-history-card.is-cancelled .order-history-card-total {
    color: var(--text-sub);
    text-decoration: line-through;
}

.order-history-card-cancelled {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-sub);
}

.order-history-line.is-cancelled,
.order-history-detail-line.is-cancelled {
    opacity: 0.55;
    text-decoration: line-through;
    color: var(--text-sub);
}

.order-history-line.is-partially-cancelled,
.order-history-detail-line.is-partially-cancelled {
    color: var(--text-main);
}

.order-history-line-qty-change,
.order-history-detail-qty-change {
    display: inline;
    margin-left: 0.4em;
    font-weight: 700;
    color: var(--primary-bright);
    text-decoration: none;
}

.order-history-line.is-cancelled .order-history-line-qty-change,
.order-history-detail-line.is-cancelled .order-history-detail-qty-change {
    text-decoration: none;
}

.order-history-detail-meta {
    margin-bottom: 14px;
}

.order-history-detail-time {
    font-size: 13px;
    color: var(--text-sub);
}

.order-history-detail-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.order-history-detail-line-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 15px;
    font-weight: 700;
}

.order-history-detail-line-price {
    flex-shrink: 0;
    color: var(--primary-bright);
}

.order-history-detail-toppings {
    margin-top: 6px;
    padding-left: 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: var(--text-sub);
}

.order-history-detail-customs-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-sub);
    margin-bottom: 2px;
}

.order-history-detail-topping.is-empty {
    font-style: italic;
    opacity: 0.8;
}

.order-history-detail-total {
    font-size: 16px;
    font-weight: 800;
    text-align: right;
    margin-bottom: 12px;
    color: var(--primary-bright);
}

.order-history-sending-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(2px);
    z-index: 2;
}

.order-history-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: order-history-spin 0.8s linear infinite;
}

.order-history-sending-label {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

@keyframes order-history-spin {
    to { transform: rotate(360deg); }
}

.session-share-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
}

.session-share-lead {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-sub);
}

.session-share-qr-wrap {
    display: inline-block;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    margin: 0 auto 12px;
}

.session-share-qr-wrap canvas,
.session-share-qr-wrap img {
    display: block;
}

.session-share-caption {
    margin: 0;
    font-size: 13px;
    color: var(--text-sub);
}

.session-share-url {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-main);
    word-break: break-all;
    text-align: left;
    user-select: all;
}

.session-share-copy-btn {
    margin-top: 12px;
}

.session-share-note {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
}

.qty-wrap { display: flex; align-items: center; gap: 12px; }

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
}

.status-msg {
    text-align: center;
    font-size: 14px;
    margin: 10px 16px;
    white-space: pre-line;
}

.checkout-split-panel {
    margin: 12px 16px 4px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elevated, rgba(255, 255, 255, 0.04));
    text-align: center;
}

.checkout-split-total {
    margin: 0;
    font-size: 15px;
    color: var(--text-sub, #9aa0a6);
}

.checkout-split-per-person {
    margin: 8px 0 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.error { color: var(--danger); }
.success { color: var(--success); }

.toast-container {
    position: fixed;
    left: 50%;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(92vw, 420px);
    pointer-events: none;
}

.toast {
    background: var(--toast-bg);
    color: var(--toast-fg);
    border: 1px solid rgba(240, 192, 64, 0.45);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    animation: toast-in 0.22s ease-out, toast-out 0.28s ease-in 2.6s forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.hours-order-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(240, 192, 64, 0.12);
    border: 1px solid rgba(240, 192, 64, 0.4);
    color: var(--notice-fg);
    font-size: 13px;
    line-height: 1.45;
}

.connect-preview-banner {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.35);
    color: var(--success);
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

.connect-preview-banner[hidden] {
    display: none !important;
}

.view-only-connect-bar {
    margin: 20px 0 8px;
    padding: 0 0 8px;
}

.connect-fail-recovery {
    margin: 10px 0;
    text-align: center;
}

.connect-fail-recovery__error {
    font-size: 14px;
    margin: 0 0 12px;
}

.connect-fail-recovery__countdown {
    font-size: 14px;
    color: var(--text-sub);
    margin: 0 0 14px;
}

.connect-fail-recovery__btn {
    display: inline-block;
    min-width: 180px;
}

.connect-fail-recovery__btn:disabled {
    opacity: 0.65;
    cursor: default;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}

.modal.show { display: flex; }

.modal-desc {
    margin-top: 6px;
    color: var(--text-sub);
    font-size: 13px;
    line-height: 1.45;
}

#toppingModal.is-view-only .qty-row {
    display: none;
}

.modal-card {
    width: min(480px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: var(--bg-card);
    border-radius: 22px 22px 0 0;
    padding: 20px 18px calc(24px + var(--safe-area-bottom));
    border-top: 1px solid var(--border);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
}

.modal-price {
    margin: 0 0 8px;
}

.modal-price .menu-price-list {
    font-size: 14px;
    color: var(--text-sub);
}

.modal-price .menu-price-row--sale .menu-price-sale {
    font-size: 28px;
    color: var(--sale);
}

.modal-price .menu-price {
    margin: 0;
    font-size: 18px;
    color: var(--primary-bright);
    font-weight: 700;
}

.modal-close {
    border: none;
    background: var(--bg-elevated);
    color: var(--text-sub);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

.modal-section-title {
    font-size: 13px;
    color: var(--text-sub);
    margin: 16px 0 10px;
}

.topping-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
}

.topping-option.selected {
    border-color: var(--primary-bright);
    background: rgba(212, 160, 23, 0.08);
}

.topping-option.is-disabled {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
}

.topping-option.is-disabled input { pointer-events: none; }

.topping-option input { accent-color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }

.topping-option-name { flex: 1; font-size: 14px; font-weight: 500; }
.topping-option-desc { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.topping-option-price { font-size: 13px; color: var(--primary-bright); font-weight: 700; flex-shrink: 0; }

.topping-group {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    background: var(--bg-elevated);
}

.topping-group-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.topping-group-hint {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 10px;
}

.qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-elevated);
    border-radius: 14px;
    padding: 10px 14px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 16px;
}

.qty-control button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
}

.qty-control span {
    font-size: 18px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.modal-add-btn {
    width: 100%;
    margin-top: 18px;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: var(--primary-grad);
    color: #1a1200;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.offline-banner {
    margin: 12px 16px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.35);
    color: var(--offline-fg);
    font-size: 13px;
}

.offline-banner[hidden] { display: none !important; }

.empty-msg {
    text-align: center;
    color: var(--text-sub);
    padding: 32px 16px;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg-dark: #f6f3ec;
    --bg-card: #fffcf8;
    --bg-elevated: #ffffff;
    --primary: #8d6808;
    --primary-bright: #7a5806;
    --primary-grad: linear-gradient(135deg, #f0c14b, #d4a017);
    --text-main: #1c1915;
    --text-sub: #5c564c;
    --text-muted: #7a7368;
    --danger: #c0392b;
    --success: #1e8f4a;
    --border: #e4dccf;
    --sale: #d32f2f;
    --topbar-bg: linear-gradient(to bottom, rgba(246, 243, 236, 0.98), rgba(246, 243, 236, 0.9));
    --nav-bg: rgba(255, 252, 248, 0.96);
    --setting-row-bg: #ffffff;
    --toast-bg: #fffcf8;
    --toast-fg: #1c1915;
    --notice-fg: #7a5806;
    --offline-fg: #a32015;
    --timesale-chip: #c2410c;
    --nameplate-bg: #f3eadc;
    --nameplate-mark: rgba(90, 70, 40, 0.45);
    --connect-scan-bg: #efeae2;
    --connect-scan-border: #d9d0c4;
    --connect-image-bg: #e7eef3;
    --connect-image-border: #c5d4e0;
    --connect-stop-bg: #f8e4e2;
    --connect-stop-border: #e4b8b4;
    --connect-manual-bg: #efeae2;
    --connect-manual-border: #d9d0c4;
}

html[data-theme="light"] .btn-add:disabled {
    background: #d9d3c8;
    color: #8a8378;
}

html[data-theme="light"] .toast {
    border-color: rgba(141, 104, 8, 0.35);
}
