/* 顧客向け（モード①）専用スタイル */

body.customer {
    background: #fafafa;
    padding-bottom: 7rem;
}

/* PWA: ホーム画面追加バナー */
.pwa-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    padding: 0.75rem 3rem 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 200;
    font-size: 0.85rem;
}
.pwa-banner span {
    flex: 1;
    line-height: 1.4;
}
.pwa-install-btn {
    background: white;
    color: #1e40af;
    border: none;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.pwa-dismiss-btn {
    position: absolute;
    top: 0.3rem;
    right: 0.4rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    font-family: inherit;
    width: 28px;
    height: 28px;
    line-height: 1;
}

.customer-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
}

.customer-header {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    padding: 1.25rem 1.25rem 1.5rem;
    text-align: center;
}
.customer-header h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}
.customer-header .table-info,
.customer-header .order-number {
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.25rem 0.875rem;
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
}

.dine-mode {
    padding: 1rem 1rem 0;
}
.dine-mode-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.dine-mode-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.dine-mode-btn {
    padding: 0.85rem 0.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.625rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: #374151;
    line-height: 1.4;
}
.dine-mode-btn small { font-weight: 400; color: #9ca3af; font-size: 0.75rem; }
.dine-mode-btn.active {
    background: #2563eb;
    border-color: #1e40af;
    color: white;
}
.dine-mode-btn.active small { color: rgba(255, 255, 255, 0.8); }

.reduced-tag {
    color: #d97706;
    font-weight: 700;
    margin-left: 0.15rem;
}

/* Filter & search */
.menu-filter {
    padding: 0.75rem 1rem 0;
}
.menu-search-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
#menu-search {
    flex: 1;
    min-width: 180px;
    padding: 0.6rem 0.8rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    background: white;
}
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

/* Category tabs */
.category-tabs {
    display: flex;
    gap: 0.4rem;
    padding: 0.75rem 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
    background: white;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}
.cat-tab.active {
    background: #2563eb;
    color: white;
    border-color: #1e40af;
}

.menu-section {
    padding: 1rem;
}

.menu-category {
    font-size: 1rem;
    color: #6b7280;
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.25rem;
}
.menu-category:first-child { margin-top: 0.5rem; }

.menu-list {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.menu-item {
    display: flex;
    padding: 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 0;
    position: relative;
    overflow: hidden;
}
.menu-item:last-child { border-bottom: none; }

.menu-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
}
.menu-item-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #cbd5e1;
}

.menu-item-info {
    flex: 1;
    padding: 0.75rem 0.875rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.menu-item-name {
    font-weight: 700;
    margin-bottom: 0.2rem;
    font-size: 1rem;
    line-height: 1.3;
}
.menu-item-desc {
    color: #6b7280;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.menu-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 0.5rem;
}
.menu-item-price {
    color: #2563eb;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
}

.menu-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 品切れ */
.menu-item.sold-out {
    opacity: 0.55;
}
.menu-item.sold-out .menu-item-image {
    filter: grayscale(0.7);
}
.sold-out-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: #ef4444;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 1;
}

/* おすすめバッジ */
.recommended-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.2rem 0.55rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}
.qty-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #111827;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    font-family: inherit;
    line-height: 1;
}
.qty-btn:active { transform: scale(0.94); }
.qty-btn.plus {
    background: #2563eb;
    color: white;
}
.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.qty-display {
    min-width: 1.75rem;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
}

/* Cart bar */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 0.875rem 1rem calc(0.875rem + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 50;
}
.cart-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.cart-count {
    font-size: 0.8rem;
    color: #6b7280;
}
.cart-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
}
.cart-confirm {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.625rem;
    font-weight: 700;
}
.cart-confirm:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.15s ease-out;
}
.modal {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
    max-height: 92vh;
    overflow-y: auto;
    animation: slideUp 0.2s ease-out;
}
.modal h2 { margin-bottom: 1rem; font-size: 1.25rem; }
.modal-items {
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
}
.modal-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}
.modal-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
}
.modal-total strong {
    font-size: 1.5rem;
    color: #2563eb;
    font-variant-numeric: tabular-nums;
}
.modal-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.5rem;
    margin-top: 1rem;
}
.modal-actions .btn { padding: 0.85rem; font-size: 1rem; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Status page */
.status-card {
    margin: 1rem;
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.status-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.accepted { background: #dbeafe; color: #1e40af; }
.status-badge.completed { background: #d1fae5; color: #065f46; }
.status-badge.cancelled { background: #fee2e2; color: #991b1b; }
.status-text { font-size: 1rem; }

.order-summary {
    margin: 1rem;
    padding: 1.25rem;
}
.order-summary h2 { margin-bottom: 0.75rem; font-size: 1.1rem; }
.order-items-list {
    border-top: 1px solid #f3f4f6;
    margin: 0.5rem 0;
}
.order-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.95rem;
}
.order-item-row .num { font-variant-numeric: tabular-nums; }
.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.875rem 0 0.25rem;
    font-size: 1.1rem;
    border-top: 2px solid #e5e7eb;
}
.order-total-row strong {
    font-size: 1.5rem;
    color: #2563eb;
    font-variant-numeric: tabular-nums;
}

.status-help { padding: 0 1rem 1rem; text-align: center; }
.empty-menu { padding: 3rem 1rem; text-align: center; }

/* QR label print page */
.qr-label-page {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}
.qr-label {
    background: white;
    border: 2px dashed #cbd5e1;
    padding: 2rem 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}
.qr-label h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.qr-label .qr-code {
    width: 240px;
    height: 240px;
    margin: 0 auto 1rem;
    background: white;
    padding: 0.75rem;
}
.qr-label .qr-code img { width: 100%; height: 100%; }
.qr-label .qr-url {
    font-size: 0.875rem;
    color: #6b7280;
    word-break: break-all;
    margin-top: 0.5rem;
}
.qr-controls { margin: 1rem 0; display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }

@media print {
    .navbar, .qr-controls { display: none !important; }
    .qr-label { border: 2px solid #000; }
    body { background: white; }
}

/* === 顧客アプリ内決済（status画面） === */
.order-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.95rem;
}
.order-total-row.total {
    border-top: 1px solid #e5e7eb;
    margin-top: 0.4rem;
    padding-top: 0.6rem;
    font-size: 1.1rem;
}
.order-total-row.total strong {
    color: #2563eb;
    font-size: 1.3rem;
    font-weight: 700;
}
.order-total-row.discount-line {
    color: #ef4444;
    font-weight: 600;
}

.payment-card {
    padding: 1rem;
}
.payment-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.payment-label {
    font-weight: 600;
    margin: 0.75rem 0 0.5rem;
    color: #374151;
}
.payment-method-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.pay-method {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.6rem;
    background: white;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.15s ease;
}
.pay-method:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 600;
}
.pay-method input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
}
.pay-btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 0.6rem;
}
.paid-badge {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 0.75rem 1rem;
    border-radius: 0.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.6rem;
}
.paid-method {
    text-align: center;
    color: #374151;
    font-weight: 600;
    margin-bottom: 0.8rem;
}
#receipt-link {
    display: block;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

/* クーポン入力 (status画面でも共通利用) */
.coupon-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0.5rem 0;
}
.coupon-input-row input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.4rem;
    font-size: 1rem;
}
.coupon-applied {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}
.coupon-applied .clear-btn {
    background: transparent;
    border: none;
    color: #065f46;
    font-size: 1.1rem;
    cursor: pointer;
}
.coupon-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin: 0.3rem 0;
}

/* ロイヤルティバナー（履歴ページ上部） */
.loyalty-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fcd34d;
    border-radius: 0.6rem;
    padding: 0.8rem 1rem;
    margin: 0.5rem 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.lb-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
    font-weight: 700;
    color: #92400e;
}
.lb-tier { font-size: 1rem; }
.lb-balance { font-size: 1.2rem; }
.lb-sub { font-size: 0.85rem; color: #92400e; }

/* ポイント */
.points-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}
.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}
.points-header strong {
    font-size: 1.1rem;
    color: #2563eb;
    font-variant-numeric: tabular-nums;
}

/* === ヘッダリンク（履歴） === */
.customer-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.header-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.4rem 0.7rem;
    border: 1px solid #dbeafe;
    border-radius: 0.4rem;
    background: white;
    flex-shrink: 0;
}
.header-link:hover { background: #eff6ff; }

/* === お気に入りボタン === */
.menu-item { position: relative; }
.fav-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.92);
    color: #d1d5db;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.fav-btn:active { transform: scale(0.9); }
.fav-btn.is-fav { color: #ef4444; }

/* === 注文履歴ページ === */
.history-controls {
    padding: 0.5rem 1rem;
}
#history-list { padding: 0 1rem; }
.history-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.7rem;
    padding: 0.9rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.history-id { font-weight: 700; color: #2563eb; }
.history-time { color: #6b7280; font-size: 0.85rem; }
.history-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 0.3rem;
    background: #f3f4f6;
    color: #374151;
}
.history-status.status-completed { background: #ecfdf5; color: #065f46; }
.history-status.status-pending { background: #fef3c7; color: #92400e; }
.history-status.status-accepted { background: #dbeafe; color: #1e40af; }
.history-status.status-cancelled { background: #fee2e2; color: #991b1b; }

.history-items {
    border-top: 1px solid #f3f4f6;
    padding-top: 0.5rem;
    margin-bottom: 0.6rem;
}
.history-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #374151;
    padding: 0.15rem 0;
}
.history-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.6rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.history-total {
    font-size: 1.1rem;
    color: #2563eb;
    font-weight: 700;
}
.history-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.res-badge {
    display: inline-block;
    margin: 4px 0;
    padding: 4px 10px;
    background: #dbeafe;
    color: #1e3a8a;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.lb-expire {
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(220, 38, 38, 0.15);
    color: #b91c1c;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===== ポイント引換特典 ===== */
.balance-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}
.balance-row {
    display: flex; justify-content: space-between; align-items: baseline;
}
.balance-num { color: #0369a1; font-size: 1.6rem; }
.balance-actions {
    display: flex; gap: 8px; margin-top: 12px;
}
.reward-grid {
    display: grid; gap: 12px;
}
.reward-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.reward-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px;
}
.reward-pts {
    background: #fef3c7; color: #92400e; padding: 4px 10px;
    border-radius: 999px; font-size: 0.85rem; font-weight: 700;
}
.reward-type { margin: 4px 0; color: #475569; font-size: 0.9rem; }
.reward-card .btn { width: 100%; margin-top: 10px; }
.reward-card .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.ticket-row {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 12px; margin-bottom: 8px; cursor: pointer;
    transition: background 0.15s;
}
.ticket-row:hover { background: #f9fafb; }
.ticket-row.status-used { opacity: 0.55; }
.ticket-row.status-expired,
.ticket-row.status-cancelled { opacity: 0.45; }
.ticket-row-main {
    display: flex; justify-content: space-between; align-items: center;
}
.ticket-row-sub {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 4px;
}
.ticket-row-sub code {
    background: #f1f5f9; padding: 2px 8px; border-radius: 4px;
    font-family: 'SF Mono', Menlo, monospace; font-size: 0.85rem;
}
.status-badge {
    background: #e0f2fe; color: #075985;
    padding: 2px 8px; border-radius: 999px; font-size: 0.75rem;
}
.status-used .status-badge { background: #f3f4f6; color: #6b7280; }
.status-expired .status-badge,
.status-cancelled .status-badge { background: #fee2e2; color: #991b1b; }

.modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: #fff; border-radius: 16px; padding: 24px;
    max-width: 420px; width: 90%; max-height: 90vh; overflow: auto;
}
.modal-actions {
    display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px;
}
.ticket-card {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 12px; padding: 16px; text-align: center;
    margin: 12px 0;
}
.ticket-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.ticket-code {
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 1.6rem; font-weight: 700; letter-spacing: 0.1em;
    background: #fff; padding: 10px; border-radius: 8px;
    margin: 8px 0;
}
.btn.danger { background: #fee2e2; color: #991b1b; }

/* ===== AI推奨ストリップ ===== */
.rec-section {
    margin: 12px 0;
    padding: 12px 0 12px 12px;
    background: linear-gradient(135deg, #fef3c7, #fde68a, #fef3c7);
    border-radius: 14px;
}
.rec-section h2 {
    font-size: 1rem; margin: 0 0 8px 0; padding-right: 12px;
}
.rec-strip {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
    scrollbar-width: thin;
}
.rec-card {
    flex: 0 0 130px; min-height: 180px;
    background: #fff; border: 1px solid #fde68a; border-radius: 10px;
    padding: 8px; cursor: pointer; text-align: left;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.1s;
}
.rec-card:hover { transform: translateY(-2px); }
.rec-card[disabled] { opacity: 0.5; cursor: not-allowed; }
.rec-card img,
.rec-img-placeholder {
    display: block; width: 100%; height: 80px; object-fit: cover;
    border-radius: 6px; background: #f3f4f6;
    text-align: center; font-size: 2rem; line-height: 80px;
}
.rec-name {
    font-size: 0.85rem; font-weight: 600; margin-top: 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rec-price { font-size: 0.85rem; color: #ea580c; font-weight: 700; }
.rec-reason {
    font-size: 0.7rem; color: #6b7280; margin-top: 4px;
    line-height: 1.2; max-height: 2.4em; overflow: hidden;
}

/* 支払画面でのチケット選択 */
.redemption-section {
    margin: 12px 0;
    padding: 12px; background: #fffbeb;
    border: 1px solid #fde68a; border-radius: 10px;
}
.redemption-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px; font-weight: 600;
}
.redemption-options {
    display: flex; flex-direction: column; gap: 6px;
}
.redemption-options label {
    display: flex; gap: 8px; padding: 8px; cursor: pointer;
    border: 1px solid #fde68a; border-radius: 8px; background: #fff;
}
.redemption-options label:hover { background: #fef3c7; }

/* ============ オフライン状態 (v0.34) ============ */
.offline-status {
    position: fixed; top: 6px; left: 50%; transform: translateX(-50%);
    z-index: 999;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600;
    background: #ecfdf5; color: #047857;
    border: 1px solid #6ee7b7;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: opacity 0.2s;
}
.offline-status-online .offline-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #10b981;
}
.offline-status-offline {
    background: #fef2f2; color: #b91c1c; border-color: #fca5a5;
}
.offline-status-offline .offline-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #ef4444;
    animation: offline-blink 1s infinite;
}
.offline-status-online .offline-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #10b981;
}
@keyframes offline-blink {
    0%, 100% { opacity: 1; } 50% { opacity: 0.3; }
}
.offline-queue {
    padding: 2px 8px; border-radius: 999px;
    background: rgba(255,255,255,0.7);
    margin-left: 4px;
}
.offline-toast {
    position: fixed; left: 50%; bottom: 96px;
    transform: translateX(-50%);
    background: #1f2937; color: #fff;
    padding: 10px 16px; border-radius: 8px;
    font-size: 0.9rem; box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    z-index: 1000; max-width: 88vw; text-align: center;
}
.offline-toast.toast-warn { background: #b45309; }
.offline-toast.toast-success { background: #047857; }
.offline-toast.toast-error { background: #b91c1c; }

.offline-page {
    background: #fff; padding: 20px; margin: 16px;
    border-radius: 12px; border: 1px solid #e5e7eb;
}
.offline-headline {
    font-size: 1.1rem; font-weight: 600; margin-bottom: 8px;
}
.offline-actions {
    display: flex; gap: 10px; margin: 16px 0;
}
.offline-pending h2 {
    margin-top: 16px; font-size: 1rem;
}
.offline-list {
    list-style: none; padding: 0; margin: 8px 0;
    display: flex; flex-direction: column; gap: 8px;
}
.offline-list li {
    border: 1px solid #fde68a; background: #fffbeb;
    padding: 8px; border-radius: 8px;
}

/* 決済ページ (v0.37) */
.pay-section {
    background: #fff; margin: 16px; padding: 20px;
    border-radius: 12px; border: 1px solid #e5e7eb;
}
.pay-summary {
    background: #f9fafb; padding: 12px;
    border-radius: 8px; margin-bottom: 16px;
}
.pay-row {
    display: flex; justify-content: space-between;
    padding: 4px 0;
}
.pay-row strong {
    color: #ea580c; font-size: 1.2rem;
}
.pay-error {
    background: #fef2f2; color: #b91c1c;
    padding: 10px; border-radius: 8px;
    border: 1px solid #fca5a5; margin: 8px 0;
}
.pay-success {
    background: #ecfdf5; color: #047857;
    padding: 12px; border-radius: 8px;
    border: 1px solid #6ee7b7; text-align: center;
}
.pay-success .btn {
    display: inline-block; margin-top: 8px;
}
#payment-element {
    margin: 8px 0;
}

/* オンボーディングウィザード (v0.40) */
.onb-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.onb-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 380px; width: 100%;
    padding: 28px 24px 20px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
}
.onb-close {
    position: absolute; top: 6px; right: 8px;
    background: transparent; border: none;
    font-size: 1.5rem; cursor: pointer; color: #6b7280;
}
.onb-icon {
    font-size: 3.5rem; line-height: 1; margin-bottom: 8px;
}
.onb-modal h2 { font-size: 1.2rem; margin: 4px 0 10px 0; }
.onb-modal p { margin: 8px 0; }
.onb-prefs {
    text-align: left;
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
}
.onb-prefs label {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 0; font-size: 0.92rem;
    cursor: pointer;
}
.onb-actions {
    display: flex; gap: 8px; justify-content: center;
    margin-top: 14px;
}
.onb-actions .btn {
    flex: 1; max-width: 160px;
}
.onb-progress {
    display: flex; gap: 6px; justify-content: center; margin-top: 16px;
}
.onb-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #d1d5db; transition: background 0.2s;
}
.onb-dot.active {
    background: #2563eb;
}
.onb-ios-hint {
    margin-top: 8px;
    background: #eff6ff; color: #1e40af;
    padding: 8px; border-radius: 6px; font-size: 0.85rem;
}
