/* 首页 · Apple / iOS 风格（仅 body.page-front） */

:root {
    --ios-bg: #f2f2f7;
    --ios-card: #ffffff;
    --ios-label: #8e8e93;
    --ios-text: #000000;
    --ios-blue: #007aff;
    --ios-blue-press: #0062d9;
    --ios-sep: rgba(60, 60, 67, 0.29);
    --ios-sep-light: rgba(60, 60, 67, 0.12);
    --ios-search-bg: rgba(118, 118, 128, 0.12);
    /* 顶栏快捷入口：新建订单 / 收款码（同为实心胶囊，蓝 / 绿） */
    --ios-top-new-bg: linear-gradient(165deg, #288bff 0%, #007aff 38%, #0066dd 100%);
    --ios-top-new-shadow: 0 2px 10px rgba(0, 122, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    --ios-top-pay-bg: linear-gradient(165deg, #34c759 0%, #2fb350 38%, #30c85a 100%);
    --ios-top-pay-shadow: 0 2px 10px rgba(52, 199, 89, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    --ios-danger: #ff3b30;
    --ios-orange: #c65a00;
    --ios-purple: #af52de;
    --ios-success-bg: rgba(52, 199, 89, 0.12);
    --ios-success-text: #248a3d;
    --ios-radius-lg: 12px;
    --ios-radius-xl: 14px;
    --ios-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

html {
    -webkit-text-size-adjust: 100%;
}

body.page-front {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
    background: var(--ios-bg);
    color: var(--ios-text);
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

body.page-front a {
    color: var(--ios-blue);
    text-decoration: none;
}

body.page-front a:active {
    opacity: 0.55;
}

.ios-shell {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 16px 28px;
    padding-top: calc(12px + env(safe-area-inset-top, 0));
}

/* 查询订单 */
.ios-search-card {
    margin-top: 8px;
    background: var(--ios-card);
    border-radius: var(--ios-radius-xl);
    box-shadow: var(--ios-shadow);
    padding: 12px 14px;
}

/* 顶栏：左「新建订单 / 收款码」，右缩小桌号搜索（表单 display:contents 使 .ios-search-row 参与本行 flex） */
body.page-front .ios-search-topline {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
}

body.page-front .ios-search-topline .ios-search-form--topline {
    display: contents;
}

body.page-front .ios-search-topline .ios-search-form--topline .ios-search-row {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(52%, 12rem);
}

body.page-front .ios-search-topline .ios-search-field-wrap {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 6.25rem;
    padding: 0 8px;
}

body.page-front .ios-search-topline .ios-search-field-wrap svg {
    display: none;
}

body.page-front .ios-search-topline .ios-btn-search {
    min-width: 52px;
    padding: 0 8px;
    font-size: 15px;
}

body.page-front .ios-search-topline-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
}

body.page-front .ios-search-toplink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 11px;
    background: var(--ios-top-new-bg);
    box-shadow: var(--ios-top-new-shadow);
    text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}

body.page-front .ios-search-toplink:visited {
    color: #fff;
}

body.page-front .ios-search-toplink:active {
    background: linear-gradient(165deg, #006ee6 0%, #0062d9 38%, #0058c7 100%);
    box-shadow: 0 1px 5px rgba(0, 122, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transform: scale(0.98);
    opacity: 1;
}

body.page-front .ios-search-toplink--admin {
    background: linear-gradient(165deg, #aeaeb2 0%, #8e8e93 40%, #7c7c80 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

body.page-front .ios-search-toplink--admin:visited {
    color: #fff;
}

body.page-front .ios-search-toplink--admin:active {
    background: linear-gradient(165deg, #8e8e93 0%, #6d6d72 40%, #57575a 100%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(0.98);
    opacity: 1;
}

body.page-front .ios-search-topline-actions .ios-pay-qr-open-btn--topline {
    min-height: 44px;
    padding: 0 10px;
    border-radius: 11px;
    background: var(--ios-top-pay-bg);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--ios-top-pay-shadow);
    text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

body.page-front .ios-search-topline-actions .ios-pay-qr-open-btn--topline:active {
    background: linear-gradient(165deg, #2fb350 0%, #2aa849 38%, #2bad4d 100%);
    box-shadow: 0 1px 5px rgba(52, 199, 89, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transform: scale(0.98);
}

@media (min-width: 360px) {
    body.page-front .ios-search-toplink {
        padding: 0 10px;
        font-size: 13px;
    }

    body.page-front .ios-search-topline-actions .ios-pay-qr-open-btn--topline {
        font-size: 13px;
    }
}

.ios-search-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-label);
    margin-bottom: 8px;
    display: block;
}

.ios-search-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.ios-search-field-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--ios-search-bg);
    border-radius: 10px;
    padding: 0 10px;
    min-height: 44px;
}

.ios-search-field-wrap svg {
    flex-shrink: 0;
    opacity: 0.45;
}

.ios-search-input {
    flex: 1;
    border: 0;
    background: transparent;
    font-size: 17px;
    color: var(--ios-text);
    min-width: 0;
    outline: none;
}

.ios-search-input::placeholder {
    color: rgba(60, 60, 67, 0.45);
}

.ios-btn-search {
    flex-shrink: 0;
    min-width: 72px;
    border: 0;
    border-radius: 10px;
    background: var(--ios-blue);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 0 14px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.ios-btn-search:active {
    background: var(--ios-blue-press);
}

/* 分组列表 */
.ios-section-title {
    margin: 22px 0 8px 16px;
    font-size: 13px;
    font-weight: 400;
    color: var(--ios-label);
    text-transform: uppercase;
    letter-spacing: -0.08px;
}

/* 与订单小票「大人数」等标签同字号（桌号搜索标题、新建订单等） */
body.page-front .ios-section-title-lg {
    font-size: 16px;
    font-weight: 500;
    color: var(--ios-label);
    text-transform: none;
    letter-spacing: -0.2px;
}

/* 订单信息：大标题（区别于分组小标题） */
body.page-front .ios-section-title-bill {
    margin: 20px 0 10px 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ios-text);
    text-transform: none;
    letter-spacing: -0.28px;
}

.ios-group {
    background: var(--ios-card);
    border-radius: var(--ios-radius-lg);
    box-shadow: var(--ios-shadow);
    overflow: hidden;
}

.ios-group + .ios-group {
    margin-top: 10px;
}

.ios-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    min-height: 44px;
    border-bottom: 0.5px solid var(--ios-sep-light);
    font-size: 17px;
}

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

.ios-row-label {
    color: var(--ios-text);
    flex-shrink: 0;
}

.ios-row-value {
    text-align: right;
    color: var(--ios-label);
    word-break: break-all;
}

.ios-row-value.ios-em {
    color: var(--ios-text);
    font-weight: 600;
}

/* 订单详情：一行三列（人数 / 大人单价 / 小孩单价） */
body.page-front .ios-row-triple {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    padding: 0 !important;
    min-height: 0;
    border-bottom: 0.5px solid var(--ios-sep-light);
}

body.page-front .ios-row-triple .ios-pair-cell {
    flex: 1;
    min-width: 0;
    padding: 12px 10px;
}

body.page-front .ios-row-triple .ios-pair-cell:not(:last-child) {
    border-right: 0.5px solid var(--ios-sep-light);
}

body.page-front .ios-row-triple .ios-pair-label {
    font-size: 12px;
}

body.page-front .ios-row-triple .ios-pair-value {
    font-size: 15px;
}

/* 订单详情：六项合并为三行（每行两列） */
.ios-row-pair {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    padding: 0 !important;
    min-height: 0;
    border-bottom: 0.5px solid var(--ios-sep-light);
}

.ios-row-pair:last-of-type {
    border-bottom: 0;
}

.ios-group .ios-row-pair + .ios-row:not(.ios-row-pair) {
    border-top: 0.5px solid var(--ios-sep-light);
}

.ios-pair-cell {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
}

.ios-pair-cell:first-child {
    border-right: 0.5px solid var(--ios-sep-light);
}

.ios-pair-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ios-label);
    margin-bottom: 4px;
}

.ios-pair-value {
    font-size: 17px;
    color: var(--ios-text);
    letter-spacing: -0.2px;
}

.ios-pair-value.ios-em {
    font-weight: 600;
}

.ios-pair-value.ios-paid {
    color: var(--ios-blue);
    font-weight: 600;
}

/* 当前桌号下方：两列表格；覆盖 .ios-row 的 flex；无外框，仅单元格之间的内部分隔线 */
body.page-front .ios-order-bill .ios-order-bill-count-price-row.ios-row {
    display: block;
    padding: 0;
    min-height: 0;
    margin-top: 6px;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    gap: 0;
    align-items: stretch;
    justify-content: flex-start;
    font-size: inherit;
    box-shadow: none;
    outline: 0;
}

body.page-front .ios-order-bill .ios-order-count-price {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    text-align: left;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
}

body.page-front .ios-order-bill .ios-order-count-price td {
    width: 50%;
    padding: 12px 14px;
    vertical-align: middle;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
}

/* 内横线：行间（不含表格外底边 → 最后一行不画底边） */
body.page-front .ios-order-bill .ios-order-count-price tr:not(:last-child) td {
    border-bottom: 1px solid rgba(60, 60, 67, 0.14);
}

/* 内竖线：两列之间（不含表格外左/右 → 仅左列右侧） */
body.page-front .ios-order-bill .ios-order-count-price td:nth-child(1):not(.ios-oc-cell--full) {
    border-right: 1px solid rgba(60, 60, 67, 0.14);
}

body.page-front .ios-order-bill .ios-order-count-price tr {
    border: 0;
}

body.page-front .ios-order-bill .ios-order-count-price td.ios-oc-cell--full {
    width: 100%;
    border-right: none;
}

body.page-front .ios-order-bill .ios-oc-pair {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

body.page-front .ios-order-bill .ios-oc-lb {
    flex-shrink: 0;
    max-width: 42%;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--ios-label);
    text-align: left;
}

body.page-front .ios-order-bill .ios-oc-v {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ios-text);
    text-align: right;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

body.page-front .ios-order-bill .ios-oc-v-datetime {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

body.page-front .ios-order-bill .ios-oc-pair--full .ios-oc-lb {
    max-width: none;
}

/* 订单详情整块：不要卡片外圈阴影/描边（仅屏幕） */
body.page-front .ios-group.ios-order-bill {
    box-shadow: none;
    border: 0;
    outline: 0;
}

/* 窄屏：仍为表格；极窄时可横滑查看 */
@media screen and (max-width: 639px) {
    body.page-front .ios-order-bill .ios-order-bill-count-price-row {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    body.page-front .ios-order-bill .ios-order-count-price {
        min-width: 280px;
    }
}

body.page-front .ios-order-bill .ios-pair-cell,
body.page-front .ios-order-bill .ios-pair-label,
body.page-front .ios-order-bill .ios-pair-value {
    text-align: left;
}

.ios-row-link {
    color: var(--ios-blue);
    font-size: 15px;
}

.ios-list-meta {
    font-size: 13px;
    color: var(--ios-label);
    padding: 8px 16px 12px;
    border-top: 0.5px solid var(--ios-sep-light);
}

/* 表单区 */
.ios-form-section {
    margin-top: 8px;
}

.ios-banner-dining {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: var(--ios-radius-lg);
    background: rgba(255, 149, 0, 0.18);
    color: #a34c00;
    font-size: 15px;
    line-height: 1.45;
}

.ios-banner-dining strong {
    font-weight: 700;
}

.ios-row-actions {
    justify-content: flex-end;
    padding-top: 10px;
    padding-bottom: 14px;
}

.ios-inline-form {
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.ios-btn-secondary {
    display: inline-block;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    border: 0;
    background: #e5e5ea;
    color: var(--ios-text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.ios-btn-secondary:active {
    opacity: 0.75;
}

.ios-btn-block {
    display: block;
    width: 100%;
    margin-top: 12px;
}

.ios-end-meal-form {
    margin: 0 0 8px;
}

body.page-front .ios-order-meal-actions {
    margin: 12px 0 8px;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
}

body.page-front .ios-order-meal-actions .ios-end-meal-form,
body.page-front .ios-order-meal-actions .ios-cancel-order-form {
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

body.page-front .ios-order-meal-actions .ios-btn-block {
    margin-top: 0;
    flex: 1 1 auto;
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

body.page-front .ios-btn-cancel-order {
    background: rgba(255, 59, 48, 0.14);
    color: var(--ios-danger);
}

body.page-front .ios-btn-cancel-order:active {
    opacity: 0.85;
}

.ios-checkout-hint {
    margin: 12px 0 10px;
    padding: 12px 16px;
    border-radius: var(--ios-radius-lg);
    background: rgba(118, 118, 128, 0.1);
}

.ios-checkout-hint-main {
    font-size: 16px;
    line-height: 1.35;
    color: var(--ios-text);
}

.ios-checkout-hint-pay strong {
    color: var(--ios-orange);
    font-weight: 700;
}

.ios-checkout-hint-refund strong {
    color: var(--ios-success-text);
    font-weight: 700;
}

.ios-checkout-hint-even {
    color: var(--ios-label);
    font-size: 15px;
}

.ios-checkout-hint-caption {
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-label);
    margin-bottom: 8px;
}

body.page-front .ios-checkout-hint--after-finished {
    margin: 0;
    border-top: 0.5px solid var(--ios-sep-light);
    border-radius: 0;
}

/* 收退提示：嵌在「已加菜品」明细行下方，右对齐 */
body.page-front .ios-checkout-hint--under-detail {
    margin: 0;
    padding: 4px 16px 12px;
    text-align: right;
    background: transparent;
    border-radius: 0;
}

body.page-front .ios-checkout-hint--under-detail .ios-checkout-hint-main {
    text-align: right;
    margin: 0;
    padding: 0;
    font-size: 15px;
}

.ios-add-wrap {
    margin-top: 10px;
    margin-bottom: 8px;
}

.ios-subsection-title {
    margin: 16px 0 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-label);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.ios-add-list .ios-add-line {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.ios-add-line-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.ios-add-paid-form-root {
    margin: 0;
    padding: 0;
    border: 0;
}

.ios-add-del-form {
    margin: 0;
    padding: 0;
    border: 0;
    display: inline-flex;
    align-items: center;
}

.ios-add-del-slot {
    min-width: 58px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

button.ios-btn-delete-add.ios-add-del-align {
    visibility: hidden;
    pointer-events: none;
}

.ios-btn-delete-add {
    margin: 0;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ios-danger, #c00);
    background: rgba(255, 59, 48, 0.12);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.ios-btn-delete-add:active {
    opacity: 0.85;
}

.ios-btn-delete-add:disabled {
    color: var(--ios-tertiary-label, #8e8e93);
    background: rgba(142, 142, 147, 0.16);
    cursor: not-allowed;
    opacity: 1;
}

.ios-add-line-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    flex: 1;
    min-width: 0;
}

.ios-add-name {
    font-weight: 600;
    font-size: 17px;
}

.ios-add-meta {
    font-size: 15px;
    color: var(--ios-label);
}

.ios-add-paid-cell {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
}

.ios-add-paid-label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ios-label);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.ios-add-paid-cb {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--ios-blue);
    cursor: pointer;
}

.ios-add-save-paid-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 6px 12px 8px;
}

body.page-front .ios-add-list .ios-add-save-paid-btn {
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 8px;
    border: 0;
    background: var(--ios-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

body.page-front .ios-add-list .ios-add-save-paid-btn:active {
    background: var(--ios-blue-press);
}

.ios-add-total-row {
    background: rgba(118, 118, 128, 0.08);
    font-weight: 600;
}

.ios-add-total-row.ios-add-total-one-line {
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.ios-add-total-inline {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px 10px;
    font-size: 14px;
    line-height: 1.3;
    text-align: right;
}

.ios-add-ti {
    white-space: nowrap;
}

.ios-add-ti-sep {
    color: var(--ios-label);
    font-weight: 400;
    user-select: none;
}

.ios-add-total-k {
    color: var(--ios-label);
    font-weight: 500;
}

.ios-add-total-num {
    font-weight: 600;
    color: var(--ios-text);
}

.ios-add-total-paid {
    font-weight: 600;
    color: var(--ios-blue);
}

.ios-add-total {
    font-size: 17px;
    color: var(--ios-blue);
}

.ios-add-slot {
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: flex-end;
    padding-top: 12px;
    padding-bottom: 12px;
}

.ios-add-slot-dish {
    flex: 1 1 160px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

select.ios-add-dish-select {
    width: 100%;
    padding: 8px 28px 8px 10px;
    border-radius: 8px;
    border: 0;
    background-color: rgba(118, 118, 128, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%238e8e93' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    font-size: 16px;
    color: var(--ios-text);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

select.ios-add-dish-select:focus {
    outline: 2px solid rgba(0, 122, 255, 0.35);
    outline-offset: 1px;
}

.ios-add-qty-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ios-label);
    letter-spacing: 0.02em;
}

select.ios-add-qty {
    width: 100%;
    padding: 8px 28px 8px 10px;
    border-radius: 8px;
    border: 0;
    background-color: rgba(118, 118, 128, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%238e8e93' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    font-size: 17px;
    text-align: left;
    color: var(--ios-text);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

select.ios-add-qty:focus {
    outline: 2px solid rgba(0, 122, 255, 0.35);
    outline-offset: 1px;
}

.ios-add-submit-wrap {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    align-self: flex-end;
}

.ios-add-submit-wrap .ios-add-qty-label {
    visibility: hidden;
}

body.page-front .ios-add-form .ios-add-submit-btn {
    width: auto;
    min-width: 56px;
    min-height: 34px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.ios-add-form > .ios-add-slot:last-child {
    border-bottom: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


body.page-front .field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-label);
    margin: 0 0 6px 16px;
}

body.page-front .row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

body.page-front .row.order-form-row {
    gap: 24px;
}

body.page-front .order-form-row .order-form-twin {
    flex: 1 1 0;
    min-width: 0;
}

body.page-front .input,
body.page-front select.input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 0;
    background: var(--ios-card);
    color: var(--ios-text);
    font-size: 17px;
    line-height: 1.35;
    box-sizing: border-box;
    min-height: 50px;
    box-shadow: var(--ios-shadow);
    -webkit-appearance: none;
    appearance: none;
}

body.page-front select.input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%238e8e93' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

body.page-front .input:focus,
body.page-front select.input:focus {
    outline: 2px solid rgba(0, 122, 255, 0.35);
    outline-offset: 0;
}

body.page-front .form-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.page-front .field.full,
body.page-front .actions.full {
    width: 100%;
}

body.page-front .hint {
    margin: 6px 0 0 16px;
    font-size: 13px;
    color: var(--ios-label);
}

body.page-front .btn-primary {
    width: 100%;
    min-height: 50px;
    border-radius: 12px;
    border: 0;
    background: var(--ios-blue);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

body.page-front .btn-primary:active {
    background: var(--ios-blue-press);
}

body.page-front .alert {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: var(--ios-radius-lg);
    font-size: 15px;
    border: 0;
}

body.page-front .alert-success {
    background: var(--ios-success-bg);
    color: var(--ios-success-text);
}

body.page-front .alert-error {
    background: rgba(255, 59, 48, 0.12);
    color: #c62828;
}

.ios-empty {
    padding: 16px;
    text-align: center;
    font-size: 15px;
    color: var(--ios-label);
}

body.page-front a.ios-inline-link {
    color: var(--ios-blue);
    font-weight: 600;
    text-decoration: underline;
}

.ios-search-order-detail {
    margin-bottom: 12px;
}

.ios-search-order-detail:last-of-type {
    margin-bottom: 4px;
}

.ios-footnote {
    margin: 16px 16px 0;
    font-size: 13px;
    color: var(--ios-label);
    text-align: center;
}

/* 删除加菜 · 确认弹层（<dialog>） */
body.page-front dialog.ios-dialog {
    margin: auto;
    padding: 0;
    border: none;
    max-width: calc(100vw - 40px);
    width: 300px;
    background: transparent;
    box-shadow: none;
    z-index: 500;
}

body.page-front dialog.ios-dialog::backdrop {
    background: rgba(0, 0, 0, 0.38);
    -webkit-backdrop-filter: saturate(1.2) blur(8px);
    backdrop-filter: saturate(1.2) blur(8px);
}

body.page-front .ios-dialog-card {
    background: var(--ios-card);
    border-radius: var(--ios-radius-xl);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    text-align: center;
}

body.page-front .ios-dialog-text {
    margin: 0;
    padding: 22px 20px 20px;
    font-size: 15px;
    color: var(--ios-text);
    line-height: 1.45;
    opacity: 0.92;
}

body.page-front .ios-dialog-footer {
    display: flex;
    border-top: 1px solid var(--ios-sep-light);
}

body.page-front .ios-dialog-foot-btn {
    flex: 1;
    margin: 0;
    padding: 14px 12px;
    font-size: 17px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    background: var(--ios-card);
    color: var(--ios-blue);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

body.page-front .ios-dialog-foot-btn:active {
    background: rgba(0, 0, 0, 0.04);
}

body.page-front .ios-dialog-foot-btn + .ios-dialog-foot-btn {
    border-left: 1px solid var(--ios-sep-light);
}

body.page-front .ios-dialog-foot-btn-danger {
    color: var(--ios-danger);
    font-weight: 700;
}

body.page-front .ios-dialog-foot-btn-primary {
    color: var(--ios-blue);
    font-weight: 700;
}

body.page-front .ios-order-bill .ios-oc-amount-paid-btn {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ios-blue);
    text-align: right;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

body.page-front .ios-order-bill .ios-oc-amount-paid-btn:active {
    opacity: 0.65;
}

body.page-front .ios-amount-paid-dialog-form {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

body.page-front .ios-amount-paid-dialog-body {
    padding: 18px 20px 16px;
    text-align: left;
}

body.page-front .ios-amount-paid-dialog-title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 700;
    color: var(--ios-text);
    text-align: center;
}

body.page-front .ios-amount-paid-dialog-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ios-label);
}

body.page-front .ios-amount-paid-dialog-input {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(60, 60, 67, 0.2);
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ios-text);
    background: rgba(118, 118, 128, 0.08);
}

body.page-front .ios-amount-paid-dialog-input:focus {
    outline: none;
    border-color: var(--ios-blue);
    background: var(--ios-card);
}

/* 可选顶栏：未设置 $payment_qr_hide_top_dock 时显示（新建订单、后台、收款码）；首页已并入搜索卡片同一行 */
body.page-front .ios-front-dock {
    position: static;
    z-index: auto;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
    box-sizing: border-box;
}

body.page-front .ios-front-dock-surface {
    width: 100%;
    max-width: 430px;
}

body.page-front .ios-front-dock-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(1.2) blur(16px);
    backdrop-filter: saturate(1.2) blur(16px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.1),
        0 0 0 0.5px rgba(60, 60, 67, 0.1);
}

body.page-front .ios-front-dock-slot {
    display: flex;
    align-items: center;
    min-width: 0;
}

body.page-front .ios-front-dock-slot--start {
    justify-content: flex-start;
}

body.page-front .ios-front-dock-slot--center {
    justify-content: center;
}

body.page-front .ios-front-dock-slot--end {
    justify-content: flex-end;
}

/* 顶栏链接：独立圆角块（左 / 中各一） */
body.page-front .ios-front-dock-inner .ios-front-nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    max-width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    color: var(--ios-text);
    text-decoration: none;
    border-radius: 10px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    background: var(--ios-search-bg);
    box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.12);
}

body.page-front .ios-front-dock-inner .ios-front-nav-item:active {
    background: rgba(255, 255, 255, 0.75);
}

body.page-front .ios-front-dock-inner .ios-front-nav-item:focus-visible {
    outline: 2px solid rgba(0, 122, 255, 0.45);
    outline-offset: 1px;
}

body.page-front .ios-pay-qr-open-btn {
    flex-shrink: 0;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    border: 0;
    background: var(--ios-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

body.page-front .ios-pay-qr-open-btn:active {
    background: var(--ios-blue-press);
}

body.page-front dialog.ios-pay-qr-dialog {
    margin: auto;
    padding: 0;
    border: none;
    max-width: calc(100vw - 24px);
    width: min(400px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    background: transparent;
    box-shadow: none;
}

body.page-front dialog.ios-pay-qr-dialog::backdrop {
    background: rgba(0, 0, 0, 0.38);
    -webkit-backdrop-filter: saturate(1.2) blur(8px);
    backdrop-filter: saturate(1.2) blur(8px);
}

body.page-front .ios-pay-qr-dialog-card {
    display: flex;
    flex-direction: column;
    max-height: min(85vh, 720px);
    max-height: min(85dvh, 720px);
    background: var(--ios-card);
    border-radius: var(--ios-radius-xl);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

body.page-front .ios-pay-qr-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--ios-sep-light);
    flex-shrink: 0;
}

body.page-front .ios-pay-qr-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ios-text);
}

body.page-front .ios-pay-qr-close {
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--ios-label);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.page-front .ios-pay-qr-close:active {
    background: rgba(0, 0, 0, 0.06);
}

body.page-front .ios-pay-qr-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 18px;
}

body.page-front .ios-pay-qr-sub {
    margin: 16px 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ios-label);
    text-transform: none;
    letter-spacing: 0;
}

body.page-front .ios-pay-qr-sub:first-child {
    margin-top: 0;
}

body.page-front .ios-pay-qr-fig {
    margin: 0 0 18px;
    padding: 0;
    text-align: center;
}

body.page-front .ios-pay-qr-fig:last-child {
    margin-bottom: 0;
}

body.page-front .ios-pay-qr-img {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid var(--ios-sep-light);
    background: #fafafa;
}

body.page-front .ios-pay-qr-cap {
    margin-top: 8px;
    font-size: 14px;
    color: var(--ios-text);
    line-height: 1.35;
}

/* 订单信息页 · 打印（仅账单 + 已加菜品与结账提示） */
body.page-front .ios-order-print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 10px 16px;
}

body.page-front .ios-order-print-header .ios-section-title-bill {
    margin: 0;
    flex: 1;
    min-width: 0;
}

body.page-front .ios-order-print-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
}

body.page-front .ios-order-print-btn {
    flex-shrink: 0;
    min-height: 0;
    padding: 4px 12px;
    border-radius: 8px;
    border: 0;
    background: var(--ios-search-bg);
    color: var(--ios-blue);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.25;
    letter-spacing: -0.28px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.12);
}

body.page-front .ios-order-print-btn:active {
    opacity: 0.65;
}

/* 仅打印时显示的店名标题 */
body.page-front .front-print-shop-title {
    display: none;
}

@page {
    margin: 10mm;
    size: auto;
}

@media print {
    body.page-front:has(.front-order-print-area) * {
        visibility: hidden !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area,
    body.page-front:has(.front-order-print-area) .front-order-print-area * {
        visibility: visible !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .front-no-print {
        display: none !important;
        visibility: hidden !important;
    }

    /* 小票：窄栏、居中、等宽字；最外黑框已去掉，内文分区仍用表格线等 */
    body.page-front:has(.front-order-print-area) .front-order-print-area {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        top: 0 !important;
        transform: none !important;
        width: 72mm !important;
        max-width: calc(100% - 16mm) !important;
        margin: 0 !important;
        padding: 8px 7px 10px !important;
        box-sizing: border-box !important;
        background: #fff !important;
        color: #000 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        font-family: "Courier New", Courier, "Noto Sans Mono CJK SC", ui-monospace, monospace !important;
        font-size: 9.5pt !important;
        line-height: 1.35 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.page-front:has(.front-order-print-area) .front-print-shop-title {
        display: block !important;
        visibility: visible !important;
        margin: 0 0 6px !important;
        padding: 0 2px 6px !important;
        font-size: 11pt !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        letter-spacing: 0.04em !important;
        color: #000 !important;
        border-bottom: 1px dashed #000 !important;
    }

    body.page-front:has(.front-order-print-area) .ios-order-print-header {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 0 6px !important;
        padding: 0 0 6px !important;
        border-bottom: 1px dashed #000 !important;
        gap: 8px !important;
    }

    body.page-front:has(.front-order-print-area) .ios-order-print-header .ios-section-title-bill {
        flex: none !important;
        margin: 0 !important;
        font-size: 9.5pt !important;
        font-weight: 700 !important;
        text-align: center !important;
        color: #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-group.ios-order-bill {
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-order-bill-count-price-row {
        padding: 0 !important;
        min-height: 0 !important;
        margin-top: 0 !important;
        border-radius: 0 !important;
        overflow: visible !important;
        border: none !important;
        background: transparent !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-order-count-price {
        width: 100% !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-order-count-price td {
        padding: 3px 4px !important;
        vertical-align: middle !important;
        border: 1px solid #000 !important;
        background: #fff !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-order-bill .ios-oc-lb {
        font-size: 7.5pt !important;
        font-weight: 600 !important;
        color: #444 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-order-bill .ios-oc-v {
        font-size: 8.5pt !important;
        font-weight: 700 !important;
        color: #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-order-bill .ios-oc-amount-paid-btn {
        color: #000 !important;
        text-decoration: none !important;
        cursor: default !important;
        border: 0 !important;
        background: transparent !important;
        padding: 0 !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-order-bill .ios-oc-v-datetime {
        font-size: 8.5pt !important;
        font-weight: 600 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-add-wrap {
        margin-top: 6px !important;
        margin-bottom: 0 !important;
        padding-top: 6px !important;
        border-top: 1px dashed #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-subsection-title {
        margin: 0 0 6px !important;
        padding: 0 !important;
        font-size: 8.5pt !important;
        font-weight: 700 !important;
        text-align: center !important;
        letter-spacing: 0.35em !important;
        text-indent: 0.35em !important;
        color: #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-add-list {
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-add-line {
        justify-content: flex-start !important;
        min-height: 0 !important;
        padding: 3px 0 !important;
        margin: 0 !important;
        font-size: 8.5pt !important;
        border-bottom: 1px dotted #999 !important;
        gap: 6px !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-add-name {
        font-weight: 600 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-add-meta {
        color: #000 !important;
        font-size: 8.5pt !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-add-total-row {
        margin-top: 4px !important;
        padding-top: 6px !important;
        padding-bottom: 2px !important;
        min-height: 0 !important;
        border-top: 2px solid #000 !important;
        border-bottom: none !important;
        font-size: 8.5pt !important;
        font-weight: 700 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-row-label {
        color: #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-add-total-inline {
        font-weight: 700 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-add-total-k {
        color: #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-checkout-hint--under-detail {
        margin: 0 !important;
        padding: 4px 0 0 !important;
        background: transparent !important;
        border-top: 1px dashed #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-checkout-hint--under-detail .ios-checkout-hint-main {
        font-size: 8.5pt !important;
        font-weight: 700 !important;
        color: #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-checkout-hint-pay strong,
    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-checkout-hint-refund strong {
        color: #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-checkout-hint--after-finished {
        margin: 0 !important;
        padding: 8px 0 0 !important;
        background: transparent !important;
        border-top: 1px solid #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-checkout-hint--after-finished .ios-checkout-hint-caption {
        font-size: 8pt !important;
        color: #000 !important;
    }

    body.page-front:has(.front-order-print-area) .front-order-print-area .ios-checkout-hint--after-finished .ios-checkout-hint-main {
        font-size: 9pt !important;
        font-weight: 700 !important;
        color: #000 !important;
    }
}
