.product-builder{margin:16px 0;padding:18px}.product-builder .section-head{align-items:flex-start}.product-builder h3{margin:0 0 6px;color:#efd49b}.product-builder .section-head p{margin:0 0 12px;font-size:12px;color:#aabdac}.builder-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.builder-fields label{display:flex;flex-direction:column;gap:6px;font-size:10px;color:#d3ddca;letter-spacing:.5px}.builder-fields input,.builder-fields select{width:100%;min-width:0;padding:11px;border-radius:7px;border:1px solid #42644c;background:#09281d;color:#fff5dc;font:13px system-ui}.builder-preview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:17px 0 9px}.builder-preview>div{padding:12px;border:1px solid #385843;border-radius:7px;background:#09291e;min-width:0}.builder-preview small{display:block;font-size:8px;color:#a2bba5}.builder-preview b{display:block;font-size:20px;color:#edf4df;margin-top:6px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.builder-preview .builder-final{border-color:#a38b4e;background:#173d28}.builder-preview .builder-final b{color:#f4db9b}.premium-name .displayVariant{margin-top:6px;padding:7px;width:100%;border:1px solid #4f674f;border-radius:5px;background:#103823;color:#f4e1b2;font-size:10px}.product-builder #newProductStatus{min-height:18px;color:#dcd4b2}.product-builder button:disabled{opacity:.45;cursor:not-allowed}
#admin .product-builder{background:linear-gradient(145deg,#0a2e21,#173d2a)!important;color:#f8e9bd!important;border:1px solid #81966b!important}#admin .product-builder .builder-fields label{color:#f2e5be!important}#admin .product-builder .section-head p,#admin .product-builder #newProductUnit{color:#ccd8bb!important}
#admin .product-order{padding:18px;margin:16px 0;background:linear-gradient(145deg,#0a2e21,#173d2a)!important;border:1px solid #81966b;color:#f8e9bd!important}.product-order h3{margin-top:0}.order-group{padding:10px 12px;border:1px solid #45634a;border-radius:7px;margin:10px 0}.order-group h4,.order-group summary{margin:0 0 8px;color:#e9d69e;font-size:13px;font-weight:750}.order-row{display:flex;align-items:center;gap:8px;border-top:1px solid #ffffff12;padding:7px 0}.order-row>span{flex:1;font-size:12px;color:#e5eddb}.order-row button{min-width:36px;min-height:32px;padding:3px 8px;font-size:20px;color:#f5dda1!important}.order-row button:disabled{opacity:.25;cursor:default}.product-order .fine{color:#c1cfb6!important}
@media(max-width:640px){.builder-fields,.builder-preview{grid-template-columns:repeat(2,minmax(0,1fr))}.product-builder{padding:12px}}
#home .physical-panels{min-width:0;min-height:0;display:flex;flex-direction:column;gap:6px}#home .physical-panels>.physical-market{flex:var(--panel-count,1);min-height:0}#home .physical-panels .rates{grid-template-rows:repeat(var(--panel-count),minmax(0,1fr))!important}.delete-product{border:1px solid #a34436!important;background:#fff4f1!important;color:#8b2419!important;padding:7px 10px!important;border-radius:5px;margin:6px 0}.marketPanel{padding:7px;max-width:100%}
@media(orientation:portrait){#home .physical-panels{grid-area:auto}}
#home .physical-panels:empty{display:none!important}@media(orientation:landscape){#home .physical-panels{grid-column:1!important;grid-row:1/3!important}}
/* Give Reference the full left board; stack USD, MCX and RTGS on the right. */
@media(orientation:landscape){#home .physical-panels{display:contents!important}#home .market-sections,#home .market-sections.single-physical{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)!important;grid-template-rows:minmax(60px,1.6fr) minmax(80px,2.8fr) minmax(64px,var(--rtgs-weight,1.8fr))!important}#home .reference-market{grid-column:1!important;grid-row:1/-1!important}#home .usd-market{grid-column:2!important;grid-row:1!important}#home .mcx-market{grid-column:2!important;grid-row:2!important}#home .rtgs-market{grid-column:2!important;grid-row:3!important}#home .market-sections.no-rtgs{grid-template-rows:minmax(60px,1.6fr) minmax(90px,2.8fr)!important}#home .market-sections.no-reference{grid-template-columns:minmax(0,1fr)!important}#home .no-reference .usd-market,#home .no-reference .mcx-market,#home .no-reference .rtgs-market{grid-column:1!important}}
@media(orientation:portrait){#home .market-sections,#home .market-sections.single-physical{display:flex!important;flex-direction:column;overflow-y:auto!important;overflow-x:hidden!important;gap:6px!important;align-content:start!important}#home .usd-market{flex:0 0 clamp(78px,12dvh,96px)!important;min-height:78px!important}#home .physical-panels{display:flex!important;flex-direction:column;flex:1 0 auto!important;min-height:calc(var(--physical-count,1)*52px + 80px)!important}#home .physical-panels>.physical-market{min-height:calc(var(--panel-count,1)*52px + 40px)!important;flex:var(--panel-count,1) 0 auto!important}#home .physical-panels .rates{height:auto!important;grid-template-rows:repeat(var(--panel-count,1),minmax(52px,1fr))!important}#home .physical-market .rate-card,#home .mcx-market .rate-card{min-height:52px!important}#home .mcx-market{flex:0 0 150px!important;min-height:150px!important}#home .spot-name{font-size:clamp(12px,3.5vw,16px)!important}#home .spot-range{font-size:clamp(9px,2.5vw,11px)!important}#home .usd-market .price.mid b{font-size:clamp(18px,5vw,23px)!important}#home .spot-card{gap:1px!important;padding:3px!important}#home .physical-panels:empty{display:none!important}}

@media(orientation:portrait){#home .physical-panels .rates,#home .mcx-market .rates{display:flex!important;flex-direction:column;height:auto!important}#home .physical-market .rate-card,#home .mcx-market .rate-card{height:auto!important;flex:1 0 auto!important;padding-top:4px!important;padding-bottom:4px!important;overflow:visible!important}}

@media(orientation:landscape){#rates .spot-card .spot-name{font-size:clamp(10px,1.45vw,24px)!important;letter-spacing:-.25px!important}}

/* Landscape spot values share a bounded card; no vertical gutter above MCX. */
@media(orientation:landscape){#home .market-sections,#home .market-sections.single-physical{row-gap:0!important;grid-template-rows:minmax(70px,2.1fr) minmax(80px,2.8fr) minmax(64px,var(--rtgs-weight,1.8fr))!important}#home .market-sections.no-rtgs{grid-template-rows:minmax(70px,2.1fr) minmax(90px,2.8fr)!important}#home .usd-market .rates{height:100%!important;min-height:0!important;padding:0!important}#home .usd-market .spot-card{container-type:size;box-sizing:border-box;min-height:0!important;min-width:0!important;padding:2px!important;gap:0!important;grid-template-rows:22% 42% 36%!important;overflow:hidden!important}#home .usd-market .spot-name{display:block!important;width:100%;height:100%;min-height:0;line-height:1!important;font-size:clamp(8px,18cqh,22px)!important;white-space:nowrap!important}#home .usd-market .spot-range{width:100%!important;height:100%!important;min-height:0!important;flex-direction:column!important;gap:0!important;line-height:1!important}#home .usd-market .spot-range .high-mark,#home .usd-market .spot-range .low-mark{display:block!important;box-sizing:border-box;max-width:100%;height:50%;font-size:clamp(6px,16cqh,13px)!important;line-height:1!important;padding:0!important}#home .usd-market .price.mid{width:100%;height:100%;min-height:0!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important}#home .usd-market .price.mid b{display:block!important;max-width:100%;max-height:100%;line-height:1!important;font-size:clamp(10px,26cqh,30px)!important}}

@media(orientation:landscape){#home .usd-market{gap:0!important}}

/* Keep H/L on one line and reserve more of a short phone board for MCX/RTGS rows. */
@media(orientation:landscape){#home .usd-market .spot-range{flex-direction:row!important;flex-wrap:nowrap!important;gap:3px!important}#home .usd-market .spot-range .high-mark,#home .usd-market .spot-range .low-mark{height:auto!important;flex:0 1 auto;min-width:0;font-size:clamp(6px,16cqh,13px)!important}#home .usd-market .spot-card{grid-template-rows:26% 30% 44%!important}#home .product small{flex-wrap:nowrap!important;white-space:nowrap!important}#home .product small>span{white-space:nowrap!important;flex:0 0 auto}#home .market-sections,#home .market-sections.single-physical{grid-template-rows:minmax(58px,1.3fr) minmax(70px,2.8fr) minmax(70px,var(--rtgs-weight,1.8fr))!important}#home .market-sections.no-rtgs{grid-template-rows:minmax(58px,1.3fr) minmax(90px,2.8fr)!important}}
@media(orientation:landscape) and (max-height:500px){#home .market-block{gap:0!important}#home .market-title{min-height:12px!important;padding:0 2px!important}#home .market-title h2{font-size:clamp(8px,2.8dvh,12px)!important}#home .market-head{min-height:12px!important;padding:1px 4px!important;font-size:6px!important}#home .rate-card:not(.spot-card){container-type:size;padding:1px 4px!important}#home .product b{display:block;white-space:nowrap!important;line-height:1!important;font-size:clamp(6px,30cqh,18px)!important}#home .product small{margin-top:1px!important;gap:3px!important;font-size:clamp(5px,21cqh,12px)!important;line-height:1!important}#home .rate-card:not(.spot-card) .price b{font-size:clamp(10px,43cqh,26px)!important;line-height:1!important;padding:0!important}}

@media(orientation:landscape){#home .high-mark,#home .low-mark{margin:0!important;padding:0!important}#home .clock span{font-size:clamp(6px,1.1vw,12px)!important}#home .clock small{font-size:clamp(5px,.8vw,9px)!important}}

@media(orientation:landscape) and (max-width:1100px){#home .market-head,#home .rate-card:not(.spot-card){grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr)!important;column-gap:clamp(10px,1.6vw,18px)!important}#home .rate-card:not(.spot-card) .price{padding:1px 4px!important}#home .rate-card:not(.spot-card) .price b{font-size:clamp(9px,2.6vw,26px)!important;line-height:1!important;padding:0!important;max-width:100%!important}}

#admin .premium-first{margin:10px 0 14px}#admin .admin-grid{display:block}#admin .product-builder,#admin .product-order{padding:12px;margin:12px 0}.builder-fields{gap:9px}.builder-fields input,.builder-fields select{padding:8px;font-size:13px}.builder-fields select{max-width:100%;text-overflow:ellipsis}.builder-preview{gap:6px;margin:10px 0}.builder-preview>div{padding:8px}.builder-preview b{font-size:clamp(15px,3vw,22px)}.order-row>span{min-width:0;overflow-wrap:anywhere}.order-row button{flex:0 0 40px;min-height:40px}.product-order .order-group{padding:8px}.product-builder h3,.product-order h3{font-size:16px}@media(max-width:360px){.builder-fields{grid-template-columns:minmax(0,1fr)}.builder-preview{grid-template-columns:repeat(2,minmax(0,1fr))}}
