.count-group-label{display:flex;align-items:center;gap:10px;margin:13px 0 0;color:#e2c17c;font-size:12px;font-weight:700}
.count-group-label select{flex:1;min-width:0;max-width:540px;font:16px Georgia,serif;padding:8px 12px;border:1px solid #a87c40;border-radius:18px;color:#f3e5cd;background:#321822}
.count-section{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:20px 3px 4px;color:#edca82;font:italic 700 21px Georgia,serif;border-bottom:1px solid #b98a43;padding:0 0 9px}
.count-section small{font:12px system-ui,sans-serif;color:#d7b783;white-space:nowrap}
.count-total{min-width:80px;max-width:40%;text-align:right;flex-shrink:0;color:#af9b98}
.count-total strong{display:block;font:italic 700 30px/1 Georgia,serif;overflow-wrap:anywhere}
.count-total span{font:11px system-ui,sans-serif;white-space:nowrap}
.count-total.has-count{color:#f4d58b;text-shadow:0 0 9px #d4a62d55}
.count-actions{grid-template-columns:1fr 1fr!important}
.count-actions button:first-child{background:linear-gradient(#20523a,#103727)!important;box-shadow:0 0 10px #40bc7350}
.count-equation{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap;color:#f0d08a;font:italic 700 20px Georgia,serif;margin:9px 0}
.count-equation span{border:1px solid #a17e4255;background:#ffffff08;border-radius:8px;padding:3px 7px}
.count-equation small{font:11px system-ui,sans-serif;color:#d6c0b8}
.count-equation b{font-size:13px;color:#c4a272}
#countEditor{max-width:600px;padding:24px 18px;color:#f3e1cd}
#countEditor h2{padding-right:25px;font:700 25px Georgia,serif}
#countHelp,#countListed{color:#cdb5aa;font-size:14px;line-height:1.5}
.count-input-row{display:grid;grid-template-columns:minmax(85px,.7fr) minmax(100px,1.3fr) 32px;align-items:end;gap:8px;margin:13px 0}
.count-input-row label{display:block;font-size:12px;color:#ddc495;min-width:0}
.count-input-row input{box-sizing:border-box;min-width:0;width:100%;font-size:16px;padding:10px 9px;border-radius:8px;border:1px solid #ac8648;background:#220f19;color:#fff0d5;margin-top:4px}
.count-input-row small{font-size:10px;color:#bca8a0}
.remove-count-row{min-height:40px;font-size:20px;border:1px solid #856140;border-radius:50%;background:#44232e;color:#edcb95}
#countRunningTotal{border-top:1px solid #bf9650;border-bottom:1px solid #bf9650;padding:13px 0;font:italic 700 29px Georgia,serif;color:#f4d58b}
#countError{color:#ffb5b5;line-height:1.4}
#saveCount{width:100%;margin-top:10px}
#countNote{width:100%;box-sizing:border-box;font-size:16px;background:#220f19;color:#f8e6ce;border:1px solid #9b7542;border-radius:10px;padding:9px}
.count-group-totals p{display:flex;gap:15px;justify-content:space-between;border-bottom:1px solid #a77f4266;padding:8px 0}
.count-group-totals span{font-size:13px}
.count-report-total strong{font:italic 700 32px Georgia,serif;color:#f0cd7b}
.report-preview table{min-width:760px}
#retrySave{margin-top:8px;color:#ffe1aa}
@media(max-width:360px){.count-group-label{font-size:11px;gap:6px}.count-group-label select{max-width:220px}.count-section{font-size:18px}.count-total{min-width:65px}.count-total strong{font-size:26px}}
@media print{.count-group-label,#retrySave{display:none}.count-report-total strong{color:#28151c}.count-group-totals p{color:#28151c}}

.count-pdf-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.count-pdf-actions a{display:inline-flex;align-items:center;justify-content:center;border:1px solid #bc9756;border-radius:24px;padding:12px 18px;color:#eed3a0;background:#391522;text-decoration:none;font-weight:700}.count-pdf-actions [hidden]{display:none}[data-pdf-status]{font-size:15px;line-height:1.5;color:#dac8cc}#submissionExports{margin-bottom:22px}#submitPreview{margin-top:18px}

.count-group-summary{margin:12px 0}.count-group-summary summary{color:#d3b474;cursor:pointer;padding:8px 0}

.inline-count-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(88px,.65fr);gap:6px;margin-top:8px;align-items:start}
.inline-count-label{min-width:0}
.inline-count-input{box-sizing:border-box;width:100%;min-height:44px;border:1px solid #d3a65c;border-radius:999px;padding:9px 15px;background:linear-gradient(#184431,#102d23);color:#fff0d3;font:600 20px/1.2 system-ui,sans-serif;box-shadow:0 0 9px #40bc732c;text-align:center}
.inline-count-input::placeholder{font:600 14px system-ui,sans-serif;color:#d1c9b6;opacity:1}
.inline-count-input:focus,.inline-count-input.is-count-active{outline:2px solid #ffe1ab;outline-offset:2px}
.inline-count-next{min-height:44px;border:1px solid #d3a65c;border-radius:999px;background:linear-gradient(#624b3e,#43332b);color:#f7ddb0;font:700 15px system-ui,sans-serif}
.inline-count-status{grid-column:1/-1;margin:0;font-size:12px;line-height:1.4;color:#d7b783}
.inline-count-status:empty{display:none}
.inline-count-status.error{color:#ffc1b6}
.inline-counting #filterDock,.inline-counting #searchDock,.inline-counting #previousUnchecked,.inline-counting #nextUnchecked{visibility:hidden;pointer-events:none}
.inline-counting .summary .progress-track,.inline-counting #progressText,.inline-counting .count-group-label,.inline-counting #rosterNotice{display:none}
.inline-counting .summary{padding-block:8px}

.count-keypad[hidden]{display:none}
.count-keypad{position:fixed;z-index:110;left:0;right:0;bottom:0;padding:10px max(12px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom));background:linear-gradient(160deg,#36131f,#160b14);border-top:1px solid #d5ad68;box-shadow:0 -10px 28px #08040c99;touch-action:manipulation}
.count-keypad-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 44px 64px;align-items:center;gap:8px;margin-bottom:8px}
.count-keypad-toolbar div{min-width:0}.count-keypad-toolbar small{display:block;color:#cda76d;font-size:10px;letter-spacing:.14em}.count-keypad-toolbar strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#f8e7ce;font-size:15px;line-height:1.5}
.count-keypad button{min-height:46px;border:1px solid #b8955266;border-radius:12px;background:linear-gradient(#49303a,#301d27);color:#faead7;font:500 25px/1 system-ui,sans-serif;touch-action:manipulation;-webkit-user-select:none;user-select:none}
.count-keypad button:active{background:#725132}.count-keypad button:focus-visible{outline:2px solid #f7d89c;outline-offset:2px}
.count-keypad .count-keypad-enter{background:linear-gradient(#2b7652,#17482f);border-color:#ceaa68;color:#ffedc9;font-weight:700;font-size:29px}
.count-keypad-keys{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.count-keypad-open #wineList{padding-bottom:calc(var(--count-keypad-height,280px) + 30px)}
@media(pointer:coarse),(max-width:700px){.inline-count-form{grid-template-columns:1fr}.inline-count-next{display:none}.count-keypad button{min-height:46px}}
@media(max-height:600px){.count-keypad{padding-top:6px;padding-bottom:calc(6px + env(safe-area-inset-bottom))}.count-keypad button{min-height:40px}.count-keypad-keys{gap:4px}.count-keypad-toolbar{margin-bottom:4px}}
@media print{.count-keypad{display:none!important}}

.count-keypad-open .inline-count-input:focus:not(.is-count-active){outline:none}

.count-color-rose{background:#742c48!important;border-color:#ffa5c0!important;color:#ffe7ee!important;font-weight:800!important}

.count-pdf-viewer{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;background:#171116;color:#f8e6c8;overflow:hidden;box-sizing:border-box}.count-pdf-viewer[open]{display:flex;flex-direction:column}.count-pdf-toolbar{flex:none;padding:calc(10px + env(safe-area-inset-top)) 12px 10px;background:#381422;border-bottom:2px solid #caa461;display:flex;flex-wrap:wrap;align-items:center;gap:10px}.count-pdf-toolbar>div{display:flex;gap:8px;width:100%}.count-pdf-toolbar button{min-height:44px;padding:8px 14px;border:1px solid #d2ad6f;border-radius:18px;background:#512138;color:#fff2d7;font-size:16px;font-weight:700}.count-pdf-toolbar button:disabled{opacity:.5}.count-pdf-toolbar p{width:100%;margin:0;font-size:13px;line-height:1.3}.count-pdf-pages{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px 8px calc(12px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch}.count-pdf-pages img{display:block;width:100%;height:auto;margin:0 auto 12px;max-width:1100px}.count-pdf-print-frame{position:fixed;left:-10000px;top:0;width:1056px;height:816px;border:0}.count-pdf-actions [role=button]{cursor:pointer}
