:root {
    color-scheme: light;
    --brand: oklch(51% 0.038 145);
    --brand-strong: oklch(37% 0.032 148);
    --brand-soft: oklch(95.5% 0.018 142);
    --accent: oklch(74% 0.055 86);
    --accent-soft: oklch(96.5% 0.022 88);
    --blue: oklch(47% 0.095 258);
    --blue-soft: oklch(94% 0.025 258);
    --danger: oklch(51% 0.17 29);
    --danger-soft: oklch(96% 0.035 29);
    --warning: oklch(58% 0.13 58);
    --warning-soft: oklch(95% 0.04 58);
    --ink: oklch(22% 0.012 150);
    --text: oklch(35% 0.011 150);
    --muted: oklch(55% 0.01 150);
    --subtle: oklch(70% 0.008 150);
    --line: oklch(88.5% 0.007 150);
    --line-strong: oklch(80.5% 0.008 150);
    --surface: oklch(98.7% 0.003 150);
    --surface-raised: oklch(99.7% 0.002 150);
    --page-bg: oklch(97.4% 0.004 140);
    --shadow-sm: 0 1px 0 oklch(22% 0.02 150 / 0.05);
    --shadow-md: 0 16px 36px oklch(22% 0.02 150 / 0.11);
    --shadow-focus: 0 0 0 3px color-mix(in oklch, var(--brand), transparent 86%);
    --radius-card: 8px;
    --radius-control: 10px;
    --radius-pill: 999px;
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 20px;
    --space-xl: 28px;
    --tap: 48px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page-bg);
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--page-bg);
    color: var(--ink);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

.material-symbols-outlined {
    display: inline-block;
    direction: ltr;
    font-family: "Material Symbols Outlined";
    font-feature-settings: "liga";
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    overflow: hidden;
    text-rendering: optimizeLegibility;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
}

.skip-link {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 8px);
    left: 12px;
    z-index: 1000;
    transform: translateY(-140%);
    padding: 8px 12px;
    border-radius: var(--radius-control);
    background: var(--ink);
    color: var(--surface-raised);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.16s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

body::before {
    content: none;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    touch-action: manipulation;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--ink);
    background: var(--surface-raised);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    backdrop-filter: none;
}

.header-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    min-height: calc(58px + env(safe-area-inset-top));
    max-width: 480px;
    margin: 0 auto;
    padding: env(safe-area-inset-top) 14px 0;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    min-width: 0;
}

.header-left {
    justify-content: flex-start;
}

.header-right {
    justify-content: flex-end;
    gap: var(--space-xs);
}

.header h1 {
    justify-self: center;
    margin: 0;
    min-width: 0;
    max-width: min(220px, calc(100vw - 156px));
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--ink);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-back,
.header-placeholder {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
}

.nav-back {
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.16s ease, transform 0.1s ease;
}

.nav-back svg {
    width: 24px;
    height: 24px;
}

.nav-back:active {
    transform: scale(0.94);
    background: color-mix(in oklch, var(--brand-soft), white 36%);
}

.header-action,
.channel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 72px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.container {
    width: min(100%, 480px);
    margin: 0 auto;
    padding: 14px 16px calc(104px + env(safe-area-inset-bottom));
    display: grid;
    gap: var(--space-md);
    flex: 1;
    align-content: start;
    overflow-x: hidden;
}

.no-tabbar .container {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.app-main {
    animation: page-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.is-navigating .app-main {
    opacity: 0.68;
    transform: translateY(2px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    margin: 0 0 var(--space-lg);
    padding: var(--space-md);
    border: 1px solid color-mix(in oklch, var(--line), white 24%);
    border-radius: var(--radius-card);
    background: var(--surface-raised);
    box-shadow: none;
    overflow: hidden;
}

.card-title {
    margin: 0 0 var(--space-sm);
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.section-head .card-title {
    margin-bottom: 0;
}

.section-meta {
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.app-hero {
    display: grid;
    gap: var(--space-sm);
    padding: 18px var(--space-md);
    background: var(--surface-raised);
}

.app-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
}

.app-kicker.centered {
    margin-inline: auto;
}

.app-title {
    margin: 0;
    color: var(--ink);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: 0;
}

.app-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.home-hero,
.profile-hero {
    align-items: start;
}

.profile-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-md);
}

.farm-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-xs);
    min-height: 44px;
    padding: 0 12px;
    border: none;
    border-radius: var(--radius-card);
    background: color-mix(in oklch, var(--brand-soft), white 30%);
    color: var(--brand-strong);
    text-decoration: none;
}

.farm-chip span {
    color: var(--muted);
    font-size: 12px;
}

.farm-chip strong {
    min-width: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.status-line {
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.status-subline {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

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

.feature-tile {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 12px;
    border: none;
    border-radius: var(--radius-card);
    background: var(--page-bg);
    color: inherit;
    text-decoration: none;
    box-shadow: none;
    transition: transform 0.12s ease, background 0.16s ease;
}

.feature-tile::after {
    content: "chevron_right";
    color: var(--subtle);
    font-family: "Material Symbols Outlined";
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
}

.feature-tile.is-static {
    grid-template-columns: 42px minmax(0, 1fr);
}

.feature-tile.is-static::after {
    content: none;
}

a.feature-tile:active {
    transform: scale(0.985);
    background: color-mix(in oklch, var(--brand-soft), white 40%);
}

.feature-tile.is-static {
    background: color-mix(in oklch, var(--brand-soft), white 62%);
}

.feature-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.feature-tile strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.feature-tile small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.feature-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: none;
    border-radius: 10px;
    background: color-mix(in oklch, var(--brand-soft), white 40%);
    color: var(--brand-strong);
}

.feature-icon .material-symbols-outlined {
    display: block;
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
}

.feature-icon.is-garden {
    border: none;
    background: color-mix(in oklch, var(--brand-soft), white 30%);
    color: var(--brand-strong);
}

.feature-icon.is-accent {
    border: none;
    background: color-mix(in oklch, var(--accent-soft), white 30%);
    color: oklch(45% 0.052 88);
}

.feature-icon.is-blue {
    border: none;
    background: color-mix(in oklch, var(--blue-soft), white 30%);
    color: oklch(39% 0.082 246);
}

.feature-icon.is-profile {
    border: none;
    background: color-mix(in oklch, var(--brand-soft), white 30%);
    color: oklch(38% 0.042 148);
}

.compact-list,
.product-list {
    display: grid;
    gap: var(--space-xs);
}

.compact-row,
.product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-sm);
    min-height: 50px;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid color-mix(in oklch, var(--line), white 60%);
    color: inherit;
    text-decoration: none;
}

.compact-row:last-child,
.product-row:last-child {
    border-bottom: 0;
}

.compact-row span,
.product-title {
    min-width: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.compact-row strong,
.product-price strong {
    color: var(--brand-strong);
    font-size: 15px;
    white-space: nowrap;
}

.account-snapshot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-md);
}

.quick-links {
    display: grid;
    gap: var(--space-xs);
    justify-items: end;
}

.quick-links a {
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.product-row {
    align-items: start;
    min-height: 64px;
}

.product-meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.product-price {
    display: grid;
    justify-items: end;
    gap: 3px;
}

.product-price span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.hero-note,
.state-note {
    margin-top: var(--space-sm);
    padding: 9px 11px;
    border: 1px solid color-mix(in oklch, var(--line), white 24%);
    border-radius: var(--radius-card);
    background: var(--brand-soft);
    color: var(--text);
    font-size: 12px;
    line-height: 1.65;
}

.state-note {
    margin-top: 0;
}

.state-note.is-warning,
.hero-note.is-warning {
    border: none;
    background: var(--warning-soft);
    color: oklch(36% 0.085 58);
}

.state-note.is-danger,
.hero-note.is-danger {
    border: none;
    background: var(--danger-soft);
    color: oklch(36% 0.1 29);
}

.state-note.is-info,
.hero-note.is-info {
    border: none;
    background: var(--blue-soft);
    color: oklch(36% 0.075 242);
}

.rule-link {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    color: var(--brand-strong);
    font-weight: 700;
    line-height: inherit;
    text-align: left;
    cursor: pointer;
}

.rule-link:focus-visible {
    outline: 2px solid color-mix(in oklch, var(--brand), transparent 50%);
    outline-offset: 3px;
    border-radius: 4px;
}

.rule-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: var(--page-bg);
}

.rule-overlay-header {
    flex-shrink: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in oklch, var(--surface-raised), transparent 4%);
}

.rule-overlay-header-inner {
    display: grid;
    max-width: 480px;
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    padding: 14px 16px;
}

.rule-overlay-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.rule-overlay-close {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 0;
    background: none;
    color: var(--brand-strong);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.rule-overlay-body {
    display: grid;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    flex: 1;
    gap: var(--space-lg);
    overflow: auto;
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
}

.action-list {
    display: grid;
    gap: var(--space-xs);
}

.action-item {
    display: grid;
    grid-template-columns: 44px 1fr 28px;
    align-items: center;
    gap: var(--space-sm);
    min-height: 68px;
    padding: var(--space-sm);
    border: none;
    border-radius: var(--radius-card);
    background: var(--page-bg);
    color: inherit;
    text-decoration: none;
    touch-action: manipulation;
    transition: transform 0.12s ease, background 0.18s ease;
}

.action-item:active {
    transform: scale(0.992);
    background: color-mix(in oklch, var(--brand-soft), white 40%);
}

.action-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    border: none;
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.action-icon.is-accent {
    border: none;
    background: var(--accent-soft);
    color: oklch(39% 0.09 86);
}

.action-icon.is-blue {
    border: none;
    background: var(--blue-soft);
    color: oklch(36% 0.09 242);
}

.action-title {
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.action-desc {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.action-arrow {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-xs);
}

.metric-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.mini-card {
    min-width: 0;
    padding: var(--space-sm);
    border: none;
    border-radius: 10px;
    background: var(--page-bg);
}

.metric-label {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.metric-value {
    margin-top: 5px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    word-break: break-word;
}

.metric-value.primary {
    color: var(--brand);
    font-size: 28px;
}

.metric-value.success {
    color: var(--brand);
}

.metric-value.warning {
    color: var(--warning);
}

.metric-value.large {
    font-size: 40px;
}

.account-overview-card .metric-value,
.account-overview-card .metric-value.primary,
.account-overview-card .metric-value.success {
    color: var(--brand);
    font-size: 26px;
    font-variant-numeric: tabular-nums;
    line-height: 1.12;
}

.account-overview-card .metric-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-overview-card .metric-card-spend {
    grid-column: 1 / -1;
}

.account-overview-card .metric-card-spend .metric-value {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.account-overview-card .metric-card {
    display: grid;
    align-content: center;
    min-height: 82px;
}

.detail-list {
    display: grid;
    gap: var(--space-xs);
}

.detail-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid color-mix(in oklch, var(--line), white 60%);
}

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

.detail-label {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.detail-value {
    min-width: 0;
    color: var(--text);
    font-size: 13px;
    text-align: right;
    word-break: break-word;
}

.form-group {
    display: grid;
    gap: 6px;
    margin-bottom: var(--space-md);
}

.form-group label {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select,
.form-control {
    width: 100%;
    min-height: var(--tap);
    padding: 0 13px;
    border: 1px solid color-mix(in oklch, var(--line-strong), white 28%);
    border-radius: var(--radius-control);
    outline: none;
    background: color-mix(in oklch, var(--surface-raised), var(--page-bg) 16%);
    color: var(--ink);
    font-size: 16px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
    appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.form-control::placeholder {
    color: var(--subtle);
    opacity: 1;
}

.form-group textarea {
    min-height: 96px;
    padding-top: 12px;
    padding-bottom: 12px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-control:focus {
    border-color: color-mix(in oklch, var(--brand), white 8%);
    box-shadow: var(--shadow-focus);
}

.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled,
.form-control:disabled {
    color: var(--subtle);
    background: color-mix(in oklch, var(--surface), var(--line) 30%);
    cursor: not-allowed;
}

.amount-input {
    min-height: 64px;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
}

.mode-tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    padding: 0;
}
.mode-tab {
    flex: 1;
    min-height: 40px;
    padding-bottom: 8px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: color .2s ease;
}
.mode-tab.active {
    background: transparent;
    color: var(--brand-strong);
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--brand);
}

.btn {
    display: inline-flex;
    width: 100%;
    min-width: 120px;
    min-height: var(--tap);
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.18s ease, background 0.18s ease;
    appearance: none;
    -webkit-appearance: none;
}

.btn:focus-visible,
.nav-back:focus-visible,
.header-action:focus-visible,
.pay-header-home:focus-visible,
.pay-header-more:focus-visible,
.tabbar-item:focus-visible,
.action-item:focus-visible,
.auth-guest-button:focus-visible,
.product-card:focus-visible,
.product-dropdown-trigger:focus-visible,
.me-stat:focus-visible,
.me-row:focus-visible {
    outline: 0;
    box-shadow: var(--shadow-focus);
}

.btn:active {
    transform: scale(0.992);
}

.btn:disabled,
.btn.is-disabled {
    opacity: 0.58;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--brand);
    color: white;
    box-shadow: none;
}

.btn-primary:active {
    opacity: 0.85;
}

.btn-success,
.btn-wechat {
    background: var(--brand);
    color: white;
}

.btn-alipay {
    background: var(--blue);
    color: var(--surface-raised);
}

.btn-outline {
    border-color: var(--line-strong);
    background: transparent;
    color: var(--brand-strong);
}

.btn-sm {
    width: auto;
    min-width: 76px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
}

.btn-fit {
    width: auto;
    min-width: 96px;
    align-self: start;
}

.btn-quiet {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-xs);
}

.button-stack {
    display: grid;
    gap: var(--space-xs);
}

.bottom-actions {
    position: sticky;
    bottom: calc(74px + env(safe-area-inset-bottom));
    z-index: 40;
    margin: var(--space-sm) -14px 0;
    padding: var(--space-sm) 14px calc(var(--space-sm) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface-raised);
    backdrop-filter: none;
}

.no-tabbar .bottom-actions {
    bottom: 0;
}

.tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: min(100%, 480px);
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface-raised);
    box-shadow: none;
    backdrop-filter: none;
}

.tabbar-item {
    display: grid;
    min-width: 0;
    min-height: 54px;
    place-items: center;
    align-content: center;
    gap: 3px;
    border-radius: var(--radius-control);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease, transform 0.1s ease;
}

.tabbar-item:active {
    transform: scale(0.96);
    background: color-mix(in oklch, var(--brand-soft), white 34%);
}

.tabbar-item.active {
    color: var(--brand-strong);
    background: color-mix(in oklch, var(--brand-soft), white 44%);
}

.tabbar-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
}

.tabbar-icon svg {
    width: 23px;
    height: 23px;
}

.amount-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    padding: var(--space-md) 0;
}

.amount-display .symbol {
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
}

.amount-display .value {
    color: var(--ink);
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.error-msg {
    margin-bottom: var(--space-sm);
    padding: 10px 12px;
    border: none;
    border-radius: var(--radius-card);
    background: var(--danger-soft);
    color: oklch(36% 0.1 29);
    font-size: 13px;
    line-height: 1.55;
}

.field-error {
    color: var(--danger);
    font-size: 12px;
    line-height: 1.45;
}

.success-icon {
    display: grid;
    width: 72px;
    height: 72px;
    margin: var(--space-lg) auto var(--space-sm);
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 12px 24px color-mix(in oklch, var(--brand), transparent 78%);
}

.success-icon svg {
    width: 36px;
    height: 36px;
    fill: white;
}

.meta-card {
    display: grid;
    gap: 0;
    margin-top: var(--space-sm);
    padding: 2px var(--space-sm);
    border: none;
    border-radius: var(--radius-card);
    background: var(--page-bg);
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 9px 0;
    border-bottom: 1px solid color-mix(in oklch, var(--line), white 55%);
    color: var(--muted);
    font-size: 13px;
    min-width: 0;
}

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

.meta-value {
    color: var(--text);
    font-weight: 700;
    text-align: right;
    word-break: break-word;
    min-width: 0;
    overflow-wrap: break-word;
}

.mono,
.meta-value.mono,
.order-no,
.points-ledger-code,
.ledger-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0;
}

.ledger-balance {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.text-link {
    border: 0;
    background: transparent;
    color: var(--brand);
    font: inherit;
    font-weight: 700;
    padding: 0 0 0 6px;
}

.order-item,
.ledger-item,
.points-ledger-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid color-mix(in oklch, var(--line), white 60%);
}

.order-item:last-child,
.ledger-item:last-child,
.points-ledger-item:last-child {
    border-bottom: 0;
}

.order-info {
    min-width: 0;
}

.order-info .order-no,
.order-no {
    color: var(--muted);
    font-size: 12px;
    word-break: break-all;
}

.order-info .order-channel,
.order-channel,
.order-points,
.points-ledger-meta,
.ledger-meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.order-amount {
    display: block;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

.order-amount.paid,
.points-change.positive,
.ledger-change.positive {
    color: var(--brand);
}

.order-amount.pending,
.points-change.negative,
.ledger-change.negative {
    color: var(--warning);
}

.status-tag,
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    margin-top: 5px;
    padding: 0 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-tag.paid,
.pill.paid,
.pill.success {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.pill.default {
    background: color-mix(in oklch, var(--surface), var(--muted) 8%);
    color: var(--muted);
}

.pill.danger {
    background: color-mix(in oklch, var(--warning-soft), #fde8e8 40%);
    color: oklch(42% 0.12 25);
}

.status-tag.pending,
.pill.pending,
.pill.warning {
    background: var(--warning-soft);
    color: oklch(38% 0.09 58);
}

.points-change,
.ledger-change {
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.points-balance,
.ledger-balance {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.empty-state {
    display: grid;
    gap: var(--space-xs);
    padding: var(--space-lg) var(--space-md);
    place-items: center;
    border: none;
    border-radius: var(--radius-card);
    background: var(--page-bg);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.empty-state strong {
    color: var(--text);
    font-size: 15px;
}

.signature-image {
    max-width: 100%;
    max-height: 112px;
}

.text-center { text-align: center; }
.text-muted { color: var(--muted); font-size: 13px; }
.mt-12 { margin-top: var(--space-sm); }
.mt-16 { margin-top: var(--space-md); }
.mt-24 { margin-top: var(--space-lg); }
.mb-8 { margin-bottom: var(--space-xs); }

.task-panel {
    display: grid;
    gap: var(--space-sm);
    padding: var(--space-lg) 0;
    border: 0;
    border-radius: var(--radius-card);
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.task-panel + .task-panel,
.task-panel + .button-stack,
.button-stack + .task-panel {
    margin-top: 0;
}

.task-kicker {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.task-title {
    margin: 0;
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1.18;
    letter-spacing: 0;
}

.task-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.task-form {
    display: grid;
    gap: var(--space-sm);
}

.task-form .form-group {
    margin-bottom: 0;
}

.task-form.compact {
    margin-top: var(--space-sm);
}

.code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: var(--space-sm);
    align-items: end;
}

.check-line {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xs);
    padding: 2px 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.4;
}

.check-line input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--brand);
    flex: 0 0 auto;
}

.password-login {
    border-top: 1px solid var(--line);
    padding-top: var(--space-sm);
}

.password-login summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 700;
}

.quote-box {
    display: grid;
    gap: var(--space-xs);
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.quote-main {
    color: var(--brand-strong);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.quote-sub {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.quote-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
}

.metric-grid > div {
    display: grid;
    gap: 4px;
    min-height: 72px;
    padding: var(--space-sm);
    border: none;
    border-radius: 10px;
    background: var(--page-bg);
}

.metric-grid span,
.compact-row small,
.order-row small,
.order-row-side small {
    color: var(--muted);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-grid strong {
    color: var(--text);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.filter-row {
    display: flex;
    gap: var(--space-xs);
    overflow-x: auto;
    padding-bottom: 2px;
}

.filter-row a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    height: 32px;
    padding: 0 12px;
    border: none;
    border-radius: 999px;
    line-height: 1;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.86rem;
    background: var(--surface);
    white-space: nowrap;
}

.filter-row a.active {
    border-color: color-mix(in oklch, var(--brand), black 8%);
    background: color-mix(in oklch, var(--brand), white 88%);
    color: color-mix(in oklch, var(--brand), black 22%);
}

.order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid color-mix(in oklch, var(--line), white 60%);
    min-width: 0;
}

.order-row a {
    min-width: 0;
}

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

.order-row > span:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
    overflow: hidden;
}

.order-row-side {
    display: grid;
    gap: 3px;
    text-align: right;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 0;
    max-width: 40%;
}

.timeline-list {
    display: grid;
    gap: var(--space-sm);
}

.timeline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border: none;
    border-radius: 10px;
    color: var(--muted);
    background: var(--page-bg);
}

.timeline-item.active {
    color: var(--text);
    border-color: color-mix(in oklch, var(--brand), white 45%);
    background: color-mix(in oklch, var(--brand), white 92%);
}

.meta-card.flat {
    box-shadow: none;
    border: 1px solid var(--line);
}

.amount-display.compact {
    margin: 0;
}

.tabbar-icon.material-symbols-outlined {
    font-size: 23px;
    line-height: 1;
}

@media (max-width: 360px) {
    .code-row {
        grid-template-columns: 1fr;
    }
    .metric-grid {
        grid-template-columns: 1fr;
    }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    background: oklch(16% 0.02 154 / 0.48);
    backdrop-filter: blur(6px);
}

.loading-overlay.active {
    display: flex;
}

.loading-panel {
    display: grid;
    min-width: 112px;
    gap: 12px;
    place-items: center;
    padding: 18px 20px;
    border: 1px solid oklch(100% 0 0 / 0.22);
    border-radius: var(--radius-card);
    background: oklch(18% 0.018 154 / 0.78);
    color: oklch(98% 0.004 154);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid oklch(100% 0 0 / 0.82);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 13px;
    font-weight: 700;
}

.app-toast {
    position: fixed;
    top: calc(66px + env(safe-area-inset-top));
    left: 50%;
    z-index: 1000;
    width: min(calc(100% - 32px), 420px);
    transform: translate(-50%, -12px);
    padding: 10px 14px;
    border-radius: var(--radius-control);
    background: var(--ink);
    color: var(--surface-raised);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-xs);
    width: min(100%, 480px);
    margin: 0 auto var(--space-md);
    padding: 0 14px;
}

.page-link,
.page-current {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.page-link {
    border: 1px solid var(--line-strong);
    background: var(--surface-raised);
    color: var(--brand-strong);
}

.page-link.disabled {
    color: var(--subtle);
}

.page-current {
    min-width: 72px;
    color: var(--muted);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (hover: hover) {
    .action-item:hover,
    .btn-outline:hover {
        border-color: color-mix(in oklch, var(--brand), white 52%);
    }
}

@media (max-width: 360px) {
    .container {
        padding-inline: 12px;
    }

    .header-row {
        padding-inline: 10px;
    }

    .header h1 {
        font-size: 16px;
    }

    .app-title {
        font-size: 22px;
    }

    .button-grid,
    .metric-grid.three,
    .profile-hero,
    .account-snapshot {
        grid-template-columns: 1fr;
    }

    .btn-fit {
        width: 100%;
    }

    .quick-links {
        justify-items: stretch;
    }

    .metric-grid {
        gap: 7px;
    }

    .header-action,
    .channel-badge {
        padding-inline: 8px;
        max-width: 72px;
    }
}

@media (min-width: 700px) {
    .container {
        padding-top: var(--space-lg);
    }

    .card {
        margin-bottom: var(--space-md);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Benefits ── */

.benefits-hero {
    display: grid;
    gap: 8px;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-card);
    background:
        linear-gradient(145deg, color-mix(in oklch, var(--brand-soft), white 50%), color-mix(in oklch, var(--surface-raised), var(--brand-soft) 30%));
}

.benefits-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.benefits-hero-links {
    display: flex;
    gap: var(--space-md);
}

.benefits-hero-links a {
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.benefits-hero .benefits-balance {
    color: var(--brand);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.benefits-hero .benefits-balance-unit {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand);
}

.benefits-metrics {
    display: flex;
    gap: var(--space-md);
    color: var(--muted);
    font-size: 12px;
}

.benefits-metrics em {
    font-style: normal;
    color: var(--text);
    font-weight: 700;
}

.benefits-hero-note {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.benefits-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
}

.benefits-entry-tile {
    display: grid;
    gap: 4px;
    padding: var(--space-md);
    border-radius: 12px;
    background: var(--surface-raised);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform 0.12s ease;
}

.benefits-entry-tile:active {
    transform: scale(0.98);
}

.benefits-entry-tile .material-symbols-outlined {
    font-size: 24px;
    color: var(--brand);
}

.benefits-entry-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.benefits-entry-count {
    font-size: 12px;
    color: var(--muted);
}

.collapsible-section {
    border-radius: var(--radius-card);
    background: var(--surface-raised);
    box-shadow: var(--shadow-sm);
    padding: 2px var(--space-lg);
}

.collapsible-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 10px 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.collapsible-section summary::-webkit-details-marker {
    display: none;
}

.collapsible-section summary::after {
    content: "expand_more";
    font-family: "Material Symbols Outlined";
    font-size: 20px;
    color: var(--muted);
    transition: transform 0.16s ease;
}

.collapsible-section[open] summary::after {
    transform: rotate(180deg);
}

.collapsible-section .collapsible-content {
    padding: var(--space-xs) 0 var(--space-sm);
}

.collapsible-divider {
    height: 1px;
    margin: var(--space-xs) 0;
    background: color-mix(in oklch, var(--line), white 40%);
}

.benefits-rule-text {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.benefits-rule-list {
    display: grid;
    gap: 6px;
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

/* ── Pay page ── */

.pay-farm-header {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 0 0 var(--space-sm);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.pay-farm-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: transparent;
    color: var(--brand-strong);
    font-size: 23px;
}

.pay-farm-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.pay-farm-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.pay-farm-name {
    color: var(--brand-strong);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pay-panel {
    gap: var(--space-md);
    padding-top: var(--space-sm);
}

.pay-panel-head {
    display: grid;
    gap: 6px;
}

.pay-panel-title {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.pay-panel-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.amount-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    transition: border-color 0.15s ease;
}

.amount-field:focus-within {
    border-color: var(--brand);
}

.amount-currency {
    color: var(--brand-strong);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

/* ── Cashier page ── */

.channel-card-list {
    display: grid;
    gap: var(--space-xs);
}

.channel-card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.channel-card input[type="radio"] {
    display: none;
}

.channel-card.selected {
    border-color: var(--brand);
    background: oklch(98% 0.01 142);
}

.channel-card-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.channel-card-icon.is-wechat {
    background: #e8f5e9;
    color: #2e7d32;
}

.channel-card-icon.is-alipay {
    background: #e3f2fd;
    color: #1565c0;
}

.channel-card-icon.is-mock {
    background: #fff3e0;
    color: #e65100;
}

.channel-card-name {
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.channel-card-check {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.channel-card.selected .channel-card-check {
    border-color: var(--brand);
    background: var(--brand);
}

.channel-card.selected .channel-card-check::after {
    content: "✓";
    font-size: 14px;
    color: white;
    line-height: 1;
}

.countdown-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* ── Product card selector ── */

.product-select-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.product-card-list {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.product-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 22px;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease;
}

.product-card:last-child {
    border-bottom: 0;
}

.product-card:active {
    transform: scale(0.992);
}

.product-card.selected {
    border-color: var(--line);
    background: oklch(99% 0.005 140);
}

.product-card-info {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.product-card-name {
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-price {
    color: var(--brand-strong);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.product-card-check {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: border-color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.product-card.selected .product-card-check {
    border-color: var(--brand);
    background: var(--brand);
}

.product-card.selected .product-card-check::after {
    content: "✓";
    font-size: 12px;
    color: white;
    line-height: 1;
}

/* ── Product dropdown (many products) ── */

.product-dropdown {
    position: relative;
}

.product-dropdown-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 24px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.product-dropdown-trigger:active {
    transform: scale(0.992);
}

.product-dropdown-trigger.is-open {
    border-color: var(--brand);
    background: white;
}

.product-dropdown-arrow {
    color: var(--muted);
    font-size: 20px;
    transition: transform 0.2s ease;
}

.product-dropdown-trigger.is-open .product-dropdown-arrow {
    transform: rotate(180deg);
}

.product-dropdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 12px oklch(0% 0 0 / 0.06);
}

.product-dropdown-panel.is-open {
    display: grid;
    gap: 2px;
}

.product-dropdown-panel .product-card {
    grid-template-columns: minmax(0, 1fr) auto 22px;
    border: 0;
    padding: var(--space-xs) var(--space-md);
    min-height: 44px;
    border-radius: 0;
}

.product-dropdown-panel .product-card.selected {
    background: oklch(98% 0.01 140);
}

/* ── Quantity stepper ── */

.quantity-stepper {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.stepper-btn {
    display: grid;
    width: 40px;
    height: 44px;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--brand-strong);
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.12s ease;
    appearance: none;
    -webkit-appearance: none;
    touch-action: manipulation;
}

.stepper-btn:active {
    background: var(--brand-soft);
}

.stepper-btn:disabled {
    color: var(--subtle);
    cursor: not-allowed;
}

.quantity-stepper .stepper-input {
    width: 100%;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    appearance: none;
    -moz-appearance: textfield;
}

.quantity-stepper .stepper-input::-webkit-inner-spin-button,
.quantity-stepper .stepper-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ── Quote skeleton ── */

.quote-box.quote-skeleton {
    pointer-events: none;
}

.quote-box.quote-skeleton .skeleton-line {
    background: color-mix(in oklch, var(--line), white 20%);
    border-radius: 6px;
    animation: skeleton-pulse 1.2s ease-in-out infinite;
}

.skeleton-line-main {
    width: 45%;
    height: 1.8rem;
}

.skeleton-line-sub {
    width: 75%;
    height: 0.9rem;
}

.skeleton-line-short {
    width: 55%;
    height: 0.9rem;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ── Countdown progress bar ── */

.countdown-bar {
    margin-top: var(--space-xs);
    height: 3px;
    border-radius: 2px;
    background: color-mix(in oklch, var(--line), white 50%);
    overflow: hidden;
}

.countdown-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--brand);
    transition: width 1s linear, background-color 0.5s ease;
}

.countdown-bar-fill.is-urgent {
    background: var(--danger);
}

/* ── Trust indicator ── */

.trust-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--space-xs) 0;
    color: var(--subtle);
    font-size: 12px;
    font-weight: 700;
}

.amount-field .amount-input {
    min-height: 50px;
    padding: 0 0 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

.amount-field .amount-input:focus {
    box-shadow: none;
}

.trust-line svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ── Result status icon ── */

.result-icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    place-items: center;
    border-radius: 50%;
}

.result-icon .material-symbols-outlined {
    font-size: 32px;
    line-height: 1;
}

.result-icon.is-success {
    background: var(--brand-soft);
    color: var(--brand);
}

.result-icon.is-pending {
    background: var(--warning-soft);
    color: var(--warning);
}

.result-icon.is-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.result-icon.is-info {
    background: var(--blue-soft);
    color: var(--blue);
}

.result-icon.is-muted {
    background: color-mix(in oklch, var(--line), white 30%);
    color: var(--muted);
}

/* ── Channel card icon sizing ── */

.channel-card-icon .material-symbols-outlined {
    font-size: 22px;
    line-height: 1;
}

/* ── Polling pulse dot ── */

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
    animation: pulse-breathe 1.5s ease-in-out infinite;
}

@keyframes pulse-breathe {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.75); }
}

/* ── Auth page ── */

body.auth-page {
    position: relative;
    min-height: 100dvh;
    background: oklch(96.6% 0.003 250);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.auth-page::before {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    width: min(100vw, 480px);
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, white 0%, oklch(98.8% 0.003 250) 42%, oklch(96.6% 0.003 250) 100%);
}

body.auth-page::after {
    content: none;
}

.auth-page .header,
.auth-page .container,
.auth-page .icp-footer {
    position: relative;
    z-index: 1;
}

.auth-page .header {
    z-index: 3;
    background: white;
    border-bottom: 1px solid oklch(92% 0.004 250);
    box-shadow: none;
    backdrop-filter: none;
}

.auth-page .header-row {
    min-height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 16px 0;
}

.auth-page .header h1 {
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
}

.auth-page .nav-back {
    color: var(--ink);
}

.auth-page .container,
.no-tabbar.auth-page .container {
    display: flex;
    justify-content: center;
    width: min(100%, 480px);
    height: calc(100dvh - 56px - env(safe-area-inset-top));
    padding: 0 28px;
    overflow: auto;
}

.auth-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2.4vh, 22px);
    max-width: 340px;
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom);
}

.auth-brand-lockup,
.auth-hero-copy,
.auth-card,
.auth-guest-form,
.auth-trust,
.auth-brand,
.auth-tagline {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-brand-logo {
    display: block;
    width: 38px;
    height: auto;
    object-fit: contain;
}

.auth-brand-name {
    color: var(--brand-strong);
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.auth-tagline {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    text-align: center;
}

.auth-card {
    display: grid;
    gap: 14px;
    width: 100%;
    padding: 14px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 36px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.auth-tab {
    position: relative;
    min-width: 0;
    padding-bottom: 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-tab:focus {
    outline: 0;
}

.auth-tab:focus-visible {
    box-shadow: var(--shadow-focus);
}

.auth-tab.active {
    color: var(--brand-strong);
    font-weight: 700;
    box-shadow: none;
}

.auth-tab.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: var(--brand);
    transform: translateX(-50%);
}

.auth-tab.active::after {
    content: none;
}

.auth-form {
    display: grid;
    gap: 14px;
    animation: fade-in 0.18s ease;
}

.auth-form .form-group {
    gap: 10px;
    margin-bottom: 0;
}

.auth-form .form-group label {
    color: var(--ink);
    font-size: 13px;
    font-weight: 400;
}

.auth-input-shell {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    transition: border-color 0.15s ease;
}

.auth-phone-shell {
    grid-template-columns: 24px auto 1px minmax(0, 1fr);
    gap: 12px;
}

.auth-input-shell:focus-within {
    border-color: var(--brand);
}

.auth-field-icon {
    color: var(--muted);
    font-size: 20px;
}

.auth-country-code {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 400;
    white-space: nowrap;
}

.auth-country-code .material-symbols-outlined {
    color: var(--subtle);
    font-size: 18px;
}

.auth-input-divider {
    width: 1px;
    height: 26px;
    background: var(--line);
}

.auth-page .auth-input-shell .form-control,
.auth-page .auth-input-shell input {
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink);
    font-size: 15px;
}

.auth-page .auth-input-shell .form-control:focus,
.auth-page .auth-input-shell input:focus {
    border: 0;
    box-shadow: none;
}

.auth-page .auth-input-shell .form-control::placeholder,
.auth-page .auth-input-shell input::placeholder {
    color: var(--muted);
}

.auth-page .code-row {
    grid-template-columns: minmax(0, 1fr) minmax(100px, 30%);
    gap: 10px;
}

.auth-page .code-row .btn-outline {
    min-width: 0;
    min-height: 46px;
    padding: 0 10px;
    border-color: var(--line);
    border-radius: 12px;
    background: white;
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

.auth-page .check-line {
    align-items: center;
    gap: 6px;
    padding: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
}

.auth-page .check-line input {
    width: 16px;
    height: 16px;
    margin-top: 0;
    accent-color: var(--brand-strong);
}

.auth-page .legal-link {
    color: var(--brand-strong);
    font-weight: 700;
}

.auth-submit {
    display: inline-flex;
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    margin-top: 2px;
    border: 0;
    border-radius: 12px;
    background: var(--brand);
    color: white;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: none;
}

.auth-submit::before,
.auth-submit::after {
    content: none;
}

.auth-card .state-note {
    display: none;
    margin-top: -2px;
    padding: 8px 10px;
    border: 0;
    border-radius: 12px;
    background: color-mix(in oklch, var(--brand-soft), white 54%);
    color: var(--brand-strong);
    text-align: center;
}

.auth-card .state-note.is-success,
.auth-card .state-note.is-danger,
.auth-card .state-note.is-warning {
    display: block;
}

.auth-footer-link {
    margin-top: -4px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.auth-footer-link a {
    color: var(--brand-strong);
    text-decoration: none;
    font-weight: 700;
}

.auth-guest-form {
    margin-top: 0;
}

.auth-guest-button {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(34px, 1fr) auto minmax(34px, 1fr);
    align-items: center;
    gap: 13px;
    min-height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand-strong);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.auth-guest-button:active {
    transform: scale(0.99);
}

.auth-guest-rule {
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, oklch(59% 0.036 145 / 0.58));
}

.auth-guest-rule:last-child {
    background: linear-gradient(90deg, oklch(59% 0.036 145 / 0.58), transparent);
}

.auth-guest-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}

.auth-guest-label .material-symbols-outlined {
    font-size: 16px;
}

.auth-page .icp-footer,
.auth-page.no-tabbar .icp-footer {
    width: min(100%, 480px);
    margin: 0 auto;
    padding: 0 16px calc(12px + env(safe-area-inset-bottom));
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.auth-mode--hidden {
    display: none;
}

.auth-page .state-note.is-info {
    display: none;
}

@media (max-width: 360px) {
    .auth-page .container,
    .no-tabbar.auth-page .container {
        padding-right: 20px;
        padding-left: 20px;
    }

    .auth-brand-name {
        font-size: 20px;
    }

    .auth-card {
        padding-right: 14px;
        padding-left: 14px;
    }

    .auth-page .code-row {
        grid-template-columns: 1fr;
    }

    .home-hero-top {
        gap: var(--space-sm);
    }

    .home-info-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Legal pages ── */

.legal-meta {
    margin: var(--space-xs) 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.legal-body h3 {
    margin: var(--space-lg) 0 var(--space-xs);
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.legal-body h3:first-child {
    margin-top: var(--space-sm);
}

.legal-body p {
    margin: 0 0 var(--space-xs);
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
}

.legal-body p strong {
    color: var(--ink);
    font-weight: 700;
}

.legal-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
}

.icp-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 8px 16px calc(72px + env(safe-area-inset-bottom));
    font-size: 11px;
    color: var(--subtle);
    line-height: 1.6;
}

.no-tabbar .icp-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.icp-footer a {
    color: inherit;
    text-decoration: none;
}

/* Non-home pages use the home page as the visual baseline. */
body:not(.home-page):not(.auth-page) {
    min-height: 100dvh;
    background: oklch(98.8% 0.01 96);
}

body:not(.home-page):not(.auth-page)::before {
    content: none;
}

body:not(.home-page):not(.auth-page) .header {
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    backdrop-filter: none;
}

body:not(.home-page):not(.auth-page) .header-row {
    min-height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 16px 0;
}

body:not(.home-page):not(.auth-page) .header h1 {
    color: var(--brand-strong);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

body:not(.home-page):not(.auth-page) .header .nav-back,
body:not(.home-page):not(.auth-page) .header-right .nav-back {
    color: var(--brand-strong);
}

body:not(.home-page):not(.auth-page) .header-action,
body:not(.home-page):not(.auth-page) .channel-badge {
    min-height: 36px;
    max-width: 84px;
    border-color: var(--line);
    border-radius: 10px;
    background: white;
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 700;
}

body:not(.home-page):not(.auth-page) .container {
    width: min(100%, 480px);
    gap: 14px;
    padding: 10px 17px calc(88px + env(safe-area-inset-bottom));
    overflow: visible;
}

body:not(.home-page):not(.auth-page).no-tabbar .container {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

body:not(.home-page):not(.auth-page) .card,
body:not(.home-page):not(.auth-page) .task-panel,
body:not(.home-page):not(.auth-page) .benefits-hero,
body:not(.home-page):not(.auth-page) .collapsible-section {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: none;
    overflow: hidden;
}

body:not(.home-page):not(.auth-page) .task-panel.app-hero,
body:not(.home-page):not(.auth-page) .result-panel {
    padding-top: 18px;
    padding-bottom: 18px;
}

body:not(.home-page):not(.auth-page) .card-title,
body:not(.home-page):not(.auth-page) .home-section-title {
    margin: 0;
    color: var(--brand-strong);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

body:not(.home-page):not(.auth-page) .app-title,
body:not(.home-page):not(.auth-page) .task-title {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

body:not(.home-page):not(.auth-page) .app-subtitle,
body:not(.home-page):not(.auth-page) .task-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

body:not(.home-page):not(.auth-page) .task-kicker,
body:not(.home-page):not(.auth-page) .app-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: oklch(97% 0.01 140);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
}

body:not(.home-page):not(.auth-page) .app-kicker.centered {
    margin-inline: auto;
}

body:not(.home-page):not(.auth-page) .btn {
    min-height: 46px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: none;
}

body:not(.home-page):not(.auth-page) .btn-sm {
    width: auto;
    min-width: 76px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
}

body:not(.home-page):not(.auth-page) .btn-primary,
body:not(.home-page):not(.auth-page) .btn-success,
body:not(.home-page):not(.auth-page) .btn-wechat {
    border-color: transparent;
    background: var(--brand);
    color: white;
}

body:not(.home-page):not(.auth-page) .btn-outline {
    border-color: var(--line);
    background: white;
    color: var(--brand-strong);
}

body:not(.home-page):not(.auth-page) .btn-quiet {
    background: transparent;
    color: var(--muted);
}

body:not(.home-page):not(.auth-page) .form-group {
    gap: 8px;
}

body:not(.home-page):not(.auth-page) .form-group label {
    color: var(--ink);
    font-size: 13px;
    font-weight: 400;
}

body:not(.home-page):not(.auth-page) .form-group input,
body:not(.home-page):not(.auth-page) .form-group textarea,
body:not(.home-page):not(.auth-page) .form-group select,
body:not(.home-page):not(.auth-page) .form-control {
    min-height: 46px;
    border-color: var(--line);
    border-radius: 12px;
    background: white;
    color: var(--ink);
    font-size: 15px;
}

body:not(.home-page):not(.auth-page) .form-group input:focus,
body:not(.home-page):not(.auth-page) .form-group textarea:focus,
body:not(.home-page):not(.auth-page) .form-group select:focus,
body:not(.home-page):not(.auth-page) .form-control:focus {
    border-color: var(--brand);
    box-shadow: var(--shadow-focus);
}

body:not(.home-page):not(.auth-page) .state-note,
body:not(.home-page):not(.auth-page) .hero-note,
body:not(.home-page):not(.auth-page) .error-msg {
    padding: 9px 11px;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    font-size: 12px;
    line-height: 1.6;
}

body:not(.home-page):not(.auth-page) .meta-card,
body:not(.home-page):not(.auth-page) .meta-card.flat,
body:not(.home-page):not(.auth-page) .empty-state {
    padding: 2px 12px;
    border: 0;
    border-radius: 12px;
    background: oklch(98.8% 0.01 96);
    box-shadow: none;
}

body:not(.home-page):not(.auth-page) .empty-state {
    padding: 22px 14px;
}

body:not(.home-page):not(.auth-page) .detail-row,
body:not(.home-page):not(.auth-page) .meta-row,
body:not(.home-page):not(.auth-page) .compact-row,
body:not(.home-page):not(.auth-page) .product-row,
body:not(.home-page):not(.auth-page) .order-item,
body:not(.home-page):not(.auth-page) .ledger-item,
body:not(.home-page):not(.auth-page) .points-ledger-item {
    border-bottom-color: color-mix(in oklch, var(--line), white 48%);
}

body:not(.home-page):not(.auth-page) .metric-card,
body:not(.home-page):not(.auth-page) .mini-card,
body:not(.home-page):not(.auth-page) .metric-grid > div,
body:not(.home-page):not(.auth-page) .timeline-item {
    border: 0;
    border-radius: 12px;
    background: oklch(98.8% 0.01 96);
    box-shadow: none;
}

body:not(.home-page):not(.auth-page) .metric-grid {
    gap: 10px;
}

body:not(.home-page):not(.auth-page) .metric-grid span,
body:not(.home-page):not(.auth-page) .metric-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

body:not(.home-page):not(.auth-page) .metric-grid strong,
body:not(.home-page):not(.auth-page) .metric-value {
    color: var(--brand-strong);
    font-size: 16px;
    font-weight: 700;
}

body:not(.home-page):not(.auth-page) .amount-display {
    padding: 6px 0 10px;
}

body:not(.home-page):not(.auth-page) .amount-display .value {
    color: var(--brand-strong);
    font-size: 40px;
}

body:not(.home-page):not(.auth-page) .status-tag,
body:not(.home-page):not(.auth-page) .pill {
    min-height: 22px;
    margin-top: 0;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 400;
}

body:not(.home-page):not(.auth-page) .filter-row a,
body:not(.home-page):not(.auth-page) .orders-filter a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
}

body:not(.home-page):not(.auth-page) .filter-row a.active,
body:not(.home-page):not(.auth-page) .orders-filter a.active {
    border-color: transparent;
    background: oklch(96% 0.02 140);
    color: var(--brand-strong);
    font-weight: 700;
}

body:not(.home-page):not(.auth-page) .mode-tab-bar,
body:not(.home-page):not(.auth-page) .product-card-list {
    border-color: var(--line);
}

body:not(.home-page):not(.auth-page) .mode-tab {
    min-height: 44px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
}

body:not(.home-page):not(.auth-page) .mode-tab.active {
    color: var(--brand-strong);
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--brand);
}

body:not(.home-page):not(.auth-page) .pay-panel {
    padding-top: 14px;
    overflow: visible;
}

body:not(.home-page):not(.auth-page) .pay-farm-header {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 54px;
}

body:not(.home-page):not(.auth-page) .pay-farm-icon,
body:not(.home-page):not(.auth-page) .feature-icon,
body:not(.home-page):not(.auth-page) .action-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: oklch(97% 0.01 140);
    color: var(--brand);
}

body:not(.home-page):not(.auth-page) .pay-farm-name,
body:not(.home-page):not(.auth-page) .product-card-price {
    color: var(--brand-strong);
}

body:not(.home-page):not(.auth-page) .amount-field,
body:not(.home-page):not(.auth-page) .quantity-stepper,
body:not(.home-page):not(.auth-page) .product-dropdown-trigger,
body:not(.home-page):not(.auth-page) .channel-card {
    border-color: var(--line);
    border-radius: 12px;
    background: white;
    box-shadow: none;
}

body:not(.home-page):not(.auth-page) .product-card {
    min-height: 50px;
    padding: 10px 0;
}

body:not(.home-page):not(.auth-page) .product-card.selected,
body:not(.home-page):not(.auth-page) .channel-card.selected,
body:not(.home-page):not(.auth-page) .product-dropdown-panel .product-card.selected {
    border-color: var(--brand);
    background: oklch(98% 0.01 142);
}

body:not(.home-page):not(.auth-page) .quote-box {
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: oklch(98.8% 0.01 96);
}

body:not(.home-page):not(.auth-page) .quote-main {
    color: var(--brand-strong);
}

body:not(.home-page):not(.auth-page) .benefits-hero {
    background: white;
}

body:not(.home-page):not(.auth-page) .benefits-entry-grid {
    gap: 10px;
}

body:not(.home-page):not(.auth-page) .benefits-entry-tile,
body:not(.home-page):not(.auth-page) .action-item,
body:not(.home-page):not(.auth-page) .feature-tile {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: none;
}

body:not(.home-page):not(.auth-page) .benefits-entry-tile .material-symbols-outlined {
    color: var(--brand);
}

body:not(.home-page):not(.auth-page) .tabbar {
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 16px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
    background: white;
    box-shadow: none;
    backdrop-filter: none;
}

body:not(.home-page):not(.auth-page) .tabbar-item {
    min-height: 52px;
    border-radius: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

body:not(.home-page):not(.auth-page) .tabbar-item.active {
    position: relative;
    color: var(--brand-strong);
    background: transparent;
    font-weight: 700;
}

body:not(.home-page):not(.auth-page) .tabbar-item.active .tabbar-icon.material-symbols-outlined {
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

body:not(.home-page):not(.auth-page) .tabbar-item.active::after {
    content: "";
    position: absolute;
    bottom: 1px;
    left: 50%;
    width: 26px;
    height: 3px;
    border-radius: 999px;
    background: var(--brand-strong);
    transform: translateX(-50%);
}

body:not(.home-page):not(.auth-page) .icp-footer {
    width: min(100%, 480px);
    margin: 2px auto 0;
    padding: 0 16px calc(88px + env(safe-area-inset-bottom));
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

body:not(.home-page):not(.auth-page).no-tabbar .icp-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

/* ── Unified C-end system flow pages ── */

body.system-flow-page:not(.home-page):not(.auth-page) {
    --system-bg: oklch(96.6% 0.003 250);
    --system-surface: oklch(99.2% 0.001 250);
    --system-line: oklch(91.5% 0.004 250);
    --system-line-soft: oklch(92.8% 0.004 250);
    --system-ink: oklch(18% 0.004 250);
    --system-text: oklch(28% 0.004 250);
    --system-muted: oklch(56% 0.004 250);
    background: var(--system-bg);
}

body.system-flow-page:not(.home-page):not(.auth-page) .header {
    border-bottom: 1px solid var(--system-line-soft);
    background: white;
}

body.system-flow-page:not(.home-page):not(.auth-page) .header-row {
    max-width: 480px;
    min-height: calc(60px + env(safe-area-inset-top));
}

body.system-flow-page:not(.home-page):not(.auth-page) .header h1 {
    color: var(--system-ink);
    font-size: 17px;
    font-weight: 700;
}

body.system-flow-page:not(.home-page):not(.auth-page) .header .nav-back,
body.system-flow-page:not(.home-page):not(.auth-page) .header-right .nav-back {
    color: var(--system-ink);
}

body.system-flow-page:not(.home-page):not(.auth-page) .header-action,
body.system-flow-page:not(.home-page):not(.auth-page) .channel-badge {
    min-height: 34px;
    border-color: oklch(88.5% 0.004 250);
    border-radius: 999px;
    background: white;
    color: var(--brand-strong);
    font-size: 12px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .container {
    gap: 8px;
    padding: 0 18px calc(88px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    background: var(--system-bg);
}

body.system-flow-page:not(.home-page):not(.auth-page).no-tabbar .container {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

body.system-flow-page:not(.home-page):not(.auth-page) .card,
body.system-flow-page:not(.home-page):not(.auth-page) .task-panel,
body.system-flow-page:not(.home-page):not(.auth-page) .benefits-hero,
body.system-flow-page:not(.home-page):not(.auth-page) .benefits-entry-grid,
body.system-flow-page:not(.home-page):not(.auth-page) .collapsible-section,
body.system-flow-page:not(.home-page):not(.auth-page) .me-hero,
body.system-flow-page:not(.home-page):not(.auth-page) .me-stats,
body.system-flow-page:not(.home-page):not(.auth-page) .me-menu {
    display: grid;
    gap: 12px;
    margin: 0 -18px;
    padding: 14px 24px;
    border: 0;
    border-top: 1px solid var(--system-line);
    border-bottom: 1px solid var(--system-line);
    border-radius: 0;
    background: var(--system-surface);
    box-shadow: none;
    overflow: hidden;
}

body.system-flow-page:not(.home-page):not(.auth-page) .task-panel.app-hero {
    padding-top: 18px;
    padding-bottom: 18px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .card-title,
body.system-flow-page:not(.home-page):not(.auth-page) .section-title,
body.system-flow-page:not(.home-page):not(.auth-page) .home-section-title {
    margin: 0;
    color: var(--system-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

body.system-flow-page:not(.home-page):not(.auth-page) .app-title,
body.system-flow-page:not(.home-page):not(.auth-page) .task-title {
    margin: 0;
    color: var(--system-ink);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.28;
}

body.system-flow-page:not(.home-page):not(.auth-page) .app-subtitle,
body.system-flow-page:not(.home-page):not(.auth-page) .task-subtitle {
    color: var(--system-muted);
    font-size: 13px;
    line-height: 1.55;
}

body.system-flow-page:not(.home-page):not(.auth-page) .task-kicker,
body.system-flow-page:not(.home-page):not(.auth-page) .app-kicker {
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 600;
}

body.system-flow-page:not(.home-page):not(.auth-page) .section-head {
    align-items: center;
    min-height: 28px;
    margin-bottom: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .section-meta,
body.system-flow-page:not(.home-page):not(.auth-page) .benefits-hero-links a {
    color: oklch(48% 0.105 255);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .state-note,
body.system-flow-page:not(.home-page):not(.auth-page) .hero-note,
body.system-flow-page:not(.home-page):not(.auth-page) .error-msg {
    margin: 0;
    padding: 9px 10px;
    border: 0;
    border-radius: 10px;
    background: oklch(96.4% 0.01 145);
    color: var(--system-text);
    box-shadow: none;
    font-size: 12px;
    line-height: 1.55;
}

body.system-flow-page:not(.home-page):not(.auth-page) .state-note.is-info,
body.system-flow-page:not(.home-page):not(.auth-page) .hero-note.is-info {
    background: oklch(95.2% 0.02 258);
    color: oklch(36% 0.075 242);
}

body.system-flow-page:not(.home-page):not(.auth-page) .state-note.is-warning,
body.system-flow-page:not(.home-page):not(.auth-page) .hero-note.is-warning {
    background: oklch(95% 0.04 58);
    color: oklch(38% 0.09 58);
}

body.system-flow-page:not(.home-page):not(.auth-page) .state-note.is-danger,
body.system-flow-page:not(.home-page):not(.auth-page) .hero-note.is-danger,
body.system-flow-page:not(.home-page):not(.auth-page) .error-msg {
    background: var(--danger-soft);
    color: var(--danger);
}

body.system-flow-page:not(.home-page):not(.auth-page) .detail-list,
body.system-flow-page:not(.home-page):not(.auth-page) .kv-list,
body.system-flow-page:not(.home-page):not(.auth-page) .compact-list,
body.system-flow-page:not(.home-page):not(.auth-page) .phone-list {
    display: grid;
    gap: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .detail-row,
body.system-flow-page:not(.home-page):not(.auth-page) .kv-row,
body.system-flow-page:not(.home-page):not(.auth-page) .compact-row,
body.system-flow-page:not(.home-page):not(.auth-page) .phone-row,
body.system-flow-page:not(.home-page):not(.auth-page) .order-row {
    min-height: 42px;
    padding: 9px 0;
    border-bottom: 1px solid var(--system-line-soft);
    color: var(--system-muted);
    font-size: 12px;
    line-height: 1.35;
}

body.system-flow-page:not(.home-page):not(.auth-page) .detail-row:last-child,
body.system-flow-page:not(.home-page):not(.auth-page) .kv-row:last-child,
body.system-flow-page:not(.home-page):not(.auth-page) .compact-row:last-child,
body.system-flow-page:not(.home-page):not(.auth-page) .phone-row:last-child,
body.system-flow-page:not(.home-page):not(.auth-page) .order-row:last-child {
    border-bottom: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .detail-label,
body.system-flow-page:not(.home-page):not(.auth-page) .kv-row span:first-child,
body.system-flow-page:not(.home-page):not(.auth-page) .compact-row small,
body.system-flow-page:not(.home-page):not(.auth-page) .order-row small,
body.system-flow-page:not(.home-page):not(.auth-page) .order-row-side small {
    color: var(--system-muted);
    font-size: 12px;
    font-weight: 400;
}

body.system-flow-page:not(.home-page):not(.auth-page) .detail-value,
body.system-flow-page:not(.home-page):not(.auth-page) .kv-row span:last-child,
body.system-flow-page:not(.home-page):not(.auth-page) .compact-row strong,
body.system-flow-page:not(.home-page):not(.auth-page) .phone-number,
body.system-flow-page:not(.home-page):not(.auth-page) .order-row strong {
    color: var(--system-text);
    font-size: 13px;
    font-weight: 650;
}

body.system-flow-page:not(.home-page):not(.auth-page) .metric-grid {
    gap: 8px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .metric-grid > div,
body.system-flow-page:not(.home-page):not(.auth-page) .metric-card,
body.system-flow-page:not(.home-page):not(.auth-page) .mini-card,
body.system-flow-page:not(.home-page):not(.auth-page) .timeline-item,
body.system-flow-page:not(.home-page):not(.auth-page) .preview-card,
body.system-flow-page:not(.home-page):not(.auth-page) .terms-box {
    border: 0;
    border-radius: 10px;
    background: var(--system-bg);
    box-shadow: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .metric-grid > div {
    min-height: 66px;
    padding: 10px 12px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .metric-grid span,
body.system-flow-page:not(.home-page):not(.auth-page) .metric-label {
    color: var(--system-muted);
    font-size: 12px;
    font-weight: 400;
}

body.system-flow-page:not(.home-page):not(.auth-page) .metric-grid strong,
body.system-flow-page:not(.home-page):not(.auth-page) .metric-value {
    color: var(--brand-strong);
    font-size: 16px;
    font-weight: 700;
}

body.system-flow-page:not(.home-page):not(.auth-page) .form-group {
    gap: 7px;
    margin-bottom: 12px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .form-group label {
    color: var(--system-text);
    font-size: 13px;
    font-weight: 600;
}

body.system-flow-page:not(.home-page):not(.auth-page) .form-group input,
body.system-flow-page:not(.home-page):not(.auth-page) .form-group textarea,
body.system-flow-page:not(.home-page):not(.auth-page) .form-group select,
body.system-flow-page:not(.home-page):not(.auth-page) .form-control,
body.system-flow-page:not(.home-page):not(.auth-page) .add-phone-form input {
    min-height: 44px;
    border: 1px solid oklch(88.5% 0.004 250);
    border-radius: 10px;
    background: white;
    color: var(--system-ink);
    font-size: 14px;
    box-shadow: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .form-group textarea {
    min-height: 88px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .form-group input:focus,
body.system-flow-page:not(.home-page):not(.auth-page) .form-group textarea:focus,
body.system-flow-page:not(.home-page):not(.auth-page) .form-group select:focus,
body.system-flow-page:not(.home-page):not(.auth-page) .form-control:focus,
body.system-flow-page:not(.home-page):not(.auth-page) .add-phone-form input:focus {
    border-color: oklch(52% 0.054 145);
    box-shadow: 0 0 0 3px oklch(78% 0.06 145 / 0.22);
}

body.system-flow-page:not(.home-page):not(.auth-page) .btn {
    min-height: 44px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .btn-sm {
    min-height: 34px;
    border-radius: 10px;
    font-size: 13px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .btn-primary,
body.system-flow-page:not(.home-page):not(.auth-page) .btn-success,
body.system-flow-page:not(.home-page):not(.auth-page) .btn-wechat {
    border-color: transparent;
    background: var(--brand);
    color: white;
}

body.system-flow-page:not(.home-page):not(.auth-page) .btn-outline {
    border-color: oklch(88.5% 0.004 250);
    background: white;
    color: var(--brand-strong);
}

body.system-flow-page:not(.home-page):not(.auth-page) .btn-quiet {
    border-color: transparent;
    background: transparent;
    color: var(--system-muted);
}

body.system-flow-page:not(.home-page):not(.auth-page) .button-stack,
body.system-flow-page:not(.home-page):not(.auth-page) .button-row {
    gap: 8px;
    margin-top: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .action-list {
    gap: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .action-item,
body.system-flow-page:not(.home-page):not(.auth-page) .me-row {
    min-height: 56px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--system-line-soft);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .action-item:last-child,
body.system-flow-page:not(.home-page):not(.auth-page) .me-row:last-child {
    border-bottom: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .action-icon,
body.system-flow-page:not(.home-page):not(.auth-page) .me-row-icon,
body.system-flow-page:not(.home-page):not(.auth-page) .me-stat-icon {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: oklch(95.2% 0.02 145);
    color: var(--brand-strong);
}

body.system-flow-page:not(.home-page):not(.auth-page) .action-arrow,
body.system-flow-page:not(.home-page):not(.auth-page) .me-row-go {
    width: auto;
    height: auto;
    border: 0;
    color: var(--subtle);
    font-size: 20px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .action-title,
body.system-flow-page:not(.home-page):not(.auth-page) .me-row-text strong {
    color: var(--system-text);
    font-size: 14px;
    font-weight: 700;
}

body.system-flow-page:not(.home-page):not(.auth-page) .action-desc,
body.system-flow-page:not(.home-page):not(.auth-page) .me-row-text small {
    color: var(--system-muted);
    font-size: 12px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .feature-tile,
body.system-flow-page:not(.home-page):not(.auth-page) .benefits-entry-tile {
    min-height: 72px;
    border: 1px solid var(--system-line);
    border-radius: 12px;
    background: white;
    box-shadow: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .benefits-entry-tile {
    padding: 12px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .benefits-entry-tile .material-symbols-outlined {
    color: var(--brand-strong);
}

body.system-flow-page:not(.home-page):not(.auth-page) .benefits-hero {
    gap: 10px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .benefits-hero .benefits-balance {
    color: var(--system-ink);
    font-size: 40px;
    font-weight: 650;
}

body.system-flow-page:not(.home-page):not(.auth-page) .benefits-balance-unit,
body.system-flow-page:not(.home-page):not(.auth-page) .benefits-hero-note,
body.system-flow-page:not(.home-page):not(.auth-page) .benefits-metrics {
    color: var(--system-muted);
}

body.system-flow-page:not(.home-page):not(.auth-page) .benefits-metrics {
    gap: 8px;
    padding-top: 2px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .benefits-metrics span {
    border-right-color: var(--system-line-soft);
    font-size: 12px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .benefits-metrics em {
    color: var(--brand-strong);
}

body.system-flow-page:not(.home-page):not(.auth-page) .collapsible-section summary {
    min-height: 38px;
    padding: 0;
    color: var(--system-ink);
    font-size: 14px;
    font-weight: 700;
}

body.system-flow-page:not(.home-page):not(.auth-page) .collapsible-section .collapsible-content {
    padding: 0 0 2px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .orders-filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 -18px;
    padding: 8px 18px;
    border-bottom: 1px solid var(--system-line);
    background: white;
    overflow: visible;
}

body.system-flow-page:not(.home-page):not(.auth-page) .orders-type-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 0;
    border-top: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .orders-filter a,
body.system-flow-page:not(.home-page):not(.auth-page) .filter-row a {
    min-height: 32px;
    padding: 0 12px;
    border-color: oklch(88.5% 0.004 250);
    border-radius: 999px;
    background: white;
    font-size: 12px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .orders-filter a {
    justify-content: center;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.system-flow-page:not(.home-page):not(.auth-page) .orders-filter a.active,
body.system-flow-page:not(.home-page):not(.auth-page) .filter-row a.active {
    border-color: transparent;
    background: oklch(95.8% 0.024 145);
    color: var(--brand-strong);
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-card {
    display: grid;
    gap: 0;
    padding: 0 24px;
    overflow: hidden;
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-card .compact-list {
    gap: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-card .order-list-item {
    border-bottom: 1px solid var(--system-line-soft);
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-card .order-list-item:last-child {
    border-bottom: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-card .order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 0;
    color: inherit;
    text-decoration: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-card .order-row > span:first-child {
    display: grid;
    min-width: 0;
    gap: 3px;
    overflow: hidden;
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-card .order-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-row-side {
    display: grid;
    justify-items: end;
    gap: 4px;
    text-align: right;
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 0 12px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-actions form {
    min-width: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .order-actions .btn {
    min-width: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-hero {
    gap: 10px;
    padding-top: 16px;
    padding-bottom: 16px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-hero-name {
    color: var(--system-ink);
    font-size: 16px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-hero-meta,
body.system-flow-page:not(.home-page):not(.auth-page) .me-hero-summary,
body.system-flow-page:not(.home-page):not(.auth-page) .me-stat-label {
    color: var(--system-muted);
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-hero-badge,
body.system-flow-page:not(.home-page):not(.auth-page) .phone-tag {
    border: 0;
    border-radius: 999px;
    background: oklch(95.8% 0.024 145);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 600;
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0 24px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-stat {
    min-height: 78px;
    padding: 12px 6px;
    border-left: 1px solid var(--system-line-soft);
    background: transparent;
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-stat:first-child {
    border-left: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-stat-value {
    color: var(--brand-strong);
    font-size: 18px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-menu {
    padding-top: 2px;
    padding-bottom: 2px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .me-logout {
    margin: 0 -18px;
    padding: 12px 24px;
    border-top: 1px solid var(--system-line);
    border-bottom: 1px solid var(--system-line);
    background: white;
    color: var(--system-muted);
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .container {
    gap: 8px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .apply-steps {
    position: relative;
    display: flex;
    margin: 0 -18px;
    padding: 12px 18px 10px;
    border: 0;
    border-bottom: 1px solid var(--system-line);
    border-radius: 0;
    background: white;
}

body.system-flow-page:not(.home-page):not(.auth-page) .apply-steps::before {
    content: "";
    position: absolute;
    top: 23px;
    left: calc(100% / 6);
    right: calc(100% / 6);
    height: 1px;
    background: var(--system-line-soft);
}

body.system-flow-page:not(.home-page):not(.auth-page) .apply-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .step-dot {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-color: var(--system-line);
    border-style: solid;
    border-width: 1px;
    border-radius: 50%;
    background: white;
    color: var(--system-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

body.system-flow-page:not(.home-page):not(.auth-page) .apply-step.active .step-dot {
    border-color: transparent;
    background: var(--brand);
    color: white;
}

body.system-flow-page:not(.home-page):not(.auth-page) .step-label {
    max-width: 100%;
    color: var(--system-muted);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.system-flow-page:not(.home-page):not(.auth-page) .apply-step.active .step-label {
    color: var(--brand-strong);
    font-weight: 650;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .contract-apply-section {
    gap: 12px;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .selection-group {
    display: grid;
    gap: 10px;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .selection-group + .selection-group {
    padding-top: 12px;
    border-top: 1px solid var(--system-line-soft);
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .preview-card {
    margin-top: 8px;
    padding: 12px;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .terms-box {
    overflow: auto;
    white-space: pre-wrap;
    line-height: 1.75;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .check-list {
    display: grid;
    gap: 10px;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .check-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .check-row input {
    flex: 0 0 auto;
    margin-top: 3px;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .check-row label {
    min-width: 0;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .signature-pad {
    display: block;
    width: 100%;
    height: min(220px, 34dvh);
    background: white;
    touch-action: none;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .signature-actions {
    display: flex;
    gap: 8px;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .payment-method-list {
    display: grid;
    gap: 8px;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .payment-method-btn {
    width: 100%;
    text-align: left;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .payment-method-btn small {
    display: block;
    margin-top: 2px;
    color: var(--system-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

body.system-flow-page.contract-apply-page:not(.home-page):not(.auth-page) .rule-link {
    color: oklch(48% 0.105 255);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .rule-overlay {
    background: var(--system-bg);
}

body.system-flow-page:not(.home-page):not(.auth-page) .rule-overlay-header {
    border-bottom-color: var(--system-line);
    background: white;
}

body.system-flow-page:not(.home-page):not(.auth-page) .rule-overlay-header h2 {
    color: var(--system-ink);
    font-size: 17px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .rule-overlay-close {
    min-height: 34px;
    padding: 0 8px 0 0;
    color: var(--system-ink);
    font-size: 13px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .rule-overlay-close .material-symbols-outlined {
    font-size: 22px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .rule-overlay-body {
    gap: 8px;
    padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
}

body.system-flow-page:not(.home-page):not(.auth-page) .rule-overlay-body .task-panel {
    margin: 0 -18px;
    border-top: 1px solid var(--system-line);
    border-bottom: 1px solid var(--system-line);
    border-radius: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .terms-box {
    max-height: 42vh;
    padding: 12px;
    color: var(--system-text);
    font-size: 13px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .check-row {
    color: var(--system-text);
    font-size: 13px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .signature-pad {
    border-color: oklch(88.5% 0.004 250);
    border-radius: 10px;
    box-shadow: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .payment-method-btn {
    justify-content: space-between;
    min-height: 54px;
    padding: 0 12px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .meta-card,
body.system-flow-page:not(.home-page):not(.auth-page) .meta-card.flat,
body.system-flow-page:not(.home-page):not(.auth-page) .empty-state {
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: var(--system-bg);
    box-shadow: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .empty-state {
    padding: 18px 0;
    border-radius: 0;
    background: transparent;
}

body.system-flow-page:not(.home-page):not(.auth-page) .container > .button-stack,
body.system-flow-page:not(.home-page):not(.auth-page) .container > form.button-row {
    margin: 0 -18px;
    padding: 14px 24px;
    border-top: 1px solid var(--system-line);
    border-bottom: 1px solid var(--system-line);
    background: var(--system-surface);
}

body.system-flow-page:not(.home-page):not(.auth-page) .help-faq-list {
    display: grid;
    gap: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .help-faq-item {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid var(--system-line-soft);
}

body.system-flow-page:not(.home-page):not(.auth-page) .help-faq-item:last-child {
    border-bottom: 0;
}

body.system-flow-page:not(.home-page):not(.auth-page) .help-faq-item strong {
    color: var(--brand-strong);
    font-size: 14px;
    line-height: 1.35;
}

body.system-flow-page:not(.home-page):not(.auth-page) .help-faq-item p {
    margin: 0;
    color: var(--system-muted);
    font-size: 13px;
    line-height: 1.6;
}

body.system-flow-page.benefits-page:not(.home-page):not(.auth-page) .benefits-entry-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 4px;
    padding-bottom: 4px;
}

body.system-flow-page.benefits-page:not(.home-page):not(.auth-page) .benefits-entry-tile {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--system-line-soft);
    border-radius: 0;
    background: transparent;
}

body.system-flow-page.benefits-page:not(.home-page):not(.auth-page) .benefits-entry-tile:last-child {
    border-bottom: 0;
}

body.system-flow-page.benefits-page:not(.home-page):not(.auth-page) .benefits-entry-tile::after {
    content: "chevron_right";
    justify-self: end;
    color: var(--subtle);
    font-family: "Material Symbols Outlined";
    font-size: 20px;
    font-weight: 400;
}

body.system-flow-page.benefits-page:not(.home-page):not(.auth-page) .benefits-entry-tile .material-symbols-outlined {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: oklch(95.2% 0.02 145);
    font-size: 20px;
}

body.system-flow-page.benefits-page:not(.home-page):not(.auth-page) .benefits-entry-label {
    font-size: 14px;
    font-weight: 700;
}

body.system-flow-page.benefits-page:not(.home-page):not(.auth-page) .benefits-entry-count {
    justify-self: end;
    color: var(--system-muted);
    font-size: 12px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-dashboard-hero {
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 16px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-dashboard-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-dashboard-title {
    display: grid;
    min-width: 0;
    gap: 6px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-status-pill {
    display: inline-flex;
    max-width: 104px;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border-radius: 999px;
    background: oklch(95.8% 0.024 145);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-status-pill.is-pending {
    background: var(--blue-soft);
    color: oklch(36% 0.075 242);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-status-pill.is-warning {
    background: var(--warning-soft);
    color: oklch(38% 0.09 58);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-alert-list {
    display: grid;
    gap: 8px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-primary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding-top: 10px;
    border-top: 1px solid var(--system-line-soft);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-primary-row span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-primary-row small {
    color: var(--system-muted);
    font-size: 12px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-primary-row strong {
    color: var(--system-text);
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-primary-row .btn {
    min-width: 92px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-summary-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0 -18px;
    padding: 0 24px;
    border-top: 1px solid var(--system-line);
    border-bottom: 1px solid var(--system-line);
    background: var(--system-surface);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-summary-item {
    display: grid;
    min-width: 0;
    min-height: 82px;
    align-content: center;
    justify-items: center;
    gap: 4px;
    padding: 11px 6px;
    border-left: 1px solid var(--system-line-soft);
    color: inherit;
    text-align: center;
    text-decoration: none;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-summary-item:first-child {
    border-left: 0;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-summary-item .material-symbols-outlined {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: oklch(95.2% 0.02 145);
    color: var(--brand-strong);
    font-size: 20px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-summary-item small {
    color: var(--system-muted);
    font-size: 12px;
    line-height: 1.2;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-summary-item strong {
    max-width: 100%;
    color: var(--brand-strong);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-action-section {
    padding-top: 12px;
    padding-bottom: 4px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-action-section .action-item > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 3px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-action-section .action-title,
body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-action-section .action-desc {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-product-section,
body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-recent-section {
    padding-top: 12px;
    padding-bottom: 10px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-product-row span {
    display: grid;
    min-width: 0;
    gap: 3px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 6px 0 2px;
    color: inherit;
    text-decoration: none;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-order-row span {
    display: grid;
    min-width: 0;
    gap: 3px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-order-row span:last-child {
    justify-items: end;
    text-align: right;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-order-row strong {
    min-width: 0;
    color: var(--system-text);
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-order-row span:last-child strong {
    color: var(--brand-strong);
    font-size: 16px;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-order-row small {
    color: var(--system-muted);
    font-size: 12px;
    line-height: 1.35;
}

body.system-flow-page:not(.home-page):not(.auth-page) .legal-meta {
    margin: 0;
    color: var(--system-muted);
    font-size: 12px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .legal-body h3 {
    margin: 18px 0 8px;
    color: var(--system-ink);
    font-size: 15px;
}

body.system-flow-page:not(.home-page):not(.auth-page) .legal-body p {
    margin: 0 0 9px;
    color: var(--system-text);
    font-size: 13px;
    line-height: 1.75;
}

body.system-flow-page:not(.home-page):not(.auth-page) .tabbar {
    border-top: 1px solid var(--system-line);
    border-radius: 0;
    background: white;
    box-shadow: none;
}

body.system-flow-page:not(.home-page):not(.auth-page) .icp-footer {
    display: none;
}

@media (max-width: 360px) {
    body.system-flow-page:not(.home-page):not(.auth-page) .container {
        padding-right: 14px;
        padding-left: 14px;
    }

    body.system-flow-page:not(.home-page):not(.auth-page) .card,
    body.system-flow-page:not(.home-page):not(.auth-page) .task-panel,
    body.system-flow-page:not(.home-page):not(.auth-page) .benefits-hero,
    body.system-flow-page:not(.home-page):not(.auth-page) .benefits-entry-grid,
    body.system-flow-page:not(.home-page):not(.auth-page) .collapsible-section,
    body.system-flow-page:not(.home-page):not(.auth-page) .me-hero,
    body.system-flow-page:not(.home-page):not(.auth-page) .me-stats,
    body.system-flow-page:not(.home-page):not(.auth-page) .me-menu,
    body.system-flow-page:not(.home-page):not(.auth-page) .me-logout,
    body.system-flow-page:not(.home-page):not(.auth-page) .orders-filter,
    body.system-flow-page:not(.home-page):not(.auth-page) .apply-steps,
    body.system-flow-page:not(.home-page):not(.auth-page) .container > .button-stack,
    body.system-flow-page:not(.home-page):not(.auth-page) .container > form.button-row {
        margin-right: -14px;
        margin-left: -14px;
    }

    body.system-flow-page:not(.home-page):not(.auth-page) .orders-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.system-flow-page:not(.home-page):not(.auth-page) .orders-type-filter {
        grid-template-columns: 1fr;
    }
}

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

/* ── Pay page: merchant payment keypad layout ── */

body.pay-page:not(.home-page):not(.auth-page) {
    --pay-keypad-height: 286px;
    background: oklch(96.6% 0.003 250);
}

body.pay-page:not(.home-page):not(.auth-page) .header {
    background: white;
    border-bottom: 1px solid oklch(92% 0.004 250);
}

body.pay-page:not(.home-page):not(.auth-page) .header h1 {
    color: oklch(16% 0.004 250);
    font-size: 17px;
    font-weight: 700;
}

body.pay-page:not(.home-page):not(.auth-page) .header-row {
    max-width: 480px;
    min-height: calc(60px + env(safe-area-inset-top));
}

.pay-header-home {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    border: 0;
    background: transparent;
    color: oklch(16% 0.004 250);
    cursor: pointer;
    text-decoration: none;
    appearance: none;
    -webkit-appearance: none;
}

.pay-header-home .material-symbols-outlined {
    font-size: 29px;
    font-variation-settings: "FILL" 0, "wght" 450, "GRAD" 0, "opsz" 28;
}

.pay-header-back .material-symbols-outlined {
    font-size: 32px;
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 28;
}

.pay-header-home:active {
    transform: scale(0.96);
    background: oklch(95.5% 0.004 250);
}

.pay-header-more {
    display: inline-flex;
    min-width: 82px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid oklch(88.5% 0.004 250);
    border-radius: 999px;
    background: oklch(99% 0.001 250);
    color: oklch(18% 0.004 250);
    text-decoration: none;
}

.pay-header-more .material-symbols-outlined {
    font-size: 22px;
    font-variation-settings: "FILL" 0, "wght" 650, "GRAD" 0, "opsz" 24;
}

.pay-header-divider {
    display: block;
    width: 1px;
    height: 20px;
    background: oklch(91% 0.004 250);
}

body.pay-page:not(.home-page):not(.auth-page) .container {
    width: min(100%, 480px);
    height: calc(100dvh - 60px - env(safe-area-inset-top));
    min-height: 0;
    padding: 0 18px;
    background: oklch(96.6% 0.003 250);
    gap: 0;
    overflow: hidden;
}

body.pay-page:not(.home-page):not(.auth-page) .task-panel.pay-panel {
    display: grid;
    gap: 0;
    margin: 0 -18px;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.pay-page .pay-panel-head,
.pay-page .pay-farm-header {
    display: none;
}

.pay-merchant {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 22px 12px 20px;
    text-align: center;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-merchant-logo {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-merchant .pay-farm-copy {
    display: grid;
    gap: 2px;
    justify-items: center;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-merchant .pay-farm-name {
    max-width: min(100%, 28ch);
    color: oklch(25% 0.004 250);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-merchant .pay-farm-label {
    max-width: min(100%, 30ch);
    color: oklch(32% 0.004 250);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.pay-page .pay-farm-picker {
    margin: -18px 0 22px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-mode-tabs {
    width: min(210px, 70%);
    margin: -6px auto 14px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid oklch(88.5% 0.004 250);
    border-radius: 0;
    background: transparent;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-mode-tabs .mode-tab {
    position: relative;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 0;
    color: oklch(46% 0.004 250);
    font-size: 12px;
    font-weight: 500;
    box-shadow: none;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-mode-tabs .mode-tab.active {
    background: transparent;
    color: var(--brand-strong);
    box-shadow: none;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-mode-tabs .mode-tab.active::after {
    content: "";
    position: absolute;
    right: 20px;
    bottom: -1px;
    left: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--brand-strong);
}

.pay-amount-card {
    display: grid;
    gap: 0;
    margin: 0 -18px;
    padding: 18px 24px 14px;
    border-top: 1px solid oklch(91.5% 0.004 250);
    border-bottom: 1px solid oklch(91.5% 0.004 250);
    border-radius: 0;
    background: oklch(99.2% 0.001 250);
    box-shadow: none;
}

body.pay-page:not(.home-page):not(.auth-page) .amount-field {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    min-height: 68px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid oklch(86.5% 0.004 250);
    border-radius: 0;
    background: transparent;
}

body.pay-page:not(.home-page):not(.auth-page) .amount-field:focus-within {
    border-color: oklch(90% 0.004 250);
}

body.pay-page:not(.home-page):not(.auth-page) .amount-field::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 58px;
    width: 2px;
    height: 34px;
    border-radius: 999px;
    background: oklch(63% 0.12 255);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
}

body.pay-page:not(.home-page):not(.auth-page) .amount-field.is-empty::after {
    opacity: 1;
    animation: pay-amount-caret 1.05s steps(2, start) infinite;
}

body.pay-page:not(.home-page):not(.auth-page) .amount-field.has-amount::after {
    opacity: 0;
    animation: none;
}

.pay-page .amount-currency {
    display: grid;
    align-self: center;
    height: 52px;
    padding-left: 8px;
    place-items: center;
    border-right: 0;
    color: oklch(19% 0.004 250);
    font-size: 27px;
    font-weight: 650;
    line-height: 1;
}

body.pay-page:not(.home-page):not(.auth-page) .amount-field .amount-input {
    min-height: 66px;
    padding: 0 0 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: oklch(18% 0.004 250);
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    text-align: left;
    box-shadow: none;
    cursor: default;
}

body.pay-page:not(.home-page):not(.auth-page) .amount-field .amount-input::placeholder {
    color: oklch(80% 0.004 250);
}

.pay-remark-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin-top: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: oklch(99.4% 0.001 250);
    color: oklch(34% 0.004 250);
    -webkit-tap-highlight-color: transparent;
}

.pay-remark-trigger {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 0 0 10px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.pay-remark-row .material-symbols-outlined {
    color: oklch(52% 0.006 250);
    font-size: 19px;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
}

.pay-remark-copy {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.pay-remark-label {
    color: oklch(27% 0.004 250);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}

.pay-remark-preview {
    min-width: 0;
    color: oklch(58% 0.004 250);
    font-size: 13px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pay-remark-action {
    justify-self: end;
}

.pay-remark-clear,
.pay-remark-editor-clear {
    display: inline-grid;
    width: 32px;
    min-width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: oklch(56% 0.004 250);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.pay-remark-clear[hidden],
.pay-remark-editor-clear[hidden] {
    display: none;
}

.pay-remark-clear .material-symbols-outlined,
.pay-remark-editor-clear .material-symbols-outlined {
    font-size: 18px;
}

.pay-remark-row.has-value {
    border-color: oklch(90% 0.004 250);
}

.pay-remark-row.has-value .pay-remark-preview {
    color: oklch(24% 0.004 250);
}

.pay-remark-row.has-value .pay-remark-trigger > .material-symbols-outlined {
    color: var(--brand-strong);
}

.pay-remark-editor {
    position: fixed;
    right: auto;
    bottom: max(var(--pay-system-keyboard-inset, 0px), env(safe-area-inset-bottom));
    left: 50%;
    z-index: 118;
    display: grid;
    width: min(calc(100% - 28px), 452px);
    gap: 8px;
    padding: 10px 12px 11px;
    border: 1px solid oklch(88.5% 0.006 250);
    border-radius: 10px 10px 0 0;
    background: oklch(99.8% 0.001 250);
    color: oklch(24% 0.004 250);
    box-shadow: 0 -10px 26px oklch(20% 0.01 250 / 0.10);
    transform: translateX(-50%);
}

.pay-remark-editor[hidden] {
    display: none !important;
}

.pay-remark-editor-label {
    color: oklch(30% 0.004 250);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.pay-remark-editor-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 6px;
}

.pay-remark-input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid oklch(87.5% 0.004 250);
    border-radius: 8px;
    outline: 0;
    background: oklch(99.4% 0.001 250);
    color: oklch(24% 0.004 250);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
}

.pay-remark-input::placeholder {
    color: oklch(66% 0.004 250);
    opacity: 1;
}

.pay-remark-input:focus {
    border-color: oklch(72% 0.105 145);
    box-shadow: 0 0 0 3px oklch(92% 0.025 145);
}

.pay-remark-done {
    display: inline-grid;
    min-width: 48px;
    min-height: 36px;
    place-items: center;
    padding: 0 11px;
    border: 0;
    border-radius: 8px;
    background: oklch(94.5% 0.03 145);
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.pay-remark-meta {
    display: flex;
    min-height: 16px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pay-remark-feedback,
.pay-remark-limit {
    color: oklch(58% 0.004 250);
    font-size: 11px;
    line-height: 1.25;
}

.pay-remark-feedback {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pay-remark-feedback.is-warning,
.pay-remark-limit.is-full {
    color: oklch(52% 0.12 62);
}

.pay-remark-feedback.is-danger {
    color: var(--danger);
}

.pay-remark-limit {
    white-space: nowrap;
}

.pay-check-hint {
    padding: 14px 8px 0;
    color: oklch(62% 0.004 250);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.pay-check-hint.is-warning {
    color: oklch(58% 0.13 58);
}

body.pay-page:not(.home-page):not(.auth-page) .quote-box {
    position: fixed;
    bottom: calc(var(--pay-keypad-height) + env(safe-area-inset-bottom));
    left: 50%;
    z-index: 91;
    display: grid;
    width: min(100%, 480px);
    min-height: 0;
    margin: 0;
    padding: 0 18px;
    border: 0;
    border-top: 1px solid oklch(88% 0.004 250);
    border-radius: 0;
    background: oklch(98.8% 0.002 250 / 0.98);
    color: oklch(48% 0.004 250);
    box-shadow: none;
    text-align: center;
    transform: translateX(-50%);
    backdrop-filter: blur(8px);
}

body.pay-page:not(.home-page):not(.auth-page) .quote-box:empty {
    display: none;
}

body.pay-page:not(.home-page):not(.auth-page) .quote-box.has-result,
body.pay-page:not(.home-page):not(.auth-page) .quote-box.quote-skeleton {
    animation: pay-match-dock-in 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quote-box.has-result,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quote-box.quote-skeleton {
    animation: none;
}

.pay-match-card {
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 98px;
    max-height: none;
    overflow: hidden;
    padding: 14px 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

.pay-match-card::after {
    content: none;
}

.pay-match-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: oklch(94.8% 0.015 145);
    color: var(--brand-strong);
    font-size: 18px;
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.pay-match-copy {
    position: relative;
    z-index: 1;
    display: grid;
    min-width: 0;
    gap: 2px;
}

.pay-match-title {
    color: oklch(24% 0.008 150);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pay-match-desc {
    color: oklch(50% 0.008 150);
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pay-match-points {
    position: relative;
    z-index: 1;
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border-radius: 999px;
    background: oklch(94.5% 0.015 145);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pay-match-note {
    position: relative;
    z-index: 1;
    grid-column: 2 / -1;
    min-width: 0;
    padding-top: 5px;
    border-top: 1px solid oklch(91% 0.006 90);
    color: oklch(43% 0.08 62);
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pay-match-card.is-warning {
    background: transparent;
}

.pay-match-card.is-warning .pay-match-icon,
.pay-match-card.is-warning .pay-match-points {
    background: oklch(95.5% 0.03 78);
    color: oklch(43% 0.088 70);
}

.pay-match-card.is-danger {
    background: transparent;
}

.pay-match-card.is-danger .pay-match-icon {
    background: var(--danger-soft);
    color: var(--danger);
}

.pay-match-card.is-pending {
    background: transparent;
}

.pay-match-card.is-pending .pay-match-icon {
    background: oklch(94% 0.025 258);
    color: var(--blue);
    animation: pay-match-spin 0.9s linear infinite;
}

.pay-match-scanner {
    position: absolute;
    top: 0;
    left: -42%;
    z-index: 2;
    width: 42%;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, oklch(68% 0.12 253), transparent);
    animation: pay-match-scan 1.05s ease-in-out infinite;
}

.pay-match-dots {
    position: relative;
    z-index: 1;
    display: inline-flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    width: 34px;
}

.pay-match-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: oklch(58% 0.08 253);
    animation: pay-match-dot 1s ease-in-out infinite;
}

.pay-match-dots i:nth-child(2) {
    animation-delay: 0.14s;
}

.pay-match-dots i:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes pay-match-dock-in {
    from {
        opacity: 0;
        transform: translate(-50%, 8px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes pay-match-scan {
    to {
        left: 100%;
    }
}

@keyframes pay-match-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pay-match-dot {
    0%, 80%, 100% {
        opacity: 0.34;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@keyframes pay-amount-caret {
    0%, 45% {
        opacity: 1;
    }
    46%, 100% {
        opacity: 0;
    }
}

body.pay-page:not(.home-page):not(.auth-page) .pay-product-panel {
    display: grid;
    gap: 0;
    margin: 0 -18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.pay-product-card {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 20px 20px 14px;
    border: 1px solid oklch(91.8% 0.002 250);
    border-radius: 8px;
    background: oklch(100% 0 0);
    box-shadow:
        0 8px 18px oklch(20% 0.004 250 / 0.035),
        0 1px 1px oklch(20% 0.004 250 / 0.025);
}

.pay-product-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
    margin-bottom: 14px;
    color: oklch(18% 0.004 250);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.2;
}

.pay-product-title::before {
    content: "";
    width: 5px;
    height: 23px;
    border-radius: 999px;
    background: var(--brand-strong);
}

.pay-product-search-input {
    width: 100%;
    min-height: 40px;
    margin-bottom: 10px;
    padding: 0 12px;
    border: 1px solid oklch(90% 0.004 250);
    border-radius: 8px;
    outline: none;
    background: oklch(98.8% 0.002 250);
    color: oklch(22% 0.004 250);
    font-size: 14px;
    font-weight: 400;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pay-product-search-input::placeholder {
    color: oklch(67% 0.004 250);
}

.pay-product-search-input:focus {
    border-color: oklch(72% 0.08 145);
    box-shadow: 0 0 0 3px oklch(92% 0.025 145);
}

.pay-product-count {
    color: oklch(62% 0.004 250);
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card-list {
    display: grid;
    min-width: 0;
    max-width: 100%;
    max-height: min(38vh, 336px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: none;
    touch-action: pan-y;
    border: 0;
    border-top: 1px solid oklch(91.5% 0.004 250);
    border-radius: 0;
    background: transparent;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto 22px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid oklch(93% 0.004 250);
    background: transparent;
    transition: background 0.14s ease, color 0.14s ease;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card:last-child {
    border-bottom: 0;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card[hidden] {
    display: none;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card.selected {
    background: oklch(96% 0.018 145);
    border-bottom-color: oklch(90% 0.02 145);
}

body.pay-page:not(.home-page):not(.auth-page) .product-card.selected .product-card-name,
body.pay-page:not(.home-page):not(.auth-page) .product-card.selected .product-card-price {
    color: var(--brand-strong);
}

body.pay-page:not(.home-page):not(.auth-page) .product-card-name {
    color: oklch(24% 0.004 250);
    font-size: 14px;
    font-weight: 600;
}

.product-card-sub {
    color: oklch(58% 0.004 250);
    font-size: 12px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card-price {
    color: var(--brand-strong);
    font-size: 14px;
    font-weight: 700;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card-check {
    width: 19px;
    height: 19px;
    border-color: oklch(83% 0.004 250);
    background: transparent;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card.selected .product-card-check {
    border-color: var(--brand-strong);
    background: var(--brand-strong);
}

body.pay-page:not(.home-page):not(.auth-page) .product-card.selected .product-card-check::after {
    color: white;
    font-weight: 700;
}

.pay-product-empty {
    padding: 18px 0;
    color: oklch(62% 0.004 250);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.pay-product-empty[hidden] {
    display: none;
}

.pay-product-footer {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid oklch(91.5% 0.004 250);
    margin-top: 6px;
    color: oklch(43% 0.004 250);
    font-size: 13px;
    font-weight: 500;
}

.pay-product-footer-label {
    flex-shrink: 0;
}

body.pay-page:not(.home-page):not(.auth-page) .quantity-stepper {
    display: grid;
    width: 128px;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.pay-page:not(.home-page):not(.auth-page) .stepper-btn {
    width: 36px;
    height: 34px;
    min-height: 34px;
    border-radius: 999px;
    background: oklch(94.8% 0.006 250);
    color: oklch(28% 0.004 250);
}

body.pay-page:not(.home-page):not(.auth-page) .stepper-btn:disabled {
    background: oklch(96% 0.003 250);
    color: oklch(70% 0.004 250);
    cursor: not-allowed;
}

body.pay-page:not(.home-page):not(.auth-page) .quantity-stepper .stepper-input {
    min-height: 34px;
    color: oklch(20% 0.004 250);
    font-size: 15px;
    font-weight: 600;
}

.pay-page .pay-submit {
    display: none;
    margin-top: 14px;
}

body.pay-product-mode .pay-submit {
    display: inline-flex;
}

body.pay-product-mode:not(.home-page):not(.auth-page) .quote-box {
    position: static;
    width: auto;
    margin: 12px 0 0;
    padding: 0;
    border: 0;
    border-top: 1px solid oklch(88% 0.004 250);
    background: transparent;
    transform: none;
    backdrop-filter: none;
}

body.pay-product-mode:not(.home-page):not(.auth-page) .quote-box:empty {
    display: none;
}

body.pay-product-mode:not(.home-page):not(.auth-page) .quote-box.has-result,
body.pay-product-mode:not(.home-page):not(.auth-page) .quote-box.quote-skeleton {
    animation: none;
}

body.pay-product-mode:not(.home-page):not(.auth-page) .pay-submit {
    width: 100%;
    margin-top: 12px;
}

body.pay-product-mode .pay-keypad-shell {
    display: none;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-checkout-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 10px 0 0;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-checkout-row .quote-box {
    position: static;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    transform: none;
    backdrop-filter: none;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-checkout-row .quote-box:empty {
    display: none;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-card {
    margin: 0 0 -1px;
    padding: 14px 16px;
    border: 1px solid var(--payment-line);
    border-top: none;
    border-bottom: none;
    background: var(--payment-surface);
    border-radius: 0;
    transition: none;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-card::after {
    content: "";
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: 0;
    height: 1px;
    background: var(--payment-line);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-card .pay-match-title {
    color: var(--payment-ink);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-card .pay-match-points {
    align-self: start;
    background: oklch(94.8% 0.018 145);
    color: oklch(32% 0.068 145);
}
    border-radius: 0;
}

body.pay-text-entry-active .pay-keypad-shell,
body.pay-text-entry-active .quote-box,
body.pay-text-entry-active .pay-submit {
    display: none !important;
}

body.pay-product-mode:not(.home-page):not(.auth-page) .container {
    height: auto;
    min-height: calc(100dvh - 60px - env(safe-area-inset-top));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    overflow: visible;
}

body.pay-text-entry-active:not(.home-page):not(.auth-page) .container {
    height: auto;
    min-height: calc(100dvh - 60px - env(safe-area-inset-top));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    overflow: visible;
}

.pay-launch-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    background: oklch(18% 0.004 250 / 0.36);
    backdrop-filter: blur(10px);
}

.pay-launch-overlay[hidden] {
    display: none;
}

.pay-launch-panel {
    display: grid;
    width: min(100%, 342px);
    gap: 16px;
    justify-items: center;
    padding: 26px 22px 22px;
    border: 1px solid oklch(92% 0.004 250);
    border-radius: 18px;
    background: oklch(99.5% 0.001 250);
    color: oklch(20% 0.004 250);
    text-align: center;
    box-shadow: 0 18px 50px oklch(18% 0.004 250 / 0.18);
}

.pay-launch-orbit {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: oklch(94.5% 0.018 145);
    color: var(--brand-strong);
}

.pay-launch-orbit::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1px solid oklch(78% 0.07 145 / 0.42);
    border-top-color: var(--brand-strong);
    border-radius: 50%;
    animation: pay-launch-spin 0.9s linear infinite;
}

.pay-launch-orbit .material-symbols-outlined {
    font-size: 30px;
    font-variation-settings: "FILL" 1, "wght" 480, "GRAD" 0, "opsz" 28;
}

.pay-launch-copy {
    display: grid;
    gap: 6px;
}

.pay-launch-kicker {
    color: oklch(55% 0.004 250);
    font-size: 12px;
    line-height: 1;
}

.pay-launch-copy strong {
    color: oklch(18% 0.004 250);
    font-size: 18px;
    line-height: 1.3;
}

.pay-launch-copy span:last-child {
    color: oklch(48% 0.004 250);
    font-size: 13px;
    line-height: 1.55;
}

.pay-launch-actions {
    display: grid;
    width: 100%;
    gap: 10px;
}

.pay-launch-actions[hidden] {
    display: none;
}

.pay-launch-overlay.is-success .pay-launch-orbit {
    background: oklch(94% 0.026 145);
    color: var(--brand-strong);
}

.pay-launch-overlay.is-success .pay-launch-orbit::after,
.pay-launch-overlay.is-danger .pay-launch-orbit::after,
.pay-launch-overlay.is-muted .pay-launch-orbit::after {
    animation: none;
    border-color: currentColor;
    opacity: 0.24;
}

.pay-launch-overlay.is-danger .pay-launch-orbit {
    background: var(--danger-soft);
    color: var(--danger);
}

.pay-launch-overlay.is-muted .pay-launch-orbit {
    background: oklch(94% 0.004 250);
    color: oklch(48% 0.004 250);
}

@keyframes pay-launch-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Pay result page: unified aggregate payment result ── */

body.pay-result-page:not(.home-page):not(.auth-page) {
    background: oklch(96.6% 0.003 250);
}

body.pay-result-page:not(.home-page):not(.auth-page) .header {
    border-bottom: 1px solid oklch(92% 0.004 250);
    background: white;
}

body.pay-result-page:not(.home-page):not(.auth-page) .header h1 {
    color: oklch(16% 0.004 250);
    font-size: 17px;
    font-weight: 700;
}

body.pay-result-page:not(.home-page):not(.auth-page) .header-row {
    max-width: 480px;
    min-height: calc(60px + env(safe-area-inset-top));
}

body.pay-result-page:not(.home-page):not(.auth-page) .container {
    width: min(100%, 480px);
    min-height: calc(100dvh - 61px - env(safe-area-inset-top));
    padding: 0 18px calc(12px + env(safe-area-inset-bottom));
    gap: 0;
    overflow: hidden auto;
    background: oklch(96.6% 0.003 250);
}

body.pay-result-page:not(.home-page):not(.auth-page) .pay-result-view {
    display: grid;
    gap: 0;
    margin: 0 -18px;
    padding: 0 18px 12px;
}

.pay-result-merchant {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 58px;
    padding: 9px 12px 8px;
    text-align: left;
}

.pay-result-logo {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: contain;
}

.pay-result-merchant-copy {
    display: grid;
    gap: 0;
    min-width: 0;
    justify-items: start;
}

.pay-result-farm {
    max-width: min(100%, 28ch);
    color: oklch(25% 0.004 250);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.pay-result-label {
    color: oklch(46% 0.004 250);
    font-size: 12px;
    line-height: 1.25;
}

.pay-result-summary {
    display: grid;
    justify-items: center;
    gap: 5px;
    margin: 0 -18px;
    padding: 14px 24px 12px;
    border-top: 1px solid oklch(91.5% 0.004 250);
    border-bottom: 1px solid oklch(91.5% 0.004 250);
    background: oklch(99.2% 0.001 250);
    text-align: center;
}

.pay-result-orb {
    position: relative;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 50%;
    background: oklch(94% 0.006 250);
    color: oklch(48% 0.004 250);
}

.pay-result-orb .material-symbols-outlined {
    font-size: 26px;
    font-variation-settings: "FILL" 0, "wght" 520, "GRAD" 0, "opsz" 30;
}

.pay-result-summary.is-success .pay-result-orb {
    background: oklch(94.5% 0.018 145);
    color: var(--brand-strong);
}

.pay-result-summary.is-danger .pay-result-orb {
    background: var(--danger-soft);
    color: var(--danger);
}

.pay-result-summary.is-pending .pay-result-orb {
    background: var(--warning-soft);
    color: var(--warning);
}

.pay-result-summary.is-info .pay-result-orb {
    background: var(--blue-soft);
    color: var(--blue);
}

.pay-result-summary.is-info .pay-result-orb::after,
.pay-result-summary.is-pending .pay-result-orb::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    opacity: 0.34;
    animation: pay-launch-spin 1.05s linear infinite;
}

.pay-result-kicker {
    color: oklch(58% 0.004 250);
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
}

.pay-result-title {
    margin: 0;
    color: oklch(18% 0.004 250);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

.pay-result-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    padding-top: 2px;
    color: oklch(18% 0.004 250);
    font-variant-numeric: tabular-nums;
}

.pay-result-currency {
    font-size: 18px;
    font-weight: 650;
    line-height: 1;
}

.pay-result-value {
    font-size: 32px;
    font-weight: 650;
    line-height: 1;
}

.pay-result-hint {
    display: inline-flex;
    max-width: min(100%, 33ch);
    align-items: center;
    justify-content: center;
    min-height: 23px;
    color: oklch(50% 0.004 250);
    font-size: 12px;
    line-height: 1.45;
}

.pay-result-hint.is-success {
    color: var(--brand-strong);
}

.pay-result-hint.is-danger {
    color: var(--danger);
}

.pay-result-hint.is-pending {
    color: var(--warning);
}

.pay-result-hint.is-info {
    color: var(--blue);
}

.pay-result-hint.is-muted {
    color: oklch(52% 0.004 250);
}

.pay-result-detail-list {
    display: grid;
    margin: 8px -18px 0;
    padding: 0 24px;
    border-top: 1px solid oklch(91.5% 0.004 250);
    border-bottom: 1px solid oklch(91.5% 0.004 250);
    background: oklch(99.2% 0.001 250);
}

.pay-result-detail-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 38px;
    border-bottom: 1px solid oklch(92% 0.004 250);
    color: oklch(56% 0.004 250);
    font-size: 12px;
    line-height: 1.35;
}

.pay-result-detail-row:last-child {
    border-bottom: 0;
}

.pay-result-detail-value {
    min-width: 0;
    color: oklch(24% 0.004 250);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.pay-result-copy {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-left: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: oklch(48% 0.105 255);
    font-size: 12px;
    font-weight: 600;
}

.pay-result-actions {
    gap: 8px;
    margin-top: 10px;
}

.pay-result-actions form {
    display: grid;
    margin: 0;
}

body.pay-result-page:not(.home-page):not(.auth-page) .pay-result-actions .btn {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}

body.pay-result-page:not(.home-page):not(.auth-page) .pay-result-actions .btn-primary {
    border-color: transparent;
    background: var(--brand);
    color: white;
}

body.pay-result-page:not(.home-page):not(.auth-page) .pay-result-actions .btn-outline {
    border-color: oklch(88.5% 0.004 250);
    background: white;
    color: var(--brand-strong);
}

body.pay-result-page:not(.home-page):not(.auth-page) .icp-footer {
    display: none;
}

/* ── Order detail page: compact business record ── */

body.order-detail-page:not(.home-page):not(.auth-page) {
    background: oklch(96.6% 0.003 250);
}

body.order-detail-page:not(.home-page):not(.auth-page) .header {
    border-bottom: 1px solid oklch(92% 0.004 250);
    background: white;
}

body.order-detail-page:not(.home-page):not(.auth-page) .header h1 {
    color: oklch(16% 0.004 250);
    font-size: 17px;
    font-weight: 700;
}

body.order-detail-page:not(.home-page):not(.auth-page) .header-row {
    max-width: 480px;
    min-height: calc(60px + env(safe-area-inset-top));
}

body.order-detail-page:not(.home-page):not(.auth-page) .header .nav-back {
    color: oklch(16% 0.004 250);
}

body.order-detail-page:not(.home-page):not(.auth-page) .container {
    width: min(100%, 480px);
    gap: 0;
    padding: 0 18px calc(18px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    background: oklch(96.6% 0.003 250);
}

.order-detail-view {
    display: grid;
    gap: 8px;
    margin: 0 -18px;
    padding: 0 18px 18px;
}

.order-detail-hero,
.order-detail-section {
    margin: 0 -18px;
    border-top: 1px solid oklch(91.5% 0.004 250);
    border-bottom: 1px solid oklch(91.5% 0.004 250);
    background: oklch(99.2% 0.001 250);
    box-shadow: none;
}

.order-detail-hero {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 14px 24px 16px;
    text-align: center;
}

.order-detail-merchant {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-bottom: 4px;
}

.order-detail-logo {
    display: block;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 9px;
    object-fit: contain;
}

.order-detail-merchant-copy {
    display: grid;
    min-width: 0;
    gap: 0;
    justify-items: start;
    text-align: left;
}

.order-detail-merchant-copy span {
    max-width: min(100%, 24ch);
    color: oklch(25% 0.004 250);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-detail-merchant-copy small {
    color: oklch(46% 0.004 250);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
}

.order-detail-status-line {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    color: oklch(48% 0.004 250);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.order-detail-status-line em {
    min-height: 22px;
    padding: 5px 8px 0;
    border-radius: 999px;
    background: oklch(94.8% 0.006 250);
    color: oklch(50% 0.004 250);
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
}

.order-detail-status-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: oklch(94% 0.006 250);
    color: oklch(48% 0.004 250);
    font-size: 19px;
    font-variation-settings: "FILL" 0, "wght" 520, "GRAD" 0, "opsz" 24;
}

.order-detail-hero.is-success .order-detail-status-icon {
    background: oklch(94.5% 0.018 145);
    color: var(--brand-strong);
}

.order-detail-hero.is-danger .order-detail-status-icon {
    background: var(--danger-soft);
    color: var(--danger);
}

.order-detail-hero.is-pending .order-detail-status-icon {
    background: var(--warning-soft);
    color: var(--warning);
}

.order-detail-hero.is-info .order-detail-status-icon {
    background: var(--blue-soft);
    color: var(--blue);
}

.order-detail-title {
    width: 100%;
    margin: 0;
    color: oklch(18% 0.004 250);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.order-detail-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    color: oklch(18% 0.004 250);
    font-variant-numeric: tabular-nums;
}

.order-detail-amount span {
    font-size: 18px;
    font-weight: 650;
    line-height: 1;
}

.order-detail-amount strong {
    font-size: 34px;
    font-weight: 650;
    line-height: 1;
}

.order-detail-hero-note {
    max-width: min(100%, 34ch);
    margin: 0;
    color: oklch(50% 0.004 250);
    font-size: 12px;
    line-height: 1.45;
}

.order-detail-section {
    display: grid;
    padding: 0 24px;
}

.order-detail-section-head {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid oklch(92% 0.004 250);
}

.order-detail-section-head span {
    color: oklch(20% 0.004 250);
    font-size: 14px;
    font-weight: 700;
}

.order-detail-section-head small {
    min-width: 0;
    color: oklch(58% 0.004 250);
    font-size: 12px;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-detail-row {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 40px;
    border-bottom: 1px solid oklch(92% 0.004 250);
    color: oklch(56% 0.004 250);
    font-size: 12px;
    line-height: 1.35;
}

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

.order-detail-row strong {
    min-width: 0;
    color: oklch(24% 0.004 250);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.order-detail-copy {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-left: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: oklch(48% 0.105 255);
    font-size: 12px;
    font-weight: 600;
}

.order-detail-after-sale {
    gap: 8px;
    padding-bottom: 10px;
}

.order-detail-note {
    padding: 9px 0 0;
    border-top: 0;
    color: oklch(50% 0.004 250);
    font-size: 12px;
    line-height: 1.5;
}

.order-detail-note.is-info {
    color: var(--blue);
}

.order-detail-note.is-warning {
    color: var(--warning);
}

.order-detail-actions {
    gap: 8px;
    margin-top: 2px;
}

.order-detail-actions form {
    display: grid;
    margin: 0;
}

body.order-detail-page:not(.home-page):not(.auth-page) .order-detail-actions .btn {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}

body.order-detail-page:not(.home-page):not(.auth-page) .order-detail-actions .btn-primary {
    border-color: transparent;
    background: var(--brand);
    color: white;
}

body.order-detail-page:not(.home-page):not(.auth-page) .order-detail-actions .btn-outline {
    border-color: oklch(88.5% 0.004 250);
    background: white;
    color: var(--brand-strong);
}

body.order-detail-page:not(.home-page):not(.auth-page) .icp-footer {
    display: none;
}

/* ── Refund flow pages: apply and progress ── */

body.refund-flow-page:not(.home-page):not(.auth-page) {
    background: oklch(96.6% 0.003 250);
}

body.refund-flow-page:not(.home-page):not(.auth-page) .header {
    border-bottom: 1px solid oklch(92% 0.004 250);
    background: white;
}

body.refund-flow-page:not(.home-page):not(.auth-page) .header h1 {
    color: oklch(16% 0.004 250);
    font-size: 17px;
    font-weight: 700;
}

body.refund-flow-page:not(.home-page):not(.auth-page) .header-row {
    max-width: 480px;
    min-height: calc(60px + env(safe-area-inset-top));
}

body.refund-flow-page:not(.home-page):not(.auth-page) .header .nav-back {
    color: oklch(16% 0.004 250);
}

body.refund-flow-page:not(.home-page):not(.auth-page) .container {
    width: min(100%, 480px);
    gap: 0;
    padding: 0 18px calc(18px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    background: oklch(96.6% 0.003 250);
}

.refund-flow-view {
    display: grid;
    gap: 8px;
    margin: 0 -18px;
    padding: 0 18px 18px;
}

.refund-flow-hero,
.refund-flow-section {
    margin: 0 -18px;
    border-top: 1px solid oklch(91.5% 0.004 250);
    border-bottom: 1px solid oklch(91.5% 0.004 250);
    background: oklch(99.2% 0.001 250);
    box-shadow: none;
}

.refund-flow-hero {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 14px 24px 16px;
    text-align: center;
}

.refund-flow-merchant {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-bottom: 4px;
}

.refund-flow-logo {
    display: block;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 9px;
    object-fit: contain;
}

.refund-flow-merchant-copy {
    display: grid;
    min-width: 0;
    gap: 0;
    justify-items: start;
    text-align: left;
}

.refund-flow-merchant-copy span {
    max-width: min(100%, 24ch);
    color: oklch(25% 0.004 250);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.refund-flow-merchant-copy small {
    color: oklch(46% 0.004 250);
    font-size: 12px;
    line-height: 1.25;
}

.refund-flow-status-line {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    color: oklch(48% 0.004 250);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.refund-flow-status-line em {
    min-height: 22px;
    padding: 5px 8px 0;
    border-radius: 999px;
    background: oklch(94.8% 0.006 250);
    color: oklch(50% 0.004 250);
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
}

.refund-flow-status-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 19px;
    font-variation-settings: "FILL" 0, "wght" 520, "GRAD" 0, "opsz" 24;
}

.refund-flow-hero.is-success .refund-flow-status-icon {
    background: oklch(94.5% 0.018 145);
    color: var(--brand-strong);
}

.refund-flow-hero.is-danger .refund-flow-status-icon {
    background: var(--danger-soft);
    color: var(--danger);
}

.refund-flow-hero.is-warning .refund-flow-status-icon {
    background: var(--warning-soft);
    color: var(--warning);
}

.refund-flow-title {
    width: 100%;
    margin: 0;
    color: oklch(18% 0.004 250);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.refund-flow-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    color: oklch(18% 0.004 250);
    font-variant-numeric: tabular-nums;
}

.refund-flow-amount span {
    font-size: 18px;
    font-weight: 650;
    line-height: 1;
}

.refund-flow-amount strong {
    font-size: 34px;
    font-weight: 650;
    line-height: 1;
}

.refund-flow-hero-note {
    max-width: min(100%, 34ch);
    margin: 0;
    color: oklch(50% 0.004 250);
    font-size: 12px;
    line-height: 1.45;
}

.refund-flow-section {
    display: grid;
    padding: 0 24px;
}

.refund-flow-section-head {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid oklch(92% 0.004 250);
}

.refund-flow-section-head span {
    color: oklch(20% 0.004 250);
    font-size: 14px;
    font-weight: 700;
}

.refund-flow-section-head small {
    min-width: 0;
    color: oklch(58% 0.004 250);
    font-size: 12px;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.refund-flow-row {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 40px;
    border-bottom: 1px solid oklch(92% 0.004 250);
    color: oklch(56% 0.004 250);
    font-size: 12px;
    line-height: 1.35;
}

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

.refund-flow-row strong {
    min-width: 0;
    color: oklch(24% 0.004 250);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.refund-flow-link,
.refund-flow-copy {
    color: oklch(48% 0.105 255);
    text-decoration: none;
}

.refund-flow-copy {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-left: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
}

.refund-flow-note,
.refund-flow-alert {
    padding: 9px 0 0;
    color: oklch(50% 0.004 250);
    font-size: 12px;
    line-height: 1.5;
}

.refund-flow-note.is-info {
    color: var(--blue);
}

.refund-flow-note.is-warning {
    color: var(--warning);
}

.refund-flow-alert.is-danger,
.refund-flow-note.is-danger {
    color: var(--danger);
}

.refund-flow-form {
    display: grid;
    gap: 12px;
    padding: 12px 0 0;
}

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

.refund-reason-option {
    position: relative;
    display: grid;
    min-height: 38px;
    place-items: center;
    padding: 0 10px;
    border: 1px solid oklch(88.5% 0.004 250);
    border-radius: 10px;
    background: white;
    color: oklch(36% 0.004 250);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.refund-reason-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.refund-reason-option:has(input:checked),
.refund-reason-option.is-selected {
    border-color: oklch(52% 0.054 145);
    background: oklch(95.8% 0.024 145);
    box-shadow: inset 0 0 0 1px oklch(52% 0.054 145);
    color: var(--brand-strong);
}

.refund-reason-option:has(input:checked)::after,
.refund-reason-option.is-selected::after {
    content: "";
    position: absolute;
    right: 9px;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--brand-strong);
}

.refund-flow-field {
    display: grid;
    gap: 8px;
    color: oklch(30% 0.004 250);
    font-size: 13px;
    font-weight: 700;
}

.refund-flow-field textarea {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    padding: 10px 0;
    border: 0;
    border-top: 1px solid oklch(90% 0.004 250);
    border-bottom: 1px solid oklch(90% 0.004 250);
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: oklch(22% 0.004 250);
    font-size: 14px;
    line-height: 1.5;
}

.refund-flow-field textarea::placeholder {
    color: oklch(67% 0.004 250);
}

.refund-flow-field textarea:focus {
    border-bottom-color: oklch(72% 0.08 145);
    box-shadow: none;
}

.refund-upload-field {
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 4px 10px;
    min-height: 58px;
    padding: 10px 0;
    border-top: 1px solid oklch(90% 0.004 250);
    border-bottom: 1px solid oklch(90% 0.004 250);
    color: oklch(24% 0.004 250);
}

.refund-upload-field .material-symbols-outlined {
    grid-row: span 2;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 20px;
}

.refund-upload-field strong {
    color: oklch(22% 0.004 250);
    font-size: 13px;
    line-height: 1.2;
}

.refund-upload-field small {
    min-width: 0;
    color: oklch(58% 0.004 250);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.refund-upload-field input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.refund-flow-timeline {
    display: grid;
    padding: 10px 0 2px;
}

.refund-flow-step {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    min-height: 48px;
    color: oklch(58% 0.004 250);
}

.refund-flow-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: -4px;
    left: 5px;
    width: 1px;
    background: oklch(88% 0.004 250);
}

.refund-flow-step-dot {
    position: relative;
    z-index: 1;
    width: 11px;
    height: 11px;
    margin-top: 5px;
    border-radius: 50%;
    background: oklch(80% 0.004 250);
}

.refund-flow-step.is-current .refund-flow-step-dot {
    background: var(--brand-strong);
}

.refund-flow-step strong {
    display: block;
    color: oklch(24% 0.004 250);
    font-size: 13px;
    line-height: 1.35;
}

.refund-flow-step small {
    display: block;
    margin-top: 2px;
    color: oklch(58% 0.004 250);
    font-size: 12px;
    line-height: 1.4;
}

.refund-flow-actions {
    gap: 8px;
    margin-top: 2px;
}

body.refund-flow-page:not(.home-page):not(.auth-page) .refund-flow-actions .btn {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}

body.refund-flow-page:not(.home-page):not(.auth-page) .refund-flow-actions .btn-primary {
    border-color: transparent;
    background: var(--brand);
    color: white;
}

body.refund-flow-page:not(.home-page):not(.auth-page) .refund-flow-actions .btn-outline {
    border-color: oklch(88.5% 0.004 250);
    background: white;
    color: var(--brand-strong);
}

body.refund-flow-page:not(.home-page):not(.auth-page) .icp-footer {
    display: none;
}

body.refund-flow-page .errorlist {
    margin: 4px 0 0;
    padding: 0;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.45;
    list-style: none;
}

@media (max-height: 700px) {
    body.pay-result-page:not(.home-page):not(.auth-page) .container {
        padding-inline: 16px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }

    body.pay-result-page:not(.home-page):not(.auth-page) .pay-result-view {
        margin-inline: -16px;
        padding-inline: 16px;
        padding-bottom: 8px;
    }

    .pay-result-merchant {
        min-height: 45px;
        padding: 6px 12px 5px;
    }

    .pay-result-logo {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .pay-result-label {
        display: none;
    }

    .pay-result-summary {
        margin-inline: -16px;
        padding: 9px 22px 8px;
    }

    .pay-result-orb {
        width: 38px;
        height: 38px;
    }

    .pay-result-orb .material-symbols-outlined {
        font-size: 23px;
    }

    .pay-result-kicker {
        display: none;
    }

    .pay-result-title {
        font-size: 18px;
    }

    .pay-result-value {
        font-size: 29px;
    }

    .pay-result-hint {
        min-height: 20px;
        font-size: 11px;
        line-height: 1.35;
    }

    .pay-result-detail-list {
        margin: 6px -16px 0;
        padding-inline: 22px;
    }

    .pay-result-detail-row {
        grid-template-columns: 72px minmax(0, 1fr);
        min-height: 34px;
        font-size: 11px;
    }

    .pay-result-detail-value,
    .pay-result-copy {
        font-size: 11px;
    }

    .pay-result-actions {
        gap: 7px;
        margin-top: 8px;
    }

    body.pay-result-page:not(.home-page):not(.auth-page) .pay-result-actions .btn {
        min-height: 38px;
        font-size: 13px;
    }
}

.pay-keypad-shell {
    position: fixed;
    right: auto;
    bottom: 0;
    left: 50%;
    z-index: 92;
    width: min(100%, 480px);
    transform: translateX(-50%);
    background: oklch(99.8% 0.001 250);
    box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom);
}

.pay-bank-line {
    display: flex;
    height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid oklch(88.8% 0.004 250);
    border-bottom: 1px solid oklch(91% 0.004 250);
    color: oklch(18% 0.004 250);
    font-size: 15px;
    line-height: 1;
}

.pay-bank-logo {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.pay-bank-line strong {
    font-size: 15px;
    font-weight: 700;
}

.pay-keypad {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 60px;
    background: oklch(91% 0.004 250);
    gap: 1px;
}

.pay-keypad button {
    display: grid;
    min-width: 0;
    min-height: 60px;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: oklch(99.8% 0.001 250);
    color: oklch(23% 0.004 250);
    font-size: 34px;
    font-weight: 350;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pay-keypad button:active {
    background: oklch(94.5% 0.004 250);
}

.pay-keypad .material-symbols-outlined {
    font-size: 27px;
    font-variation-settings: "FILL" 0, "wght" 420, "GRAD" 0, "opsz" 28;
}

.pay-key-confirm {
    grid-column: 4;
    grid-row: 2 / span 3;
    min-height: 182px;
    background: oklch(72% 0.12 253) !important;
    color: white !important;
    font-size: 24px !important;
    font-weight: 500 !important;
}

.pay-key-confirm:disabled {
    background: oklch(80% 0.035 253) !important;
    color: oklch(100% 0 0 / 0.76) !important;
}

.pay-key-zero {
    grid-column: 1 / span 2;
}

body.pay-page:not(.home-page):not(.auth-page) .icp-footer {
    display: none;
}

@media (max-width: 360px) {
    body.pay-page:not(.home-page):not(.auth-page) {
        --pay-keypad-height: 266px;
    }

    .pay-merchant {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-merchant-logo {
        width: 46px;
        height: 46px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-merchant .pay-farm-name,
    body.pay-page:not(.home-page):not(.auth-page) .pay-merchant .pay-farm-label {
        font-size: 15px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .amount-field .amount-input {
        font-size: 24px;
    }

    .pay-keypad {
        grid-auto-rows: 55px;
    }

    .pay-keypad button {
        min-height: 55px;
        font-size: 31px;
    }

    .pay-key-confirm {
        min-height: 167px;
    }
}

/* ── Pay page refinement: compact mobile webview layout ── */

body.pay-page:not(.home-page):not(.auth-page) {
    --pay-keypad-height: 260px;
    --pay-product-action-height: 64px;
    overscroll-behavior: none;
}

html.pay-keyboard-lock,
html.pay-keyboard-lock body {
    width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body.pay-page:not(.home-page):not(.auth-page) .container,
body.pay-text-entry-active:not(.home-page):not(.auth-page) .container {
    height: calc(100dvh - 60px - env(safe-area-inset-top));
    min-height: 0;
    padding-bottom: 0;
    overflow: hidden;
}

body.pay-product-mode:not(.home-page):not(.auth-page) .container {
    height: auto;
    min-height: calc(100dvh - 60px - env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    overflow: visible;
}

body.pay-page:not(.home-page):not(.auth-page) .task-form {
    gap: 0;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-merchant {
    gap: 5px;
    padding: 12px 12px 9px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-merchant-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-merchant .pay-farm-name {
    font-size: 15px;
    line-height: 1.28;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-merchant .pay-farm-label {
    font-size: 12px;
    line-height: 1.25;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-mode-tabs {
    width: min(238px, 76%);
    min-height: 34px;
    margin: 0 auto 10px;
    padding: 3px;
    border: 1px solid oklch(90.5% 0.004 250);
    border-radius: 999px;
    background: oklch(99.2% 0.001 250);
}

body.pay-page:not(.home-page):not(.auth-page) .pay-mode-tabs .mode-tab {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-mode-tabs .mode-tab.active {
    background: oklch(94.5% 0.03 145);
}

body.pay-page:not(.home-page):not(.auth-page) .pay-mode-tabs .mode-tab.active::after {
    content: none;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-amount-card {
    margin: 0 -18px;
    padding: 13px 22px 9px;
    border: 0;
    background: oklch(99.4% 0.001 250);
}

body.pay-page:not(.home-page):not(.auth-page) .amount-field {
    grid-template-columns: 50px minmax(0, 1fr);
    min-height: 58px;
    border-bottom-color: oklch(92% 0.004 250);
}

body.pay-page:not(.home-page):not(.auth-page) .amount-field::after {
    left: 52px;
    height: 30px;
}

body.pay-page:not(.home-page):not(.auth-page) .amount-currency {
    height: 46px;
    padding-left: 4px;
    font-size: 25px;
}

body.pay-page:not(.home-page):not(.auth-page) .amount-field .amount-input {
    min-height: 58px;
    padding-left: 10px;
    font-size: 26px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-remark-row {
    min-height: 40px;
    margin-top: 8px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-remark-trigger {
    min-height: 40px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-remark-label,
body.pay-page:not(.home-page):not(.auth-page) .pay-remark-preview {
    font-size: 12px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-check-hint {
    min-height: 32px;
    padding: 8px 8px 0;
    font-size: 12px;
    line-height: 1.35;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-check-hint[hidden] {
    display: none;
}

body.pay-page:not(.home-page):not(.auth-page) .quote-box {
    bottom: calc(var(--pay-keypad-height) + env(safe-area-inset-bottom));
    padding: 0 18px 8px;
    border-top: 0;
    background: transparent;
    backdrop-filter: none;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-match-card {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    max-height: 62px;
    padding: 7px 10px;
    border: 1px solid oklch(92% 0.004 250);
    border-radius: 8px;
    background: oklch(99.4% 0.001 250 / 0.98);
}

body.pay-page:not(.home-page):not(.auth-page) .pay-match-icon {
    width: 26px;
    height: 26px;
    font-size: 17px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-match-title {
    font-size: 12px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-match-desc,
body.pay-page:not(.home-page):not(.auth-page) .pay-match-note {
    font-size: 11px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-match-points {
    min-height: 22px;
    padding: 0 8px;
    font-size: 11px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-product-panel {
    margin: 0 -18px;
    padding: 0;
    border: 0;
    background: transparent;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-product-card {
    padding: 14px 16px 10px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-product-title {
    font-size: 14px;
    margin-bottom: 10px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-product-search-input {
    min-height: 36px;
    font-size: 13px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-product-footer {
    min-height: 40px;
    font-size: 12px;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card-list {
    gap: 0;
    max-height: clamp(
        148px,
        calc(100dvh - 542px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),
        300px
    );
    padding: 0;
    border: 0;
    scrollbar-width: none;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card-list::-webkit-scrollbar {
    display: none;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card {
    min-height: 52px;
    padding: 8px 12px;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card.selected {
    background: oklch(95.8% 0.025 145);
}

body.pay-page:not(.home-page):not(.auth-page) .product-card-name {
    font-size: 13px;
}

body.pay-page:not(.home-page):not(.auth-page) .product-card-price {
    font-size: 13px;
}

body.pay-page:not(.home-page):not(.auth-page) .quantity-stepper {
    width: 122px;
}

body.pay-product-mode:not(.home-page):not(.auth-page) .quote-box {
    position: static;
    width: auto;
    margin: 8px 0 0;
    padding: 0;
    border-top: 0;
    background: transparent;
    transform: none;
    backdrop-filter: none;
}

body.pay-product-mode:not(.home-page):not(.auth-page) .quote-box:empty {
    display: none;
}

body.pay-product-mode:not(.home-page):not(.auth-page) .quote-box.has-result,
body.pay-product-mode:not(.home-page):not(.auth-page) .quote-box.quote-skeleton {
    animation: none;
}

body.pay-product-mode:not(.home-page):not(.auth-page) .pay-submit {
    position: static;
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    transform: none;
}

body.pay-product-mode .pay-keypad-shell,
body.pay-text-entry-active .pay-keypad-shell,
body.pay-text-entry-active .quote-box,
body.pay-text-entry-active .pay-submit {
    display: none !important;
}

body.pay-text-entry-active:not(.home-page):not(.auth-page) .pay-remark-row .pay-remark-clear {
    display: none;
}

body.pay-text-entry-active:not(.home-page):not(.auth-page) .container {
    height: var(--pay-locked-container-height, calc(100dvh - 60px - env(safe-area-inset-top)));
}

body.pay-text-entry-active:not(.home-page):not(.auth-page) .pay-remark-input {
    width: 100%;
    min-height: 40px;
    font-size: 14px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-bank-line {
    height: 38px;
    font-size: 13px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-bank-logo {
    width: 22px;
    height: 22px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-bank-line strong {
    font-size: 13px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-keypad {
    grid-auto-rows: 54px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-keypad button {
    min-height: 54px;
    font-size: 29px;
}

body.pay-page:not(.home-page):not(.auth-page) .pay-key-confirm {
    min-height: 164px;
    font-size: 21px !important;
}

@media (max-height: 700px) {
    body.pay-page:not(.home-page):not(.auth-page) {
        --pay-keypad-height: 246px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-merchant {
        padding-top: 8px;
        padding-bottom: 6px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-merchant-logo {
        width: 34px;
        height: 34px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-mode-tabs {
        margin-bottom: 8px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-amount-card {
        padding-top: 10px;
        padding-bottom: 7px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .amount-field {
        min-height: 52px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .amount-field .amount-input {
        min-height: 52px;
        font-size: 24px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-check-hint {
        min-height: 26px;
        padding-top: 6px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .product-card-list {
        max-height: clamp(
            118px,
            calc(100dvh - 530px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),
            210px
        );
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-bank-line {
        height: 36px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-keypad {
        grid-auto-rows: 52px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-keypad button {
        min-height: 52px;
        font-size: 28px;
    }

    body.pay-page:not(.home-page):not(.auth-page) .pay-key-confirm {
        min-height: 158px;
    }
}

/* ── Payment flow refresh: restrained C-end payment system ── */

body.payment-flow-page:not(.home-page):not(.auth-page) {
    --payment-bg: oklch(97.1% 0.002 250);
    --payment-surface: oklch(99.4% 0.001 250);
    --payment-surface-soft: oklch(98.2% 0.002 250);
    --payment-line: oklch(91.5% 0.004 250);
    --payment-line-soft: oklch(94% 0.003 250);
    --payment-ink: oklch(18% 0.004 250);
    --payment-text: oklch(28% 0.004 250);
    --payment-muted: oklch(56% 0.004 250);
    --payment-quiet: oklch(68% 0.004 250);
    --payment-accent: var(--brand-strong);
    background: var(--payment-bg);
    color: var(--payment-text);
}

body.payment-flow-page:not(.home-page):not(.auth-page) .header {
    border-bottom: 1px solid var(--payment-line);
    background: color-mix(in oklch, var(--payment-surface), white 60%);
    box-shadow: none;
}

body.payment-flow-page:not(.home-page):not(.auth-page) .header h1 {
    color: var(--payment-ink);
    font-size: 17px;
    font-weight: 650;
    letter-spacing: 0;
}

body.payment-flow-page:not(.home-page):not(.auth-page) .pay-header-home,
body.payment-flow-page:not(.home-page):not(.auth-page) .pay-header-more {
    color: var(--payment-ink);
}

body.payment-flow-page:not(.home-page):not(.auth-page) .pay-header-divider {
    background: var(--payment-line);
}

body.payment-flow-page:not(.pay-page):not(.home-page):not(.auth-page) .container {
    width: min(100%, 480px);
    min-height: calc(100dvh - 61px - env(safe-area-inset-top));
    gap: 0;
    padding: 0 18px calc(20px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    background: var(--payment-bg);
}

body.payment-flow-page:not(.pay-page):not(.home-page):not(.auth-page) .icp-footer {
    display: none;
}

body.payment-flow-page:not(.home-page):not(.auth-page) .btn {
    min-height: 44px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0;
    box-shadow: none;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, opacity 0.14s ease;
}

body.payment-flow-page:not(.home-page):not(.auth-page) .btn-primary {
    border-color: transparent;
    background: var(--payment-accent);
    color: white;
}

body.payment-flow-page:not(.home-page):not(.auth-page) .btn-primary:active {
    background: oklch(43% 0.055 145);
}

body.payment-flow-page:not(.home-page):not(.auth-page) .btn-outline,
body.payment-flow-page:not(.home-page):not(.auth-page) .btn-quiet {
    border-color: var(--payment-line);
    background: var(--payment-surface);
    color: var(--payment-accent);
}

body.payment-flow-page:not(.home-page):not(.auth-page) .btn-sm {
    min-height: 34px;
    border-radius: 8px;
    font-size: 12px;
}

body.payment-flow-page:not(.home-page):not(.auth-page) .button-stack {
    position: static;
    gap: 8px;
    margin-top: 8px;
    padding: 0;
}

body.payment-flow-page:not(.home-page):not(.auth-page) .button-stack form {
    display: grid;
    margin: 0;
}

body.payment-flow-page:not(.pay-page):not(.home-page):not(.auth-page) .button-stack .btn {
    width: 100%;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-merchant,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-merchant-picker {
    border-bottom-color: var(--payment-line-soft);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-farm-name {
    color: var(--payment-ink);
    font-weight: 650;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-farm-label {
    color: var(--payment-muted);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-mode-tabs {
    border: 1px solid var(--payment-line);
    background: var(--payment-surface-soft);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-mode-tabs .mode-tab {
    color: var(--payment-muted);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-mode-tabs .mode-tab.active {
    background: var(--payment-surface);
    color: var(--payment-accent);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-bank-line,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-footer,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-remark-row,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-card,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .product-card {
    border-color: var(--payment-line);
    background: var(--payment-surface);
    box-shadow: none;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-remark-row.is-active,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .product-card.selected {
    border-color: oklch(73% 0.078 145);
    background: oklch(96.8% 0.018 145);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .product-card:active,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quantity-stepper button:active {
    background: oklch(95.5% 0.004 250);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quantity-stepper {
    border-color: var(--payment-line);
    background: var(--payment-surface);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quantity-stepper button:disabled {
    color: var(--payment-quiet);
    background: transparent;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quote-box {
    z-index: 1;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-submit {
    border-radius: 8px;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-view,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-view,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-view {
    display: grid;
    gap: 8px;
    margin: 0 -18px;
    padding: 0 18px 18px;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-merchant,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-merchant,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-merchant {
    justify-content: flex-start;
    min-height: 48px;
    padding: 8px 0;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-logo,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-logo,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-logo {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-farm,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-merchant-copy span,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-merchant-copy span {
    color: var(--payment-ink);
    font-size: 14px;
    font-weight: 650;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-label,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-merchant-copy small,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-merchant-copy small {
    color: var(--payment-muted);
    font-size: 11px;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-summary,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-hero,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-hero,
body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-detail-list,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-section,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-section,
body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-card {
    margin-right: -18px;
    margin-left: -18px;
    border: 0;
    border-top: 1px solid var(--payment-line);
    border-bottom: 1px solid var(--payment-line);
    border-radius: 0;
    background: var(--payment-surface);
    box-shadow: none;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-summary,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-hero,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-hero {
    justify-items: start;
    gap: 6px;
    padding: 16px 24px 18px;
    text-align: left;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-orb,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-status-icon,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-status-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-orb .material-symbols-outlined {
    font-size: 20px;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-summary.is-info .pay-result-orb::after,
body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-summary.is-pending .pay-result-orb::after {
    inset: -3px;
    opacity: 0.22;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-kicker {
    display: none;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-title,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-title,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-title {
    color: var(--payment-ink);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-amount,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-amount,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-amount {
    justify-content: flex-start;
    color: var(--payment-ink);
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-value,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-amount strong,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-amount strong {
    font-size: 32px;
    font-weight: 680;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-currency,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-amount span,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-amount span {
    font-size: 17px;
    font-weight: 650;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-hint,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-hero-note,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-hero-note {
    justify-content: flex-start;
    max-width: 100%;
    color: var(--payment-muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-status-line,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-status-line {
    justify-content: flex-start;
    color: var(--payment-muted);
    font-weight: 650;
}

body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-status-line em,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-status-line em {
    border-radius: 999px;
    background: var(--payment-surface-soft);
    color: var(--payment-muted);
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-detail-list,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-section,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-section {
    padding: 0 24px;
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-detail-row,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-row,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-row {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 40px;
    border-bottom-color: var(--payment-line-soft);
    color: var(--payment-muted);
}

body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-detail-value,
body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-row strong,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-row strong {
    color: var(--payment-text);
    font-size: 12px;
    font-weight: 650;
}

body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-section-head,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-section-head {
    min-height: 42px;
    border-bottom-color: var(--payment-line-soft);
}

body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-section-head span,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-section-head span {
    color: var(--payment-ink);
    font-size: 14px;
    font-weight: 700;
}

body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-section-head small,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-section-head small {
    color: var(--payment-muted);
}

body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-note,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-note,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-alert {
    padding: 9px 0 0;
    color: var(--payment-muted);
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .container {
    width: min(100%, 480px);
    gap: 0;
    padding: 0 18px calc(84px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    background: var(--payment-bg);
}

body.orders-page.payment-flow-page.no-tabbar:not(.home-page):not(.auth-page) .container {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .orders-filter {
    display: flex;
    gap: 8px;
    margin: 0 -18px;
    padding: 10px 18px 8px;
    border-bottom: 1px solid var(--payment-line);
    background: var(--payment-surface);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .orders-filter::-webkit-scrollbar {
    display: none;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .orders-type-filter {
    padding-top: 0;
    padding-bottom: 10px;
    border-top: 0;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .orders-filter a {
    width: auto;
    min-width: fit-content;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--payment-line);
    border-radius: 999px;
    background: var(--payment-surface);
    color: var(--payment-muted);
    font-size: 12px;
    font-weight: 650;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .orders-filter a.active {
    border-color: transparent;
    background: oklch(94.8% 0.02 145);
    color: var(--payment-accent);
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-card {
    display: grid;
    gap: 0;
    margin-top: 8px;
    padding: 0 24px;
    overflow: visible;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-card .compact-list {
    gap: 0;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-card .order-list-item {
    border-bottom: 1px solid var(--payment-line-soft);
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-card .order-list-item:last-child {
    border-bottom: 0;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-card .order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 12px 0;
    border-bottom: 0;
    color: inherit;
    text-decoration: none;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-card .order-row > span:first-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-card .order-row strong {
    min-width: 0;
    color: var(--payment-ink);
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-row small,
body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-row-side small {
    color: var(--payment-muted);
    font-size: 11px;
    line-height: 1.35;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-row-side {
    display: grid;
    justify-items: end;
    gap: 4px;
    text-align: right;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-row-side strong {
    color: var(--payment-ink);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 0 12px;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-actions form {
    display: grid;
    margin: 0;
}

body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .empty-state {
    min-height: 160px;
    padding: 30px 16px;
    border-radius: 0;
    background: transparent;
    color: var(--payment-muted);
}

body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-reason-grid {
    gap: 8px;
}

body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-reason-option {
    min-height: 38px;
    border-color: var(--payment-line);
    border-radius: 8px;
    background: var(--payment-surface);
    color: var(--payment-text);
    font-size: 13px;
    font-weight: 650;
    box-shadow: none;
}

body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-reason-option:has(input:checked),
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-reason-option.is-selected {
    border-color: oklch(70% 0.076 145);
    background: oklch(96.8% 0.018 145);
    color: var(--payment-accent);
    box-shadow: none;
}

body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-reason-option:has(input:checked)::after,
body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-reason-option.is-selected::after {
    right: 8px;
    top: 8px;
    width: 6px;
    height: 6px;
}

body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-field textarea {
    min-height: 76px;
    padding: 10px 0;
    border-top-color: var(--payment-line);
    border-bottom-color: var(--payment-line);
    color: var(--payment-ink);
}

body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-upload-field {
    min-height: 54px;
    border-top-color: var(--payment-line);
    border-bottom-color: var(--payment-line);
}

body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-timeline {
    padding-top: 12px;
}

body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-step-dot {
    background: var(--payment-line);
}

body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-step.is-current .refund-flow-step-dot {
    background: var(--payment-accent);
}

@media (max-width: 360px) {
    body.payment-flow-page:not(.pay-page):not(.home-page):not(.auth-page) .container {
        padding-right: 14px;
        padding-left: 14px;
    }

    body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-view,
    body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-view,
    body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-view {
        margin-right: -14px;
        margin-left: -14px;
        padding-right: 14px;
        padding-left: 14px;
    }

    body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .orders-filter,
    body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-card {
        margin-right: -14px;
        margin-left: -14px;
    }

    body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-summary,
    body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-hero,
    body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-hero,
    body.pay-result-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-detail-list,
    body.order-detail-page.payment-flow-page:not(.home-page):not(.auth-page) .order-detail-section,
    body.refund-flow-page.payment-flow-page:not(.home-page):not(.auth-page) .refund-flow-section {
        margin-right: -14px;
        margin-left: -14px;
        padding-right: 20px;
        padding-left: 20px;
    }

    body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .orders-filter {
        padding-right: 14px;
        padding-left: 14px;
    }

    body.orders-page.payment-flow-page:not(.home-page):not(.auth-page) .order-card {
        padding-right: 20px;
        padding-left: 20px;
    }
}

/* Cashier minimal refresh: keep the C-end payment surface quiet and explicit. */
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) {
    --pay-keypad-height: 260px;
    --pay-action-bg: var(--payment-accent);
    --pay-action-bg-active: oklch(32% 0.03 148);
    --pay-action-bg-disabled: oklch(81% 0.018 145);
    --pay-action-color-disabled: oklch(100% 0 0 / 0.72);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-header-more {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-color: transparent;
    border-radius: 12px;
    background: transparent;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-header-more:active {
    background: var(--payment-surface-soft);
    transform: scale(0.96);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-header-more .material-symbols-outlined {
    font-size: 25px;
    font-variation-settings: "FILL" 0, "wght" 520, "GRAD" 0, "opsz" 24;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .amount-field::after {
    background: var(--payment-accent);
}

body.pay-text-entry-active.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .amount-field::after {
    opacity: 0;
    animation: none;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-key-confirm {
    background: var(--pay-action-bg) !important;
    font-size: 19px !important;
    font-weight: 650 !important;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-key-confirm:disabled {
    background: var(--pay-action-bg-disabled) !important;
    color: var(--pay-action-color-disabled) !important;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-key-confirm:active {
    background: var(--pay-action-bg-active) !important;
    transform: none;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-card {
    box-shadow: none;
}

body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .container {
    height: auto;
    min-height: calc(100dvh - 60px - env(safe-area-inset-top));
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    overflow: visible;
}

body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-mode-tabs,
body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) #modeAmount,
body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) #modeProduct,
body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quote-box,
body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-submit,
body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-keypad-shell {
    display: none !important;
}

body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-farm-picker {
    margin: 0 0 14px;
}

body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .task-panel:not(.pay-panel) {
    margin: 0 -18px;
    border: 0;
    border-top: 1px solid var(--payment-line);
    border-bottom: 1px solid var(--payment-line);
    border-radius: 0;
    background: var(--payment-surface);
    box-shadow: none;
}

body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .empty-state {
    min-height: 120px;
    background: transparent;
    color: var(--payment-muted);
}

body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .empty-state span {
    max-width: 28ch;
    line-height: 1.7;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Product mode scroll polish: make only the product list scroll. */
body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .container {
    height: auto;
    min-height: calc(100dvh - 60px - env(safe-area-inset-top));
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
    overflow: visible;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .task-panel.pay-panel,
body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .task-form,
body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-panel {
    min-height: 0;
    overflow: visible;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .task-form {
    display: grid;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-panel {
    display: grid !important;
    gap: 8px;
    padding-bottom: 8px;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .product-card-list {
    position: relative;
    height: auto;
    max-height: clamp(
        220px,
        calc(100dvh - 490px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),
        340px
    );
    min-height: 0;
    margin-right: -4px;
    padding-right: 4px;
    padding-bottom: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: oklch(78% 0.006 250) transparent;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .product-card-list::-webkit-scrollbar {
    display: block;
    width: 3px;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .product-card-list::-webkit-scrollbar-track {
    background: transparent;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .product-card-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: oklch(78% 0.006 250);
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-footer {
    margin-top: 0;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quote-box {
    margin-top: 0;
}

@media (max-height: 700px) {
    body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .product-card-list {
        max-height: clamp(
            156px,
            calc(100dvh - 490px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),
            210px
        );
    }
}

/* Product checkout confirmation: compact quote and action in one bar. */
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-checkout-row {
    display: contents;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-checkout-row {
    position: fixed;
    right: auto;
    bottom: 0;
    left: 50%;
    z-index: 92;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(136px, 36%);
    align-items: stretch;
    width: min(100%, 480px);
    min-height: 96px;
    margin: 0;
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
    border: 0;
    border-top: 1px solid var(--payment-line);
    border-radius: 0;
    background: var(--payment-surface);
    transform: translateX(-50%);
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quote-box {
    position: static;
    display: grid;
    width: auto;
    min-height: 96px;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--payment-surface);
    color: var(--payment-muted);
    transform: none;
    backdrop-filter: none;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quote-box:empty {
    display: grid;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quote-box.has-result,
body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quote-box.quote-skeleton {
    animation: none;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .quote-sub {
    display: flex;
    min-height: 96px;
    align-items: center;
    padding: 0 14px;
    color: var(--payment-muted);
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-card {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    min-height: 96px;
    max-height: none;
    gap: 9px;
    padding: 14px 14px;
    border: 0;
    background: transparent;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-icon {
    width: 30px;
    height: 30px;
    background: var(--payment-accent);
    color: white;
    font-size: 20px;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-title {
    color: var(--payment-accent);
    font-size: 14px;
    font-weight: 750;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-desc {
    display: grid;
    gap: 1px;
    color: var(--payment-muted);
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-product,
body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-farm {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-product {
    color: var(--payment-text);
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-points {
    min-height: 24px;
    padding: 0 8px;
    background: oklch(91.5% 0.02 145);
    color: var(--payment-accent);
    font-size: 12px;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-note {
    display: none;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-submit {
    display: grid;
    width: 100%;
    min-height: 96px;
    align-content: center;
    justify-items: center;
    gap: 4px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    background: var(--pay-action-bg);
    color: white;
    text-align: center;
    transform: none;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-submit:disabled {
    background: var(--pay-action-bg-disabled);
    color: var(--pay-action-color-disabled);
    opacity: 1;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-submit:active {
    background: var(--pay-action-bg-active);
    transform: none;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-submit-label {
    font-size: 21px;
    font-weight: 650;
    line-height: 1.15;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-submit-amount {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.15;
}

@media (max-width: 390px) {
    body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-checkout-row {
        grid-template-columns: minmax(0, 1fr) 132px;
    }

    body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-card {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 8px;
        padding: 10px;
    }

    body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-icon {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }

    body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-match-points {
        grid-column: 2;
        justify-self: start;
        min-height: 22px;
        margin-top: 2px;
        font-size: 12px;
    }

    body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-submit-label {
        font-size: 16px;
    }
}

/* C-end UI polish pass: keep the existing flows, improve warmth, touch states, and status clarity. */
:root {
    --farm-bg: oklch(97.3% 0.012 104);
    --farm-bg-soft: oklch(98.7% 0.009 104);
    --farm-surface: oklch(99.4% 0.004 104);
    --farm-line: oklch(90.2% 0.016 112);
    --farm-line-soft: oklch(92.8% 0.012 112);
    --farm-clay: oklch(46% 0.062 58);
    --farm-clay-soft: oklch(95.2% 0.034 64);
    --farm-shadow: 0 18px 42px oklch(38% 0.042 112 / 0.11);
    --touch-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    font-variant-numeric: tabular-nums;
    text-rendering: optimizeLegibility;
}

body.system-flow-page:not(.home-page):not(.auth-page) {
    --system-bg: var(--farm-bg);
    --system-surface: var(--farm-surface);
    --system-line: var(--farm-line);
    --system-line-soft: var(--farm-line-soft);
}

body.system-flow-page:not(.home-page):not(.auth-page) .header {
    background: color-mix(in oklch, var(--farm-surface), white 42%);
}

body.system-flow-page:not(.home-page):not(.auth-page) .container {
    background:
        linear-gradient(180deg, oklch(98.5% 0.011 104) 0, var(--system-bg) 240px),
        var(--system-bg);
}

.btn,
.nav-back,
.header-action,
.pay-header-home,
.pay-header-more,
.tabbar-item,
body.system-flow-page:not(.home-page):not(.auth-page) .action-item,
body.system-flow-page:not(.home-page):not(.auth-page) .home-summary-item,
body.system-flow-page:not(.home-page):not(.auth-page) .compact-row,
body.system-flow-page:not(.home-page):not(.auth-page) .order-row,
body.system-flow-page:not(.home-page):not(.auth-page) .me-row,
body.payment-flow-page:not(.home-page):not(.auth-page) .orders-filter a,
body.payment-flow-page:not(.home-page):not(.auth-page) .product-card,
body.payment-flow-page:not(.home-page):not(.auth-page) .refund-reason-option {
    transition:
        background-color 0.18s var(--touch-ease),
        border-color 0.18s var(--touch-ease),
        color 0.18s var(--touch-ease),
        opacity 0.18s var(--touch-ease),
        transform 0.18s var(--touch-ease),
        box-shadow 0.18s var(--touch-ease);
}

body.system-flow-page:not(.home-page):not(.auth-page) .action-item:active,
body.system-flow-page:not(.home-page):not(.auth-page) .home-summary-item:active,
body.system-flow-page:not(.home-page):not(.auth-page) .compact-row:active,
body.system-flow-page:not(.home-page):not(.auth-page) .order-row:active,
body.system-flow-page:not(.home-page):not(.auth-page) .me-row:active,
body.payment-flow-page:not(.home-page):not(.auth-page) .orders-filter a:active,
body.payment-flow-page:not(.home-page):not(.auth-page) .product-card:active,
body.payment-flow-page:not(.home-page):not(.auth-page) .refund-reason-option:active {
    transform: translateY(1px) scale(0.992);
}

body.system-flow-page:not(.home-page):not(.auth-page) .action-item:focus-visible,
body.system-flow-page:not(.home-page):not(.auth-page) .home-summary-item:focus-visible,
body.system-flow-page:not(.home-page):not(.auth-page) .compact-row:focus-visible,
body.system-flow-page:not(.home-page):not(.auth-page) .order-row:focus-visible,
body.system-flow-page:not(.home-page):not(.auth-page) .me-row:focus-visible,
body.payment-flow-page:not(.home-page):not(.auth-page) .orders-filter a:focus-visible,
body.payment-flow-page:not(.home-page):not(.auth-page) .product-card:focus-visible,
body.payment-flow-page:not(.home-page):not(.auth-page) .refund-reason-option:focus-visible,
body.payment-flow-page:not(.home-page):not(.auth-page) .mode-tab:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand), transparent 82%);
}

body.system-flow-page:not(.home-page):not(.auth-page) .app-kicker,
body.system-flow-page:not(.home-page):not(.auth-page) .task-kicker {
    color: var(--farm-clay);
}

body.system-flow-page:not(.home-page):not(.auth-page) .state-note:not(.is-warning):not(.is-danger):not(.is-info),
body.system-flow-page:not(.home-page):not(.auth-page) .hero-note:not(.is-warning):not(.is-danger):not(.is-info) {
    background: var(--farm-clay-soft);
    color: oklch(34% 0.04 72);
}

body.system-flow-page:not(.home-page):not(.auth-page) .empty-state {
    position: relative;
    min-height: 132px;
    align-content: center;
    background:
        radial-gradient(circle at 50% 0, oklch(96% 0.026 145), transparent 64%),
        var(--farm-bg-soft);
}

body.system-flow-page:not(.home-page):not(.auth-page) .empty-state::before {
    content: "eco";
    display: grid;
    width: 34px;
    height: 34px;
    margin-bottom: 2px;
    place-items: center;
    border-radius: 50%;
    background: oklch(94.8% 0.026 145);
    color: var(--brand-strong);
    font-family: "Material Symbols Outlined";
    font-size: 21px;
    font-feature-settings: "liga";
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-dashboard-hero,
body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        linear-gradient(135deg, oklch(99% 0.009 104) 0%, oklch(94.8% 0.03 144) 100%);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-dashboard-hero::after,
body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-hero::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -62px;
    z-index: -1;
    width: 176px;
    height: 236px;
    background: url("../images/home/home-hero-scenery.png") center / cover no-repeat;
    opacity: 0.2;
    filter: saturate(0.95);
    pointer-events: none;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-dashboard-head,
body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-alert-list,
body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-primary-row,
body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-hero-copy,
body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-trust-row,
body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-hero .state-note {
    position: relative;
    z-index: 1;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-dashboard-hero {
    gap: 14px;
    padding-top: 20px;
    padding-bottom: 18px;
    border-top-color: color-mix(in oklch, var(--farm-line), white 30%);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-dashboard-hero .app-title {
    font-size: 21px;
    font-weight: 760;
    text-wrap: balance;
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-dashboard-hero .app-subtitle {
    max-width: 29ch;
    color: oklch(42% 0.02 128);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-status-pill {
    box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--brand), transparent 78%);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-primary-row {
    border-top-color: color-mix(in oklch, var(--brand), transparent 78%);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-summary-band {
    background: color-mix(in oklch, var(--farm-surface), white 28%);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-summary-item .material-symbols-outlined,
body.system-flow-page:not(.home-page):not(.auth-page) .action-icon,
body.system-flow-page:not(.home-page):not(.auth-page) .me-row-icon,
body.system-flow-page:not(.home-page):not(.auth-page) .me-stat-icon {
    box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--brand), transparent 82%);
}

body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-action-section .action-item:active,
body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-action-panel .action-item:active {
    background: color-mix(in oklch, var(--brand-soft), white 44%);
}

body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-hero {
    min-height: 214px;
    align-content: end;
    gap: 12px;
    padding-top: 24px;
    padding-bottom: 18px;
}

body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-hero .app-title {
    max-width: 12em;
    font-size: 23px;
    font-weight: 780;
    line-height: 1.2;
    text-wrap: balance;
}

body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-hero .app-subtitle {
    max-width: 28ch;
    color: oklch(42% 0.02 128);
}

body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-trust-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-trust-row span {
    display: inline-flex;
    min-width: 0;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: oklch(100% 0 0 / 0.62);
    color: oklch(35% 0.04 105);
    font-size: 12px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-action-panel {
    padding-top: 12px;
    padding-bottom: 4px;
}

body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-action-panel .action-item {
    min-height: 66px;
}

body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-action-panel .action-title {
    font-size: 15px;
}

body.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-hint.is-danger,
body.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-hint.is-pending,
body.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-hint.is-info,
body.payment-flow-page:not(.home-page):not(.auth-page) .pay-result-hint.is-success {
    max-width: 36ch;
}

@media (max-width: 360px) {
    body.home-system-page.system-flow-page:not(.home-page):not(.auth-page) .home-dashboard-hero::after,
    body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-hero::after {
        right: -54px;
        opacity: 0.14;
    }

    body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-hero .app-title {
        font-size: 21px;
    }

    body.entry-page.system-flow-page:not(.home-page):not(.auth-page) .entry-trust-row {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-main,
    .btn,
    .nav-back,
    .header-action,
    .pay-header-home,
    .pay-header-more,
    .tabbar-item,
    body.system-flow-page:not(.home-page):not(.auth-page) .action-item,
    body.system-flow-page:not(.home-page):not(.auth-page) .home-summary-item,
    body.system-flow-page:not(.home-page):not(.auth-page) .compact-row,
    body.system-flow-page:not(.home-page):not(.auth-page) .order-row,
    body.system-flow-page:not(.home-page):not(.auth-page) .me-row,
    body.payment-flow-page:not(.home-page):not(.auth-page) .orders-filter a,
    body.payment-flow-page:not(.home-page):not(.auth-page) .product-card,
    body.payment-flow-page:not(.home-page):not(.auth-page) .refund-reason-option {
        animation: none !important;
        transition: none !important;
    }
}

/* Cashier topbar compaction: merchant identity and mode switch share one row. */
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(156px, 44%);
    align-items: center;
    gap: 12px;
    min-height: 84px;
    margin: 0 -18px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--payment-line);
    background: var(--payment-surface);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-merchant,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-merchant-picker {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 10px;
    min-width: 0;
    padding: 0;
    text-align: left;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-merchant-logo {
    width: 42px;
    height: 42px;
    border-radius: 11px;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-farm-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
    justify-items: start;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-farm-name,
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-farm-label {
    max-width: 100%;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-farm-name {
    color: var(--payment-ink);
    font-size: 15px;
    font-weight: 700;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-farm-label {
    color: var(--payment-muted);
    font-size: 12px;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-mode-tabs {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    padding: 3px;
    align-self: center;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-mode-tabs .mode-tab {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card {
    padding-top: 14px;
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .product-card-list {
    max-height: clamp(
        268px,
        calc(100dvh - 430px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),
        420px
    );
}

body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-panel {
    padding-top: 10px;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-card {
    border-color: var(--payment-line);
    background: oklch(100% 0 0);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-title {
    color: var(--payment-ink);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-title::before {
    background: var(--payment-accent);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-search-input {
    border-color: var(--payment-line);
    background: var(--payment-surface-soft);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-search-input:focus {
    border-color: oklch(72% 0.08 145);
    box-shadow: 0 0 0 3px oklch(92% 0.025 145);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-product-footer {
    border-color: var(--payment-line);
}

body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar {
    grid-template-columns: minmax(0, 1fr);
}

body.pay-no-farm.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-farm-picker {
    margin: 10px 0 14px;
}

@media (max-width: 360px) {
    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar {
        grid-template-columns: minmax(0, 1fr) 148px;
        gap: 8px;
        padding-right: 14px;
        padding-left: 14px;
    }

    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-merchant,
    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-merchant-picker {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px;
    }

    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-merchant-logo {
        width: 38px;
        height: 38px;
    }

    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-farm-name {
        font-size: 14px;
    }

    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-topbar .pay-mode-tabs .mode-tab {
        padding: 0 6px;
    }

    body.pay-product-mode.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .product-card-list {
        max-height: clamp(
            236px,
            calc(100dvh - 428px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),
            360px
        );
    }
}

/* Cashier amount card: lift the amount entry into a quieter premium surface. */
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-panel {
    display: grid;
    margin: 14px 0 0;
    padding: 0;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 22px 20px 20px;
    border: 1px solid oklch(91.8% 0.002 250);
    border-radius: 8px;
    background: oklch(100% 0 0);
    box-shadow:
        0 8px 18px oklch(20% 0.004 250 / 0.035),
        0 1px 1px oklch(20% 0.004 250 / 0.025);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
    color: var(--payment-ink);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.2;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-title::before {
    content: "";
    width: 5px;
    height: 23px;
    border-radius: 999px;
    background: var(--payment-accent);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .amount-field {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 82px;
    border-bottom-color: oklch(88.8% 0.002 250);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .amount-field::after {
    left: 62px;
    width: 3px;
    height: 42px;
    background: var(--payment-accent);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .amount-currency {
    height: 66px;
    padding-left: 0;
    color: oklch(17% 0.004 250);
    font-size: 34px;
    font-weight: 760;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .amount-field .amount-input {
    width: 100%;
    min-width: 0;
    min-height: 82px;
    padding-left: 16px;
    color: var(--payment-ink);
    font-size: clamp(30px, 8vw, 34px);
    font-weight: 680;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .amount-field .amount-input::placeholder {
    color: oklch(68% 0.004 250);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .pay-check-hint {
    display: inline-flex;
    justify-self: center;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 28px;
    max-width: 100%;
    padding: 0;
    color: var(--payment-muted);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .pay-check-hint::before {
    content: "verified_user";
    flex: 0 0 auto;
    color: var(--payment-accent);
    font-family: "Material Symbols Outlined";
    font-size: 18px;
    font-feature-settings: "liga";
    line-height: 1;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .pay-check-hint.is-warning::before {
    color: var(--warning);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .pay-check-hint[hidden] {
    display: none;
}

@media (max-width: 360px) {
    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-panel {
        margin-top: 12px;
    }

    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card {
        padding: 18px 16px 18px;
        gap: 14px;
    }

    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .amount-field {
        grid-template-columns: 54px minmax(0, 1fr);
        min-height: 72px;
    }

    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .amount-field::after {
        left: 58px;
        height: 36px;
    }

    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .amount-currency {
        font-size: 30px;
    }

    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .amount-field .amount-input {
        font-size: 28px;
    }

    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page) .pay-amount-card .amount-field .amount-input {
        padding-left: 12px;
    }
}

/* Amount quote extension: keep the match result attached to the amount card. */
body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-checkout-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-checkout-row .quote-box {
    position: static;
    width: 100%;
    max-height: 0;
    margin: -1px 0 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid oklch(91.8% 0.002 250);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: oklch(100% 0 0);
    opacity: 0;
    box-shadow:
        0 10px 20px oklch(20% 0.004 250 / 0.03),
        0 1px 1px oklch(20% 0.004 250 / 0.02);
    transform: translateY(-8px);
    transition:
        max-height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.2s ease,
        transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: none;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-checkout-row .quote-box:empty {
    display: none;
}

body.pay-quote-visible.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-amount-card {
    border-bottom-color: oklch(94.2% 0.002 250);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 1px 1px oklch(20% 0.004 250 / 0.02);
}

body.pay-quote-visible.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-checkout-row .quote-box {
    max-height: 126px;
    opacity: 1;
    transform: translateY(0);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-card {
    min-height: 84px;
    padding: 15px 18px 17px;
    border: 0;
    border-top: 1px solid oklch(94.2% 0.002 250);
    background: transparent;
    animation: pay-quote-unfold 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-card::after {
    content: none;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-icon {
    width: 32px;
    height: 32px;
    background: oklch(94.8% 0.018 145);
    font-size: 19px;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-title {
    font-size: 14px;
    font-weight: 760;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-desc {
    font-size: 12px;
}

body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-points {
    align-self: center;
}

.pay-match-skeleton {
    grid-template-columns: 34px minmax(0, 1fr) 68px;
}

.pay-match-skeleton .pay-match-copy {
    gap: 8px;
}

.skeleton-token,
.skeleton-line,
.skeleton-pill {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        oklch(92.8% 0.004 250) 0%,
        oklch(96.8% 0.003 250) 44%,
        oklch(92.8% 0.004 250) 100%
    );
    box-shadow: inset 0 0 0 1px oklch(94% 0.003 250 / 0.72);
}

.skeleton-token::after,
.skeleton-line::after,
.skeleton-pill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        oklch(100% 0 0 / 0.82) 48%,
        transparent 100%
    );
    transform: translateX(-120%);
    animation: pay-skeleton-shimmer 1.35s ease-in-out infinite;
}

.skeleton-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.skeleton-title {
    width: min(62%, 148px);
    height: 13px;
    border-radius: 999px;
}

.skeleton-desc {
    width: min(86%, 210px);
    height: 10px;
    border-radius: 999px;
}

.skeleton-pill {
    width: 62px;
    height: 24px;
    border-radius: 999px;
}

@keyframes pay-quote-unfold {
    from {
        opacity: 0;
        transform: translateY(-7px);
        clip-path: inset(0 0 42% 0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }
}

@keyframes pay-skeleton-shimmer {
    100% {
        transform: translateX(120%);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-checkout-row .quote-box,
    body.pay-page.payment-flow-page:not(.home-page):not(.auth-page):not(.pay-product-mode) .pay-match-card,
    .skeleton-token::after,
    .skeleton-line::after,
    .skeleton-pill::after {
        animation: none !important;
        transition: none !important;
    }
}
