:root {
    --bg: #f2f2f7;
    --grouped-bg: #f2f2f7;
    --surface: #ffffff;
    --surface-2: #f7f7fa;
    --fill: #78788012;
    --fill-strong: #7676801f;
    --text: #1c1c1e;
    --text-2: #3c3c43;
    --muted: #8a8a8e;
    --muted-2: #aeaeb2;
    --separator: #3c3c432e;
    --separator-solid: #e5e5ea;
    --blue: #007aff;
    --green: #34c759;
    --green-deep: #248a3d;
    --red: #ff3b30;
    --gold: #c9a227;
    --gold-deep: #a9821b;
    --gold-soft: #f6efd6;
    --navy: #1c2b46;
    --radius-lg: 20px;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-card: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-float: 0 8px 30px rgba(0,0,0,0.12);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    letter-spacing: -0.01em;
}

body.mobile-app {
    min-height: 100dvh;
    padding-bottom: calc(20px + var(--safe-bottom));
}

::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- Top App Bar (iOS large-title style) ---------- */
.mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: calc(10px + var(--safe-top)) 16px 12px;
    background: rgba(249, 249, 251, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--separator);
}

.mobile-topbar-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.mobile-topbar-logo {
    width: 40px;
    height: 40px;
    border-radius: 0;
    object-fit: contain;
    flex: 0 0 auto;
}

.mobile-topbar-copy { min-width: 0; }

.mobile-topbar-title {
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text);
}

.mobile-topbar-sub {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    color: var(--gold-deep);
    margin-top: 4px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    background: var(--gold-soft);
    border: 1px solid rgba(201,162,39,0.28);
    padding: 3px 9px;
    border-radius: 999px;
}

.mobile-topbar-sub i { color: var(--gold-deep); font-size: 0.78rem; }

.mobile-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

/* Colored segmented control */
.amount-toggle {
    display: inline-flex;
    background: #e7e9f0;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.amount-toggle-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 36px;
    height: 30px;
    border-radius: 8px;
    padding: 0 11px;
    transition: all 0.2s ease;
}

.amount-toggle-btn[data-amount-mode="million"].active {
    background: linear-gradient(135deg, #b8860b, #d4af37);
    color: #241a02;
    box-shadow: 0 3px 9px rgba(201,162,39,0.5);
}

.amount-toggle-btn[data-amount-mode="dollar"].active {
    background: linear-gradient(135deg, #1f9d55, #34c759);
    color: #06331b;
    box-shadow: 0 3px 9px rgba(52,199,89,0.45);
}

.mobile-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: var(--fill-strong);
    color: var(--blue);
    display: inline-grid;
    place-items: center;
    font-size: 1rem;
    transition: transform 0.12s ease, background 0.2s ease;
}

.mobile-icon-btn:active { transform: scale(0.9); background: var(--fill); }

/* ---------- Main ---------- */
.mobile-main {
    padding: 16px 16px 0;
    max-width: 760px;
    margin: 0 auto;
}

/* ---------- KPI ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
    align-items: start;
}

.kpi-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.kpi-column-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 11px;
    border-radius: 999px;
}

.kpi-column-title::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.kpi-column-title.memo { background: var(--gold-soft); color: var(--gold-deep); }
.kpi-column-title.inhouse { background: rgba(0,122,255,0.12); color: #0257c9; }

.kpi-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-card);
}

.kpi-card.primary {
    grid-column: span 2;
    background: linear-gradient(135deg, #1c2b46 0%, #2b3d5f 100%);
    color: #fff;
}

.kpi-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    font-size: 0.9rem;
    background: var(--gold-soft);
    color: var(--gold-deep);
    margin-bottom: 9px;
}

.kpi-card.primary .kpi-icon {
    background: rgba(201,162,39,0.2);
    color: #f2d675;
}

.kpi-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: -0.01em;
}

.kpi-card.primary .kpi-label { color: rgba(255,255,255,0.66); }

.kpi-value {
    margin-top: 3px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green-deep);
    line-height: 1.12;
    word-break: break-word;
    letter-spacing: -0.03em;
}

.kpi-card.primary .kpi-value { color: #fff; font-size: 1.6rem; }
.kpi-value.plain { color: var(--text); }

.kpi-note {
    margin-top: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: -0.01em;
}

.kpi-card.primary .kpi-note { color: rgba(255,255,255,0.62); }

.kpi-split {
    margin-top: 3px;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--gold-deep);
    line-height: 1.35;
    word-break: break-word;
}

.kpi-card.primary .kpi-split { color: #f2d675; }

/* ---------- Filter Panel ---------- */
.filter-panel {
    margin-bottom: 20px;
}

.search-wrap { position: relative; margin-bottom: 12px; }

.search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.95rem;
}

.mobile-search {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 11px;
    padding: 0 14px 0 36px;
    font-size: 16px;
    background: var(--fill-strong);
    color: var(--text);
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.mobile-search::placeholder { color: var(--muted); }

.mobile-search:focus {
    outline: none;
    background: var(--surface);
    box-shadow: 0 0 0 3.5px rgba(0,122,255,0.18);
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-row:last-of-type { margin-bottom: 0; }

.mobile-select {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 11px;
    padding: 0 32px 0 13px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8e' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 15px;
    box-shadow: var(--shadow-card);
    appearance: none;
    -webkit-appearance: none;
    transition: box-shadow 0.2s ease;
}

.mobile-select:focus {
    outline: none;
    box-shadow: 0 0 0 3.5px rgba(0,122,255,0.18);
}

.mobile-btn {
    height: 44px;
    border-radius: 11px;
    border: 0;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: transform 0.12s ease, opacity 0.2s ease;
}

.mobile-btn:active { transform: scale(0.97); opacity: 0.85; }

.mobile-btn.primary {
    background: linear-gradient(135deg, #b8860b 0%, #d4af37 45%, #e9c85a 100%);
    color: #241a02;
    box-shadow: 0 8px 20px rgba(201,162,39,0.35);
}

.mobile-btn.ghost {
    background: var(--surface);
    color: var(--blue);
    box-shadow: var(--shadow-card);
}

.w-100 { width: 100%; }

.segment-toggle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 10px;
    padding: 2px;
    background: var(--fill-strong);
    border-radius: 11px;
}

.segment-btn {
    border: 0;
    background: transparent;
    color: var(--text-2);
    font-size: 0.82rem;
    font-weight: 600;
    height: 34px;
    border-radius: 9px;
    transition: all 0.2s ease;
}

.segment-btn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.result-meta {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
    margin-top: 14px;
    padding: 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---------- Customer List (iOS inset grouped) ---------- */
.customer-list {
    display: grid;
    gap: 12px;
    padding-bottom: 20px;
}

.customer-card {
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    padding: 14px;
    color: inherit;
    position: relative;
    transition: transform 0.12s ease, background 0.15s ease;
}

.customer-card:active {
    transform: scale(0.985);
    background: var(--surface-2);
}

.customer-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.customer-id-wrap {
    display: flex;
    gap: 11px;
    align-items: center;
    min-width: 0;
}

.customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, #c9a227, #a9821b);
}

.customer-name {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.02em;
}

.customer-group {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 1px;
}

.customer-total {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--green-deep);
    white-space: nowrap;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.customer-total::after {
    content: "\F285";
    font-family: "bootstrap-icons";
    font-size: 0.8rem;
    color: var(--muted-2);
    font-weight: 400;
}

.customer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.chip {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--fill-strong);
    color: var(--text-2);
}

.chip.gold { background: var(--gold-soft); color: var(--gold-deep); }
.chip.teal { background: rgba(52,199,89,0.14); color: var(--green-deep); }

.break-group { margin-top: 12px; }

.break-group-title {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.break-group-title.memo { background: var(--gold-soft); color: var(--gold-deep); }
.break-group-title.inhouse { background: rgba(0,122,255,0.12); color: #0257c9; }

.break-group-title::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.customer-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.break-item {
    background: var(--surface-2);
    border-radius: 10px;
    padding: 9px 11px;
}

.break-item span {
    display: block;
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.01em;
    font-weight: 600;
}

.break-item strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.empty-state {
    text-align: center;
    padding: 44px 18px;
    color: var(--muted);
    background: var(--surface);
    border-radius: var(--radius);
    font-weight: 500;
    box-shadow: var(--shadow-card);
}

.empty-state i {
    display: block;
    font-size: 2rem;
    color: var(--muted-2);
    margin-bottom: 10px;
}

/* ---------- Detail Sheet (iOS modal card) ---------- */
.mobile-detail-sheet[hidden] { display: none !important; }

.mobile-detail-sheet { position: fixed; inset: 0; z-index: 200; }

.mobile-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    animation: fade 0.25s ease both;
}

.mobile-detail-panel {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    max-height: 92vh;
    overflow: auto;
    background: var(--grouped-bg);
    border-radius: 14px 14px 0 0;
    padding: 8px 16px calc(20px + var(--safe-bottom));
    box-shadow: var(--shadow-float);
    animation: sheet 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mobile-detail-panel::before {
    content: "";
    display: block;
    width: 38px;
    height: 5px;
    border-radius: 999px;
    background: var(--muted-2);
    opacity: 0.5;
    margin: 6px auto 14px;
}

.mobile-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.mobile-detail-eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gold-deep);
    font-weight: 700;
}

.mobile-detail-head h3 {
    margin: 4px 0 0;
    font-size: 1.28rem;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.mobile-detail-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.mobile-detail-head .mobile-icon-btn {
    background: var(--fill-strong);
    color: var(--muted);
}

.mobile-detail-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
    align-items: start;
}

.mobile-detail-metrics .kpi-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.metric-box {
    background: var(--surface);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow-card);
}

.metric-box.hero {
    grid-column: span 2;
    background: linear-gradient(135deg, #1c2b46 0%, #2b3d5f 100%);
    color: #fff;
}

.metric-box .label {
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.01em;
    font-weight: 600;
}

.metric-box.hero .label { color: rgba(255,255,255,0.66); }

.metric-box .value {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--green-deep);
    margin-top: 2px;
    letter-spacing: -0.02em;
}

.metric-box.hero .value { color: #fff; font-size: 1.4rem; }

.metric-note {
    margin-top: 4px;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--muted);
}

.metric-box.hero .metric-note { color: rgba(255,255,255,0.62); }

.metric-split {
    margin-top: 2px;
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--gold-deep);
    line-height: 1.35;
    word-break: break-word;
}

.metric-box.hero .metric-split { color: #f2d675; }

.detail-filter-bar {
    display: flex;
    gap: 8px;
    margin: 2px 0 14px;
}

.detail-filter-chip {
    flex: 1;
    border: 0;
    background: var(--fill-strong);
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 600;
    height: 38px;
    border-radius: 11px;
    transition: all 0.2s ease;
}

.detail-filter-chip.active {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 4px 12px rgba(28,43,70,0.28);
}

.detail-section-title {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    margin: 4px 4px 10px;
}

.detail-row {
    border-radius: 12px;
    padding: 13px;
    margin-bottom: 9px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.detail-row-title {
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: -0.02em;
}

.detail-row-sub {
    font-size: 0.77rem;
    color: var(--muted);
    margin-top: 2px;
}

.detail-row-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 11px;
    font-size: 0.77rem;
    color: var(--muted);
}

.detail-row-grid strong {
    display: block;
    color: var(--text);
    font-size: 0.86rem;
    margin-top: 1px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ---------- Auth ---------- */
.auth-page {
    background: linear-gradient(180deg, #1c2b46 0%, #0f1a2e 100%) !important;
}

.auth-shell {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 26px 18px calc(26px + var(--safe-bottom));
}

.auth-card {
    width: min(430px, 100%);
    background: var(--surface);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
    padding: 28px 22px;
    animation: rise 0.4s ease both;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 22px;
}

.auth-logo {
    width: 68px;
    height: 68px;
    border-radius: 0;
    object-fit: contain;
}

.auth-brand h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--text);
}

.auth-brand p {
    margin: 0;
    color: var(--gold-deep);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.auth-title { margin: 0 0 5px; font-size: 1.2rem; letter-spacing: -0.02em; font-weight: 700; text-align: center; }
.auth-subtitle { margin: 0 0 18px; color: var(--muted); font-size: 0.9rem; text-align: center; }

.auth-form { display: grid; gap: 13px; }

.mobile-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: -6px;
}

.mobile-input {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 16px;
    background: var(--fill-strong);
    color: var(--text);
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.mobile-input:focus {
    outline: none;
    background: var(--surface);
    box-shadow: 0 0 0 3.5px rgba(0,122,255,0.2);
}

.otp-input {
    letter-spacing: 0.5em;
    text-align: center;
    font-weight: 700;
    font-size: 1.3rem;
}

.mobile-check {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.88rem;
    color: var(--text-2);
}

.mobile-check input { width: 18px; height: 18px; accent-color: var(--blue); }

.auth-form .mobile-btn { margin-top: 6px; height: 48px; }

.mfa-option {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    border: 0;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    background: var(--surface-2);
    box-shadow: inset 0 0 0 1.5px transparent;
    transition: box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.mfa-option:has(input:checked) {
    background: var(--gold-soft);
    box-shadow: inset 0 0 0 1.5px var(--gold);
}

.mfa-option input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold-deep); }
.mfa-option-body strong { display: block; font-size: 0.95rem; }
.mfa-option-body small { color: var(--muted); }

.mobile-alert {
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 0.88rem;
    margin-bottom: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-alert.success { background: rgba(52,199,89,0.14); color: var(--green-deep); }
.mobile-alert.error { background: rgba(255,59,48,0.12); color: var(--red); }

.auth-footnote {
    margin: 18px 0 0;
    text-align: center;
    color: var(--muted-2);
    font-size: 0.76rem;
}

.d-inline { display: inline-flex; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 14px; }

/* ---------- Install App button ---------- */
.install-app-wrap {
    position: fixed;
    right: 16px;
    bottom: calc(18px + var(--safe-bottom));
    z-index: 300;
    display: none;
    align-items: center;
    animation: rise 0.4s ease both;
}

.install-app-wrap.is-visible { display: inline-flex; }

.install-app-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    padding: 0 18px;
    height: 48px;
    border-radius: 999px;
    background: linear-gradient(135deg, #b8860b 0%, #d4af37 45%, #e9c85a 100%);
    color: #241a02;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    box-shadow: 0 12px 28px rgba(201,162,39,0.5);
}

.install-app-btn:active { transform: scale(0.95); }
.install-app-btn i { font-size: 1.1rem; }

.install-app-close {
    width: 26px;
    height: 26px;
    margin-left: -10px;
    margin-bottom: 34px;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background: #1c1c1e;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.install-app-close:active { transform: scale(0.9); }

.install-ios-sheet[hidden] { display: none !important; }
.install-ios-sheet { position: fixed; inset: 0; z-index: 400; }

.install-ios-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    animation: fade 0.2s ease both;
}

.install-ios-card {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: var(--surface);
    border-radius: 22px 22px 0 0;
    padding: 22px 20px calc(22px + var(--safe-bottom));
    box-shadow: var(--shadow-float);
    animation: sheet 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.install-ios-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.install-ios-step {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.92rem;
    color: var(--text-2);
    margin: 0 0 12px;
    line-height: 1.4;
}

.install-ios-step span {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold-deep);
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.install-ios-step i { color: var(--gold-deep); }

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes sheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (min-width: 768px) {
    .mobile-main { padding: 20px 16px 0; }
}
