/* One scrollable cart panel, with compact item rows in a single column. */
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] {
    position:fixed!important;inset:0!important;display:grid!important;place-items:center!important;
    box-sizing:border-box!important;width:100%!important;height:100dvh!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:max(8px,env(safe-area-inset-top,0px)) max(8px,env(safe-area-inset-right,0px)) var(--merch-cart-bottom-padding,max(8px,env(safe-area-inset-bottom,0px))) max(8px,env(safe-area-inset-left,0px))!important;
    overflow:hidden!important;touch-action:pan-y pinch-zoom!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] > .book-merch-cart-panel {
    display:block!important;box-sizing:border-box!important;flex:none!important;
    width:min(560px,100%)!important;min-width:0!important;max-width:100%!important;
    height:auto!important;min-height:0!important;max-height:100%!important;
    margin:0!important;padding:16px!important;border-radius:18px!important;
    overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;
    touch-action:pan-y pinch-zoom!important;-webkit-overflow-scrolling:touch!important;
    scrollbar-gutter:stable;scroll-padding-block:16px;animation:none!important;transform:none!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-items {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-auto-flow:row!important;
    grid-auto-rows:max-content!important;align-content:start!important;align-items:start!important;
    flex:0 0 auto!important;width:100%!important;min-width:0!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:14px 0!important;padding:0!important;gap:10px!important;overflow:visible!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-items > article {
    position:static!important;inset:auto!important;display:grid!important;box-sizing:border-box!important;
    grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;
    grid-auto-rows:max-content!important;align-content:start!important;align-items:center!important;gap:10px!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:12px!important;border:1px solid #edd8df!important;border-radius:13px!important;background:#fff!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-item-copy {
    grid-column:1/-1!important;min-width:0!important;width:100%!important;max-width:100%!important;
    height:auto!important;white-space:normal!important;overflow-wrap:anywhere!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-item-copy :is(strong,small) {
    display:block!important;min-width:0!important;max-width:100%!important;white-space:normal!important;
    overflow-wrap:anywhere!important;line-height:1.4!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] :is(.book-merch-cart-quantity,.book-merch-cart-quantity-fixed) {
    grid-column:1!important;justify-self:start!important;align-self:center!important;margin:0!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-quantity {
    grid-template-columns:44px 48px 44px!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-quantity button {
    width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-quantity input {
    width:48px!important;height:44px!important;font-size:16px!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-items > article > button {
    grid-column:2!important;justify-self:end!important;align-self:center!important;width:auto!important;
    min-width:0!important;height:auto!important;min-height:44px!important;margin:0!important;white-space:normal!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-panel > header {
    position:static!important;flex:none!important;min-width:0!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] :is(.book-merch-cart-summary,.book-merch-cart-panel > footer,.book-merch-cart-warning) {
    position:static!important;flex:0 0 auto!important;min-width:0!important;max-width:100%!important;
    height:auto!important;overflow-wrap:anywhere!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-summary {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
}
html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-panel > footer > :only-child {
    grid-column:1/-1!important;
}
@media(max-width:960px),(hover:none) and (pointer:coarse) {
    html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] {
        /* Fallback while the shared viewport script is loading. */
        bottom:calc(var(--courtreadz-mobile-taskbar-height,calc(50px + env(safe-area-inset-bottom,0px))) + 8px)!important;
        height:auto!important;
    }
    html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] > .book-merch-cart-panel {
        width:100%!important;height:100%!important;padding:14px!important;
    }
    html:is(.app-document,.guest-document).book-merch-cart-open body > .book-merch-cart-dialog[role="dialog"] .book-merch-cart-panel > footer {
        grid-template-columns:minmax(0,1fr)!important;
    }
}
