/* D2-7 → D2-27 (DES_DECISIONS 14): one shell for web and app. The main menu is the
   previous production top icon row on every width (the same items in the same order
   on mobile and desktop; unified_style.css styles it) and there is no bottom tab bar.
   This file only places the ad/brand region: desktop "above_tabbar" stays a fixed
   strip, mobile (D2-28, DES 15) keeps the same fixed bottom brand banner as V4. */
html[data-shell-menu] {
    --shell-tab-height: 0px;
    --app-brand-film-height: clamp(58px, 7.2svh, 68px);
}
@media (min-width: 768px) {
    #adBannerArea .iliya-brand-motion { display: none !important; }
}
html[data-shell-menu] body.unified-page.app-shell > #appMainFrame {
    height: calc(100% - var(--app-bottom-reserved, 0px)) !important;
}
html[data-shell-menu] body.private-bids-page > .container {
    height: calc(100% - var(--app-bottom-reserved, 0px)) !important;
    max-height: calc(100% - var(--app-bottom-reserved, 0px)) !important;
}
html[data-shell-menu] body:not(.unified-page):not(.private-bids-page) {
    padding-bottom: var(--app-bottom-reserved, 0px);
}
/* D2-24: the 일거리 등록 FAB stays above the reserved bottom area (desktop fixed banner). */
html[data-shell-menu] body.private-bids-page .private-bid-fab {
    bottom: calc(max(var(--app-bottom-reserved, 0px), var(--app-dialog-safe-bottom, env(safe-area-inset-bottom, 0px))) + 18px) !important;
}
/* The mobile home deliberately scrolls the document instead of the frame. */
@media (max-width: 767px) {
    html[data-shell-menu] body.unified-page:not(.mobile-shell-embed) #infoCardsSection {
        padding-bottom: var(--app-bottom-reserved, 0px) !important;
    }
}
html[data-shell-ad] #appAdRegion:empty { display: none !important; }
html[data-shell-ad="above_tabbar"] body > #appAdRegion {
    position: fixed !important;
    inset: auto 0 var(--shell-tab-height) !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding-bottom: var(--shell-ad-safe-area, 0px);
    background: var(--color-bg, #fff);
    z-index: 8900 !important;
}
html[data-shell-ad="feed_card"] #appAdRegion {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto;
    margin: 8px 0 !important;
    border-radius: 12px;
    overflow: hidden;
}
html[data-shell-ad] #appAdRegion > #adBannerArea {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    display: block !important;
    border: 0 !important;
}
html[data-shell-ad] #appAdRegion[hidden],
html[data-shell-ad] #appAdRegion > #adBannerArea[hidden] { display: none !important; }
/* Reuse the existing mobile film/copy styling; only its placement changes. */
html[data-shell-ad] #adBannerArea[data-brand-visible="1"] .iliya-brand-film {
    display: block !important;
    position: relative;
    width: 100%;
    height: var(--app-brand-film-height);
    overflow: hidden;
    background: #09182f;
}
html[data-shell-ad] #adBannerArea[data-brand-visible="0"] .iliya-brand-film {
    display: none !important;
}
/* D2-7 (3-1): one 16px side gutter on mobile, so every card shares the same left and
   right edges. Web and app alike, whatever the menu position. */
@media (max-width: 767px) {
    /* D2-28 (DES 15): the mobile home keeps the V4 spacing; the gutter applies to 내일거리 only. */
    html body.private-bids-page:not(.mobile-shell-embed) > .container {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }
    /* The header stays edge to edge; its own 16px padding is the gutter. */
    html body.private-bids-page:not(.mobile-shell-embed) > .container > header {
        width: auto !important;
        margin-right: -16px !important;
        margin-left: -16px !important;
        padding-left: 16px !important;
    }
}
