:root{--ink:#191919;--paper:#f7f3e8;--white:#fffefb;--yellow:#f9e44c;--coral:#f89c89;--blue:#b8d8f2;--lilac:#d5c3f6;--muted:#55534d;--line:2px solid var(--ink);font-family:Arial,"Microsoft JhengHei","PingFang TC","Noto Sans TC",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a{touch-action:manipulation}button{color:inherit;cursor:pointer}button:disabled{cursor:not-allowed}a{color:inherit;text-underline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--ink);outline-offset:3px;box-shadow:0 0 0 2px var(--paper)}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.skip{position:fixed;left:12px;top:-80px;padding:14px;background:var(--yellow);z-index:10;border:var(--line)}.skip:focus{top:12px}
.site-header{border-bottom:var(--line);background:var(--paper)}.header-inner{max-width:1280px;margin:auto;min-height:86px;display:flex;align-items:center;justify-content:space-between;padding:12px 0;gap:20px}.brand{display:flex;gap:8px;align-items:center;text-decoration:none;font-size:30px;font-weight:900;line-height:1;letter-spacing:-1.8px}.brand svg{width:48px;height:48px;transform:rotate(-9deg);flex-shrink:0}.brand small{display:block;font-size:11px;letter-spacing:2.1px;font-weight:700;margin-top:8px}.brand-loop{letter-spacing:-2px}.header-end{display:flex;align-items:center;gap:30px}.fan-tag{font-size:12px;font-weight:700;letter-spacing:1px}.language-control{display:flex;border:var(--line);box-shadow:3px 3px 0 var(--ink);background:var(--white)}.language-control button{min-width:52px;min-height:40px;border:0;background:transparent;font-size:13px;font-weight:800;padding:8px 12px}.language-control button[aria-pressed=true]{background:var(--ink);color:var(--paper)}
.shell{max-width:1280px;margin:auto}.intro{display:flex;align-items:center;justify-content:space-between;padding:42px 0 38px;gap:36px}.eyebrow{display:flex;align-items:center;gap:9px;margin:0 0 14px;font-size:12px;font-weight:800;letter-spacing:2.5px}.tiny-star{font-size:22px;line-height:1}h1{font-size:50px;line-height:1.16;letter-spacing:-2px;margin:0;font-weight:900}h1 span{display:inline-block;position:relative;z-index:0}h1 span:after{content:"";position:absolute;background:var(--yellow);height:15px;bottom:1px;left:0;right:-5px;z-index:-1;transform:rotate(-1deg)}.intro-copy{font-size:15px;line-height:1.8;margin:20px 0 0;max-width:630px;color:var(--muted)}.formula{position:relative;min-width:270px;text-align:center;margin-right:12px;transform:rotate(3deg)}.formula-number{font-size:76px;line-height:.92;font-weight:900;letter-spacing:-7px}.formula-number span{font-size:48px;display:inline-block;margin:0 14px;vertical-align:top}.formula p{font-size:13px;font-weight:800;letter-spacing:1px;margin:14px 0}.formula-sticker{display:inline-block;font-size:12px;font-weight:800;background:var(--coral);border:var(--line);padding:8px 15px;transform:rotate(-6deg);box-shadow:3px 3px 0 var(--ink)}
.workspace{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:28px;align-items:start}.panel{border:var(--line);box-shadow:5px 5px 0 var(--ink);background:var(--white)}.panel-heading{display:flex;align-items:center;padding:17px 20px;gap:12px;border-bottom:var(--line);background:var(--yellow)}.step{background:var(--ink);color:var(--paper);font-size:12px;font-weight:900;width:30px;height:30px;display:grid;place-items:center;flex-shrink:0;transform:rotate(-5deg)}h2{font-size:21px;line-height:1.4;margin:0;font-weight:900;letter-spacing:-.5px}.count-stamp{margin-left:auto;display:flex;align-items:baseline;gap:5px;white-space:nowrap}.count-stamp b{font-size:24px;font-weight:900}.count-stamp span{font-size:12px;font-weight:700}.pool-body{padding:20px}.roles{padding:0;border:0;margin:0 0 18px}.roles legend{font-size:13px;font-weight:800;margin-bottom:10px}.role-options{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.role-options label{position:relative;cursor:pointer}.role-options input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}.role-options label>span{display:flex;align-items:center;justify-content:center;gap:5px;min-height:44px;border:var(--line);font-size:13px;font-weight:800;background:var(--white);transition:transform .1s}.role-options svg{width:15px;height:15px;fill:currentColor}.role-options input:checked+span{background:var(--ink);color:var(--paper);box-shadow:2px 2px 0 var(--yellow)}.role-options input:focus-visible+span{outline:3px solid var(--ink);outline-offset:3px}.search-field>label{font-size:13px;font-weight:800;display:block;margin-bottom:9px}.search-box{display:flex;align-items:center;border:var(--line);background:var(--paper);height:44px;padding-left:12px;gap:8px}.search-box:focus-within{box-shadow:3px 3px 0 var(--yellow)}.search-box svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;flex-shrink:0}.search-box input{width:100%;min-width:0;border:0;background:transparent;outline:none;height:100%;font-size:14px;padding:0 8px 0 0;color:var(--ink)}.search-box input::placeholder{color:#65615b}.search-box input::-webkit-search-cancel-button{display:none}.clear-search{border:0;border-left:var(--line);background:var(--white);min-width:44px;height:40px;font-size:24px}.search-field>p{font-size:11px;line-height:1.6;color:var(--muted);margin:7px 0 6px}.list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;min-height:44px;margin:1px 0 7px}.list-toolbar p{font-size:12px;margin:0;color:var(--muted)}.list-toolbar>div{display:flex;align-items:center;gap:5px}.list-toolbar>div>span{color:#777}.text-action{border:0;background:transparent;text-decoration:underline;text-underline-offset:4px;font-size:11px;font-weight:700;padding:10px 2px;min-height:44px}.text-action:disabled{color:#68645e;text-decoration:none}.hero-grid{padding:3px 8px 8px 2px;margin:0;border:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;max-height:330px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--ink) #e3dfd6;align-content:start}.hero-option{position:relative;display:flex;flex-direction:column;cursor:pointer;min-width:0}.hero-option input{position:absolute;width:100%;height:100%;opacity:0;margin:0;z-index:1;cursor:pointer}.hero-thumb{background:#e7e2d7;border:2px solid #908c85;position:relative;aspect-ratio:1;display:block;overflow:hidden}.hero-thumb img{width:100%;height:100%;object-fit:contain;display:block}.hero-check{position:absolute;bottom:0;right:0;width:19px;height:19px;display:grid;place-items:center;background:var(--ink);color:var(--paper);font-size:13px;font-weight:900;border-left:1px solid var(--ink);border-top:1px solid var(--ink);visibility:hidden}.hero-option input:checked~.hero-thumb{border-color:var(--ink);background:var(--blue)}.hero-option input:checked~.hero-thumb .hero-check{visibility:visible}.hero-option input:focus-visible~.hero-thumb{outline:3px solid var(--ink);outline-offset:2px}.hero-option:hover .hero-thumb{box-shadow:2px 2px 0 var(--ink)}.hero-label{font-size:11px;font-weight:700;line-height:1.3;text-align:center;margin-top:5px;overflow-wrap:anywhere;min-height:28px}.hero-thumb .thumb-fallback{position:absolute;inset:0;display:grid;place-items:center;font-size:22px;font-weight:900}.no-match{min-height:230px;border:2px dashed #817b73;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px}.no-match>span{font-size:38px}.no-match strong{font-size:17px}.no-match p{font-size:13px;color:var(--muted);line-height:1.6}.pool-message{padding:14px;background:#ffe2cf;border:var(--line);margin-top:14px;font-size:13px;line-height:1.5}.pool-message strong{font-size:14px}.pool-message p{margin:5px 0}.pool-message button{font-size:13px}.draw-zone{padding-top:18px}.primary{display:flex;width:100%;align-items:center;justify-content:center;gap:11px;padding:16px;border:3px solid var(--ink);background:var(--yellow);box-shadow:4px 4px 0 var(--ink);font-size:19px;font-weight:900;transition:transform .1s,box-shadow .1s}.primary>span:last-child{margin-left:auto;font-size:25px;line-height:1}.primary svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8}.primary svg circle{fill:currentColor;stroke:0}.primary:hover{background:#fced7c}.primary:active,.secondary:active{transform:translate(3px,3px);box-shadow:1px 1px 0 var(--ink)}.primary:disabled{background:#d8d5ce;color:#55534d;box-shadow:2px 2px 0 var(--ink)}.draw-zone>p{font-size:11px;line-height:1.6;text-align:center;color:var(--muted);margin:13px 0 0}
.result-heading{display:flex;align-items:center;gap:12px;padding:17px 0 19px;min-height:68px}.result-status{margin-left:auto;font-size:11px;font-weight:700;background:var(--white);border:var(--line);padding:6px 9px;white-space:nowrap}.initial-result{position:relative;overflow:hidden;min-height:575px;background:var(--blue);text-align:center;padding:25px 28px 0}.initial-topline{display:flex;justify-content:space-between;font-size:11px;font-weight:800;letter-spacing:2px}.initial-topline>span:last-child{font-size:24px;line-height:1}.initial-collage{height:260px;position:relative;max-width:380px;margin:12px auto 8px}.portrait-ticket{position:absolute;top:32px;width:145px;height:170px;border:var(--line);box-shadow:5px 5px 0 var(--ink);background:var(--coral);overflow:hidden}.portrait-ticket img{width:100%;height:100%;object-fit:contain}.portrait-ticket>span{position:absolute;right:10px;bottom:5px;font-size:25px;font-weight:900}.ticket-one{left:2%;transform:rotate(-12deg)}.ticket-two{right:2%;top:43px;background:var(--lilac);transform:rotate(11deg)}.mystery-ticket{position:absolute;top:33px;left:calc(50% - 68px);width:136px;height:180px;background:var(--yellow);border:var(--line);box-shadow:5px 5px 0 var(--ink);transform:rotate(-3deg);font-size:130px;font-weight:900;line-height:1.3}.orbit-label{position:absolute;bottom:14px;right:18px;transform:rotate(-8deg);background:var(--ink);color:var(--paper);padding:9px 14px;font-size:11px;font-weight:800;letter-spacing:1.8px}.initial-result h3{font-size:31px;font-weight:900;line-height:1.4;margin:0}.initial-result>p{font-size:14px;line-height:1.8;color:#363e45;margin:16px auto 28px}.initial-bottom{border-top:var(--line);display:flex;justify-content:center;align-items:center;gap:23px;min-height:52px;font-size:11px;font-weight:800;letter-spacing:2px;margin:0 -28px}.hero-result{display:grid;grid-template-columns:46% 54%;min-height:287px;overflow:hidden;background:var(--white)}.hero-art{position:relative;min-height:285px;background:var(--coral);border-right:var(--line);overflow:hidden;display:flex;align-items:flex-end;justify-content:center}.hero-art-pattern{position:absolute;font-size:260px;color:#c95d47;opacity:.22;line-height:1;top:4px;left:-15px}.hero-art img{width:100%;height:100%;max-height:294px;object-fit:contain;position:relative;z-index:1;align-self:center}.hero-number{position:absolute;left:12px;bottom:12px;background:var(--ink);color:var(--paper);font-size:10px;letter-spacing:2px;font-weight:800;padding:7px 10px;z-index:2;transform:rotate(-4deg)}.hero-identity{padding:27px 22px;display:flex;align-items:flex-start;flex-direction:column;justify-content:center}.small-label{font-size:12px;font-weight:700;letter-spacing:2px}.hero-identity h3{font-size:44px;font-weight:900;line-height:1.1;overflow-wrap:anywhere;letter-spacing:-1.8px;margin:11px 0 14px}.hero-identity h3.long-name{font-size:31px;letter-spacing:-1px}.role-badge{border:var(--line);font-size:11px;font-weight:800;letter-spacing:1px;padding:6px 11px;background:var(--yellow)}.hero-identity p{font-size:13px;line-height:1.7;color:var(--muted);margin:18px 0 15px}.hero-identity a{font-size:11px;font-weight:700;min-height:44px;display:flex;align-items:center}.perk-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px;margin-top:20px}.perk-card{border:var(--line);box-shadow:4px 4px 0 var(--ink);padding:18px;min-height:220px;overflow-wrap:anywhere}.perk-card.minor{background:var(--yellow)}.perk-card.major{background:var(--lilac)}.perk-level{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;font-weight:800;line-height:1.5;padding-bottom:13px;border-bottom:1px solid #19191977}.perk-level span:last-child{white-space:nowrap;font-size:10px}.perk-name-row{display:flex;align-items:center;gap:11px;margin-top:17px}.perk-icon{display:grid;place-items:center;flex-shrink:0;width:46px;height:46px;background:var(--ink);border:1px solid var(--ink);border-radius:50%;position:relative;padding:5px}.perk-icon img{width:100%;height:100%;object-fit:contain}.perk-icon .icon-fallback{color:var(--paper);font-size:28px;font-weight:800}.perk-card h3{font-size:19px;line-height:1.35;font-weight:900;margin:0}.perk-card>p{font-size:13px;line-height:1.8;margin:14px 0 0}.result-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:23px;flex-wrap:wrap}.result-bottom>span{font-size:12px;color:var(--muted);font-weight:700}.secondary{min-height:44px;border:var(--line);background:var(--white);box-shadow:3px 3px 0 var(--ink);padding:9px 17px;font-size:13px;font-weight:800;transition:transform .1s,box-shadow .1s}.secondary:hover{background:var(--paper)}.secondary:disabled{background:#d8d5ce;color:#55534d;box-shadow:none}.back-to-pool{font-size:12px;display:none;min-height:44px;align-items:center}.portrait-fallback{padding:24px;text-align:center;font-size:15px;font-weight:700;z-index:2}.data-state{min-height:430px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;background:#ffe2cf;text-align:center}.data-state-symbol{font-size:70px;font-weight:900;line-height:1}.data-state h3{font-size:24px;margin:18px 0 10px}.data-state p{font-size:14px;line-height:1.8;max-width:350px;margin:0 0 24px}
.how-strip{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 8px;border-top:var(--line);border-bottom:var(--line);margin-top:40px}.how-strip p{margin:0;font-size:13px;font-weight:800;letter-spacing:1px;text-align:center;line-height:1.8}.how-strip p span{margin:0 14px}.strip-star{font-size:27px}.site-footer{display:flex;justify-content:space-between;gap:26px;padding:28px 0 32px;color:var(--muted);font-size:11px;line-height:1.7}.site-footer strong{color:var(--ink);font-size:18px;font-weight:900;letter-spacing:-.7px}.site-footer p{margin:7px 0 0}.footer-source{display:flex;flex-direction:column;justify-content:center;gap:8px;text-align:right;flex-shrink:0}.footer-source a{min-height:30px;display:flex;align-items:center;justify-content:flex-end}.design-review{border:2px dashed #7b766e;padding:24px;margin-bottom:40px;background:#eeeadf;font-size:13px;line-height:1.7}.review-header{display:flex;align-items:center;gap:15px;flex-wrap:wrap}.review-header span{font-size:12px}.review-states{display:flex;gap:8px;flex-wrap:wrap}.review-states button{border:var(--line);padding:10px;background:var(--white);min-height:44px}.flow-diagram{display:flex;gap:15px;align-items:center;flex-wrap:wrap}.flow-diagram a{padding:12px;border:var(--line);background:var(--white);display:flex;gap:10px;align-items:center;text-decoration:none}.flow-diagram b{background:var(--ink);color:var(--white);padding:3px 8px}.secondary-flow{margin-top:14px;font-size:12px;color:var(--muted)}
@media(min-width:1400px){.header-inner,.shell{max-width:1280px}}@media(max-width:1350px){.header-inner,.shell{margin-left:28px;margin-right:28px}.hero-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.hero-identity h3{font-size:38px}.hero-identity{padding:24px 18px}.hero-identity h3.long-name{font-size:28px}.perk-card{padding:15px}.perk-name-row{gap:8px}.perk-card h3{font-size:18px}}
@media(max-width:1100px){h1{font-size:43px}.formula{min-width:230px}.workspace{gap:22px}.pool-body{padding:16px}.panel-heading{padding:16px;gap:9px}h2{font-size:19px}.result-heading{gap:9px}.result-status{font-size:10px;padding:6px}.perk-grid{gap:12px}.perk-icon{width:38px;height:38px}.perk-name-row{align-items:flex-start}.perk-card{padding:13px}.perk-level{flex-wrap:wrap}.hero-art{min-height:260px}.hero-identity h3{font-size:34px}.hero-identity h3.long-name{font-size:25px}.hero-identity{padding:22px 15px}.hero-identity p{font-size:12px}}
@media(max-width:920px){.workspace{grid-template-columns:1fr;gap:28px}.hero-grid{grid-template-columns:repeat(7,minmax(0,1fr));max-height:310px}.intro{padding:32px 0}.formula{min-width:180px;margin:0}.formula-number{font-size:62px}.formula p{font-size:11px}.formula-sticker{font-size:10px}.pool-body{padding:22px}.panel-heading{padding:17px 22px}.result-heading{padding-top:0}.initial-result{min-height:515px}.initial-collage{height:235px}.hero-result{min-height:300px}.hero-art{min-height:300px}.hero-art img{max-height:320px}.hero-identity{padding:25px 30px}.hero-identity h3{font-size:48px}.hero-identity h3.long-name{font-size:38px}.hero-identity p{font-size:14px}.perk-card{min-height:205px;padding:20px}.perk-card h3{font-size:22px}.perk-icon{width:48px;height:48px}.perk-level{flex-wrap:nowrap;font-size:12px}.result-bottom{justify-content:flex-start}.result-bottom>span{margin-right:auto}.back-to-pool{display:flex}.how-strip{margin-top:32px}.site-footer{flex-direction:column;gap:20px}.footer-source{text-align:left;align-items:flex-start}.footer-source a{justify-content:flex-start}}
@media(max-width:600px){.header-inner,.shell{margin-left:18px;margin-right:18px}.header-inner{min-height:76px;gap:10px}.brand{font-size:25px;gap:4px}.brand svg{width:39px;height:39px}.brand small{font-size:9px;letter-spacing:1.1px;margin-top:7px}.header-end{gap:0}.fan-tag{display:none}.language-control{box-shadow:2px 2px 0 var(--ink)}.language-control button{min-width:44px;min-height:40px;padding:8px;font-size:12px}.intro{padding:30px 0 28px}.intro>div:first-child{width:100%}h1{font-size:37px;letter-spacing:-1.5px}.intro-copy{font-size:13px;line-height:1.8;margin-top:17px}.eyebrow{font-size:10px;letter-spacing:2px;margin-bottom:12px}.formula{display:none}.pool-body{padding:16px}.panel-heading{padding:14px;gap:9px}h2{font-size:19px}.count-stamp b{font-size:21px}.count-stamp span{font-size:10px}.step{width:27px;height:27px;font-size:11px}.role-options{gap:6px}.role-options label>span{font-size:12px}.role-options svg{width:13px;height:13px}.hero-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-height:314px}.hero-label{font-size:11px;min-height:26px}.list-toolbar{margin:4px 0 8px}.list-toolbar p{font-size:11px}.text-action{font-size:10px}.search-field>p{font-size:11px}.primary{font-size:18px;padding:13px}.draw-zone>p{font-size:10px}.result-heading h2{font-size:20px}.result-status{font-size:10px}.initial-result{min-height:500px;padding:21px 18px 0}.initial-collage{height:235px}.portrait-ticket{width:118px;height:154px}.mystery-ticket{width:120px;height:165px;left:calc(50% - 60px);font-size:115px;top:37px}.ticket-one{left:1%}.ticket-two{right:1%}.initial-result h3{font-size:27px}.initial-result>p{font-size:13px}.initial-bottom{margin:0 -18px}.hero-result{grid-template-columns:43% 57%;min-height:248px}.hero-art{min-height:248px}.hero-identity{padding:20px 16px}.hero-identity h3{font-size:34px}.hero-identity h3.long-name{font-size:26px}.hero-identity p{font-size:12px;margin:13px 0 8px}.small-label{font-size:11px}.hero-identity a{font-size:10px}.hero-number{left:8px;font-size:8px;letter-spacing:1px;padding:6px}.perk-grid{grid-template-columns:1fr;gap:16px;margin-top:18px}.perk-card{min-height:0;padding:18px}.perk-level{padding-bottom:12px}.perk-name-row{margin-top:14px;align-items:center;gap:12px}.perk-card h3{font-size:21px}.perk-card>p{font-size:13px;margin-top:11px}.result-bottom{gap:10px}.result-bottom>span{flex:1 0 100%;margin-bottom:4px}.result-bottom .secondary{margin-right:auto}.how-strip{gap:9px;padding:16px 0}.how-strip p{font-size:11px;letter-spacing:0}.how-strip p span{margin:0 3px}.strip-star{font-size:19px}.site-footer{font-size:10px;padding-top:24px}.design-review{padding:17px}.review-header h2{font-size:18px}.design-review p{font-size:12px}.flow-diagram{gap:9px;flex-direction:column;align-items:stretch}.flow-diagram>span{text-align:center}.secondary-flow{gap:7px}}
@media(max-width:360px){.header-inner,.shell{margin-left:16px;margin-right:16px}.brand{font-size:22px}.brand svg{width:34px;height:34px}.brand small{font-size:8px}.language-control button{min-width:38px}h1{font-size:33px}.pool-body{padding:12px}.panel-heading{padding:12px}h2{font-size:17px}.count-stamp b{font-size:18px}.role-options{gap:4px}.role-options label>span{font-size:11px;gap:3px}.role-options svg{width:11px;height:11px}.list-toolbar>div{gap:4px}.text-action{font-size:10px}.hero-grid{gap:7px}.hero-identity{padding:15px 12px}.hero-identity h3{font-size:30px}.hero-identity h3.long-name{font-size:23px}.result-heading h2{font-size:18px}.result-status{font-size:9px;padding:5px}.hero-art{min-height:240px}.initial-result h3{font-size:24px}.portrait-ticket{width:104px}.mystery-ticket{width:108px;left:calc(50% - 54px)}.how-strip .strip-star{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
/* Review pass 1: visible primary action and touch targets. See visual-review.md. */
.brand{min-height:44px}.language-control button{min-width:44px;min-height:44px}.search-box{height:48px}.search-box input{height:44px}.clear-search{height:44px}.hero-label,.text-action{font-size:12px}.footer-source a{min-height:44px}.site-footer{font-size:12px}.design-review>p>a{display:inline-flex;min-height:44px;align-items:center}
.portrait-fallback{align-self:center;width:100%}.hero-art:has(.portrait-fallback:not([hidden])) .hero-number{display:none}
@media(min-width:921px){.intro{padding-top:28px;padding-bottom:26px}.hero-grid{max-height:250px}.initial-result{min-height:505px}.initial-collage{height:215px}}
/* v2: personal / team configuration and challenge cards. */
#team-form{display:flex;flex-direction:column;max-height:calc(100dvh - 36px)}#team-dialog .dialog-body{overflow-y:auto;min-height:0;scrollbar-width:thin}#team-dialog .dialog-heading,#team-dialog .dialog-footer{flex-shrink:0}
.player-field select:focus-visible{outline:3px solid var(--ink);outline-offset:3px;box-shadow:0 0 0 2px var(--paper)}
.player-field select:disabled{opacity:1}
.mode-bar{display:flex;align-items:center;gap:24px;margin:0 0 26px;padding:16px 0;border-top:var(--line);border-bottom:var(--line)}.mode-options{display:flex;flex-shrink:0;margin:0;padding:0;border:var(--line);box-shadow:3px 3px 0 var(--ink)}.mode-options label{position:relative;cursor:pointer}.mode-options input{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer}.mode-options label>span{display:flex;align-items:center;justify-content:center;min-height:46px;padding:11px 22px;font-weight:800;font-size:14px;background:var(--white)}.mode-options label+label{border-left:var(--line)}.mode-options input:checked+span{background:var(--yellow)}.mode-options input:focus-visible+span{outline:3px solid var(--ink);outline-offset:4px}.mode-bar>p{font-size:13px;line-height:1.6;color:var(--muted);margin:0}
.team-overview{padding:26px;background:var(--blue)}.team-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.team-heading .eyebrow{font-size:11px;letter-spacing:2px}.team-heading h2{font-size:28px;line-height:1.3}.team-count{display:flex;flex-direction:column;align-items:center;background:var(--yellow);border:var(--line);padding:12px 16px;transform:rotate(4deg);box-shadow:3px 3px 0 var(--ink);flex-shrink:0}.team-count b{font-size:42px;line-height:1.1}.team-count span{font-size:12px;font-weight:800;white-space:nowrap}.team-lead{font-size:14px;line-height:1.8;margin:24px 0 20px}.roster-summary{list-style:none;margin:0 0 22px;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}.roster-summary li{display:flex;align-items:center;gap:12px;padding:13px;border:var(--line);background:var(--white);min-width:0}.player-number{width:35px;height:35px;display:grid;place-items:center;background:var(--ink);color:var(--paper);font-size:15px;font-weight:900;flex-shrink:0}.roster-summary strong{display:block;font-size:14px}.roster-summary li div>span{display:block;font-size:12px;margin-top:4px;color:var(--muted)}.roster-summary li.inactive{background:#e3e0d8;border-style:dashed}.roster-summary li.inactive .player-number{background:#55534d}.team-overview>.secondary{width:100%;background:var(--white);font-size:15px;padding:13px}.team-rule{font-size:12px;line-height:1.8;margin:17px 0 0}.team-overview .pool-message{background:var(--white)}.team-overview .pool-message ul{padding-left:18px;line-height:1.8}
dialog#team-dialog{width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:var(--line);box-shadow:7px 7px 0 var(--ink);background:var(--paper);color:var(--ink);overflow:auto}#team-dialog::backdrop{background:rgb(25 25 25 / .65)}.dialog-heading{display:flex;align-items:flex-start;gap:16px;justify-content:space-between;padding:24px;border-bottom:var(--line);background:var(--yellow)}.dialog-heading .eyebrow{font-size:10px;margin-bottom:8px}.dialog-heading h2{font-size:27px}.icon-button{min-width:44px;min-height:44px;font-size:28px;line-height:1;background:var(--white);border:var(--line);flex-shrink:0}.dialog-body{padding:0 24px 24px}.dialog-body>p{font-size:13px;line-height:1.8;margin:20px 0 14px}.roster-toolbar{display:flex;gap:12px;align-items:center;justify-content:flex-end;flex-wrap:wrap;margin-bottom:10px}.roster-toolbar>strong{font-size:13px;margin-right:auto}.player-fields{display:grid;gap:10px}.player-field{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:16px;padding:10px 12px;background:var(--white);border:var(--line)}.player-field>label{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:800;cursor:pointer;min-height:44px}.player-field input{width:20px;height:20px;accent-color:var(--ink);cursor:pointer}.player-field select{width:100%;min-width:0;min-height:44px;border:var(--line);padding:9px 28px 9px 10px;font:inherit;font-size:14px;background:var(--paper);color:var(--ink)}.player-field select:disabled{background:#d8d5ce;color:#55534d}.dialog-body>.form-error{background:#ffe2cf;border:var(--line);padding:12px;color:var(--ink);margin-bottom:0}.dialog-footer{padding:18px 24px;border-top:var(--line);display:flex;gap:14px;justify-content:flex-end;background:var(--white)}.dialog-footer .primary{width:auto;font-size:15px;padding:11px 18px}.dialog-footer .secondary{font-size:15px}
.team-results{margin-top:40px;scroll-margin-top:24px}.team-result-heading{display:flex;align-items:center;gap:20px;margin-bottom:24px;flex-wrap:wrap}.team-result-heading>div{margin-right:auto}.team-result-heading .eyebrow{font-size:11px;margin-bottom:9px}.team-result-heading h2{font-size:32px}.team-result-heading>.primary{width:auto;font-size:15px;padding:12px 18px}.team-result-heading .result-status{margin-left:0}.team-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:start}.team-card{min-width:0;overflow:hidden}.team-card-player{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:var(--line);padding:12px 16px;background:var(--ink);color:var(--paper);font-size:13px}.team-card-player>span{font-size:12px}.team-card-hero{display:grid;grid-template-columns:40% 60%;background:var(--white)}.team-portrait{background:var(--coral);border-right:var(--line);display:flex;align-items:center;justify-content:center;min-height:160px;min-width:0}.team-portrait img{width:100%;height:160px;object-fit:contain}.team-portrait .portrait-fallback{font-size:12px;padding:14px}.team-card-hero>div:last-child{padding:18px 14px;min-width:0}.team-hero-name{font-size:25px;font-weight:900;line-height:1.2;overflow-wrap:anywhere;margin:0 0 12px;letter-spacing:-.8px}.team-card-hero .role-badge{display:inline-block}.team-source{display:flex;min-height:44px;align-items:center;font-size:11px;line-height:1.5;margin-top:5px}.team-perks{display:grid;grid-template-columns:1fr}.team-perk{padding:16px;border-top:var(--line)}.team-perk.minor{background:var(--yellow)}.team-perk.major{background:var(--lilac)}.team-perk .perk-level{font-size:11px;padding-bottom:9px}.team-perk .perk-name-row{margin-top:12px;align-items:center}.team-perk h4{font-size:18px;line-height:1.4;margin:0;overflow-wrap:anywhere}.team-perk .perk-icon{width:40px;height:40px}.team-perk p{font-size:13px;line-height:1.75;margin:12px 0 0;overflow-wrap:anywhere}.team-result-bottom{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:24px}.team-result-bottom p{font-size:13px;color:var(--muted)}.team-result-bottom>a{display:flex;align-items:center;text-decoration:none}
@media(max-width:1100px){.team-overview{padding:22px}.team-heading h2{font-size:24px}.team-count{padding:10px 12px}.team-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.mode-bar{align-items:stretch;flex-direction:column;gap:12px;padding:14px 0;margin-bottom:22px}.mode-options label{flex:1}.mode-options label>span{padding:11px 10px;font-size:14px}.mode-bar>p{font-size:12px}.team-overview{padding:20px 16px}.team-heading{gap:14px}.team-heading h2{font-size:24px}.team-heading .eyebrow{font-size:9px}.team-count{padding:9px 12px}.team-count b{font-size:34px}.team-count span{font-size:10px}.team-lead{font-size:13px;margin:20px 0 16px}.roster-summary{gap:9px}.roster-summary li{padding:11px 8px;gap:8px}.player-number{width:28px;height:30px;font-size:12px}.roster-summary strong{font-size:13px}.roster-summary li div>span{font-size:11px}.team-cards{grid-template-columns:1fr;gap:24px}.team-results{margin-top:32px}.team-result-heading{gap:14px}.team-result-heading h2{font-size:27px}.team-result-heading>.primary{width:100%;justify-content:center}.team-result-heading .result-status{font-size:10px}.team-card-hero{grid-template-columns:42% 58%}.team-card-hero>div:last-child{padding:20px 16px}.team-hero-name{font-size:28px}.team-card-hero .team-source{font-size:12px}.team-perk{padding:18px}.team-perk h4{font-size:20px}.team-perk .perk-icon{width:44px;height:44px}.team-result-bottom{align-items:flex-start;flex-direction:column;gap:7px}.dialog-heading{padding:18px 16px;gap:8px}.dialog-heading h2{font-size:23px}.dialog-body{padding:0 14px 18px}.player-field{gap:10px;padding:8px}.player-field>label{font-size:13px;gap:7px}.player-field select{font-size:13px;padding-left:7px;padding-right:20px}.roster-toolbar{gap:10px}.roster-toolbar>strong{flex:1 0 100%}.dialog-footer{padding:14px;gap:12px}.dialog-footer .primary{font-size:13px;padding:10px 12px;flex:1}.dialog-footer .secondary{font-size:13px}.dialog-body>p{font-size:12px}.team-portrait .portrait-fallback{font-size:12px}}

/* v3 additions; approved v2 screens retain their established tokens. */
.settings-bar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:-9px 0 26px;padding:0 0 18px;border-bottom:1px solid var(--ink)}.settings-bar>p{margin:0;font-size:13px;font-weight:700;line-height:1.6}.settings-bar>.secondary{flex-shrink:0;background:var(--lilac)}#recent-status{display:flex;align-items:center;gap:12px;margin-left:auto;font-size:12px;color:var(--muted);line-height:1.6}#recent-status .text-action{white-space:nowrap}.global-selection{border:var(--line);background:var(--paper);padding:12px;margin:15px 0 9px}.global-selection>p{font-size:11px;line-height:1.6;margin:0 0 8px;color:var(--muted)}.global-selection>div{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.global-selection .secondary{font-size:12px;padding:8px 12px}.global-selection>div>span{font-size:12px;font-weight:700;margin-left:auto}.team-share-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:-4px 0 24px}.team-share-actions>p{font-size:13px;font-weight:800;margin:0}.perk-grid.one-perk{grid-template-columns:1fr}.result-bottom{justify-content:flex-start}.result-bottom>span{margin-right:auto}.shared-view{display:flex;gap:26px;align-items:center;justify-content:space-between;background:var(--blue);padding:28px;margin:30px 0}.shared-view h2{font-size:30px;line-height:1.25}.shared-view p:last-child{font-size:14px;line-height:1.8;margin:14px 0 0;max-width:660px}.shared-view>.secondary{flex-shrink:0}.is-shared .workspace{display:block;max-width:820px;margin:0 auto}.is-shared .team-results{margin-top:28px}.is-shared #reroll,.is-shared .back-to-pool,.is-shared #team-reroll,.is-shared .team-result-bottom{display:none}.is-shared .brand{cursor:default}.is-shared .result-bottom>span{display:none}.is-shared #result .result-heading{padding-top:0}
dialog.v3-dialog{width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:var(--line);box-shadow:7px 7px 0 var(--ink);background:var(--paper);color:var(--ink);overflow:hidden}dialog.v3-dialog::backdrop{background:rgb(25 25 25 / .65)}.v3-dialog>form,.v3-dialog[open]:not(:has(form)){display:flex;flex-direction:column;max-height:calc(100dvh - 36px)}.v3-dialog .dialog-heading,.v3-dialog .dialog-footer{flex-shrink:0}.v3-dialog .dialog-body{overflow-y:auto;min-height:0;scrollbar-width:thin}.v3-dialog .dialog-heading{background:var(--lilac)}.v3-dialog .dialog-heading h2{line-height:1.25}.setting-group{padding:13px 14px;border:var(--line);margin:20px 0 0;background:var(--white)}.setting-group legend{font-size:12px;font-weight:800;padding:0 6px}.setting-choice{display:flex;gap:12px;align-items:center;min-height:58px;cursor:pointer}.setting-choice input{width:21px;height:21px;accent-color:var(--ink);flex-shrink:0}.setting-choice strong{display:block;font-size:14px;line-height:1.5}.setting-choice small{display:block;font-size:12px;color:var(--muted);line-height:1.6;margin-top:3px}.setting-group>p{font-size:12px;color:var(--muted);line-height:1.7;margin:8px 0 0}.recent-group{background:var(--paper)}.number-setting{display:grid;grid-template-columns:1fr 88px;gap:8px 16px;align-items:center;padding-top:12px;margin-top:10px;border-top:1px solid var(--ink)}.number-setting label{font-size:13px;font-weight:800;line-height:1.6}.number-setting input{width:100%;min-height:44px;font:inherit;font-weight:800;border:var(--line);background:var(--white);padding:8px;color:var(--ink)}.number-setting input:disabled{background:#d8d5ce;color:#55534d;opacity:1}.number-setting input[aria-invalid=true]{border-color:#8f271c;background:#ffe2cf}.number-setting>p{grid-column:1/-1;font-size:12px;line-height:1.7;margin:0;color:var(--muted)}.number-setting>.form-error{color:#8f271c;font-weight:800}#share-field>label{display:block;font-size:12px;line-height:1.6;font-weight:800;margin:22px 0 9px}#share-value{width:100%;min-height:108px;max-height:220px;resize:vertical;border:var(--line);padding:12px;background:var(--white);color:var(--ink);font:13px/1.7 ui-monospace,Consolas,monospace;overflow-wrap:anywhere}#share-value:focus-visible,.number-setting input:focus-visible,.setting-choice input:focus-visible{outline:3px solid var(--ink);outline-offset:3px;box-shadow:0 0 0 2px var(--paper)}.dialog-body>.notice{border:var(--line);background:var(--yellow);padding:12px;line-height:1.7;font-size:12px}.dialog-body>#share-feedback{font-size:13px;font-weight:800;line-height:1.7;margin-bottom:0}#share-dialog .dialog-footer{flex-wrap:wrap}#share-dialog .dialog-footer .primary{flex:1}
@media(max-width:920px){#recent-status{margin-left:0;flex-basis:100%}.shared-view{align-items:flex-start;flex-direction:column;gap:18px}.shared-view h2{font-size:27px}.settings-bar{gap:12px}.team-share-actions{margin-top:0}}
@media(max-width:600px){.settings-bar{gap:12px;margin-top:-6px;margin-bottom:22px}.settings-bar>p{font-size:12px;flex:1;min-width:140px}.settings-bar>.secondary{font-size:13px}.global-selection{padding:10px}.global-selection>div{gap:10px}.global-selection>div>span{font-size:11px}.global-selection>p{font-size:11px}#recent-status{justify-content:space-between;gap:8px;font-size:11px}.shared-view{padding:20px 16px;margin:24px 0}.shared-view h2{font-size:25px}.shared-view p:last-child{font-size:13px}.shared-view>.secondary{width:100%}.setting-group{padding:10px;margin-top:17px}.setting-group legend{font-size:11px}.setting-choice{gap:10px}.setting-choice strong{font-size:13px}.setting-choice small,.setting-group>p{font-size:11px}.number-setting{grid-template-columns:1fr 72px;gap:8px 10px}.number-setting label{font-size:12px}.number-setting>p{font-size:11px}.v3-dialog .dialog-heading h2{font-size:23px}.v3-dialog .dialog-footer .primary{font-size:13px}.team-share-actions{gap:12px}.team-share-actions .secondary{font-size:12px;padding:10px 12px}.team-share-actions>p{flex-basis:100%}.result-bottom>.secondary{font-size:12px;padding:10px 12px;margin-right:0}.result-bottom>span{display:none}.is-shared .result-heading{flex-wrap:wrap}.is-shared .result-status{margin-left:auto}}
/* v3.2: custom player names and settings alongside the mode control. */
.team-rule{text-align:center}
.mode-options{flex-shrink:0}
.mode-bar>#mode-help{flex:1;min-width:0}
.mode-bar>.settings-bar{margin:0 0 0 auto;padding:0;border:0;max-width:45%;gap:12px;flex-wrap:nowrap}
.mode-bar #settings-summary{min-width:0;max-width:210px;font-size:12px;line-height:1.6}
.history-bar{display:flex;justify-content:flex-end;margin:-9px 0 26px;padding:0 0 18px;border-bottom:1px solid var(--ink)}
.history-bar #recent-status{margin-left:0;flex-basis:auto}
.player-field>.player-name-field{grid-column:1/-1;display:grid;gap:5px;font-size:12px;font-weight:700;cursor:default;min-width:0}
.player-field .player-name-input{width:100%;min-width:0;height:44px;border:var(--line);padding:9px 10px;font:inherit;font-size:14px;background:var(--paper);color:var(--ink);cursor:text}
.player-name-input:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.player-name-input[aria-invalid="true"]{border-color:#a82c18;background:#ffe2cf}
.player-name-error{grid-column:1/-1;margin:0;font-size:12px;line-height:1.6;color:#a82c18}
.roster-summary li>div{min-width:0}
.roster-summary strong,.player-name{overflow-wrap:anywhere}
.player-identity{display:flex;gap:8px;align-items:baseline;min-width:0}
.player-slot{font-size:11px;flex-shrink:0}
.team-card-player>.assigned-role{flex-shrink:0}
@media(max-width:920px){.mode-bar{flex-wrap:wrap}.mode-bar>.settings-bar{max-width:none}}
@media(max-width:600px){.mode-bar>.settings-bar{margin:0;max-width:none}.mode-bar #settings-summary{max-width:none}.history-bar{margin-top:-6px}.player-name-field>span{font-size:12px}}
/* Expanded desktop roster, without an inner scroll area. */
@media(min-width:921px){
  .header-inner,.shell{width:calc(100% - 64px);max-width:1800px;margin-inline:auto}
  .workspace{display:flex;flex-direction:column;gap:30px;align-items:stretch}
  .pool-panel{width:100%}
  .pool-body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:24px;align-items:start}
  .pool-body>.roles{margin-bottom:0}
  .pool-body>.search-field{min-width:0}
  .pool-body>.global-selection{margin:0;min-width:0}
  .pool-body>.list-toolbar{grid-column:1/3;margin-top:12px;margin-bottom:4px}
  .pool-body>.selection-legend{grid-column:3;justify-content:flex-end;align-self:center;margin:12px 0 4px}
  #hero-grid{grid-column:1/-1;grid-template-columns:minmax(0,2fr) minmax(0,3fr) minmax(0,2fr);gap:24px;max-height:none;height:auto;overflow:visible;overscroll-behavior:auto;min-width:0;padding:4px 2px 8px}
  #hero-grid[data-groups="1"]{grid-template-columns:minmax(0,1fr)}
  #hero-grid[data-groups="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero-role-group{min-width:0}
  .hero-role-heading{display:flex;align-items:center;gap:8px;font-size:16px;line-height:1.5;margin:0 0 12px;padding:8px 0;border-bottom:2px solid var(--ink)}
  .hero-role-heading svg{width:18px;height:18px;fill:currentColor;flex-shrink:0}
  .role-visible-count{font-size:12px;font-weight:700;margin-left:auto;padding:1px 6px;background:var(--paper);border:1px solid var(--ink)}
  .role-heroes{display:grid;grid-template-columns:repeat(auto-fill,minmax(54px,1fr));gap:9px 6px;align-items:stretch}
  .hero-role-group .hero-option{align-self:stretch}
  .hero-role-group .hero-label{flex:1}
  .pool-body>.no-match,.pool-body>.pool-message,.pool-body>.draw-zone{grid-column:1/-1}
  .pool-body>.draw-zone{display:flex;flex-direction:column;gap:12px;align-items:center;margin-top:16px}
  .pool-body>.draw-zone>.primary{width:auto;min-width:280px;max-width:100%;flex-shrink:0}
  .pool-body>.draw-zone>p{margin:0;text-align:center;font-size:12px}
  .workspace>.result-panel{width:100%;max-width:1000px;align-self:center}
  body:not(.is-shared) .back-to-pool{display:flex}
  .workspace>.team-overview{width:100%;max-width:1280px;align-self:center}
  .team-overview .roster-summary{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
  .team-overview .roster-summary li{padding:10px;gap:8px}
  .team-overview>.secondary{display:flex;justify-content:center;width:auto;min-width:260px;margin-inline:auto}
  .team-overview .team-lead{margin:16px 0}
}
/* S01 selection: explicit user choice bright blue; continuation after third provisional palette. */
.selection-legend{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:4px 0 12px;font-size:11px;line-height:1.5}.selection-legend>span{display:flex;gap:6px;align-items:center}.selection-legend b{width:21px;height:21px;display:grid;place-items:center;border:2px solid var(--ink);font-size:15px}.legend-checked{background:#168af0;border-color:#07539e!important}.legend-empty{background:var(--white)}.hero-thumb{border:3px solid #77736c;background:var(--paper)}.hero-check{visibility:visible;width:24px;height:24px;border:2px solid var(--ink);background:var(--white);color:transparent;font-size:18px;line-height:1;bottom:3px;right:3px}.hero-option input:checked~.hero-thumb{border-color:#07539e;background:#e5f2ff}.hero-option input:checked~.hero-thumb .hero-check{background:#168af0;color:var(--ink);border-color:#07539e}.hero-label{display:flex;align-items:center;justify-content:center;min-height:34px;margin-top:0;padding:5px 2px;background:var(--paper);border:1px solid #77736c;border-top:0;color:var(--ink)}.hero-option input:checked~.hero-label{background:#d5eaff;color:var(--ink);border-color:#07539e}.hero-option input:focus-visible~.hero-thumb{outline:3px solid var(--ink);outline-offset:3px;box-shadow:0 0 0 2px var(--paper)}.hero-option:hover .hero-thumb{box-shadow:2px 2px 0 var(--ink)}
