/* Exact supplied logo is fitted without cropping, stretching or raster changes. */
:root{--capital-blue:#078fcf;--capital-red:#f32222;--capital-ink:#111827;--capital-yellow:#f8d42c}
#age-override-btn[hidden],.loyalty-inputs[hidden]{display:none!important}
img[src*="capital-logo2.jpg"]{object-fit:contain!important;object-position:center;background:#fff;border-radius:8px;filter:none!important}
.login-store-logo[src*="capital-logo2.jpg"]{width:min(330px,75vw)!important;height:auto!important;max-height:290px!important;padding:8px}
.portal-login-logo[src*="capital-logo2.jpg"]{width:min(420px,80vw)!important;height:auto!important;max-height:390px!important;padding:10px}
.store-logo img[src*="capital-logo2.jpg"]{width:105px!important;height:auto!important;max-height:94px!important}
.sidebar .store-logo>img[src*="capital-logo2.jpg"]{justify-self:center;margin-inline:auto}
.payment-customer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0;padding:10px 12px;border:1px solid var(--line);border-radius:9px}.payment-customer>div{display:grid;gap:4px;min-width:0}.payment-customer b{overflow-wrap:anywhere}.payment-customer button{flex:none;min-height:44px}
#payment-dialog .tip-buttons button{white-space:nowrap;padding:9px 10px;min-height:44px}
#payment-rewards{margin:12px 0;border:1px solid var(--line);border-radius:10px}#payment-rewards>summary{cursor:pointer;padding:13px;font-weight:800;min-height:44px}#payment-rewards>summary span{font-size:12px;font-weight:500;margin-left:8px;color:var(--muted)}.payment-rewards-content{padding:0 10px 10px}.payment-rewards-content .loyalty-checkout,.payment-rewards-content #loyalty-checkout{margin-bottom:8px!important}#payment-rewards:not([open])>.payment-rewards-content{display:none}#payment-rewards input,#payment-rewards select{max-width:100%}
@media(max-width:480px){.payment-customer{gap:8px;padding:9px}.payment-customer button{padding:9px;font-size:12px}#payment-rewards>summary span{display:block;margin-left:18px}.payment-rewards-content .loyalty-inputs{grid-template-columns:1fr}}
.store-logo span{font-size:13px!important;white-space:normal!important;line-height:1.25}
.store-logo{gap:8px!important;align-items:center}
.portal-logo img[src*="capital-logo2.jpg"]{width:78px!important;height:68px!important}
.portal-logo span{max-width:240px;white-space:normal;line-height:1.25}
.application-brand img[src*="capital-logo2.jpg"]{width:100px!important;height:auto!important;max-height:86px!important}
.application-brand span{max-width:300px;white-space:normal}
.kiosk-store-logo[src*="capital-logo2.jpg"]{width:160px!important;height:auto!important;max-height:145px!important}
.receipt-logo[src*="capital-logo2.jpg"]{width:42mm!important;max-width:100%!important;height:auto!important;max-height:none!important;margin:auto!important}
.receipt-brand h2,.receipt-brand h1{font-size:15px;line-height:1.2;overflow-wrap:anywhere}
.loyalty-page-header img[src*="capital-logo2.jpg"],body>header>img[src*="capital-logo2.jpg"]{width:100px!important;height:auto!important;max-height:88px!important}
.capital-nav-link{display:flex;align-items:center;padding:10px 12px;color:inherit;text-decoration:none;font-size:13px;border-radius:8px;line-height:1.3}
.capital-nav-link:hover,.capital-nav-link:focus-visible{background:#e6f5fc;color:#075e89}
.portal-header nav{flex-wrap:wrap;gap:6px}
.portal-header nav .portal-link{font-size:12px;white-space:normal;line-height:1.3}
.capital-search-results{display:grid;max-height:200px;overflow:auto;gap:3px;position:relative}
.capital-search-results button{text-align:left;white-space:normal;padding:8px;background:var(--surface,#fff);color:var(--text,#16232f);border:1px solid #a9bccb;border-radius:6px}
.capital-search-results button:hover,.capital-search-results button:focus-visible{background:#e6f5fc;color:#073d59}
.capital-payment-note{padding:12px;border-left:4px solid var(--capital-blue);background:#e9f7fe;color:#12364c;border-radius:6px}
.capital-join .application-header{padding-top:55px}
.capital-join .application-card{display:grid;gap:14px}
.capital-join .application-card.hidden{display:none}
.capital-join .application-intro h1{font-size:clamp(2rem,5vw,4rem)}
.capital-join .application-card input,.capital-join .application-card select{min-height:44px;min-width:0;width:100%;box-sizing:border-box}
.capital-join .application-shell{align-items:start}
@media(max-width:800px){.portal-header{flex-wrap:wrap}.portal-header nav{width:100%;justify-content:flex-start}.portal-logo span{max-width:220px}.application-header{gap:12px;flex-wrap:wrap}.application-brand{max-width:100%}.application-brand span{max-width:220px}.capital-join .application-shell{display:block}.capital-join .application-card{margin:20px 0}.capital-join .application-intro{margin:20px 0}.loyalty-page-header{flex-wrap:wrap}.login-store-logo[src*="capital-logo2.jpg"]{max-height:230px!important}.portal-login-logo[src*="capital-logo2.jpg"]{max-height:270px!important}.application-grid{grid-template-columns:1fr!important}}
@media print{img[src*="capital-logo2.jpg"]{height:auto!important;object-fit:contain!important}.receipt-logo[src*="capital-logo2.jpg"]{width:42mm!important;max-height:none!important}}
.store-portal-logo{grid-template-columns:78px minmax(0,1fr)!important}.store-portal-logo>span{display:grid!important}
.capital-join .application-shell{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:24px}
.capital-join .application-card{padding:26px;margin-top:0}.capital-join .application-grid{margin-left:0}
.capital-join .application-intro .capital-payment-note{color:#12364c}
@media(max-width:800px){.capital-join .application-shell{display:block}.capital-join .application-card{margin-top:20px}.store-portal-logo{min-width:0!important;max-width:100%}.store-portal-logo>span{font-size:10px}}

.capital-mobile-brand{display:none}
@media(max-width:700px){
 .sidebar #nav{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;height:66px!important;gap:5px;scroll-snap-type:x proximity;padding-bottom:5px}
 .sidebar #nav>button,.sidebar #nav>a[href]{flex:0 0 108px!important;width:108px!important;min-height:54px!important;scroll-snap-align:start}
 .sidebar{max-height:130px!important;padding:6px!important}.sidebar-foot{margin-top:4px!important;padding:0!important;gap:6px}
 .workspace{padding-bottom:134px!important}
 .capital-mobile-brand{display:block;float:left;width:53px;height:auto;max-height:50px;margin-right:8px}
 .topbar>div:first-child{min-height:78px}.topbar #view-kicker{font-size:8px;letter-spacing:.08em}.topbar #view-title{font-size:20px}
}

/* Catalog tiles keep their dimensions at every viewport size; only the column
   count changes. Empty space never stretches rows, and extra rows scroll. */
#view-pos #department-buttons{--capital-tile-width:138px;--capital-tile-height:60px}
#view-pos #category-buttons{--capital-tile-width:138px;--capital-tile-height:48px}
#view-pos #product-results{--capital-tile-width:138px;--capital-tile-height:60px}
html[data-catalog-view="silhouette"] #view-pos #department-buttons{--capital-tile-height:124px}
html[data-catalog-view="silhouette"] #view-pos #product-results{--capital-tile-width:142px;--capital-tile-height:158px}
html #view-pos .catalog-panel #department-buttons.department-grid,
html #view-pos .catalog-panel #category-buttons.category-grid,
html #view-pos .catalog-panel #product-results.product-grid{
 display:grid;
 grid-template-columns:repeat(auto-fill,var(--capital-tile-width));
 grid-template-rows:none;
 grid-auto-rows:var(--capital-tile-height);
 align-content:start;
 justify-content:start;
 align-items:start;
 justify-items:start;
 min-height:0;
 min-width:0;
 overflow:auto!important;
 overscroll-behavior:contain;
}
html #view-pos .catalog-panel #category-buttons.category-grid{max-height:120px!important}
html #view-pos .catalog-panel #department-buttons.department-grid>button,
html #view-pos .catalog-panel #category-buttons.category-grid>button,
html #view-pos .catalog-panel #product-results.product-grid>button{
 box-sizing:border-box;
 flex:none;
 width:var(--capital-tile-width)!important;
 min-width:var(--capital-tile-width)!important;
 max-width:var(--capital-tile-width)!important;
 height:var(--capital-tile-height)!important;
 min-height:var(--capital-tile-height)!important;
 max-height:var(--capital-tile-height)!important;
 overflow:hidden;
}
/* Use the existing compact text-card layout on small screens as well. */
html:not([data-catalog-view="silhouette"]) #view-pos #product-results .product-card{
 display:grid;
 grid-template-rows:24px 14px 10px;
 align-content:center;
 padding:4px 7px 4px 9px!important;
 gap:1px!important;
}
html:not([data-catalog-view="silhouette"]) #view-pos #product-results .product-card-name{font-size:10px!important;line-height:12px!important;height:24px;min-height:24px!important;margin:0}
html:not([data-catalog-view="silhouette"]) #view-pos #product-results .product-card-meta{line-height:14px;min-height:0;align-items:center}
html:not([data-catalog-view="silhouette"]) #view-pos #product-results .product-card-requirement{font-size:7px;line-height:9px;padding:0;min-height:0;margin:0}
html:not([data-catalog-view="silhouette"]) #view-pos #product-results .product-card-brand,
html:not([data-catalog-view="silhouette"]) #view-pos #product-results .product-card-unit{display:none}

/* Reserve the compact header and fixed navigation space. The 300px floor keeps
   search, category navigation, one text-product row and the pager usable; very
   short viewports can still scroll the page around this bounded panel. */
@media(max-width:700px){
 html #view-pos .catalog-panel{height:max(300px,calc(100vh - 350px));height:max(300px,calc(100dvh - 350px));min-height:300px;overflow:hidden}
 html #view-pos .catalog-panel #product-browser-screen.product-browser-screen{grid-template-rows:34px auto minmax(0,1fr) 38px}
 html #view-pos .catalog-panel #product-browser-screen.product-browser-screen.categories-hidden{grid-template-rows:34px minmax(0,1fr) 38px}
}
@media(max-width:700px) and (max-height:700px){
 html #view-pos .catalog-panel{padding-top:11px;padding-bottom:11px}
 html #view-pos .catalog-panel #category-buttons.category-grid{max-height:52px!important;padding:1px 0}
}
