.marginbox{padding:26px;background:#eee3e9;border:1px solid #dbc5d2;border-radius:18px}.marginbox input{font-size:36px;font-weight:650;color:var(--plum)}.marginbox p{font-size:12px;line-height:1.5;margin-bottom:0}.presets{display:flex;gap:8px;margin-top:12px}.stat strong{display:block;font:30px Georgia,serif;margin-top:7px}.notice{border-left:3px solid var(--plum);padding:14px 20px;background:#fff;margin:0 0 22px;line-height:1.6}.settings{border:1px solid var(--line);background:white;padding:22px;border-radius:14px}.settings>summary{font-size:18px;font-weight:600;cursor:pointer}.settings p{font-size:13px;line-height:1.6;color:var(--muted)}.expensegrid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:22px 0}.channelgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.channel{border:1px solid var(--line);border-radius:12px;padding:18px;background:#faf8f9}.channel h3{margin:0 0 4px}.channel small{color:var(--amber);display:block;min-height:22px}.channel label{margin:10px 0}.channel summary{font-size:12px;cursor:pointer}.rule{display:block;font-size:13px;margin:16px 0}.manual{display:grid;grid-template-columns:1fr 1fr;gap:8px}.products{margin-top:38px}.sectionline{display:flex;justify-content:space-between;align-items:center;gap:20px}.sectionline p{color:var(--muted);font-size:13px}.sectionline label{min-width:240px}.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:14px;background:white}table{border-collapse:collapse;width:100%;min-width:1050px}th,td{padding:18px 10px;border-bottom:1px solid var(--line);text-align:left}thead th{background:#eee7eb;font-size:12px;white-space:nowrap}thead th:first-child{padding-left:20px}tbody th{width:310px;min-width:280px}.product{display:flex;gap:12px;align-items:center}.product img{width:58px;height:76px;object-fit:contain}.product b{display:block;font-size:12px;font-weight:600;max-width:190px;line-height:1.5}.product small,.sku{display:block;font-size:10px;color:var(--muted);font-weight:400}.sku{letter-spacing:.5px;margin-bottom:5px}.cost{padding:5px 0;border:0;font-size:11px;color:var(--plum);text-align:left}.price{width:100%;padding:12px 7px;background:#f3f7f3;border-color:#dce7df;text-align:left}.price strong{display:block;font-size:17px;color:var(--green);white-space:nowrap}.price span{display:block;font-size:10px;color:var(--green);margin-top:6px;white-space:nowrap}.pending{font-size:11px;color:var(--amber);border-style:dashed;background:#fffaf1}.explain{margin:35px 0;padding:28px;background:#eee7eb;border-radius:14px;line-height:1.7}.explain p{font-size:13px;max-width:900px}dialog{width:min(600px,95vw);border:1px solid var(--line);border-radius:16px;padding:28px}dialog::backdrop{background:#30242c88}#close{float:right}.bigprice{font:44px Georgia,serif;color:var(--green);margin-top:20px}dl div{display:flex;justify-content:space-between;gap:20px;padding:12px 0;border-bottom:1px solid var(--line)}dd{font-weight:600;margin:0;white-space:nowrap}#toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:14px 22px;border-radius:10px;display:none}#toast.show{display:block}@media(max-width:850px){header{flex-wrap:wrap;gap:12px}nav{flex-wrap:wrap;gap:14px}.channelgrid{grid-template-columns:1fr 1fr}.hero{grid-template-columns:1fr;gap:20px}.stats{grid-template-columns:1fr 1fr}.sectionline{display:block}.sectionline label{margin-bottom:16px}}@media(max-width:550px){.expensegrid,.channelgrid{grid-template-columns:1fr}.presets{flex-wrap:wrap}main{padding:22px 14px}.settings{padding:16px}}

.tariffnotice{background:#fff5df;border:1px solid #e5c98b;border-radius:10px;padding:14px 18px;margin-top:20px;color:#785119;font-size:13px}.tariffnotice p{margin:7px 0 0;line-height:1.5}.provisional{display:block;color:#805c21;font-size:10px;margin-top:7px}

.wrapping{background:#fff;border:1px solid var(--line);border-radius:16px;padding:26px;margin:25px 0}.wrapping h2{font:30px Georgia,serif;margin:12px 0}.wrapping>p{line-height:1.6;max-width:950px}.wrapping .stats{margin:22px 0}.wrapping .notice{margin-top:22px;background:#f6f1f4}.wrapping button[type=submit]{background:var(--plum);color:white}#wrapSaved{font-size:12px;margin-left:12px;color:var(--green)}[hidden]{display:none!important}

/* One scrollable region keeps column headers aligned on desktop and mobile. */
.products .tablewrap{max-height:72vh;max-height:72dvh;scroll-padding-top:58px;overscroll-behavior:contain}
.products .tablewrap:focus-visible{outline:3px solid var(--plum);outline-offset:3px}
.products table{border-collapse:separate;border-spacing:0}
.products thead th{position:sticky;top:0;z-index:3;box-shadow:0 1px 0 var(--line);height:50px}
.products tbody th{position:sticky;left:0;z-index:2;background:#fff;border-right:1px solid var(--line)}
.products thead th:first-child{left:0;z-index:4;border-right:1px solid var(--line)}
.product-margin{margin-top:14px;padding-top:12px;border-top:1px solid var(--line);font-weight:400}
.product-margin label{font-size:11px;display:flex;align-items:center;gap:10px;justify-content:space-between}
.product-margin input{width:88px;min-width:0;padding:8px;font-size:14px;margin:0}
.product-margin small{display:block;font-size:11px;color:var(--muted);margin-top:6px}
.reset-margin{font-size:11px;padding:4px 0;border:0;background:transparent;color:var(--plum);text-decoration:underline;margin-top:4px}
.platform-label{display:block;font-size:10px;color:var(--plum);margin-bottom:7px}
@media(max-width:550px){.products tbody th{min-width:160px;width:160px;max-width:160px}.products .product{flex-direction:column;align-items:flex-start;gap:6px}.products .product img{width:38px;height:44px}.products .product b{font-size:11px;max-width:140px}.product-margin label{display:block}.product-margin input{margin-top:6px;width:100%}.products th,.products td{padding:12px 8px}.products thead th:first-child{padding-left:8px}.products .tablewrap{max-height:75vh;max-height:75dvh}}
@media(max-width:850px){header nav{min-width:0;max-width:100%;flex-basis:100%}.products .product{padding:0}}
.product-margin input:invalid{border-color:#a12839;outline:1px solid #a12839}
.products .product{padding:0;border:0;border-radius:0;background:transparent;flex-direction:row}
@media(max-width:550px){.products .product{flex-direction:column}}
