body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: transparent;
    margin: 0;
    overflow: hidden;
}

/* チャットボタンのスタイル */
#chat-bubble {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 55px;
    height: 55px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

#chat-bubble:hover {
    transform: scale(1.05);
}

#chat-bubble span {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

/* チャットウィンドウのスタイル */
#chat-window {
    position: fixed;
    bottom: 85px;
    right: 15px;
    width: 380px;
    max-width: calc(100vw - 24px);
    transition: width 0.2s ease, height 0.2s ease;
    height: 500px;
    display: none;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid #eee;
}

#chat-window.panel-open {
    width: 720px;
    max-width: calc(100vw - 24px);
}

.chat-example {
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

/* 追加分3/7 */
.chat-layout {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    position: relative;
}

/* 既存チャット領域はそのまま伸縮 */
.chat-container {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* パネル本体（PCでは右ペイン） */
.panel {
    width: 320px;
    height: 100%;
    background: #ffffff;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* hidden時は完全に非表示 */
.panel.hidden {
    display: none;
}

/* PCで閉じたときは完全非表示ではなく、右に少しだけ残す */
@media (min-width: 769px) {
    .panel.panel-collapsed-desktop {
        width: 44px;
        min-width: 44px;
        overflow: hidden;
        border-left: 1px solid #eee;
        cursor: pointer;
    }

    .panel.panel-collapsed-desktop .panel-sheet-handle::before {
        content: "◀";
        font-size: 13px;
        color: #64748b;
        display: flex;
        height: 100%;
        /* 親要素（ハンドル）と同じ高さにする */
        align-items: center;
        /* 垂直方向の真ん中 */

    }

    .panel.panel-collapsed-desktop .panel-body {
        display: none;
    }

    .panel.panel-collapsed-desktop .panel-header {
        padding: 14px 6px;
        justify-content: center;
    }

    .panel.panel-collapsed-desktop .panel-title {
        display: none;
    }

    .panel.panel-collapsed-desktop .panel-close-btn {
        display: none;
    }

    .panel.panel-collapsed-desktop .panel-sheet-handle {
        display: flex;
        height: 100%;
        min-height: 72px;
        padding: 0;
    }

    .panel.panel-collapsed-desktop .panel-sheet-bar {
        width: 5px;
        height: 44px;
    }
}

.panel-header {
    position: relative;
    z-index: 4;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.panel-close-btn {
    position: relative;
    z-index: 5;
    pointer-events: auto;
    touch-action: manipulation;
    background: transparent;
    color: #666;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.panel-close-btn:disabled {
    background: transparent;
    color: #999;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #fff;
}

.panel-placeholder {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
}

.panel-sheet-handle {
    display: none;
}


.chat-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* メッセージエリア */
#messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9f9f9;
}

.message {
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user {
    align-self: flex-end;
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.ai {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* タイピングアニメーションのスタイル */
.typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px !important;
}

.typing span {
    width: 7px;
    height: 7px;
    background: currentColor;
    border-radius: 50%;
    animation: typingPulse 1.8s ease-in-out infinite both;
}

.typing span:nth-child(2) {
    animation-delay: 0.28s;
}

.typing span:nth-child(3) {
    animation-delay: 0.56s;
}

@keyframes typingPulse {
    0%,
    100% {
        opacity: 0.28;
        transform: translateY(0) scale(0.85);
    }

    45% {
        opacity: 1;
        transform: translateY(-2px) scale(1);
    }
}

.error {
    align-self: center;
    background: #fee2e2;
    color: #dc2626;
    font-size: 12px;
    border-radius: 8px;
}

/* 入力エリア */
.input-area {
    background: white;
    border-top: 1px solid #eee;
    padding: 15px;
    display: flex;
    gap: 8px;
}

input {
    flex: 1;
    border: 1px solid #a3c8f1;
    padding: 10px 12px;
    border-radius: 20px;
    outline: none;
    font-size: 16px;
}

input:focus {
    border-color: #007bff;
}

#sendBtn {
    background: #007bff;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
}

.chat-window-close {
    flex-shrink: 0;
}

#sendBtn:disabled {
    background: #ccc;
}

button:disabled {
    background: #ccc;
}

/* 追記2026/3/7 */
.panel-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}

.panel-meta {
    font-size: 12px;
    color: #777;
    padding: 8px 10px;
    background: #f7f7f7;
    border-radius: 8px;
}

.panel-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.panel-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-label {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.panel-required {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #d14;
    background: #fff1f3;
    border-radius: 999px;
    padding: 2px 6px;
    vertical-align: middle;
}

.panel-input,
.panel-textarea,
.panel-select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.5;
    background: #fff;
}

.panel-input:focus,
.panel-textarea:focus,
.panel-select:focus {
    outline: none;
    border-color: #999;
}

.panel-textarea {
    min-height: 96px;
    resize: vertical;
}

/* 送信ボタン */
.panel-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-actions-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #666;
}

.panel-submit-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: #222;
    color: #fff;
}

.panel-submit-btn:hover {
    opacity: 0.92;
}

/* エラー見た目 */
.panel-field-error .panel-input,
.panel-field-error .panel-textarea,
.panel-field-error .panel-select {
    border-color: #d14;
    background: #fff8f8;
}

.panel-field-error-text {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #d14;
}

/* 候補UIの見た目 */
.panel-choice-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 6px;
}

.panel-choice-title {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.panel-choice-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.panel-choice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.panel-choice-label {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    min-width: 0;
    word-break: break-word;
}

.panel-choice-item:has(.panel-choice-radio:checked) {
    border-color: #222;
    background: #f7f7f7;
}

.panel-choice-radio {
    margin: 0;
}

.panel-choice-label {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.panel.dragging {
    transition: none;
    user-select: none;
}

.panel-sheet-handle {
    touch-action: none;
}

/* -----------------------------
   send_link / handoff 用カード
----------------------------- */
.action-card-wrap {
    max-width: 92%;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.action-card {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.action-card-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    padding-top: 2px;
}

.action-card-content {
    flex: 1;
    min-width: 0;
}

.action-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
}

.action-card-note {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

.action-card-contact {
    margin-bottom: 8px;
}

.action-card-contact-label {
    font-size: 12px;
    color: #777;
    margin-bottom: 2px;
}

.action-card-contact-value {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    word-break: break-word;
}

.action-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #222;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: opacity 0.2s ease;
}

.action-card-button:hover {
    opacity: 0.92;
}

.back-to-main-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.back-to-main-button {
    width: 100%;
    border: none;
    cursor: pointer;
}

.input-area {
    position: relative;
    z-index: 2;
}

.chat-window-header {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
    min-height: 52px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.chat-window-close {
    position: relative;
    z-index: 11;
    flex-shrink: 0;
    background: transparent;
    color: #007bff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.chat-window-title {
    font-size: 16px;
    font-weight: 700;
    color: #67a9ef;
}

.chat-window-close {
    background: transparent;
    color: #007bff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.chat-window-close:hover {
    background: #f5f5f5;
}

@media (max-width: 768px) {
    .action-card {
        padding: 12px;
    }

    .action-card-button {
        width: 100%;
        box-sizing: border-box;
    }
}

/* スマホでは下シート化 */
@media (max-width: 768px) {
    #chat-window {
        width: min(100vw - 16px, 420px);
        height: min(80vh, 640px);
        right: 8px;
        bottom: 8px;
    }

    #chat-window.panel-open {
        width: min(100vw - 16px, 420px);
    }

    #chat-window.panel-peek .input-area {
        margin-bottom: 72px;
    }

    #chat-window.panel-peek #messages {
        padding-bottom: 12px;
    }

    .chat-layout {
        display: block;
    }

    .panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 45%;
        border-left: none;
        border-top: 1px solid #eee;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
        z-index: 2;
    }

    .panel-header {
        touch-action: none;
    }

    .panel-sheet-handle {
        position: relative;
        z-index: 3;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 0 6px;
        cursor: pointer;
        user-select: none;
    }

    .panel-sheet-bar {
        display: block;
        width: 44px;
        height: 5px;
        border-radius: 999px;
        background: #d0d0d0;
    }

    /* スマホ下シートのサイズ3段階 */
    .panel.sheet-small {
        height: 22%;
    }

    .panel.sheet-medium {
        height: 55%;
    }

    .panel.sheet-large {
        height: 90%;
    }

    .panel.sheet-peek {
        height: 64px;
    }

    .panel.sheet-small {
        height: 22%;
    }

    .panel.sheet-medium {
        height: 55%;
    }

    .panel.sheet-large {
        height: 90%;
    }


}

/* -----------------------------
   独立受付ページ
----------------------------- */
* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    overflow: auto;
    background: #f4f7f6;
    color: #172026;
}

.reception-page {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 24px;
    padding: 28px;
    align-items: start;
}

.reception-hero {
    min-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 28px;
}

.reception-status {
    width: fit-content;
    padding: 7px 12px;
    border: 1px solid #b6ded0;
    border-radius: 999px;
    background: #e7f6ef;
    color: #136144;
    font-size: 13px;
    font-weight: 700;
}

.reception-hero h1 {
    margin: 0;
    font-size: 38px;
    line-height: 1.18;
    color: #14211d;
    letter-spacing: 0;
}

.reception-lead {
    max-width: 440px;
    margin: 0;
    color: #4b5d58;
    font-size: 16px;
    line-height: 1.8;
}

.intent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(100%, 480px);
}

.intent-button {
    min-height: 54px;
    border: 1px solid #d5dfdc;
    border-radius: 8px;
    padding: 12px 14px;
    background: #ffffff;
    color: #172026;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    line-height: 1.35;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.intent-button:hover {
    border-color: #b96518;
    box-shadow: 0 6px 18px rgba(168, 85, 10, 0.14);
    transform: translateY(-1px);
}

.intent-primary {
    grid-column: 1 / -1;
}

.intent-button.is-selected {
    background: #a8550a;
    color: #ffffff;
    border-color: #a8550a;
    box-shadow: 0 10px 24px rgba(168, 85, 10, 0.18);
}

.intent-button:disabled {
    cursor: wait;
    opacity: 0.62;
}

#chat-bubble {
    display: none;
}

#chat-window,
#chat-window.panel-open {
    position: relative;
    inset: auto;
    display: flex;
    width: 100%;
    max-width: none;
    height: calc(100vh - 56px);
    min-height: 620px;
    border-radius: 8px;
    box-shadow: 0 16px 50px rgba(20, 33, 29, 0.14);
    border: 1px solid #dce5e2;
}

.chat-window-close {
    display: none;
}

.chat-window-header {
    border-bottom-color: #dce5e2;
}

.chat-window-title {
    color: #332016;
}

#messages {
    background: #f8faf9;
}

.message {
    border-radius: 14px;
}

.user {
    background: #a8550a;
}

.ai {
    box-shadow: 0 1px 2px rgba(112, 83, 58, 0.1);
}

#sendBtn {
    background: #a8550a;
}

input:focus {
    border-color: #b96518;
}

.panel {
    border-left-color: #dce5e2;
}

.panel-submit-btn,
.action-card-button {
    background: #a8550a;
}

/* -----------------------------
   メニューカード
----------------------------- */
.menu-card-wrap {
    max-width: 100%;
    width: 100%;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.menu-panel {
    width: 100%;
    padding: 14px;
    border: 1px solid #dce5e2;
    border-radius: 8px;
    background: #ffffff;
}

.menu-panel-heading {
    margin: 0 0 6px;
    color: #172026;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 800;
}

.menu-panel-note {
    margin: 0 0 12px;
    color: #5e6f69;
    font-size: 13px;
    line-height: 1.6;
}

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

.menu-item-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e1e8e6;
    border-radius: 8px;
    background: #ffffff;
}

.menu-item-image {
    aspect-ratio: 4 / 3;
    min-height: 92px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #edf2ef;
    color: #75837e;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.menu-image-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 18px);
    height: calc(100% - 18px);
    min-height: 64px;
    border: 1px dashed rgba(117, 131, 126, 0.45);
    border-radius: 10px;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.menu-item-name {
    margin: 0 0 4px;
    color: #172026;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 800;
    word-break: break-word;
}

.menu-item-price {
    margin: 0 0 6px;
    color: #a8550a;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 800;
}

.menu-item-description {
    margin: 0;
    color: #5a6864;
    font-size: 12px;
    line-height: 1.55;
    word-break: break-word;
}

.menu-category-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.menu-category-button {
    min-height: 40px;
    border: 1px solid #cfdad6;
    border-radius: 8px;
    padding: 9px 12px;
    background: #ffffff;
    color: #172026;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.menu-category-button.is-active {
    border-color: #a8550a;
    background: #a8550a;
    color: #ffffff;
}

.menu-category-button:hover {
    border-color: #a8550a;
}

@media (max-width: 900px) {
    .reception-page {
        display: block;
        padding: 16px;
    }

    .reception-hero {
        min-height: auto;
        padding: 16px 4px 18px;
    }

    .reception-hero h1 {
        font-size: 28px;
    }

    .intent-grid {
        width: 100%;
    }

    #chat-window,
    #chat-window.panel-open {
        width: 100%;
        height: min(72vh, 680px);
        min-height: 520px;
        right: auto;
        bottom: auto;
    }
}

@media (max-width: 520px) {
    .reception-page {
        padding: 12px;
    }

    .reception-lead {
        font-size: 15px;
    }

    .intent-grid {
        gap: 8px;
    }

    .intent-button {
        min-height: 50px;
        padding: 11px 12px;
        font-size: 14px;
    }

    .menu-panel {
        padding: 12px;
    }

    .menu-grid {
        gap: 8px;
    }

    .menu-item-body {
        padding: 9px;
    }
}

/* -----------------------------
   受付ページ v2: チャットではなくページ内カード
----------------------------- */
body {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 248, 246, 0.98)),
        #f5f8f6;
}

.reception-page {
    display: flex;
    flex-direction: column;
    width: min(100%, 520px);
    min-height: 100vh;
    margin: 0 auto;
    gap: 14px;
    padding: 18px 14px 20px;
}

.reception-hero {
    min-height: auto;
    padding: 14px 4px 4px;
    gap: 12px;
}

.reception-status {
    border-radius: 999px;
}

.reception-hero h1 {
    font-size: 30px;
}

.reception-lead {
    max-width: none;
    font-size: 14px;
    line-height: 1.75;
}

.intent-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.intent-button {
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(20, 33, 29, 0.06);
}

.intent-primary {
    grid-column: auto;
}

#chat-window,
#chat-window.panel-open {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    border: none;
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(30, 46, 40, 0.12);
    background: #ffffff;
    overflow: hidden;
}

.chat-window-header {
    position: static;
    min-height: auto;
    padding: 16px 16px 10px;
    border-bottom: none;
    background: #ffffff;
}

.chat-window-title {
    color: #182620;
    font-size: 17px;
}

.reception-main-caption {
    margin: 4px 0 0;
    color: #74817d;
    font-size: 12px;
    line-height: 1.5;
}

.chat-layout {
    display: block;
}

.chat-container {
    height: auto;
    min-height: 0;
}

#messages {
    min-height: 180px;
    max-height: clamp(420px, 62vh, 680px);
    padding: 12px 16px 16px;
    gap: 10px;
    background: #ffffff;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

#messages.reception-main-muted {
    display: none;
}

.reception-empty-state {
    padding: 18px;
    border: 1px solid #e5ebe8;
    border-radius: 14px;
    background: #f8fbf9;
}

.reception-empty-badge {
    width: fit-content;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e7f6ef;
    color: #136144;
    font-size: 12px;
    font-weight: 800;
}

.reception-empty-state h2 {
    margin: 0 0 8px;
    color: #172026;
    font-size: 20px;
    line-height: 1.4;
}

.reception-empty-state p {
    margin: 0;
    color: #66736f;
    font-size: 13px;
    line-height: 1.7;
}

.message {
    max-width: 100%;
    border-radius: 14px;
}

.message.ai {
    align-self: stretch;
    background: #fff8ef;
    box-shadow: none;
}

.message.user {
    align-self: flex-end;
    width: fit-content;
    max-width: min(72%, 360px);
    margin-left: auto;
    background: #a8550a;
    color: #ffffff;
    border-bottom-right-radius: 4px;
    font-weight: 700;
    text-align: left;
}

.message.ai.typing {
    align-self: flex-start;
    width: fit-content;
    max-width: min(82%, 420px);
    background: #fff8ef;
    color: #7a4210;
    font-weight: 700;
}

.typing {
    width: fit-content;
}

@media (max-width: 768px) {
    .panel {
        position: relative !important;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        height: auto !important;
        max-height: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff;
    }
}

.panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    max-height: none;
    border-left: none;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
}

.panel.hidden {
    display: none;
}

.panel-sheet-handle {
    display: none !important;
}

.panel-header {
    padding: 0 16px 8px;
    border-bottom: none;
    background: #ffffff;
}

.panel-title {
    color: #172026;
    font-size: 18px;
}

.panel-close-btn {
    display: none;
}

.panel-body {
    padding: 0 16px 16px;
    overflow: visible;
    background: #ffffff;
}

.panel-content {
    gap: 14px;
}

.panel-description {
    padding: 12px;
    border: 1px solid #e5ebe8;
    border-radius: 12px;
    background: #f8fbf9;
    color: #5d6b66;
    font-size: 13px;
}

.panel-choice-group {
    margin: 0;
    gap: 10px;
}

.panel-choice-title {
    color: #172026;
    font-size: 14px;
}

.panel-choice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.panel-choice-item {
    min-height: 46px;
    justify-content: center;
    border-radius: 12px;
    border-color: #dfe7e4;
    box-shadow: 0 3px 12px rgba(20, 33, 29, 0.04);
}

.panel-choice-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.panel-choice-label {
    text-align: center;
    font-weight: 800;
}

.panel-choice-item:has(.panel-choice-radio:checked) {
    border-color: #a8550a;
    background: #a8550a;
}

.panel-choice-item:has(.panel-choice-radio:checked) .panel-choice-label {
    color: #ffffff;
}

.reservation-confirm-card {
    padding: 14px;
    border: 1px solid #e2e8e5;
    border-radius: 14px;
    background: #fffaf4;
}

.reservation-confirm-title {
    margin-bottom: 10px;
    color: #172026;
    font-size: 14px;
    font-weight: 800;
}

.reservation-confirm-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.reservation-confirm-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.reservation-confirm-list dt {
    color: #7b6a59;
    font-size: 12px;
}

.reservation-confirm-list dd {
    margin: 0;
    color: #172026;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.reservation-confirm-note {
    margin: 10px 0 0;
    color: #76685b;
    font-size: 12px;
    line-height: 1.6;
}

.panel-form {
    margin-top: 0;
    padding-top: 2px;
}

.panel-input,
.panel-textarea,
.panel-select {
    border-radius: 10px;
    border-color: #dfe7e4;
    background: #fcfdfc;
}

.panel-actions {
    margin-top: 2px;
}

.panel-submit-btn {
    min-height: 46px;
    border-radius: 12px;
    background: #a8550a;
}

.panel-submit-btn:disabled {
    background: #d9ddd9;
    color: #77827d;
    cursor: not-allowed;
}

.menu-panel {
    border-radius: 14px;
    background: #ffffff;
}

.aux-chat {
    padding: 12px;
    border: 1px solid #e4ebe8;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(30, 46, 40, 0.08);
}

.aux-chat-label {
    margin: 0 0 8px;
    color: #60706a;
    font-size: 12px;
    font-weight: 800;
}

.input-area {
    padding: 0;
    border-top: none;
    background: transparent;
}

.input-area input {
    min-width: 0;
    border-color: #dfe7e4;
    background: #ffffff;
}

#sendBtn {
    background: #a8550a;
}

@media (min-width: 760px) {
    .reception-page {
        width: min(100%, 720px);
    }

    .intent-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .intent-button {
        min-height: 62px;
    }
}

/* -----------------------------
   飲食店スマホLP / HP 風レイアウト
----------------------------- */
body {
    background: #fffaf4;
}

.restaurant-page {
    width: min(100%, 480px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 14px 24px;
    color: #1f1712;
}

.restaurant-hero {
    position: relative;
    margin: 0 -14px;
    padding-bottom: 18px;
    background: #fffaf4;
    color: #1f1712;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(97, 72, 50, 0.13);
}

.hero-visual {
    position: relative;
    min-height: 360px;
    background:
        linear-gradient(180deg, rgba(8, 5, 3, 0.06) 0%, rgba(8, 5, 3, 0.2) 42%, rgba(8, 5, 3, 0.68) 100%),
        url("assets/restaurant-hero.png") center top / cover no-repeat;
}

.hero-pr {
    position: absolute;
    left: 22px;
    right: 22px;
    top: 50%;
    color: #ffffff;
    transform: translateY(-50%);
}

.hero-pr-title {
    font-size: 29px;
    font-weight: 800;
    line-height: 1.32;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.44);
}

.hero-pr-text {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
}

.hero-content {
    padding: 18px 18px 6px;
}

.hero-topline {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(31, 23, 18, 0.22);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fff3e6 100%);
    box-shadow: 0 8px 18px rgba(74, 43, 20, 0.12);
    flex: 0 0 auto;
    margin-top: 3px;
}

.brand-mark::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 50%;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #9a4f09;
    transform: translateX(-50%);
}

.brand-mark::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 24px;
    height: 15px;
    border-radius: 14px 14px 8px 8px;
    background: #9a4f09;
    transform: translateX(-50%);
}

.hero-speech {
    position: relative;
    flex: 1;
    min-width: 0;
    padding: 13px 15px 14px;
    border: 1px solid #eadfd5;
    border-radius: 16px 16px 16px 6px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(74, 43, 20, 0.1);
}

.hero-speech::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 18px;
    width: 12px;
    height: 12px;
    border-left: 1px solid #eadfd5;
    border-bottom: 1px solid #eadfd5;
    background: #ffffff;
    transform: rotate(45deg);
}

.restaurant-hero .reception-status {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
    border-color: #ead9c7;
    background: #fff4e7;
    color: #8c4b14;
}

.restaurant-hero h1 {
    margin: 0;
    color: #201814;
    font-size: 22px;
    line-height: 1.35;
    text-shadow: none;
}

.restaurant-hero .reception-lead {
    margin: 8px 0 0;
    color: #6f6157;
    font-size: 14px;
    line-height: 1.7;
    text-shadow: none;
}

.restaurant-hero .intent-area {
    margin: 16px 16px 0;
}

.restaurant-hero .intent-label {
    margin: 0 0 8px;
    color: #7c6d61;
    font-size: 12px;
    font-weight: 800;
}

.restaurant-hero .intent-grid {
    width: auto;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.restaurant-hero .intent-button {
    min-height: 46px;
    border-color: #eee2d7;
    border-radius: 15px 15px 15px 6px;
    padding: 11px 13px;
    background: #ffffff;
    color: #332016;
    box-shadow: 0 8px 18px rgba(112, 83, 58, 0.08);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
}

.restaurant-hero .intent-button.is-selected {
    background: #a8550a;
    border-color: #a8550a;
    color: #ffffff;
}

.reception-workspace,
.aux-chat {
    margin-top: 18px;
}

#chat-window,
#chat-window.panel-open {
    display: none;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

#chat-window.is-active,
#chat-window.is-active.panel-open {
    display: flex;
}

.restaurant-hero #chat-window {
    margin: 18px 16px 0;
    width: auto;
    color: #211711;
}

.chat-window-header {
    background: transparent;
    padding: 0 0 8px;
}

.chat-window-title {
    color: #796c61;
    font-size: 12px;
    letter-spacing: 0;
}

.reception-main-caption {
    color: #796c61;
}

#messages {
    min-height: 160px;
    max-height: clamp(420px, 62vh, 680px);
    padding: 0 2px 2px 0;
    background: transparent;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.reception-empty-state {
    border-color: #eadfd5;
    background: #fff8ef;
}

.reception-empty-badge {
    background: #f5e6d7;
    color: #9a4f09;
}

.panel {
    background: transparent;
}

.panel-header,
.panel-body {
    background: transparent;
}

.restaurant-hero .panel-title {
    color: #211711;
    font-size: 20px;
}

.restaurant-hero .panel-description {
    border-color: #eadfd5;
    background: #fff8ef;
    color: #715f51;
}

.restaurant-hero .panel-choice-title {
    color: #211711;
    font-size: 15px;
}

.reservation-calendar {
    display: grid;
    gap: 14px;
}

.reservation-calendar-month {
    display: none;
    padding: 12px;
    border: 1px solid #eadfd5;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(74, 43, 20, 0.06);
}

.reservation-calendar-month.is-active {
    display: block;
}

.reservation-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reservation-calendar-title {
    color: #211711;
    font-size: 14px;
    font-weight: 800;
}

.reservation-calendar-nav {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: #fff3e6;
    color: #8a4f19;
    cursor: pointer;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.reservation-calendar-nav:disabled {
    opacity: 0.28;
    cursor: default;
}

.reservation-calendar-weekdays,
.reservation-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.reservation-calendar-weekdays {
    margin-bottom: 6px;
    color: #9a8a7d;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.reservation-calendar-cell {
    position: relative;
    min-height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 999px;
    color: #332016;
    font-size: 13px;
    font-weight: 800;
}

.reservation-calendar-cell-available {
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.reservation-calendar-cell-available:hover {
    background: #fff3e6;
    transform: translateY(-1px);
}

.reservation-calendar-cell-available:has(.reservation-calendar-radio:checked) {
    background: #a8550a;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(168, 85, 10, 0.2);
}

.reservation-calendar-cell-disabled {
    color: #c7b9ac;
}

.reservation-calendar-cell-empty {
    pointer-events: none;
}

.reservation-calendar-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.reservation-calendar-sub {
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}

.panel-choice-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reservation-date-card {
    min-height: 66px;
}

.reservation-date-main,
.reservation-date-sub {
    display: block;
}

.reservation-date-main {
    font-size: 14px;
}

.reservation-date-sub {
    margin-top: 3px;
    color: #8a7766;
    font-size: 11px;
}

.panel-choice-item:has(.panel-choice-radio:checked) .reservation-date-sub {
    color: rgba(255, 255, 255, 0.78);
}

.reservation-time-card {
    min-height: 44px;
}

.reservation-confirm-card {
    border-color: #ead4bd;
    background: #fff7ee;
}

.panel-submit-btn,
#sendBtn {
    background: #a8550a;
}

.aux-chat {
    border-color: #eadfd5;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(74, 43, 20, 0.08);
}

.aux-chat-label {
    color: #7c6d61;
}

.input-area input {
    border-color: #eadfd5;
}

.menu-panel {
    border-color: #eadfd5;
}

.menu-item-card {
    border-color: #eadfd5;
}

.menu-item-image {
    background: #f1e9df;
    color: #937761;
}

@media (max-width: 390px) {
    .panel-choice-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ページになじませた受付表示 */
.restaurant-hero #chat-window,
.restaurant-hero #chat-window.panel-open,
.restaurant-hero #chat-window.is-active,
.restaurant-hero #chat-window.is-active.panel-open {
    border: 0 !important;
    border-top: 1px solid #eadfd5 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fffdf9 !important;
    overflow: hidden !important;
}

.restaurant-hero .chat-window-header {
    display: flex;
    min-height: 0;
    padding: 12px 14px 8px;
    border-top: 0;
    background: #fffdf9;
}

.restaurant-hero .chat-window-title {
    color: #5f4c3f;
    font-size: 12px;
    font-weight: 800;
}

.restaurant-hero .chat-window-close {
    display: none;
}

.restaurant-hero #messages {
    min-height: 0;
    max-height: clamp(360px, 58vh, 620px);
    padding: 0 14px 14px;
    background: #fffdf9 !important;
}

.restaurant-hero .message.ai {
    border: 1px solid #f0dfce;
    background: #ffffff;
    color: #241812;
    font-weight: 600;
}

.restaurant-hero .message.user {
    position: relative;
    max-width: min(78%, 360px);
    border-radius: 18px 18px 4px 18px;
    padding: 11px 14px;
    background: #9a4f09;
    box-shadow: 0 6px 14px rgba(112, 63, 22, 0.14);
    font-weight: 800;
}
