/** プライマリーボタン */
.btn-primary {
    align-items: center;
    background-color: #1a5e32;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    color: white;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 500;
    gap: 0.5rem;
    justify-content: center;
    line-height: 1.5;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.btn-primary:hover {
    background-color: #14532d;
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.btn-primary:active {
    background-color: #0f5429;
}

.btn-primary:disabled {
    background-color: #9ca3af;
    color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

/** プライマリーボタン - 小さいサイズ */
.btn-primary.text-sm {
    font-size: 0.875rem;
}

.btn-primary.text-sm svg,
.btn-primary.text-sm i {
    width: 0.875rem;
    height: 0.875rem;
    font-size: 0.875rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary.text-sm i {
    line-height: 1;
}

/** セカンダリーボタン */
.btn-secondary {
    align-items: center;
    background-color: #f3f4f6;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    color: #374151;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 500;
    gap: 0.5rem;
    justify-content: center;
    line-height: 1.5;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-secondary:focus {
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.btn-secondary:active {
    background-color: #d1d5db;
}

.btn-secondary:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/** セカンダリーボタン - 小さいサイズ */
.btn-secondary.text-sm {
    font-size: 0.875rem;
}

.btn-secondary.text-sm svg,
.btn-secondary.text-sm i {
    width: 0.875rem;
    height: 0.875rem;
    font-size: 0.875rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary.text-sm i {
    line-height: 1;
}

/** ライトボタン */
.btn-light {
    align-items: center;
    background-color: #ffffff;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    color: #1f2937;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 500;
    gap: 0.5rem;
    justify-content: center;
    line-height: 1.5;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.btn-light:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.btn-light:focus {
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.btn-light:active {
    background-color: #f3f4f6;
}

.btn-light:disabled {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-light.border-none {
    border: none !important;
}

.btn-light.border-none:hover {
    border: none !important;
}

/** ホワイトボタン */
.btn-white {
    align-items: center;
    background-color: #ffffff;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    color: #1f2937;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 500;
    gap: 0.5rem;
    justify-content: center;
    line-height: 1.5;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.btn-white:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.btn-white:focus {
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.btn-white:active {
    background-color: #f3f4f6;
}

.btn-white:disabled {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/** 警告ボタン */
.btn-warning {
    align-items: center;
    background-color: #f59e0b;
    border-radius: 0.375rem;
    border: 1px solid #f59e0b;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 500;
    gap: 0.5rem;
    justify-content: center;
    line-height: 1.5;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
}

.btn-warning:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.btn-warning:active {
    background-color: #b45309;
}

.btn-warning:disabled {
    background-color: #b45309;
    border-color: #f59e0b;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.6;
}

/** 危険ボタン */
.btn-danger {
    align-items: center;
    background-color: #dc2626;
    border-radius: 0.375rem;
    border: 1px solid #dc2626;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 500;
    gap: 0.5rem;
    justify-content: center;
    line-height: 1.5;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #9ca3af;
}

.btn-danger:focus {
    box-shadow: 0 0 0 3px rgba(255, 111, 111, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.btn-danger:active {
    background-color: #991b1b;
}

.btn-danger:disabled {
    background-color: #991b1b;
    border-color: #dc2626;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.6;
}

/** アクションボタン */
.btn-action {
    align-items: center;
    background-color: #ffffff;
    border-radius: 0.375rem;
    border: 1px solid #1a5e32;
    color: #1f2937;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 0.5rem;
    justify-content: center;
    line-height: 1.25rem;
    padding: 0.25rem 0.5rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.btn-action svg,
.btn-action i {
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action i {
    line-height: 1;
}

.btn-action:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.btn-action:focus {
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.btn-action:active {
    background-color: #f3f4f6;
}

.btn-action:disabled {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}
.dropdown {
    display: inline-block;
    position: relative;
}

.dropdown-content {
    background-color: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    display: none;
    min-width: 160px;
    overflow: hidden;
    padding-bottom: 8px;
    padding-top: 8px;
    position: absolute;
    right: 0;
    z-index: 1000;
}

.submission-export-menu {
    max-height: 300px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dropdown.show .dropdown-content {
    display: block;
}

.dropdown-item {
    align-items: center;
    color: #374151;
    display: flex;
    font-size: 0.875rem;
    gap: 12px;
    padding: 8px 16px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.dropdown-divider {
    background-color: #e5e7eb;
    height: 1px;
    margin: 4px 0;
}
/** チェックボックス */
.checkbox,
.checkbox-sm {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    background-color: #ffffff;
    background-origin: border-box;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 0.5rem;
    padding: 0;
    transition: all 0.15s ease-in-out;
}

.checkbox {
    height: 1rem;
    width: 1rem;
}

.checkbox-sm {
    height: 0.875rem;
    width: 0.875rem;
}

.checkbox:hover,
.checkbox-sm:hover {
    border-color: #9ca3af;
}

.checkbox:focus,
.checkbox-sm:focus {
    background-color: #ffffff;
    border-color: #166534;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.checkbox:checked,
.checkbox-sm:checked {
    background-color: #166534;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    border-color: #166534;
}

.checkbox:checked:hover,
.checkbox-sm:checked:hover {
    background-color: #0f5429;
    border-color: #0f5429;
}

.checkbox:checked:focus,
.checkbox-sm:checked:focus {
    background-color: #166534;
    border-color: #166534;
}

.checkbox:indeterminate,
.checkbox-sm:indeterminate {
    background-color: #166534;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M3 7h10a1 1 0 010 2H3a1 1 0 010-2z'/%3e%3c/svg%3e");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 70% 70%;
    border-color: #166534;
}

.checkbox:indeterminate:hover,
.checkbox-sm:indeterminate:hover {
    background-color: #0f5429;
    border-color: #0f5429;
}

.checkbox:indeterminate:focus,
.checkbox-sm:indeterminate:focus {
    background-color: #166534;
    border-color: #166534;
}

.checkbox:disabled,
.checkbox-sm:disabled {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.5;
}

.checkbox:disabled:checked,
.checkbox-sm:disabled:checked {
    background-color: #9ca3af;
}

/** ラジオボタン */
.radio,
.radio-sm {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    background-color: #ffffff;
    background-origin: border-box;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 0.5rem;
    padding: 0;
    transition: all 0.15s ease-in-out;
}

.radio {
    height: 1rem;
    width: 1rem;
}

.radio-sm {
    height: 0.875rem;
    width: 0.875rem;
}

.radio:hover,
.radio-sm:hover {
    border-color: #9ca3af;
}

.radio:focus,
.radio-sm:focus {
    background-color: #ffffff;
    border-color: #166534;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.radio:checked,
.radio-sm:checked {
    background-color: #ffffff;
    border-color: #166534;
}

.radio:checked {
    border-width: 5px;
}

.radio-sm:checked {
    border-width: 4px;
}

.radio:checked:hover,
.radio-sm:checked:hover {
    border-color: #0f5429;
}

.radio:checked:focus,
.radio-sm:checked:focus {
    background-color: #ffffff;
    border-color: #166534;
}

.radio:disabled,
.radio-sm:disabled {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.5;
}

.radio:disabled:checked,
.radio-sm:disabled:checked {
    border-color: #9ca3af;
}

/** フォームラベル */
.form-label {
    align-items: center;
    color: #374151;
    display: flex;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    /* 長い区分名・フォーム名等を含むラベルが横にはみ出さないよう折り返す（anywhereはmin-content幅を縮めるためflex内でも効く） */
    overflow-wrap: anywhere;
}

/** 横並びレイアウト */
.form-horizontal {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.form-horizontal .form-label-wrapper {
    width: 280px;
    flex-shrink: 0;
}

.form-horizontal .form-label {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.form-horizontal .form-input-wrapper {
    flex: 1;
    min-width: 0;
}

/** 長い文字列によるモバイルはみ出し防止（説明文・ヘルプ・選択肢・確認値を折り返す）
    overflow-wrap は継承プロパティのため、ラッパーに当てると配下のp/span/divのテキストへ波及する */
.form-horizontal .form-label-wrapper,
.form-horizontal .form-input-wrapper {
    overflow-wrap: anywhere;
}

/** モバイル時は縦並びレイアウトに戻す */
@media (max-width: 768px) {
    .form-horizontal {
        display: block;
    }

    .form-horizontal .form-label-wrapper {
        width: auto;
    }

    .form-horizontal .form-label {
        margin-bottom: 0.5rem;
    }

    .form-horizontal .form-input-wrapper {
        flex: none;
    }
}

/** 必須マーク */
.badge-required {
    align-items: center;
    background-color: #ffffff;
    border-radius: 0.25rem;
    border: 1px solid #dc2626;
    color: #dc2626;
    display: inline-flex;
    font-size: 0.625rem;
    font-weight: 700;
    justify-content: center;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    /* ラベル側の overflow-wrap: anywhere を継承してバッジ内の文字が縦に割れるのを防ぐ
       （長いラベルではバッジごと次の行へ折り返す） */
    white-space: nowrap;
}

/** 任意マーク */
.badge-optional {
    align-items: center;
    background-color: #ffffff;
    border-radius: 0.25rem;
    border: 1px solid #6b7280;
    color: #6b7280;
    display: inline-flex;
    font-size: 0.625rem;
    font-weight: 700;
    justify-content: center;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    /* ラベル側の overflow-wrap: anywhere を継承してバッジ内の文字が縦に割れるのを防ぐ */
    white-space: nowrap;
}

/** テキストボックス */
.custom-text,
.custom-password,
.custom-datetime {
    background-color: #ffffff;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    color: #111827;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.5rem 0.75rem;
    transition: all 0.15s ease-in-out;
    width: 100%;
}

.custom-text::placeholder,
.custom-password::placeholder,
.custom-datetime::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.custom-text:hover,
.custom-password:hover,
.custom-datetime:hover {
    border-color: #9ca3af;
}

.custom-text:focus,
.custom-password:focus,
.custom-datetime:focus {
    border-color: #166534;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.custom-text:disabled,
.custom-password:disabled,
.custom-datetime:disabled {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}

.custom-text:disabled::placeholder,
.custom-password:disabled::placeholder,
.custom-datetime:disabled::placeholder {
    color: #9ca3af;
}

/* readonly は値を読ませる状態のため、:disabled と違い opacity は下げない */
.custom-text[readonly] {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
}

.custom-text[readonly]::placeholder {
    color: #9ca3af;
}

.custom-text[readonly]:hover {
    border-color: #d1d5db;
}

/* readonly はフォーカス可能なため、リングは消さずグレー系で控えめに残す */
.custom-text[readonly]:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.3);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

/** テキストエリア（縦のみリサイズ可。横リサイズで記憶される幅のばらつきを防ぐため幅は100%固定） */
.custom-text.resize-vertical {
    resize: vertical;
    width: 100%;
}

/** エラー状態 */
.custom-text.error,
.custom-password.error,
.custom-datetime.error,
.custom-number.error,
.custom-select.error,
.custom-text.resize-vertical.error {
    border-color: #dc2626;
}

.custom-text.error:focus,
.custom-password.error:focus,
.custom-datetime.error:focus,
.custom-number.error:focus,
.custom-select.error:focus,
.custom-text.resize-vertical.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

/** 数値入力ボックス */
.custom-number {
    background-color: #ffffff;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    color: #111827;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.5rem 0.75rem;
    transition: all 0.15s ease-in-out;
    width: 6rem;
    /* w-24相当 */
}

.custom-number::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.custom-number:hover {
    border-color: #9ca3af;
}

.custom-number:focus {
    border-color: #166534;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.custom-number:disabled {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}

.custom-number:disabled::placeholder {
    color: #9ca3af;
}

/* readonly は値を読ませる状態のため、:disabled と違い opacity は下げない */
.custom-number[readonly] {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
}

.custom-number[readonly]::placeholder {
    color: #9ca3af;
}

.custom-number[readonly]:hover {
    border-color: #d1d5db;
}

/* readonly はフォーカス可能なため、リングは消さずグレー系で控えめに残す */
.custom-number[readonly]:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.3);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.custom-number.error {
    border-color: #dc2626;
}

.custom-number.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

/** パスワード */
.custom-password {
    padding: 0.5rem 5rem 0.5rem 0.75rem;
}

/** 日時ピッカー */
.custom-datetime {
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
}

/** セレクトボックス（custom-textクラス使用時） */
select.custom-text {
    cursor: pointer;
}

/** プルダウン */
.custom-select {
    appearance: none;
    width: auto;
    max-width: 100%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%233b82f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #111827;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.custom-select:hover {
    border-color: #9ca3af;
}

.custom-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

.custom-select:disabled {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}

/** TinyMCEエディタのエラー状態 */
.tox-tinymce.tinymce-error {
    border-color: #dc2626;
}

.tox-tinymce.tinymce-error .tox-edit-area::before {
    border-color: #dc2626;
}

/** 郵便番号検索ボタン */
.postal-code-search-btn {
    background-color: #ffffff;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    color: #111827;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.5rem 0.75rem;
    transition: all 0.15s ease-in-out;
    white-space: normal;
    word-break: keep-all;
    width: 6rem;
}

.postal-code-search-btn:hover {
    border-color: #9ca3af;
}

.postal-code-search-btn:focus {
    border-color: #166534;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.5);
    outline-offset: 2px;
    outline: 2px solid transparent;
}

/** フォーム見出しスタイル */
.form-heading {
    position: relative;
    margin: 1rem 0 0.75rem;
    padding: 0.75rem 0 0.75rem 1rem;
    background-color: #f3f4f6;
}

.form-heading h1,
.form-heading h2,
.form-heading h3,
.form-heading h4,
.form-heading h5 {
    margin: 0;
    color: #2c3e50;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.form-heading h1 {
    font-size: 1.5rem;
}

.form-heading h2 {
    font-size: 1.25rem;
}

.form-heading h3 {
    font-size: 1.125rem;
}

.form-heading h4 {
    font-size: 1rem;
}

.form-heading h5 {
    font-size: 0.875rem;
}

/* 最初の見出しの上マージンを調整 */
.form-heading:first-child {
    margin-top: 0;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .form-heading {
        margin: 0.75rem 0 0.5rem;
        padding: 0.5rem 0 0.5rem 0.875rem;
    }

    .form-heading h1 {
        font-size: 1.25rem;
    }

    .form-heading h2 {
        font-size: 1.125rem;
    }

    .form-heading h3 {
        font-size: 1rem;
    }

    .form-heading h4 {
        font-size: 0.875rem;
    }

    .form-heading h5 {
        font-size: 0.8125rem;
    }
}

/** 注文表: 数値列・ヘッダは折り返さず（auto-layout で最小幅が1文字に潰れるのを防ぐ）、
    商品名セルだけ任意位置で折り返す。長い商品名で列がはみ出すのも防ぐ。 */
.order-table-wrapper th,
.order-table-wrapper td {
    white-space: nowrap;
}
.order-table-wrapper .order-product-name {
    white-space: normal;
    overflow-wrap: anywhere;
}

/** 注文表モバイル: 4列を狭幅に収めるため、個数/小計の固定幅(!w-32=128px)を縮め、
    セル余白と数量inputを圧縮して商品名の表示幅を確保する（PC幅は変更しない）。
    auto ではなく固定幅にすることで、数量入力で小計の桁が増えても列幅が変わらず
    （＝商品名が再レイアウトで揺れない）、想定金額が収まる幅を最小幅として確保する。 */
@media (max-width: 768px) {
    .order-table-wrapper .order-col-qty {
        width: 4.25rem !important;
    }
    .order-table-wrapper .order-col-amount {
        width: 5rem !important;
    }
    .order-table-wrapper th,
    .order-table-wrapper td {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }
    .order-table-wrapper .order-quantity-input {
        width: 3.5rem;
    }
}

/**
 * ボタンローディングスタイル
 * 
 * ローディングアイコンのアニメーションを定義します。
 * Tailwind CSSのanimate-spinクラスを使用しますが、
 * カスタムアニメーションも追加で定義可能です。
 */

/* Tailwind CSSのanimate-spinが利用できない場合のフォールバック */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ローディングアイコンのアニメーション */
.animate-spin {
    animation: spin 1s linear infinite;
}

/* ローディング状態のボタンのスタイル調整（必要に応じて） */
button[aria-busy="true"] {
    pointer-events: none;
}



/**
 * Swiper 12.1.3
 * Most modern mobile touch slider and framework with hardware accelerated transitions
 * https://swiperjs.com
 *
 * Copyright 2014-2026 Vladimir Kharlampidi
 *
 * Released under the MIT License
 *
 * Released on: March 24, 2026
 */

:root {
  --swiper-theme-color: #007aff;
  /*
  --swiper-preloader-color: var(--swiper-theme-color);
  --swiper-wrapper-transition-timing-function: initial;
  */
}
:host {
  position: relative;
  display: block;
  margin-left: auto;
  margin-right: auto;
  z-index: 1;
}
.swiper {
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
  list-style: none;
  padding: 0;
  /* Fix of Webkit flickering */
  z-index: 1;
  display: block;
}
.swiper-vertical > .swiper-wrapper {
  flex-direction: column;
}
.swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  transition-property: transform;
  transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
  box-sizing: content-box;
}
.swiper-android .swiper-slide,
.swiper-ios .swiper-slide,
.swiper-wrapper {
  transform: translate3d(0px, 0, 0);
}
.swiper-horizontal {
  touch-action: pan-y;
}
.swiper-vertical {
  touch-action: pan-x;
}
.swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  position: relative;
  transition-property: transform;
  display: block;
}
.swiper-slide-invisible-blank {
  visibility: hidden;
}
/* Auto Height */
.swiper-autoheight,
.swiper-autoheight .swiper-slide {
  height: auto;
}
.swiper-autoheight .swiper-wrapper {
  align-items: flex-start;
  transition-property: transform, height;
}
.swiper-backface-hidden .swiper-slide {
  transform: translateZ(0);
  backface-visibility: hidden;
}
/* 3D Effects */
.swiper-3d.swiper-css-mode .swiper-wrapper {
  perspective: 1200px;
}
.swiper-3d .swiper-wrapper {
  transform-style: preserve-3d;
}
.swiper-3d {
  perspective: 1200px;
  .swiper-slide,
  .swiper-cube-shadow {
    transform-style: preserve-3d;
  }
}

/* CSS Mode */
.swiper-css-mode {
  > .swiper-wrapper {
    overflow: auto;
    scrollbar-width: none; /* For Firefox */
    -ms-overflow-style: none; /* For Internet Explorer and Edge */
    &::-webkit-scrollbar {
      display: none;
    }
  }
  > .swiper-wrapper > .swiper-slide {
    scroll-snap-align: start start;
  }
  &.swiper-horizontal {
    > .swiper-wrapper {
      scroll-snap-type: x mandatory;
    }
    > .swiper-wrapper > .swiper-slide:first-child {
      margin-inline-start: var(--swiper-slides-offset-before);
      scroll-margin-inline-start: var(--swiper-slides-offset-before);
    }
    > .swiper-wrapper > .swiper-slide:last-child {
      margin-inline-end: var(--swiper-slides-offset-after);
    }
  }
  &.swiper-vertical {
    > .swiper-wrapper {
      scroll-snap-type: y mandatory;
    }
    > .swiper-wrapper > .swiper-slide:first-child {
      margin-block-start: var(--swiper-slides-offset-before);
      scroll-margin-block-start: var(--swiper-slides-offset-before);
    }
    > .swiper-wrapper > .swiper-slide:last-child {
      margin-block-end: var(--swiper-slides-offset-after);
    }
  }
  &.swiper-free-mode {
    > .swiper-wrapper {
      scroll-snap-type: none;
    }
    > .swiper-wrapper > .swiper-slide {
      scroll-snap-align: none;
    }
  }
  &.swiper-centered {
    > .swiper-wrapper::before {
      content: '';
      flex-shrink: 0;
      order: 9999;
    }
    > .swiper-wrapper > .swiper-slide {
      scroll-snap-align: center center;
      scroll-snap-stop: always;
    }
  }
  &.swiper-centered.swiper-horizontal {
    > .swiper-wrapper > .swiper-slide:first-child {
      margin-inline-start: var(--swiper-centered-offset-before);
    }
    > .swiper-wrapper::before {
      height: 100%;
      min-height: 1px;
      width: var(--swiper-centered-offset-after);
    }
  }
  &.swiper-centered.swiper-vertical {
    > .swiper-wrapper > .swiper-slide:first-child {
      margin-block-start: var(--swiper-centered-offset-before);
    }
    > .swiper-wrapper::before {
      width: 100%;
      min-width: 1px;
      height: var(--swiper-centered-offset-after);
    }
  }
}

/* Slide styles start */
/* 3D Shadows */
.swiper-3d {
  .swiper-slide-shadow,
  .swiper-slide-shadow-left,
  .swiper-slide-shadow-right,
  .swiper-slide-shadow-top,
  .swiper-slide-shadow-bottom,
  .swiper-slide-shadow,
  .swiper-slide-shadow-left,
  .swiper-slide-shadow-right,
  .swiper-slide-shadow-top,
  .swiper-slide-shadow-bottom {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
  }
  .swiper-slide-shadow {
    background: rgba(0, 0, 0, 0.15);
  }
  .swiper-slide-shadow-left {
    background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  }
  .swiper-slide-shadow-right {
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  }
  .swiper-slide-shadow-top {
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  }
  .swiper-slide-shadow-bottom {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  }
}
.swiper-lazy-preloader {
  width: 42px;
  height: 42px;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -21px;
  margin-top: -21px;
  z-index: 10;
  transform-origin: 50%;
  box-sizing: border-box;
  border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));
  border-radius: 50%;
  border-top-color: transparent;
}
.swiper:not(.swiper-watch-progress),
.swiper-watch-progress .swiper-slide-visible {
  .swiper-lazy-preloader {
    animation: swiper-preloader-spin 1s infinite linear;
  }
}
.swiper-lazy-preloader-white {
  --swiper-preloader-color: #fff;
}
.swiper-lazy-preloader-black {
  --swiper-preloader-color: #000;
}
@keyframes swiper-preloader-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* Slide styles end */

:root {
  --swiper-navigation-size: 44px;
  /*
  --swiper-navigation-top-offset: 50%;
  --swiper-navigation-sides-offset: 4px;
  --swiper-navigation-color: var(--swiper-theme-color);
  */
}
.swiper-button-prev,
.swiper-button-next {
  position: absolute;

  width: var(--swiper-navigation-size);
  height: var(--swiper-navigation-size);

  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--swiper-navigation-color, var(--swiper-theme-color));
  &.swiper-button-disabled {
    opacity: 0.35;
    cursor: auto;
    pointer-events: none;
  }
  &.swiper-button-hidden {
    opacity: 0;
    cursor: auto;
    pointer-events: none;
  }
  .swiper-navigation-disabled & {
    display: none !important;
  }

  ::slotted(svg),
  svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center;
    fill: currentColor;
    pointer-events: none;
  }
}

.swiper-button-lock {
  display: none;
}

.swiper-button-prev,
.swiper-button-next {
  top: var(--swiper-navigation-top-offset, 50%);
  margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
}
.swiper-button-prev {
  left: var(--swiper-navigation-sides-offset, 4px);
  right: auto;
  ::slotted(.swiper-navigation-icon),
  .swiper-navigation-icon {
    transform: rotate(180deg);
  }
}
.swiper-button-next {
  right: var(--swiper-navigation-sides-offset, 4px);
  left: auto;
}
.swiper-horizontal {
  .swiper-button-prev,
  .swiper-button-next,
  ~ .swiper-button-prev,
  ~ .swiper-button-next {
    top: var(--swiper-navigation-top-offset, 50%);
    margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
    margin-left: 0;
  }
  .swiper-button-prev,
  & ~ .swiper-button-prev,
  &.swiper-rtl .swiper-button-next,
  &.swiper-rtl ~ .swiper-button-next {
    left: var(--swiper-navigation-sides-offset, 4px);
    right: auto;
  }
  .swiper-button-next,
  & ~ .swiper-button-next,
  &.swiper-rtl .swiper-button-prev,
  &.swiper-rtl ~ .swiper-button-prev {
    right: var(--swiper-navigation-sides-offset, 4px);
    left: auto;
  }
  .swiper-button-prev,
  & ~ .swiper-button-prev,
  &.swiper-rtl .swiper-button-next,
  &.swiper-rtl ~ .swiper-button-next {
    ::slotted(.swiper-navigation-icon),
    .swiper-navigation-icon {
      transform: rotate(180deg);
    }
  }
  &.swiper-rtl .swiper-button-prev,
  &.swiper-rtl ~ .swiper-button-prev {
    ::slotted(.swiper-navigation-icon),
    .swiper-navigation-icon {
      transform: rotate(0deg);
    }
  }
}
.swiper-vertical {
  .swiper-button-prev,
  .swiper-button-next,
  ~ .swiper-button-prev,
  ~ .swiper-button-next {
    left: var(--swiper-navigation-top-offset, 50%);
    right: auto;
    margin-left: calc(0px - (var(--swiper-navigation-size) / 2));
    margin-top: 0;
  }
  .swiper-button-prev,
  ~ .swiper-button-prev {
    top: var(--swiper-navigation-sides-offset, 4px);
    bottom: auto;
    ::slotted(.swiper-navigation-icon),
    .swiper-navigation-icon {
      transform: rotate(-90deg);
    }
  }
  .swiper-button-next,
  ~ .swiper-button-next {
    bottom: var(--swiper-navigation-sides-offset, 4px);
    top: auto;
    ::slotted(.swiper-navigation-icon),
    .swiper-navigation-icon {
      transform: rotate(90deg);
    }
  }
}

:root {
  /*
  --swiper-pagination-color: var(--swiper-theme-color);
  --swiper-pagination-left: auto;
  --swiper-pagination-right: 8px;
  --swiper-pagination-bottom: 8px;
  --swiper-pagination-top: auto;
  --swiper-pagination-fraction-color: inherit;
  --swiper-pagination-progressbar-bg-color: rgba(0,0,0,0.25);
  --swiper-pagination-progressbar-size: 4px;
  --swiper-pagination-bullet-size: 8px;
  --swiper-pagination-bullet-width: 8px;
  --swiper-pagination-bullet-height: 8px;
  --swiper-pagination-bullet-border-radius: 50%;
  --swiper-pagination-bullet-inactive-color: #000;
  --swiper-pagination-bullet-inactive-opacity: 0.2;
  --swiper-pagination-bullet-opacity: 1;
  --swiper-pagination-bullet-horizontal-gap: 4px;
  --swiper-pagination-bullet-vertical-gap: 6px;
  */
}
.swiper-pagination {
  position: absolute;
  text-align: center;
  transition: 300ms opacity;
  transform: translate3d(0, 0, 0);
  z-index: 10;
  &.swiper-pagination-hidden {
    opacity: 0;
  }
  .swiper-pagination-disabled > &,
  &.swiper-pagination-disabled {
    display: none !important;
  }
}
/* Common Styles */
.swiper-pagination-fraction,
.swiper-pagination-custom,
.swiper-horizontal > .swiper-pagination-bullets,
.swiper-pagination-bullets.swiper-pagination-horizontal {
  bottom: var(--swiper-pagination-bottom, 8px);
  top: var(--swiper-pagination-top, auto);
  left: 0;
  width: 100%;
}
/* Bullets */
.swiper-pagination-bullets-dynamic {
  overflow: hidden;
  font-size: 0;
  .swiper-pagination-bullet {
    transform: scale(0.33);
    position: relative;
  }
  .swiper-pagination-bullet-active {
    transform: scale(1);
  }
  .swiper-pagination-bullet-active-main {
    transform: scale(1);
  }
  .swiper-pagination-bullet-active-prev {
    transform: scale(0.66);
  }
  .swiper-pagination-bullet-active-prev-prev {
    transform: scale(0.33);
  }
  .swiper-pagination-bullet-active-next {
    transform: scale(0.66);
  }
  .swiper-pagination-bullet-active-next-next {
    transform: scale(0.33);
  }
}
.swiper-pagination-bullet {
  width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));
  height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));
  display: inline-block;
  border-radius: var(--swiper-pagination-bullet-border-radius, 50%);
  background: var(--swiper-pagination-bullet-inactive-color, #000);
  opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2);
  button& {
    border: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
    appearance: none;
  }
  .swiper-pagination-clickable & {
    cursor: pointer;
  }

  &:only-child {
    display: none !important;
  }
}
.swiper-pagination-bullet-active {
  opacity: var(--swiper-pagination-bullet-opacity, 1);
  background: var(--swiper-pagination-color, var(--swiper-theme-color));
}

.swiper-vertical > .swiper-pagination-bullets,
.swiper-pagination-vertical.swiper-pagination-bullets {
  right: var(--swiper-pagination-right, 8px);
  left: var(--swiper-pagination-left, auto);
  top: 50%;
  transform: translate3d(0px, -50%, 0);
  .swiper-pagination-bullet {
    margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;
    display: block;
  }
  &.swiper-pagination-bullets-dynamic {
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    .swiper-pagination-bullet {
      display: inline-block;
      transition:
        200ms transform,
        200ms top;
    }
  }
}
.swiper-horizontal > .swiper-pagination-bullets,
.swiper-pagination-horizontal.swiper-pagination-bullets {
  .swiper-pagination-bullet {
    margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);
  }
  &.swiper-pagination-bullets-dynamic {
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    .swiper-pagination-bullet {
      transition:
        200ms transform,
        200ms left;
    }
  }
}
.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
  transition:
    200ms transform,
    200ms right;
}
/* Fraction */
.swiper-pagination-fraction {
  color: var(--swiper-pagination-fraction-color, inherit);
}
/* Progress */
.swiper-pagination-progressbar {
  background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));
  position: absolute;
  .swiper-pagination-progressbar-fill {
    background: var(--swiper-pagination-color, var(--swiper-theme-color));
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform: scale(0);
    transform-origin: left top;
  }
  .swiper-rtl & .swiper-pagination-progressbar-fill {
    transform-origin: right top;
  }
  .swiper-horizontal > &,
  &.swiper-pagination-horizontal,
  .swiper-vertical > &.swiper-pagination-progressbar-opposite,
  &.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {
    width: 100%;
    height: var(--swiper-pagination-progressbar-size, 4px);
    left: 0;
    top: 0;
  }
  .swiper-vertical > &,
  &.swiper-pagination-vertical,
  .swiper-horizontal > &.swiper-pagination-progressbar-opposite,
  &.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {
    width: var(--swiper-pagination-progressbar-size, 4px);
    height: 100%;
    left: 0;
    top: 0;
  }
}
.swiper-pagination-lock {
  display: none;
}

/* クイックメニュー */
.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.5rem;
    text-decoration: none;
    color: #374151;
    border-radius: 0.5rem;
    transition: all 0.2s;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
}

.menu-item:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.menu-item i {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: #374151;
}

.menu-item span {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.quick-menu-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.5rem;
}

@media (max-width: 1200px) {
    .quick-menu-grid {
        overflow-x: auto;
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .quick-menu-grid .menu-item {
        min-width: 120px;
        flex-shrink: 0;
    }
}

/* メンバー情報セクション */
.qrcode-image {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

/* Swiper CSS */

/* カレンダー風の日付表示 */
.calendar-date {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.calendar-date::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #dc2626, #ea580c);
}

.calendar-month {
    background: #f3f4f6;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 4px 0;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-day {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: 8px 0;
    color: #111827;
}
