/* Base Reset & Variables */
:root {
    /* LINE Colors */
    --line-green: #06C755;
    --line-header: #353A40;
    --line-bg: #8baee1; /* Default LINE chat background */
    --line-chat-bubble: #ffffff;
    --line-me-bubble: #85e249;
    --line-menu-bg: #f9f9f9;
    --line-menu-border: #e0e0e0;
    
    /* App Colors */
    --app-primary: #6b4c3a; /* Hakobune Brown */
    --app-secondary: #d4a373;
    --app-bg: #ffffff;
    --app-bg-gray: #f5f5f5;
    
    --text-main: #333333;
    --text-muted: #888888;
    --border-color: #dddddd;
    
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans JP', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #f0f0f0; /* Outer background */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* App Container (Phone Frame on PC) */
.app-container {
    width: 100%;
    max-width: 414px; /* iPhone Max width */
    height: 100%;
    max-height: 896px;
    background-color: var(--line-bg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

@media (min-width: 415px) {
    .app-container {
        height: 90vh;
        border-radius: 30px;
        border: 8px solid #222;
    }
}

/* -------------------------------------
   1. LINE Chat UI Styles
--------------------------------------*/
.chat-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.line-header {
    background-color: var(--line-header);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    height: 60px;
    z-index: 10;
}

.header-center {
    text-align: center;
}

.header-center h2 {
    font-size: 16px;
    font-weight: 700;
}

.account-status {
    font-size: 10px;
    color: #aaaaaa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.account-status::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--line-green);
    border-radius: 50%;
}

.header-left, .header-right {
    font-size: 20px;
    width: 30px;
    display: flex;
    justify-content: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.system-message {
    text-align: center;
    margin-bottom: 10px;
}
.system-message p {
    display: inline-block;
    background-color: rgba(0,0,0,0.15);
    color: white;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
}

.message-row {
    display: flex;
    gap: 10px;
}

.message-row.receive .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.message-row.receive .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    max-width: 80%;
}

.bubble {
    background-color: var(--line-chat-bubble);
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
    position: relative;
}
.message-row.receive .bubble {
    border-top-left-radius: 4px;
}

.time {
    font-size: 10px;
    color: #666;
    margin-bottom: 2px;
}

/* -------------------------------------
   2. Rich Menu Styles
--------------------------------------*/
.rich-menu-container {
    background-color: var(--line-menu-bg);
    border-top: 1px solid var(--line-menu-border);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom);
}

.rich-menu-controller {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    border-bottom: 1px solid var(--line-menu-border);
}

.keyboard-icon {
    color: var(--text-muted);
    font-size: 18px;
}

.menu-label {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
}
.menu-label i {
    margin-left: 5px;
    font-size: 10px;
}

/* 4-button Grid Layout (田) */
.rich-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 220px;
}

.rm-item {
    background: none;
    border: none;
    border-right: 1px solid var(--line-menu-border);
    border-bottom: 1px solid var(--line-menu-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.rm-item:nth-child(even) {
    border-right: none;
}
.rm-item:nth-child(n+3) {
    border-bottom: none;
}

.rm-item:active {
    background-color: #eaeaea;
}

.rm-icon-bg {
    width: 60px;
    height: 60px;
    background-color: var(--app-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(107, 76, 58, 0.3);
}

.rm-icon-bg.reserve {
    background-color: #E25E3E; /* Distinction for reservation */
    box-shadow: 0 4px 10px rgba(226, 94, 62, 0.3);
}

.rm-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

/* -------------------------------------
   3. Mini-App Overlay Common
--------------------------------------*/
.miniapp-overlay {
    position: absolute;
    top: 50px; /* Leave some space at top */
    left: 0;
    width: 100%;
    height: calc(100% - 50px);
    background-color: var(--app-bg);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.miniapp-overlay.hidden {
    transform: translateY(100%);
}

.miniapp-header {
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: var(--app-bg);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 101;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.miniapp-header h3 {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    margin-right: 30px; /* Balance close btn */
}

.miniapp-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    background-color: var(--app-bg-gray);
}

.app-screen {
    width: 100%;
    min-height: 100%;
    background-color: var(--app-bg);
}
.app-screen.bg-gray {
    background-color: var(--app-bg-gray);
}
.app-screen.hidden {
    display: none;
}

/* Utility Classes */
.hidden { display: none !important; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.placeholder-img {
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-block {
    display: block;
    width: 100%;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-primary {
    background-color: var(--app-primary);
    color: white;
}
.btn-primary:active { background-color: #4a3325; }

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--app-primary);
    color: var(--app-primary);
}
.btn-outline:active { background-color: #f7f3f0; }

/* -------------------------------------
   4. Screen: Store Info (Tabs)
--------------------------------------*/
.tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--app-bg);
    position: sticky;
    top: 0;
    z-index: 10;
}
.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 15px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
}
.tab-btn.active {
    color: var(--app-primary);
    border-bottom: 3px solid var(--app-primary);
}

.tab-pane { padding: 15px; }
.tab-pane.hidden { display: none; }

.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    overflow: hidden;
}

.cover-card .cover-img { height: 180px; }
.cover-card .card-body { padding: 15px; }
.cover-card h4 { margin-bottom: 8px; color: var(--app-primary); }
.cover-card p { font-size: 14px; color: var(--text-main); line-height: 1.6; }

.info-card { padding: 15px; }
.info-card h4 { margin-bottom: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.info-list { list-style: none; }
.info-list li { margin-bottom: 10px; font-size: 14px; }
.info-list li strong { display: inline-block; width: 70px; color: var(--text-muted); }
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.menu-list { display: flex; flex-direction: column; gap: 15px; }
.menu-item-card {
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.menu-img {
    width: 100px;
    flex-shrink: 0;
}
.menu-info {
    padding: 12px;
    flex: 1;
}
.menu-info h5 { font-size: 15px; margin-bottom: 5px; }
.menu-info .price { font-weight: 700; color: var(--app-primary); margin-bottom: 5px; }
.menu-info .badge {
    display: inline-block;
    background: #E25E3E;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
}
.menu-info .desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.menu-info.full-width { width: 100%; }

/* -------------------------------------
   5. Screen: Reservation
--------------------------------------*/
.wizard-container { padding: 20px 15px; }

.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 10px;
}
.wizard-progress .step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #eee;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    z-index: 2;
}
.wizard-progress .step.active {
    background-color: var(--app-primary);
    color: white;
}
.wizard-progress .line {
    flex: 1;
    height: 3px;
    background-color: #eee;
    margin: 0 -5px;
    z-index: 1;
}

.wizard-step h4 { text-align: center; margin-bottom: 20px; font-size: 18px; }
.wizard-step.hidden { display: none; }

.grid-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.grid-btn {
    background-color: white;
    border: 2px solid #eee;
    padding: 20px 0;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}
.grid-btn:hover, .grid-btn:active {
    border-color: var(--app-primary);
    background-color: rgba(107, 76, 58, 0.05);
}

.notice-box {
    background-color: #fff8f8;
    border-left: 4px solid #E25E3E;
    padding: 15px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}

/* Calendar styling */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: bold;
}
.btn-icon { background: none; border: none; font-size: 16px; color: var(--app-primary); cursor: pointer; padding: 5px 10px;}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}
.cal-day-header { font-size: 12px; color: #888; padding-bottom: 5px; }
.cal-day-header:first-child { color: #e74c3c; } /* Sunday */
.cal-day-header:last-child { color: #3498db; } /* Saturday */

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    border: 1px solid #eee;
    font-weight: 500;
}
.cal-day.empty { background: none; border: none; }
.cal-day.btn-date { cursor: pointer; transition: 0.2s; }
.cal-day.btn-date:hover, .cal-day.btn-date:focus, .cal-day.btn-date.selected {
    background-color: var(--app-primary);
    color: white;
    border-color: var(--app-primary);
}
.cal-day.today { border: 2px solid var(--app-secondary); }
.cal-day.disabled { background-color: #f5f5f5; color: #ccc; flex-direction: column; font-size: 12px; }
.cal-day.disabled span { font-size: 10px; color: #E25E3E; }

/* Time picker styling */
.time-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.btn-time {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    color: var(--text-main);
}
.btn-time:hover, .btn-time:active, .btn-time.selected {
    border-color: var(--app-primary);
    background-color: rgba(107, 76, 58, 0.05);
}
.btn-time:has(.badge-full) {
    background-color: #f5f5f5;
    color: #aaa;
    pointer-events: none;
    cursor: not-allowed;
}
.badge-full {
    position: absolute;
    top: -5px; right: -5px;
    background: #E25E3E; color: white;
    font-size: 9px; padding: 2px 4px; border-radius: 4px;
}

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; font-size: 14px; }
.req { background: #E25E3E; color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 5px; }
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px; /* Prevents iOS zoom */
    outline: none;
    transition: 0.2s;
}
.form-control:focus { border-color: var(--app-primary); box-shadow: 0 0 0 2px rgba(107, 76, 58, 0.1); }
.double-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }

/* Confirm box */
.confirm-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.confirm-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #eee; }
.confirm-row:last-child { border-bottom: none; }
.confirm-row .lbl { color: #888; font-size: 13px; }
.confirm-row .val { font-weight: bold; font-size: 15px; text-align: right; }
.btn-lg { padding: 15px 20px; font-size: 16px; }

.complete-icon {
    font-size: 64px;
    color: var(--line-green);
    text-align: center;
    margin: 40px 0 20px;
}


/* -------------------------------------
   6. Screen: Membership Card
--------------------------------------*/
.stamp-card-container { padding: 15px; }

/* 会員証本体のスタイル */
.member-card-wrapper {
    border-radius: 16px;
    padding: 20px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

/* 非会員（一般）向けデザイン */
.member-card-wrapper.regular {
    background: linear-gradient(135deg, var(--app-primary), #8B6550);
}

/* サブスク（プレミアム）向けデザイン */
.member-card-wrapper.sub {
    background: linear-gradient(135deg, #222, #444);
    border: 2px solid #E25E3E; /* Premium accent */
}
.member-card-wrapper.sub::after {
    content: '\f091'; /* fa-trophy */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 150px;
    color: rgba(255,255,255,0.05);
    z-index: 0;
}

.member-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.member-tier-badge {
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}
.member-card-wrapper.sub .member-tier-badge {
    background: #E25E3E;
    color: white;
}

.member-number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    letter-spacing: 1px;
    opacity: 0.8;
}

.member-profile { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    position: relative;
    z-index: 1;
}
.stamp-avatar {
    width: 60px; height: 60px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}
.member-card-wrapper.sub .stamp-avatar {
    border: 2px solid #E25E3E;
}

.stamp-user-info h5 { font-size: 20px; margin-bottom: 4px; }
.stamp-user-info p { font-size: 13px; opacity: 0.9; }
.member-card-wrapper.sub .stamp-user-info p { color: #E25E3E; font-weight: bold; }

.member-barcode {
    margin-top: 25px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.barcode-bars {
    height: 40px;
    width: 100%;
    background: repeating-linear-gradient(
      to right,
      #000,
      #000 3px,
      #fff 3px,
      #fff 5px,
      #000 5px,
      #000 9px,
      #fff 9px,
      #fff 11px,
      #000 11px,
      #000 13px,
      #fff 13px,
      #fff 17px
    );
    margin-bottom: 10px;
}
.member-barcode p {
    color: var(--text-muted);
    font-size: 10px;
    margin: 0;
}


/* スタンプカード部分（会員証の下部） */
.stamp-card-body {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stamp-card-body h4 { margin-bottom: 5px; }
.stamp-card-body .subtitle { font-size: 12px; color: var(--app-primary); margin-bottom: 20px; }

.stamps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.stamp-slot {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ccc;
    font-size: 18px;
}
.stamp-slot.has-stamp {
    border-color: var(--app-primary);
    background-color: var(--app-primary);
    color: white;
}
.stamp-slot.goal {
    border-color: #E25E3E;
    border-style: solid;
    color: #E25E3E;
}

/* -------------------------------------
   7. Screen: Events
--------------------------------------*/
.event-list { padding: 15px; }

.event-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.event-image { height: 160px; }
.event-body { padding: 15px; position: relative; }
.badge-event { background-color: #4a90e2; color: white; padding: 4px 8px; border-radius: 4px; font-size: 11px; margin-right: 8px;}
.badge-community { background-color: #f39c12; color: white; padding: 4px 8px; border-radius: 4px; font-size: 11px; margin-right: 8px;}
.event-date { font-size: 12px; color: var(--text-muted); }
.event-body h4 { margin: 10px 0; font-size: 16px; }
.event-body p { font-size: 13px; color: var(--text-main); margin-bottom: 15px; line-height: 1.5; }

/* -------------------------------------
   8. Screen: Table Order
--------------------------------------*/
.order-step { width: 100%; }
.order-step.hidden { display: none !important; }

/* Menu step: flex column so header stays fixed, menu scrolls */
.order-menu-step {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* When this step is active inside .liff-body, fill it */
}
.order-menu-step.hidden { display: none !important; }

/* Table selection grid */
.table-select-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.table-select-btn {
    background: white;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 20px 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.table-select-btn:active,
.table-select-btn:hover {
    border-color: var(--app-primary);
    background: rgba(107, 76, 58, 0.05);
}
.table-select-btn .table-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: block;
}
.table-select-btn .table-seats {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* Order table bar */
.order-table-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--app-primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}
.order-table-bar .btn-outline {
    color: white;
    border-color: rgba(255,255,255,0.5);
    padding: 4px 10px;
    font-size: 11px;
}

/* Category tabs */
.order-category-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    z-index: 10;
}
.order-cat-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 14px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
}
.order-cat-btn.active {
    color: var(--app-primary);
    border-bottom-color: var(--app-primary);
}

/* Scrollable menu area */
.order-menu-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Order menu list */
.order-menu-list {
    padding: 12px 16px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-menu-card {
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.order-menu-card.sold-out {
    opacity: 0.5;
}
.order-menu-img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}
.order-menu-body {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.order-menu-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}
.order-menu-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.order-menu-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}
.order-menu-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--app-primary);
}
.order-menu-badge {
    display: inline-block;
    background: #E25E3E;
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Quantity controls */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--app-primary);
    background: white;
    color: var(--app-primary);
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    padding: 0;
    line-height: 1;
}
.qty-btn:active {
    background: var(--app-primary);
    color: white;
}
.qty-btn.add-first {
    width: auto;
    border-radius: 20px;
    padding: 0 12px;
    height: 30px;
    font-size: 12px;
    background: var(--app-primary);
    color: white;
    border-color: var(--app-primary);
}
.qty-value {
    font-size: 16px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Cart bar — positioned at bottom of the order-menu-step, not fixed to viewport */
.order-cart-bar {
    flex-shrink: 0;
    background: white;
    border-top: 2px solid var(--app-primary);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
}
.order-cart-bar.hidden { display: none !important; }
.cart-summary {
    display: flex;
    gap: 16px;
    align-items: center;
}
.cart-count {
    font-size: 14px;
    color: var(--text-muted);
}
.cart-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--app-primary);
}

/* Cart detail */
.cart-item-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    gap: 12px;
}
.cart-item-info {
    flex: 1;
}
.cart-item-name {
    font-size: 14px;
    font-weight: 600;
}
.cart-item-price {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-item-subtotal {
    font-size: 15px;
    font-weight: 700;
    color: var(--app-primary);
    min-width: 60px;
    text-align: right;
}
.cart-detail-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 20px;
    font-weight: 700;
    border-top: 2px solid var(--app-primary);
    margin-top: 8px;
}
.cart-detail-total span:last-child {
    color: var(--app-primary);
}
