/* Homepage presentation only. No visibility/state changes to business panels. */
@media (max-width: 900px) {
    .site-header {
        height: 48px;
        min-height: 48px;
        padding: 0 12px;
        flex-wrap: nowrap;
    }
    .site-header .brand { gap: 8px; }
    .site-header .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
    .site-header .brand-mark svg { width: 21px; height: 21px; }
    .site-header .brand-word { font-size: 17px; }

    main, footer { width: calc(100% - 24px); }
    main { padding-top: 10px; }
    #homeInventory {
        padding: 3px;
        gap: 4px;
        margin-bottom: 10px;
        border-radius: 11px;
    }
    #homeInventory .product-card {
        min-height: 44px;
        padding: 6px 8px;
        border-radius: 8px;
    }
    #homeInventory .product-main { min-height: 30px; gap: 0; }
    #homeInventory .product-copy strong {
        font-size: 13px;
        line-height: 1.4;
        white-space: nowrap;
    }
    #homeInventory .product-brand-name { display: none; }
    #homeInventory .project-name-detail {
        display: inline;
        margin: 0;
        font-size: 13px;
        line-height: 1.4;
        font-weight: 600;
    }
    #homeInventory .product-card[aria-pressed="true"]::before { display: none; }
    #rechargeWorkbench { border-radius: 14px; }
    #layoutSelectedStock { padding: 12px 14px 10px; }
    .layout-stock-heading { margin-bottom: 7px; }
    #layoutStockTitle { font-size: 18px; line-height: 1.35; letter-spacing: -.2px; }

    /* One row, with a local scroll area only when all five iOS plans cannot fit. */
    #layoutStockItems {
        display: grid;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(62px, 1fr);
        gap: 6px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        padding-bottom: 2px;
    }
    #layoutStockItems:has(.layout-stock-pill:nth-child(5)) {
        grid-auto-columns: minmax(70px, 1fr);
    }
    #layoutStockItems .layout-stock-pill {
        min-height: 44px;
        padding: 5px 6px;
        gap: 2px;
        align-items: center;
        text-align: center;
        border-radius: 8px;
    }
    #layoutStockItems .layout-stock-pill b {
        font-size: 12px;
        line-height: 1.35;
        white-space: nowrap;
        overflow-wrap: normal;
    }
    #layoutStockItems .layout-stock-pill > span {
        font-size: 11px;
        line-height: 1.4;
        gap: 4px;
        padding: 0;
        white-space: nowrap;
    }
    #layoutStockItems .layout-stock-pill > span::before { width: 5px; height: 5px; }

    #rechargeWorkbench #cardMoreServices { margin: 8px 14px 0; }
    #rechargeWorkbench #cardToolNav:not([hidden]) {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        padding: 0;
    }
    #rechargeWorkbench #cardToolNav[hidden] { display: none !important; }
    #rechargeWorkbench #cardToolNav button {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 8px 12px;
        gap: 6px;
        font-size: 12px;
        line-height: 1.4;
        border-radius: 8px;
        white-space: nowrap;
    }
    #rechargeWorkbench #cardToolNav button svg {
        width: 15px;
        height: 15px;
        padding: 0;
        border-radius: 0;
        background: transparent;
    }
    #rechargeWorkbench .form-area { padding: 12px 14px 18px; }
    #rechargeWorkbench #stepOnePanel { padding-bottom: 0; }
    #rechargeWorkbench #stepTwoPanel { padding-top: 10px; }
    #rechargeWorkbench .form-area label { margin-bottom: 6px; }
    #rechargeWorkbench .input-shell { height: 48px; padding-inline: 12px; }
    #rechargeWorkbench .form-area input:not([type="checkbox"]) { min-height: 44px; font-size: 16px; }
    #rechargeWorkbench #gptSession {
        height: 104px;
        min-height: 104px;
        padding: 11px 12px;
        font-size: 16px;
        line-height: 1.5;
    }
    #rechargeWorkbench #quickRechargeStart { min-height: 48px; margin-top: 10px; }
    footer { margin-top: 16px; padding-bottom: 16px; }
}
