.grouper-body{background:#f6f2e9;color:#1d3033}
.grouper-body header,.grouper-body footer{border-color:#d5d5cd}
.grouper-body .brand span{color:#5e6d6a}
.grouper-body .eyebrow{color:#a64432}
.grouper-page{max-width:1120px;padding-top:76px;padding-bottom:84px}
.grouper-brand{display:inline-flex;align-items:center;gap:10px}
.grouper-brand img{display:block;width:44px;height:44px;object-fit:contain;flex:none;border-radius:8px}
.grouper-brand span{margin-left:-5px}
.grouper-page h1{max-width:830px;margin:12px 0 20px;font-size:clamp(50px,8vw,98px);line-height:.98;letter-spacing:-.065em;color:#172b2c}
.intro{max-width:650px;margin:0 0 34px;color:#52615e;font-size:clamp(17px,2vw,20px);line-height:1.6}
.flow-steps{display:flex;gap:0;flex-wrap:wrap;margin:0 0 34px;color:#23403f;font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.flow-steps span{padding:11px 16px;border-block:1px solid #d6d8cf;border-right:1px solid #d6d8cf}
.flow-steps span:first-child{border-left:1px solid #d6d8cf;border-radius:7px 0 0 7px}
.flow-steps span:last-child{border-radius:0 7px 7px 0}
#grouper-form{background:#fffdfa;border:1px solid #494b47;border-radius:16px;padding:clamp(22px,5vw,48px);box-shadow:0 22px 70px #0005}
.field-title{display:block;margin:0 0 12px;font-size:17px;font-weight:750;color:#1d3033}
.field-title span{margin-left:8px;color:#5e6d6a;font-size:14px;font-weight:400}
textarea,#group-number{width:100%;padding:15px;color:#1d3033;background:#fffdfa;border:1px solid #8a9892;border-radius:8px;font:inherit}
textarea{display:block;min-height:210px;line-height:1.55;resize:vertical}
textarea:focus-visible,#group-number:focus-visible,input:focus-visible,.grouper-body a:focus-visible,.grouper-body button:focus-visible{outline:3px solid #b54833;outline-offset:3px}
.field-help{margin:9px 0 0;color:#5e6d6a;font-size:13px;line-height:1.5}
fieldset{margin:30px 0 26px;padding:0;border:0}
.method-options{display:flex;flex-wrap:wrap;gap:10px}
.method-options label{display:flex;align-items:center;gap:10px;min-height:50px;padding:12px 16px;border:1px solid #becbc4;border-radius:8px;background:#f5f7f2;cursor:pointer}
.method-options label:has(input:checked){border-color:#b54833;background:#fae8df;box-shadow:inset 0 0 0 1px #b54833}
input[type=radio],input[type=checkbox]{width:19px;height:19px;flex:none;accent-color:#b54833}
#group-number{display:block;max-width:220px}
.group-names-label{margin-top:29px}
#group-names{min-height:94px}
.shuffle-settings{display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;margin-top:28px;padding:20px;border:1px solid #d3dad1;border-radius:9px;background:#f5f7f2}
.shuffle-settings .field-title{width:100%;margin:0}
.shuffle-settings select{min-width:175px;min-height:48px;padding:10px 38px 10px 13px;border:1px solid #8a9892;border-radius:8px;background:#fffdfa;color:#1d3033;font:inherit}
.shuffle-settings select:focus-visible{outline:3px solid #b54833;outline-offset:3px}
.sound-option{display:flex;align-items:center;gap:9px;min-height:48px;font-weight:650;cursor:pointer}
.shuffle-settings .field-help{width:100%;margin:0}
.participant-picker{margin-top:22px;padding-top:20px;border-top:1px solid #494b47}
.participant-picker p:not(.field-title){margin:0 0 12px;color:#5e6d6a;font-size:14px}
#participant-summary{color:#b54833;font-weight:700}
.participant-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px;max-height:190px;overflow:auto}
.participant-options label{display:flex;align-items:center;gap:9px;min-width:0;padding:9px 11px;border-radius:7px;background:#eff3ec;overflow-wrap:anywhere}
.review{margin-top:24px;padding:16px 20px;border-left:4px solid #b54833;border-radius:5px;background:#fbede5}
.review ul{margin:10px 0 15px;padding-left:22px;line-height:1.5}
.review label{display:flex;align-items:flex-start;gap:10px;line-height:1.5}
.form-message{min-height:24px;margin:16px 0;color:#9c321e;font-weight:700}
button{font:inherit;cursor:pointer}
.form-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.primary-action{min-height:52px;border:0;background:#b54833;color:#fffdfa;font-size:16px;font-weight:800}
.primary-action:hover{background:#923625}
.clear-action,.result-actions button{min-height:48px;padding:11px 17px;border:1px solid #8a9892;border-radius:8px;background:#fffdfa;color:#1d3033;font-weight:700}
.clear-action:hover,.result-actions button:hover{background:#f0e8dc}
.results{margin-top:68px}
.results-head{display:flex;align-items:end;justify-content:space-between;flex-wrap:wrap;gap:20px;margin-bottom:24px}
.results h2{margin:8px 0;color:#172b2c;font-size:clamp(34px,5vw,52px);letter-spacing:-.045em}
.results-head p:last-child,.omitted-summary{color:#5e6d6a;line-height:1.5}
.result-actions{display:flex;flex-wrap:wrap;gap:8px}
.result-actions #draw-next{border-color:#b54833;background:#b54833;color:#fffdfa}
.result-actions #draw-next:hover{background:#923625}
.result-actions button:disabled{opacity:.52;cursor:not-allowed}
.draw-hat-stand{position:relative;width:160px;height:108px;margin:0 auto 22px;filter:drop-shadow(0 12px 10px #172b2c40)}
.draw-hat-stand[hidden],#draw-next[hidden]{display:none!important}
.stand-crown{position:absolute;left:25px;bottom:26px;width:110px;height:78px;border:4px solid #2d3d3d;border-radius:11px 11px 22px 22px;background:linear-gradient(130deg,#385453,#172b2c)}
.stand-crown::after{position:absolute;right:0;bottom:9px;left:0;height:12px;border-block:2px solid #8b311f;background:#b54833;content:''}
.stand-brim{position:absolute;right:0;bottom:17px;left:0;height:21px;border:4px solid #2d3d3d;border-radius:50%;background:#172b2c}
.pending-name{color:#7a8780;font-style:italic}
.group-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,275px),1fr));gap:16px}
.group-card{min-width:0;padding:24px;border:1px solid #d3dad1;border-top:4px solid #b54833;border-radius:11px;background:#fffdfa;break-inside:avoid}
.group-card:nth-child(3n+2){border-top-color:#d27b55}
.group-card:nth-child(3n){border-top-color:#6e988b}
.group-card h3{margin:0 0 4px;color:#172b2c;font-size:24px}
.member-count{margin:0 0 18px;color:#52615e;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.group-card ol{margin:0;padding-left:24px;line-height:1.9;overflow-wrap:anywhere}
.omitted-summary{overflow-wrap:anywhere}
.privacy-note{margin-top:38px;color:#5e6d6a;font-size:13px;line-height:1.65}
.draw-stage{position:fixed;inset:0;z-index:100;overflow:hidden;pointer-events:none;contain:layout paint}
.draw-name{position:absolute;z-index:2;max-width:170px;padding:5px 10px;overflow:hidden;border:1px solid #b54833;border-radius:999px;background:#fffdfa;box-shadow:0 6px 16px #172b2c33;color:#172b2c;font-size:13px;font-weight:750;text-overflow:ellipsis;white-space:nowrap;will-change:transform,opacity}
.draw-hat{position:absolute;top:min(42vh,330px);left:50%;z-index:3;width:176px;height:128px;transform:translateX(-50%);filter:drop-shadow(0 16px 13px #172b2c55)}
.hat-crown{position:absolute;left:30px;bottom:27px;width:116px;height:96px;border:4px solid #2d3d3d;border-radius:12px 12px 26px 26px;background:linear-gradient(130deg,#385453,#172b2c)}
.hat-crown::after{position:absolute;right:0;bottom:12px;left:0;height:14px;border-block:3px solid #8b311f;background:#b54833;content:''}
.hat-brim{position:absolute;right:0;bottom:20px;left:0;height:22px;border:4px solid #2d3d3d;border-radius:50%;background:#172b2c}
.group-grid.is-drawing li{opacity:.35}
@media(prefers-reduced-motion:reduce){.draw-stage{display:none}}
@media(max-width:600px){.grouper-page{padding-top:42px}.grouper-page h1{font-size:clamp(48px,13vw,72px)}.flow-steps{gap:7px}.flow-steps span,.flow-steps span:first-child,.flow-steps span:last-child{border:1px solid #d6d8cf;border-radius:6px;padding:8px 10px;font-size:11px}.method-options{display:grid}.form-actions{display:grid}.primary-action,.clear-action{width:100%}.result-actions{width:100%}.result-actions button{flex:1 1 auto}}
@media print{header,footer,#grouper-form,.intro,.privacy-note,.result-actions,.flow-steps,.draw-stage,.draw-hat-stand,.grouper-page>.eyebrow{display:none!important}.grouper-body{background:#fff;color:#111}.grouper-page{max-width:none;padding:0}.grouper-page h1{color:#111}.results{display:block!important;margin:0}.results[hidden]{display:none!important}.results h2,.results-head p:last-child,.omitted-summary,.member-count,.group-card h3{color:#111!important}.group-grid{grid-template-columns:repeat(2,1fr)}.group-card{border-color:#888;background:#fff;color:#111;box-shadow:none}.group-grid.is-drawing li{opacity:1}}
