/* One height per display setting; text scrolls while actions stay in reach. */
html .cards,html .family-grid{align-items:stretch;grid-auto-rows:auto!important}
html .card-shell{height:var(--card-height);min-height:0;max-height:var(--card-height);align-self:stretch}
html .card-shell>.card{height:100%;min-height:0;max-height:100%;overflow:hidden;display:flex;flex-direction:column}
html .card .card-content,html .custom-card .card-content{display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:hidden;padding-top:8px}
html .card .card-status{flex:0 0 auto}
html .card .card-title{flex:0 0 auto;max-height:2.7em;overflow:auto;line-height:1.35;margin-block:3px 0;scrollbar-width:thin}
html .card .flavor,html .card .product-spec{flex:0 0 auto;max-height:2.6em;overflow:auto;line-height:1.3;scrollbar-width:thin}
html .card .notes{flex:1 1 0;min-height:0;overflow:hidden}
html .card .notes.reading-notes{display:flex;flex-direction:column;flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:hidden!important;padding:0;margin:8px 0 2px;gap:0;border-radius:12px}
html .card .reading-note-block{display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:hidden;padding:8px 10px;margin:0}
html .card .reading-note-label{flex:0 0 auto;min-height:18px;margin-bottom:4px;font-size:calc(12px * var(--text-scale,1));line-height:1.35;color:#63768c}
html .card .note-scroll{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#b7c9dc transparent;cursor:pointer;touch-action:pan-y;user-select:text;-webkit-user-select:text;white-space:normal}
html .card .note-scroll:focus-visible{outline:2px solid #6fa9e4;outline-offset:-2px;border-radius:5px}
html .card .reading-notes .note-preview-text{display:block!important;max-height:none!important;overflow:visible!important;-webkit-line-clamp:unset!important;white-space:pre-wrap!important;overflow-wrap:anywhere;font-size:calc(15px * var(--text-scale,1));line-height:1.5;margin:0}
html .card .reading-review{flex:0 0 auto;margin:0;padding:5px 10px;line-height:1.35}
html .card .reading-source{margin-bottom:8px}
html .card .card-links,html .custom-card .card-links{flex:0 0 auto;min-height:38px;margin-top:auto;display:flex;align-items:center;gap:6px}
html .card .card-links .production-time{margin-right:auto}
html .card .card-links button,html .card .card-links .custom-detail{min-height:36px;height:auto;max-width:52%;white-space:normal;line-height:1.3;margin:0;padding:4px;font-size:calc(12px * var(--text-scale,1))}
html #cards .card .finish,html #cards .card .select-card,html .family-grid .card .finish,html .family-grid .card .select-card{flex:0 0 auto!important;min-height:max(48px,var(--display-touch-min,48px))!important;height:auto!important;margin:0 var(--card-padding) 9px!important;padding:10px 12px!important;line-height:1.35;white-space:normal;font-size:calc(14px * var(--text-scale,1));border-radius:11px}
html .card .fulfillment-hints{flex:0 0 auto}
html .card .supply-card-quantity{flex:0 0 auto}
html .flow-retired .card{justify-content:center}
html .card .reading-details,html .card [data-copy-note-blessing]{display:none}

/* Web: the painted button fills its already verified touch target. */
html #cards .card .finish::before,html #cards .card .select-card::before,html .family-grid .card .finish::before,html .family-grid .card .select-card::before{inset:0;border-radius:11px}

/* Compact cards, a calmer but more legible status strip, and a single custom brief entry. */
html .card .card-status{min-height:max(34.667px,calc((17px * var(--text-scale,1) + 10px) * 4 / 3));padding-block:7px;gap:6px}
html .card .card-status>span{display:flex;align-items:center;gap:6px;flex-wrap:wrap;white-space:normal;overflow:visible;line-height:1.25}
html .card-status .output-code{margin-right:0;flex:0 0 auto}
html .card .card-status>time{font-variant-numeric:tabular-nums;font-size:calc(10px * var(--text-scale,1));white-space:nowrap}
html .card .card-status.refund-pending{background:#fff0f2;color:#bd233b;border-bottom:1px solid #f5dce2}
html .card .card-status.refund-pending>span{font-weight:650}
html .card .card-status.refund-pending .output-code{color:#bd233b}
html .card .custom-requirements-entry{flex:0 0 auto;display:flex;align-items:center;gap:6.75px;min-height:max(33px,calc(var(--display-touch-min,44px) * .75));padding:6.75px 12px;margin:8px 0 0;width:100%;border:1px solid #dce7f3;border-radius:9px;background:#f3f7fc;color:#1766af;font-size:calc(10.5px * var(--text-scale,1));font-weight:600;text-align:left;transition:background .15s,border-color .15s}
html .card .custom-requirements-entry svg{width:15.75px;height:15.75px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
html .card .custom-requirements-entry .entry-arrow{margin-left:auto;font-size:16.5px;font-weight:400;color:#668cae}
html .card .custom-requirements-entry:hover{background:#eaf2fc;border-color:#bed6ed}
html .card .custom-requirements-entry:active{background:#dceafb}
html .card .custom-requirements-entry:focus-visible{outline:3px solid #86baff;outline-offset:2px}
@media(prefers-reduced-motion:reduce){html .card .custom-requirements-entry{transition:none}}

html .card .card-reading-body{display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#bacbdd transparent}
html .card .card-reading-body .notes.reading-notes{flex:1 0 auto!important;min-height:calc(58px * var(--text-scale,1))!important}
html .card .card-reading-body .reading-notes:has(.blessing):has(.requirements){min-height:calc(116px * var(--text-scale,1))!important}
html .card .card-reading-body .note-scroll{min-height:calc(23px * var(--text-scale,1))}
html .card .card-reading-body .reading-note-block{flex:1 1 0;min-height:calc(55px * var(--text-scale,1))}

html .card.refund .finish:disabled{opacity:1!important;background:#f4f5f7!important;color:#788392!important;border-color:#e6e9ee!important;font-weight:550}
html .card.refund .finish:disabled::before{background:#f4f5f7!important}

/* Blessings read directly on the card; production notes keep their own panel. */
html .card .notes.reading-notes:has(.blessing){background:transparent;border:0;border-radius:0}
html .card .reading-note-block.blessing,html .card .reading-note-block.blessing:active{background:transparent;border:0;border-radius:0;padding-inline:0}
html .card .notes.reading-notes:has(.blessing) .reading-note-block.requirements{border:1px solid #e3e8ee;border-radius:10px;background:#fafbfd}
html .card .notes.reading-notes:has(.blessing) .reading-review{border-radius:8px}

/* One shared packaging request per store order; no change to card or action sizing. */
.card .shared-packing-entry{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;width:100%;min-height:32px;margin:5px 0 3px;padding:6px 8px;border:0;border-radius:8px;background:transparent;color:#37698f;font-size:calc(12px * var(--text-scale,1));font-weight:600;text-align:left;touch-action:pan-y}.shared-packing-entry:focus-visible{outline:2px solid #1979d4;outline-offset:2px}.shared-packing-entry:hover{background:#f0f5fa}.shared-packing-entry:active{background:#e7eff7}.shared-packing-list{margin-bottom:20px}.shared-order-packing{scroll-margin:16px}.packing-list .shared-order-packing h3{font-size:calc(18px * var(--text-scale,1))}.packing-list .shared-order-packing .packing-order-notes strong{font-size:calc(15px * var(--text-scale,1));color:#285578}
/* Refund notices sit beside the production story without replacing its facts. */
.refunds-entry{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.refunds-entry[aria-pressed=true]{background:#eef2f7;border-color:#cbd4df;color:#202d3d}
.refunds-entry b{min-width:20px;border-radius:7px;padding:2px 5px;background:#e8edf3;font-size:11px;font-variant-numeric:tabular-nums}
.refund-note{display:flex;align-items:center;gap:7px;width:100%;margin:8px 0 6px;padding:8px 10px;border:1px solid #e1e6ed;border-radius:10px;background:#f4f6f9;color:#465268;font:600 12px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;text-align:left;letter-spacing:.01em}
button.refund-note{min-height:44px;transition:background .15s ease,box-shadow .15s ease}
button.refund-note:hover{background:#edf1f6}button.refund-note:active{background:#e4eaf2}
.refund-note.pending{background:#fff8ed;border-color:#f2e5cc;color:#875720}
.refund-note-dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex:0 0 6px;opacity:.75}
.refund-note-arrow{margin-left:auto;font-size:18px;font-weight:400}
.card .card-status.refund-pending{color:inherit;background:inherit}
.refund-followup-button{display:flex;justify-content:center;align-items:center;gap:12px;background:#f0f3f7!important;color:#334155!important;border-top:1px solid #e0e6ed!important}
.refund-followup-button:active{background:#e3e9f1!important}
#dialog[data-kind=refund]{width:min(560px,calc(100vw - 32px));border-radius:22px}
#dialog[data-kind=refund] .dialog-head{padding:24px 26px 18px;background:#fff;border-bottom:1px solid #edf0f4}
#dialog[data-kind=refund] .dialog-body{padding:24px 26px;background:#fff}
#dialog[data-kind=refund] .dialog-foot{padding:16px 26px;background:#f8f9fb;border-top:1px solid #edf0f4}
.refund-sheet{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;color:#253044}
.refund-eyebrow{font-size:11px;font-weight:650;letter-spacing:.08em;color:#778397}
.refund-intro h3{margin:10px 0 12px;font-size:23px;line-height:1.35;font-weight:650;letter-spacing:-.025em}
.refund-intro p{margin:0 0 20px;color:#647186;font-size:14px;line-height:1.75}
.refund-facts{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 20px}
.refund-facts span{border-radius:7px;padding:5px 8px;background:#f3f5f8;color:#617086;font-size:12px;line-height:1.4}
.refund-unit-list{display:grid;gap:9px}
.refund-unit{display:flex;align-items:center;gap:12px;min-height:74px;padding:15px;border:1px solid #e1e6ed;border-radius:13px;cursor:pointer;transition:border-color .15s ease,background .15s ease}
.refund-unit:has(input:checked){border-color:#719bd0;background:#f1f6fc}
.refund-unit input{width:19px;height:19px;accent-color:#316cad;flex-shrink:0}
.refund-unit b,.refund-options b{display:block;font-size:15px;font-weight:600}
.refund-unit small,.refund-options small{display:block;margin-top:6px;color:#778397;font-size:12px;line-height:1.5}
.refund-unit i{margin-left:auto;color:#316cad;font-style:normal;opacity:0}.refund-unit:has(input:checked) i{opacity:1}
.refund-form-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:23px;padding-top:19px;border-top:1px solid #edf0f4}
.refund-form-bottom p{margin:0;max-width:55%;color:#778397;font-size:12px;line-height:1.5}
.refund-form-bottom button{min-height:46px;border-radius:11px;padding:11px 19px;white-space:nowrap;background:#356fae;border-color:#356fae;font-weight:600;box-shadow:none}
.refund-options{border:0;margin:0 0 20px;padding:0}.refund-options legend{margin-bottom:12px;color:#68768b;font-size:12px}
.refund-options label{display:flex;gap:12px;padding:15px 0;border-bottom:1px solid #eef1f5;align-items:flex-start;cursor:pointer}
.refund-options input{width:19px;height:19px;accent-color:#356fae;margin-top:1px}
.refund-reason{font-size:13px;color:#68768b}.refund-reason textarea{margin-top:9px;width:100%;box-sizing:border-box;resize:vertical;min-height:92px;border:1px solid #dfe5ee;border-radius:11px;padding:12px;font:14px/1.65 inherit;color:#253044;background:#f9fafc}
.refund-record{display:grid;grid-template-columns:80px 1fr;gap:14px;font-size:13px}.refund-record dt{color:#8792a3}.refund-record dd{margin:0;color:#465268}
#dialog[data-kind=refund] button:focus-visible,.refund-note:focus-visible{outline:3px solid #a9c6e9;outline-offset:3px}
@media(max-width:600px){#dialog[data-kind=refund] .dialog-head,#dialog[data-kind=refund] .dialog-body,#dialog[data-kind=refund] .dialog-foot{padding-left:20px;padding-right:20px}.refund-intro h3{font-size:21px}.refund-form-bottom{align-items:flex-start;flex-direction:column}.refund-form-bottom p{max-width:none}.refund-form-bottom button{width:100%}}
@media(prefers-reduced-motion:reduce){.refund-note,.refund-unit{transition:none}}
.refund-form-bottom button:disabled{background:#edf1f5;border-color:#edf1f5;color:#98a4b5;opacity:1;cursor:default}
@media(max-width:900px){.kitchen-navigation .flow-secondary{flex-basis:100%;width:100%}.production-top-actions{flex-wrap:nowrap!important}.production-top-actions button{min-height:44px;flex-shrink:0}}

#dialog[data-kind=refund][open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;max-height:calc(100dvh - 32px)}
#dialog[data-kind=refund] .dialog-body{overflow:auto;min-height:0;overscroll-behavior:contain}
#dialog[data-kind=refund] .dialog-head,#dialog[data-kind=refund] .dialog-foot{position:static}
#dialog[data-kind=refund] .dialog-footer-actions{gap:10px}
#dialog[data-kind=refund] .refund-submit{background:#356fae;border-color:#356fae;color:#fff;border-radius:11px;min-height:46px;padding:11px 18px;font-weight:600;box-shadow:none}
#dialog[data-kind=refund] .refund-submit:disabled{background:#edf1f5;border-color:#edf1f5;color:#98a4b5;opacity:1}
.refund-form-bottom:has(p:empty){display:none}
@media(max-width:600px){#dialog[data-kind=refund] .dialog-footer-actions{width:100%;display:grid;grid-template-columns:auto 1fr}#dialog[data-kind=refund] .refund-submit{min-width:0}}

/* Refund follow-ups retain the record without issuing production urgency. */
html .card.refund-followup{border-color:#dde3eb;background:#fff}
html .refund-followup .card-status{color:#566377;background:#f3f5f8;border-bottom:1px solid #e7ebf0}
html .refund-followup .production-time{color:#6d7b8d}

/* Four visible actions retain the tablet navigation on one row. */
html #workspace>.kitchen-navigation .production-top-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important}
@media(min-width:600px) and (orientation:portrait){
 html[data-display-size] #workspace>.kitchen-navigation{grid-template-columns:minmax(0,3fr) minmax(126px,1fr) minmax(300px,3fr)!important}
 html[data-display-size] #workspace>.kitchen-navigation .production-top-actions button{padding-inline:4px;gap:3px;font-size:clamp(10px,calc(11px * var(--text-scale,1)),13px)}
 html[data-display-size] #workspace>.kitchen-navigation .production-top-actions button b{font-size:10px;padding-inline:4px;min-width:16px}
 html[data-display-size] #workspace>.kitchen-navigation #completed-label{font-size:11px}
}

/* Informational source status; production controls and timing keep ownership. */
.upstream-status-note{display:flex;align-items:flex-start;gap:6px;margin:8px 0;padding:7px 9px;border-radius:7px;background:#fff4dc;color:#805509;font-size:12px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;font-weight:500}.upstream-status-note>span:first-child{flex:none}.upstream-status-note.is-completed{background:#f1f3f6;color:#626b78}

.refund-recovery-alert{margin:8px 16px;padding:12px 16px;border:1px solid #e8b47b;border-radius:12px;background:#fff3df;color:#824711;text-align:left;font:inherit;font-weight:650}.refund-recovery-alert[hidden]{display:none}.recovery-reminder{padding:16px 0;border-bottom:1px solid #ece6dc}.recovery-reminder small{display:block;margin-top:6px;color:#6e6559}.recovery-reminder p{line-height:1.6;color:#824711}
