:root{--red:#b82f47;--red-light:#fff0f1;--ink:#3e2926;--muted:#8b7c75;--paper:#fffdf8;--base:#f7f4ed;--line:#e4dbcf;--radius:8px;--font: 'Malgun Gothic','Segoe UI',sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--base);color:var(--ink);font:14px var(--font)}button,input,select,textarea{font:inherit}button{cursor:pointer;background:#fffdf8;color:var(--ink);border:1px solid #d5c6b9;border-radius:5px;padding:9px 13px;transition:background .15s}button:hover{background:#f5e8e5}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #db9f66;outline-offset:2px}.primary{background:var(--red);color:white;border-color:var(--red)}.primary:hover{background:#9c2338}input,select,textarea{border:1px solid var(--line);border-radius:5px;background:white;padding:10px 12px;color:var(--ink);min-width:0}input[type=checkbox]{width:auto}.sidebar{position:fixed;width:206px;inset:0 auto 0 0;border-right:1px solid var(--line);background:linear-gradient(135deg,#fffdf6,#f4eee2);display:flex;flex-direction:column;padding:24px 12px;z-index:3}.brand{display:flex;align-items:center;flex-direction:column;margin-bottom:34px}.brand b{font-size:23px;letter-spacing:-1px;margin-top:8px}.brand span{color:var(--red);font-weight:800;margin-top:5px}.pixel-icon{image-rendering:pixelated;object-fit:contain;flex-shrink:0;vertical-align:middle}nav{display:flex;flex-direction:column;gap:8px}nav button{display:flex;align-items:center;gap:14px;border:0;background:transparent;text-align:left;font-weight:700;padding:14px 15px}nav button span{font-size:22px;width:26px}.active,nav button.active{background:var(--red);color:white}.sidebar-bottom{margin-top:auto;display:grid;gap:10px}.sidebar-bottom small{text-align:center;color:var(--muted);line-height:1.7;margin-top:9px}main{margin-left:206px;padding:24px 26px;min-width:0}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted)}h1{font-size:26px;letter-spacing:-1px;margin:5px 0 0;display:flex;gap:10px;align-items:center}h2{font-size:17px;margin:0 0 16px}h3{font-size:14px;margin:20px 0 10px}p{line-height:1.7}.header-right{display:flex;gap:15px;align-items:center;font-size:12px}.demo{background:#fff1d6;color:#96641f;padding:6px 10px;border-radius:5px;font-weight:700}.demo-banner{font-size:12px;background:#fff7e9;color:#8b6a40;border:1px solid #efdfc5;padding:10px 14px;margin-bottom:18px;border-radius:5px}.metrics{display:flex;gap:14px;margin-bottom:16px}.metrics article{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:17px 20px;flex:1;min-width:0}.metrics strong{display:block;font-size:27px;color:var(--red);letter-spacing:-.7px;margin-top:9px}.metrics small{display:block;font-size:12px;color:var(--muted)}.metrics .targets{flex:1.9}.mini-progress{display:flex;align-items:center;gap:10px;font-size:11px;margin-top:10px}.mini-progress span{width:115px}progress{height:9px;border:none;border-radius:10px;overflow:hidden;accent-color:var(--red);width:110px}progress::-webkit-progress-bar{background:#eee7e1}progress::-webkit-progress-value{background:linear-gradient(90deg,#bd304a,#e98496);border-radius:10px}.mini-progress progress{flex:1}.count-strip{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);display:flex;margin-bottom:15px;padding:14px 8px}.count-strip span{flex:1;text-align:center;font-size:12px;border-right:1px solid var(--line)}.count-strip span:last-child{border:0}.count-strip b{font-size:19px;color:var(--red);margin-left:14px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:20px;margin-bottom:16px}.list-panel{padding:0;overflow:hidden}.toolbar{display:flex;align-items:center;gap:12px;margin-bottom:16px}.list-panel .toolbar{padding:14px 14px 0;margin:0 0 12px}.toolbar input:not([type=month]){flex:1}.tabs{display:flex;gap:5px;padding:0 14px;border-bottom:1px solid var(--line)}.tabs button{border:0;border-radius:5px 5px 0 0;background:transparent;padding:12px 15px}.tabs button.active{color:var(--red);background:var(--red-light);box-shadow:inset 0 -3px var(--red);font-weight:800}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;white-space:nowrap;font-size:12px}th{text-align:left;background:#f4eee6;color:#79665c;font-size:11px;padding:12px 10px;font-weight:700}td{padding:11px 10px;border-bottom:1px solid #eee7df}td small{display:block;font-size:10px;color:var(--muted);margin-top:5px;max-width:140px;overflow:hidden;text-overflow:ellipsis}tr[data-order]{cursor:pointer}tr[data-order]:hover{background:#fff7ef}tr.selected{background:#fff0f1;box-shadow:inset 3px 0 var(--red)}.product{display:flex;align-items:center;gap:9px}.badge{display:inline-block;border-radius:5px;font-size:11px;padding:5px 8px;background:#f0eae2;color:#6c5a4f;white-space:nowrap}.badge.green{background:#e5f2e5;color:#48764b}.badge.amber{background:#fff0d2;color:#9b6e28}.channel{background:transparent;color:#67554d;padding:0}.stage{font-size:11px;padding:6px 9px;white-space:nowrap}.pending{color:var(--red);background:#ffe6e9;border-color:#efbdc7}.photo{background:#fff0d2;border-color:#e7d6ae;color:#99642b}.send,.working{background:#eaf1fa;color:#477aaf;border-color:#c5d5e5}.close,.done{background:#e9f2e7;color:#4d7447;border-color:#cbdac5}footer{padding:14px;display:flex;justify-content:space-between;color:var(--muted);font-size:11px}.detail{padding:16px;align-self:start;position:sticky;top:15px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.section-title h2{margin:0;font-size:15px}.detail dl{display:grid;grid-template-columns:90px 1fr;gap:10px 6px;font-size:12px;margin:20px 0}.detail dt{color:var(--muted)}dd{margin:0;overflow-wrap:anywhere}.ribbon{padding:12px;background:#fff4f2;border:1px solid #ecd7d0;border-radius:5px;font-size:12px}.ribbon p{margin:7px 0}.ribbon small{color:var(--red)}.status-lines div{display:flex;justify-content:space-between;align-items:center;font-size:12px;padding:7px 0;border-bottom:1px solid var(--line)}.actions{display:flex;gap:8px;margin:16px 0;flex-wrap:wrap}.muted{color:var(--muted);font-size:12px;line-height:1.8}.bottom-note{display:flex;justify-content:space-between;color:#a48a79;font-size:11px;margin-top:22px}.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.photo-card{padding:14px}.photo-placeholder{height:165px;background:repeating-linear-gradient(45deg,#f2ecdf,#f2ecdf 10px,#f7f1e7 10px,#f7f1e7 20px);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;font-size:12px;color:var(--muted);border-radius:5px}.photo-card h3{margin-top:12px}.photo-card p{margin:4px 0}.photo-card button{margin-top:12px;font-size:12px}.simple-row{display:flex;align-items:center;gap:16px;padding:13px 0;border-bottom:1px solid var(--line)}.simple-row b{min-width:90px}.simple-row button{margin-left:auto}.page-intro p{color:var(--muted)}.stats-grid{display:grid;grid-template-columns:1.7fr 1fr;gap:16px}.ranking{display:flex;align-items:center;gap:15px;padding:20px 0;border-bottom:1px solid var(--line)}.ranking strong{margin-left:auto;color:var(--red)}.red{color:var(--red);font-weight:700}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.settings-grid label,dialog label{display:flex;flex-direction:column;gap:8px;margin:15px 0;color:#78665d;font-size:12px}.settings-grid label.check{flex-direction:row;align-items:center}.install-box{display:flex;align-items:center;gap:18px;background:#fff0f0;padding:14px;border-radius:5px}.install-box h3{margin:0}.install-box p{font-size:12px}.install-box img{width:64px;height:64px}hr{border:0;border-top:1px solid var(--line);margin:20px 0}dialog{border:1px solid #dbc7ba;border-radius:12px;padding:25px;background:var(--paper);color:var(--ink);width:620px;max-width:94vw;max-height:90vh}dialog::backdrop{background:#38232266;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h2{margin:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}dialog textarea{width:100%}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#492c2b;color:white;padding:15px 24px;border-radius:7px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:20;max-width:90vw}#toast.show{opacity:1}.empty{padding:40px;text-align:center}@media(min-width:1700px){main{padding:30px 38px}.workspace{grid-template-columns:minmax(0,1fr) 340px}td{padding:13px 14px}table{font-size:13px}}@media(max-width:1200px){.sidebar{width:170px}main{margin-left:170px;padding:20px 16px}.workspace{grid-template-columns:minmax(0,1fr) 270px}.metrics strong{font-size:23px}.mini-progress span{width:85px;font-size:10px}.detail{padding:12px}.count-strip b{margin-left:5px}}@media(max-width:900px){.sidebar{position:static;width:auto;padding:12px}.brand{margin:0;flex-direction:row;gap:10px}.brand img{width:40px;height:40px}.brand b{font-size:19px;margin:0}.brand span{font-size:12px}.sidebar nav{margin-top:12px;flex-direction:row;overflow:auto;gap:0}.sidebar nav button{white-space:nowrap;padding:10px}.sidebar nav button span{display:none}.sidebar-bottom{display:none}main{margin:0;padding:16px}.workspace{grid-template-columns:1fr}.detail{position:static}.metrics{flex-wrap:wrap}.metrics article{flex:1 1 40%}.metrics .targets{flex:1 1 100%}.photo-grid{grid-template-columns:1fr 1fr}.settings-grid,.stats-grid{grid-template-columns:1fr}.count-strip{overflow:auto}.count-strip span{min-width:100px}header h1{font-size:22px}.header-right{font-size:10px;gap:7px}.toolbar{flex-wrap:wrap}.bottom-note span{display:none}}@media(max-width:500px){.photo-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.metrics strong{font-size:21px}.metrics article{padding:14px}.brand span{margin-left:auto}}

.mini-progress{justify-content:space-between}.mini-progress b{color:var(--red);font-size:13px}.mini-progress span{width:auto}

.full-width{grid-column:1/-1}.address-fields{border:1px solid var(--line);border-radius:6px;padding:15px;margin:12px 0 20px}.address-controls{display:flex;gap:8px}#postcode-container{height:400px;border:1px solid var(--line);margin-bottom:12px;overflow:auto}.address-fields label{margin:12px 0}

.ribbon-controls,.link-input-row{display:flex;gap:10px}.ribbon-controls select{width:44%}.ribbon-controls input{flex:1;width:0}.link-intake{border:1px solid #e3bdc4;background:#fff4f4;border-radius:6px;padding:14px;margin:14px 0}.link-input-row input{flex:1;width:0}.link-input-row button{white-space:nowrap}@media(max-width:600px){.link-input-row{flex-wrap:wrap}.link-input-row input{min-width:150px}.ribbon-controls{flex-direction:column}.ribbon-controls select,.ribbon-controls input{width:100%}}

#order-form label:has([name="product"]){position:relative}.product-suggestions{position:absolute;top:100%;left:0;right:0;z-index:5;max-height:220px;overflow:auto;background:var(--paper);border:1px solid var(--line);border-radius:6px;box-shadow:0 6px 20px #422b2522}.product-suggestions [role="option"]{padding:11px 12px;cursor:pointer;color:var(--ink)}.product-suggestions [role="option"]:hover,.product-suggestions [aria-selected="true"]{background:var(--red-light);color:var(--red)}

.delivery-choice .check{display:flex;flex-direction:row;align-items:center;gap:8px;color:var(--red);font-weight:700}.delivery-choice input:disabled{background:#f0ece5;color:var(--muted)}

.delivery-choice{position:relative}.delivery-trigger{display:block;width:100%;text-align:left;background:#fff;padding:11px 12px;min-height:43px}.delivery-trigger:after{content:"▦";float:right;color:var(--red)}.delivery-picker{margin-top:9px;padding:16px;background:var(--paper);border:1px solid #dfc4c8;border-radius:8px;box-shadow:0 4px 15px #462a2215}.time-picker-row{display:flex;gap:12px}.time-picker-row label{flex:1}.delivery-trigger:disabled{background:#f0ece5;color:var(--muted);cursor:default}

#link-status:empty,#address-help:empty{display:none}

/* Order form: one spacing scale for every field. */
#order-form{--field-row-gap:14px;--field-label-gap:7px}
#order-form .form-grid{gap:var(--field-row-gap) 18px;align-items:start}
#order-form label{margin:0;gap:var(--field-label-gap)}
#order-form .form-grid>label,#order-form .form-grid>.full-width{min-width:0}
#order-form .form-grid>.full-width>label:not(.check){margin-bottom:var(--field-label-gap)}
#order-form .delivery-choice .check{margin-bottom:10px}
#order-form input:not([type=checkbox]):not([type=hidden]),#order-form select{min-height:42px}
#order-form .address-fields{margin:0 0 4px;padding:14px}
#order-form .address-fields>label{margin-top:var(--field-row-gap)}
#order-form .delivery-picker label{margin:0 0 12px}
#order-form>button[type=submit],#order-form>button.primary{margin-top:14px}

/* Full-width order list; details are opened on demand. */
.workspace{grid-template-columns:minmax(0,1fr)}
.order-detail-modal{width:680px}
.order-detail-modal .detail{position:static;border:0;padding:18px 0 0;margin:0}
.order-detail-modal .detail dl{grid-template-columns:130px 1fr;font-size:13px;gap:12px}
.order-detail-modal .detail .actions{position:sticky;bottom:-25px;background:var(--paper);padding:12px 0;margin-bottom:0}


.workspace{grid-template-columns:minmax(0,1fr)}

.sms-template-editor{margin-top:18px;padding:14px;border:1px solid var(--line);border-radius:6px}.sms-template-editor summary{cursor:pointer;font-weight:700;color:var(--red)}

.sort-heading{border:0;background:transparent;padding:0;display:flex;gap:8px;align-items:center;font-size:inherit;color:inherit;font-weight:inherit;width:100%;text-align:left;white-space:nowrap}.sort-heading:hover{background:transparent;color:var(--red)}.sort-heading span{color:var(--red)}.new-badge{display:inline-block;background:var(--red);color:white;font-size:9px;font-weight:800;line-height:16px;min-width:16px;text-align:center;border-radius:3px}.new-order{background:#fff4ed}

.danger-outline{color:var(--red);border-color:#dca5af;background:transparent}.danger-outline:hover{background:var(--red-light)}

@media(max-width:900px){.sidebar .sidebar-bottom{display:block;margin-top:8px}.sidebar .sidebar-bottom>small{display:none}.sidebar .sidebar-bottom nav{margin-top:0}.sidebar .sidebar-bottom nav button{padding:8px 10px}}

/* Avoid blur compositing flashes in embedded browsers and modal transitions. */
dialog::backdrop{backdrop-filter:none;background:rgba(56,35,34,.4)}
html{scrollbar-gutter:stable}

.list-panel .tabs{overflow-x:auto;white-space:nowrap}.list-panel .tabs button{flex-shrink:0}.tab-count{display:inline-block;font-size:10px;background:#eee6de;border-radius:9px;padding:1px 6px;margin-left:4px}.tabs button.active .tab-count{background:#f4cdd4;color:var(--red)}

.purchase-selection{background:#fff6f2;border:1px solid #ecd3cd;border-radius:8px;padding:0 16px 14px;margin-top:18px}.purchase-selection label{margin:12px 0}.purchase-selection [data-purchase-status]{font-size:12px;line-height:1.7;color:var(--red)}

.source-order dd{white-space:pre-wrap;line-height:1.7;overflow-wrap:anywhere}.source-order dl{padding:12px;background:#fff7ef;border-radius:6px}.source-order h3{color:var(--red)}

/* Shared navigation and page spacing. */
:root{--section-gap:16px;--panel-padding:20px;--nav-height:48px;--tab-height:44px}
.sidebar>nav,.sidebar-bottom>nav{gap:8px}
.sidebar nav button{height:var(--nav-height);min-height:var(--nav-height);padding:0 15px;gap:12px;line-height:1.4;align-items:center}
.sidebar nav button>span{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;line-height:1;flex:0 0 24px;font-size:21px}
.list-panel .tabs{display:grid;grid-template-columns:repeat(6,minmax(112px,1fr));gap:0;padding:0 14px;align-items:stretch}
.list-panel .tabs button{height:var(--tab-height);min-height:var(--tab-height);padding:0 10px;display:flex;align-items:center;justify-content:center;gap:6px;line-height:1.4}
.list-panel .tabs .tab-count{margin:0;min-width:22px;line-height:18px;padding:0 5px;text-align:center}
main>header{margin-bottom:var(--section-gap)}
main>.demo-banner,main>.toolbar,main>.metrics,main>.count-strip{margin-bottom:var(--section-gap)}
main>.toolbar{min-height:42px}
.page-intro{margin:0 0 var(--section-gap)}
.page-intro h2{margin:0 0 8px}.page-intro p{margin:0}
.settings-grid,.stats-grid,.photo-grid,.workspace{gap:var(--section-gap)}
.settings-grid>.panel,.stats-grid>.panel,.photo-grid>.panel,.workspace>.panel{margin-bottom:0}
main>.panel{margin-bottom:var(--section-gap)}
@media(max-width:900px){
 .sidebar nav button{height:42px;min-height:42px;padding:0 12px}
 .sidebar>nav{gap:4px}
 .sidebar>nav button>span{display:none}
 .sidebar .sidebar-bottom nav button{height:42px;min-height:42px;padding:0 12px}
 .list-panel .tabs{grid-template-columns:repeat(6,minmax(108px,1fr));padding:0 10px}
}

/* Keep navigation stationary without a fixed overlay over the scrolling document. */
html,body{height:100%;overflow:hidden}
#app{height:100dvh;display:grid;grid-template-columns:206px minmax(0,1fr);overflow:hidden}
.sidebar{position:relative;inset:auto;width:auto;height:100%;min-height:0;overflow-y:auto;background:#faf6ed}
main{margin-left:0;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable}
button{transition:none}
.order-detail-modal .detail .actions{position:static;background:var(--paper)}
.order-detail-modal .detail{position:static}
dialog{overscroll-behavior:contain;background:#fffdf8}
@media(min-width:901px) and (max-width:1200px){#app{grid-template-columns:170px minmax(0,1fr)}}
@media(max-width:900px){
 #app{display:flex;flex-direction:column}
 .sidebar{height:auto;flex:0 0 auto;overflow:visible}
 main{height:auto;flex:1;min-height:0}
}

.pagination{display:flex;align-items:center;gap:12px;flex-shrink:0}.pagination button{min-width:58px;padding:7px 12px}.pagination button:disabled{opacity:.4;cursor:default}.list-panel footer{gap:16px;align-items:center;flex-wrap:wrap}

/* Stable column geometry across all status filters and pages. */
.order-table{table-layout:fixed;width:100%;min-width:880px}
.order-table .col-delivery{width:15%}
.order-table .col-orderer{width:21%}
.order-table .col-receiver{width:23%}
.order-table .col-account{width:15%}
.order-table .col-channel{width:11%}
.order-table .col-action{width:15%}
.order-table th,.order-table td{overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.order-table td{height:64px}
.order-table td small{max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-table .product{min-width:0}
.order-table .product>span{display:block;min-width:0;overflow:hidden}
.order-table .product b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-table th .sort-heading{gap:5px;font-size:11px}

.order-table .col-check{width:42px}.order-table.selectable-orders{min-width:922px}.order-table td input[type="checkbox"],.order-table th input[type="checkbox"]{width:17px;height:17px;accent-color:var(--red);cursor:pointer}.bulk-actions{display:flex;align-items:center;gap:14px;padding:12px 16px;border-bottom:1px solid var(--line);background:#fff5f2}.bulk-actions small{color:var(--muted);margin-left:auto}.bulk-actions button:disabled{opacity:.4;cursor:default}.bulk-actions b{color:var(--red)}

.order-table{min-width:922px}.order-table .col-check{width:42px}.order-table .selection-spacer{padding:0}

.delivery-photos{margin-top:18px;padding:16px;background:#f7f1e7;border-radius:8px}.delivery-photos h3{margin-top:0}.delivery-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.delivery-gallery img{width:100%;height:180px;object-fit:contain;background:white;border-radius:5px}.photo-empty{grid-column:1/-1;padding:25px;text-align:center;color:var(--muted);border:1px dashed var(--line)}

.compact-ribbon{display:flex;gap:10px;align-items:baseline;min-width:0}.compact-ribbon>span:not(.ribbon-divider){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ribbon-divider{color:var(--muted)}.compact-card{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.compact-ribbon{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.compact-ribbon>span:not(.ribbon-divider){display:inline;flex:none;white-space:inherit;overflow:visible}.compact-ribbon .ribbon-divider{margin:0 4px}

.account-orders-link{display:block;border:0;background:transparent;padding:0;text-align:left;color:inherit;font:inherit;cursor:pointer;max-width:100%}.account-orders-link:hover{color:var(--red,#b92444);text-decoration:underline}.account-orders-link:focus-visible{outline:2px solid #b92444;outline-offset:4px}

.purchase-selection [hidden]{display:none!important}

.ledger-sheet-panel{padding:16px;min-width:0}.ledger-sheet-frame{display:block;width:100%;height:calc(100dvh - 300px);min-height:500px;border:1px solid #e5d8ce;border-radius:8px;background:#fff}.ledger-open-link{color:#b92444;font-size:14px;white-space:nowrap}@media(max-width:700px){.ledger-sheet-frame{height:70dvh;min-height:400px}}

.list-panel .tabs{grid-template-columns:repeat(5,minmax(108px,1fr))}.finish-order-area{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}.finish-order-button{width:100%;padding:18px;font-size:19px;font-weight:700;background:#28794d;color:white;border-color:#28794d}.finish-order-button:hover{background:#20623e}

.account-summary{display:flex;align-items:center;gap:20px;margin-bottom:18px;flex-wrap:wrap}.account-summary strong{font-size:30px;color:var(--red)}.account-summary small{color:var(--muted);margin-left:auto}.account-volume-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.account-volume-card h2{font-size:17px;margin:0}.account-volume-amount{display:block;font-size:28px;margin:16px 0;color:var(--red)}.account-volume-gauge{height:12px;border-radius:6px;background:#eee7df;overflow:hidden;margin-bottom:20px}.account-volume-gauge>span{display:block;height:100%;background:var(--red);border-radius:6px}.account-site-row{display:grid;grid-template-columns:minmax(70px,1fr) auto auto;align-items:center;gap:16px;padding:10px 0;border-top:1px solid var(--line)}.account-site-row button{font-size:12px;padding:6px 12px}.account-site-row b{font-variant-numeric:tabular-nums}@media(max-width:850px){.account-volume-grid{grid-template-columns:1fr}.account-summary small{margin-left:0}}

.ledger-stats-grid{display:grid;gap:20px}.ledger-stats-grid table{width:100%;min-width:820px}.ledger-stats-grid td:not(:first-child){font-variant-numeric:tabular-nums}.ledger-stats-grid h2{margin-top:0}.stats-share{width:100px;height:8px;background:#eee7df;border-radius:4px;overflow:hidden}.stats-share span{display:block;height:100%;background:var(--red)}

.tailored-settings{align-items:start}.tailored-settings h2{font-size:18px;margin-top:0}.settings-info{display:flex;flex-direction:column;gap:8px;margin:20px 0}.settings-info span{color:var(--muted);font-size:13px}.settings-status-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}.settings-status-row>span:not(.badge){font-size:12px;color:var(--muted)}.settings-install{grid-column:1/-1}.settings-install details{margin-top:20px}.settings-install summary{cursor:pointer;color:var(--muted)}.tailored-settings textarea{width:100%;resize:vertical}.tailored-settings .actions{margin-top:18px}

.dialog-back{margin:14px 0;background:transparent;border:1px solid var(--line);font-size:13px;padding:8px 12px}

.channel-settings-panel{container:channel-settings / inline-size}
.channel-connection-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 100px;gap:16px;min-height:66px}
.channel-connection-row>b{min-width:0;overflow-wrap:anywhere}
.channel-connection-row>.badge{justify-self:start;max-width:100%;white-space:normal}
.channel-connection-row>button{width:100%;white-space:nowrap}
.channel-connection-row>.channel-action-spacer{width:100%}
@container channel-settings (max-width:420px){
 .channel-connection-row{grid-template-columns:minmax(0,1fr) 100px;gap:10px 16px}
 .channel-connection-row>b{grid-column:1/-1}
 .channel-connection-row>.badge{grid-column:1;grid-row:2}
 .channel-connection-row>button,.channel-connection-row>.channel-action-spacer{grid-column:2;grid-row:2}
}

.dialog-head .dialog-back{margin:0}.dialog-head{gap:12px}.dialog-head h2{flex:1}.page-back{display:block;margin-bottom:10px;font-size:12px;padding:6px 10px}

.order-alert-stack{position:fixed;right:24px;bottom:24px;width:min(360px,calc(100vw - 32px));z-index:80;pointer-events:none}.order-alert-card{pointer-events:auto;border:2px solid var(--red);border-radius:12px;background:#fffdf8;padding:22px;box-shadow:0 8px 32px #48232830}.order-alert-card>strong{display:block;color:var(--red);font-size:19px}.order-alert-card p{line-height:1.6}.order-alert-card .actions{margin:16px 0 0;gap:8px}.order-alert-card .actions button{flex:1}.alert-sound-enable{margin-top:12px;width:100%}@media(max-width:600px){.order-alert-stack{right:16px;bottom:16px}}

#purchase-vault-key-field[hidden]{display:none!important}

.tracking-site-row{display:grid;grid-template-columns:minmax(100px,1fr) minmax(120px,1.3fr) auto;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line,#e8d9cc)}
.tracking-site-row small{display:block;color:var(--muted,#927f74);font-size:12px;margin-top:5px}.tracking-site-row select{width:100%;min-width:0}.tracking-site-row label{margin:0}
@media(max-width:600px){.tracking-site-row{grid-template-columns:1fr auto}.tracking-site-row>div{grid-column:1/-1}}
.order-alert-stack{display:flex;flex-direction:column;gap:12px;max-height:calc(100dvh - 48px);overflow-y:auto}.order-alert-card{flex-shrink:0}.alert-kind{display:block;font-size:12px;font-weight:800;letter-spacing:.08em;color:var(--red);margin-bottom:8px}.delivery-alert-card{border-color:#23657e;background:#eef8fb;box-shadow:0 8px 32px #23657e30}.delivery-alert-card>strong,.delivery-alert-card .alert-kind{color:#174d62}.delivery-alert-card .primary{background:#23657e;border-color:#23657e;color:white}.delivery-alert-detail{white-space:pre-line;font-size:14px;color:#174d62;border-left:3px solid #72b3cb;padding-left:10px}

/* Navigation pictograms share one size and inherit the active button colour. */
.sidebar .menu-icon{display:block;width:24px;height:24px;flex-shrink:0}
@media(max-width:900px){.sidebar nav button>span{display:inline-flex;width:20px;height:20px;flex:0 0 20px}.sidebar .menu-icon{width:20px;height:20px}.sidebar nav button{gap:8px}}

/* Original 16-bit menu sprites: square pixels, shared palette, no smoothing. */
.sidebar nav button>span:has(.pixel-menu-icon){width:32px;height:32px;flex-basis:32px}
.sidebar .pixel-menu-icon{width:32px;height:32px;image-rendering:pixelated;filter:none}
@media(max-width:900px){.sidebar nav button>span:has(.pixel-menu-icon){width:24px;height:24px;flex-basis:24px}.sidebar .pixel-menu-icon{width:24px;height:24px}}

/* Workflow sprites share the navigation palette and keep their labels readable. */
.status-pixel-icon{display:inline-block;width:24px;height:24px;flex:0 0 24px;vertical-align:middle;image-rendering:pixelated;pointer-events:none}
.order-table button.stage{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap}
.order-table button.stage .status-pixel-icon{width:16px;height:16px;flex-basis:16px}
.list-panel .tabs{grid-template-columns:repeat(5,minmax(128px,1fr))}

.product-pixel-icon{display:inline-block;width:32px;height:32px;flex:0 0 32px;vertical-align:middle;image-rendering:pixelated;pointer-events:none}
/* Square, layered borders echo a classic game dialogue window. */
.order-alert-card{--alert-edge:#8d293e;--alert-accent:#b82f47;--alert-light:#f4cdd4;border:3px solid var(--alert-edge);border-radius:0;background:#fff9ed;padding:18px;box-shadow:inset 0 0 0 2px #fffdf8,inset 0 0 0 4px var(--alert-light),4px 4px 0 #59342d35}
.delivery-alert-card{--alert-edge:#28536c;--alert-accent:#23657e;--alert-light:#badbe3;background:#f0f8f5}
.alert-kind{color:var(--alert-accent);border-bottom:2px dashed var(--alert-light);padding-bottom:9px;margin-bottom:12px;font-size:11px;letter-spacing:.1em}
.pixel-alert-heading{display:flex;gap:12px;align-items:center;color:var(--alert-accent)}
.pixel-alert-heading strong{font-size:17px;line-height:1.5}
.pixel-alert-avatar{display:flex;align-items:center;justify-content:center;width:48px;height:48px;flex:0 0 48px;background:#fffdf8;border:2px solid var(--alert-light);box-shadow:2px 2px 0 var(--alert-light)}
.pixel-alert-avatar .status-pixel-icon{width:32px;height:32px;flex-basis:32px}
.order-alert-card .actions button,.order-alert-card .alert-sound-enable{border-radius:0;border-width:2px;box-shadow:2px 2px 0 var(--alert-light)}
.order-alert-card .primary{background:var(--alert-accent);border-color:var(--alert-edge);color:#fffdf8}
@media(prefers-reduced-motion:no-preference){.order-alert-card{animation:pixel-alert-appear .16s steps(2,end)}@keyframes pixel-alert-appear{from{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}}

/* Family portrait occupies the quiet space above Settings on the desktop sidebar. */
.sidebar-family{display:flex;justify-content:center;padding-top:14px;pointer-events:none}
.sidebar-family img{display:block;width:160px;height:140px;image-rendering:pixelated;object-fit:contain}
@media(max-width:900px){.sidebar-family{display:none}}

.product-pixel-icon[data-product-kind="funeral"],.product-pixel-icon[data-product-kind="celebration"]{height:40px}

main>header h1>.pixel-menu-icon{width:32px;height:32px;flex:0 0 32px;image-rendering:pixelated}

/* A fixed slot at the right edge of the item column sits just left of the recipient.
   It never moves the recipient text, column boundaries, or the row order. */
.order-table .order-item-cell{position:relative}
.order-table .order-item-cell .product{padding-right:30px}
.order-item-cell .product>span{min-width:0;overflow:hidden}
.collected-photo-marker{position:absolute;right:5px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;background:#edf3e5;border:1px solid #ccd9be;cursor:help}
.collected-photo-marker svg{display:block;image-rendering:pixelated;pointer-events:none}

#app.shared-login-screen{display:grid;grid-template-columns:minmax(0,1fr);place-items:center;min-height:100dvh;height:100dvh;overflow:auto;padding:32px 20px;background:radial-gradient(ellipse at 50% 35%,#fffdf8 0%,#f6f0e7 75%)}
.shared-login-screen .shared-login{position:relative;margin:0;width:min(100%,420px);height:auto;min-height:0;overflow:visible;scrollbar-gutter:auto;padding:36px 36px 22px;background:var(--paper);border:1px solid #e4d3c4;border-top:4px solid var(--red);border-radius:12px;box-shadow:0 8px 0 #e9dfd2,0 20px 48px #6e433e12}
.shared-login .login-brand{display:flex;flex-direction:column;align-items:center;text-align:center}
.shared-login .login-brand img{width:80px;height:80px;image-rendering:pixelated;margin-bottom:14px}
.shared-login .login-eyebrow{font-size:10px;font-weight:700;letter-spacing:2.8px;color:#9a7c6c}
.shared-login h1{display:block;font-size:30px;letter-spacing:-1.5px;margin:8px 0 0;line-height:1.35}
.shared-login .login-brand p{margin:10px 0 27px;font-size:13px;color:var(--muted)}
.shared-login form{display:grid;gap:0}
.shared-login label{display:block;margin:0 0 8px;font-size:12px;font-weight:700;color:#70574d}
.shared-login input{display:block;width:100%;height:48px;border-radius:6px;background:#fff;margin:0 0 18px;padding:12px 14px;font-size:16px;border-color:#e4d7cc}
.shared-login input::placeholder{font-size:13px;color:#aa9b91}
.shared-login form button{display:block;width:100%;height:48px;margin:5px 0 0;border-radius:6px;font-size:15px;font-weight:700;letter-spacing:.5px;box-shadow:0 3px 0 #8c2036}
.shared-login form button:disabled{opacity:.65;cursor:wait}
.shared-login .login-message{min-height:20px;margin:12px 0 0;font-size:12px;line-height:1.6;color:var(--red);overflow-wrap:anywhere}
.shared-login .login-footnote{display:flex;justify-content:center;align-items:center;gap:7px;margin-top:14px;padding-top:17px;border-top:1px solid #eee5da;color:#a18c7c;font-size:11px}
.shared-login .login-footnote span{color:var(--red);font-size:15px}
@media(max-width:500px){#app.shared-login-screen{padding:24px 18px}.shared-login-screen .shared-login{padding:30px 26px 20px}.shared-login .login-brand img{width:72px;height:72px}.shared-login h1{font-size:28px}}
@media(max-height:650px){#app.shared-login-screen{place-items:start center}}
.shared-sync-bar{position:fixed;top:0;left:206px;right:0;z-index:10;padding:5px 16px;background:#edf3e5;border-bottom:1px solid #ccd9be;display:flex;gap:12px;align-items:center;font-size:11px}
.shared-sync-bar button{padding:3px 8px;font-size:11px}.shared-sync-bar>button:last-child{margin-left:auto}
.shared-sync-bar[data-status="conflict"],.shared-sync-bar[data-status="storage-error"]{background:#fff0f1;color:#a8283e}.shared-sync-bar[data-status="offline"]{background:#fff1d6}
body:has(.shared-sync-bar) main>header{padding-top:26px}@media(max-width:900px){.shared-sync-bar{position:sticky;left:0;flex-wrap:wrap}body:has(.shared-sync-bar) main>header{padding-top:0}}
