:root{--green:#154c3c;--leaf:#678442;--cream:#f8f6ee;--gold:#dba94c;--ink:#243c33;--muted:#64756b;--line:#dce4da}*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font:16px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,textarea,select{font:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:10px;padding:12px 18px;background:var(--green);color:white;font-weight:700;text-decoration:none;cursor:pointer;min-height:46px}button:hover,.button:hover{filter:brightness(1.12)}button:disabled{opacity:.5;cursor:not-allowed}button.secondary{background:#fff;color:var(--green);border-color:var(--line)}button.danger{background:#fff;color:#963d32;border-color:#e5b8ae}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #d79528;outline-offset:3px}[hidden]{display:none!important}a{color:var(--green)}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.8rem,3.6vw,2.8rem);letter-spacing:-.04em;line-height:1.1;margin-bottom:12px}h2{font-size:1.65rem;letter-spacing:-.03em;line-height:1.2}h3{font-size:1.15rem;line-height:1.35}.top{display:flex;align-items:center;gap:22px;padding:14px max(20px,calc((100vw - 1160px)/2));background:#fff;border-bottom:1px solid var(--line)}.top img{width:142px;max-height:70px;object-fit:contain}.top>span{font-size:.88rem;font-weight:700;color:var(--muted)}.top>a:last-child{margin-left:auto;font-size:.9rem;text-decoration:none;font-weight:700}main{max-width:1200px;margin:auto;padding:26px 20px 50px}.private-note{display:flex;gap:16px;align-items:center;border:1px solid #e5d5b2;background:#fff8e8;border-radius:10px;padding:12px 18px;font-size:.86rem}.private-note strong{white-space:nowrap;letter-spacing:.06em;color:#866323}.workspace-head{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:30px 0}.eyebrow{font-size:.73rem;font-weight:800;letter-spacing:.16em;color:var(--leaf);margin-bottom:9px}.actions{display:flex;align-items:end;gap:12px}label{display:grid;gap:6px;font-size:.88rem;font-weight:700}select,input,textarea{border:1px solid #bccbbf;border-radius:8px;padding:11px 12px;background:#fff;color:var(--ink);min-height:46px;max-width:100%;width:100%}.actions select{max-width:310px}.tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);margin-bottom:24px;padding-bottom:12px;flex-wrap:wrap}.tabs button{background:transparent;color:var(--muted)}.tabs button.active{background:var(--green);color:#fff}.hero{position:relative;overflow:hidden;background:var(--green);color:#fff;border-radius:20px;padding:38px 40px;margin-bottom:26px}.hero:after{content:'★';position:absolute;right:25px;top:-18px;font-size:210px;line-height:1;color:#ffffff08;transform:rotate(15deg);pointer-events:none}.hero .eyebrow{color:#e7c47d}.hero h2{font-size:clamp(1.8rem,3.3vw,2.6rem);max-width:760px;margin-bottom:14px}.hero p{max-width:730px;color:#e0e8db}.hero-meta{display:flex;gap:12px;flex-wrap:wrap;font-size:.8rem}.hero-meta span{border:1px solid #ffffff30;border-radius:30px;padding:5px 12px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:26px 0 18px}.section-title h2{margin-bottom:0}.section-title>p{font-size:.86rem;color:var(--muted);margin-bottom:0}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.candidate{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden}.candidate-top{padding:22px;background:linear-gradient(140deg,#e9eddf,#f9f5e8);min-height:102px;display:flex;align-items:center;justify-content:space-between}.candidate-top strong{font:700 32px/1 Georgia,serif;color:var(--green)}.candidate-top span{font-size:.73rem;font-weight:700;letter-spacing:.05em;color:var(--leaf)}.candidate-body{padding:22px;display:flex;flex-direction:column;flex:1}.candidate-body p{font-size:.9rem;color:var(--muted);white-space:pre-line}.candidate button{width:100%;margin-top:auto}.candidate.is-chosen{border:2px solid var(--leaf)}.score{font-size:.86rem;margin:18px 0 8px}.score strong{font-size:1.4rem;color:var(--green)}.meter{height:6px;border-radius:10px;overflow:hidden;background:#edf0e8;margin-bottom:8px}.meter span{height:100%;display:block;background:var(--leaf)}.subtle{font-size:.78rem;color:var(--muted)}.pill{display:inline-block;background:#eef3e7;color:#4b6938;border-radius:20px;padding:4px 10px;font-size:.73rem;font-weight:800;letter-spacing:.05em}.empty,.champion{background:#fff;padding:36px;border:1px solid var(--line);border-radius:16px;text-align:center}.champion{background:#fff9e9;border-color:#e6d29e}.champion .star{color:#b88a2d;font-size:45px}.champion h3{font-size:1.8rem;margin:12px}.bracket{display:grid;grid-template-columns:repeat(var(--rounds,3),minmax(215px,1fr));gap:20px;overflow-x:auto;padding:4px 2px 16px}.round{display:flex;flex-direction:column;gap:14px}.round>h3{font-size:.78rem;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);margin-bottom:0}.match{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px}.match.current{border:2px solid var(--leaf)}.match-head{display:flex;justify-content:space-between;gap:6px;font-size:.78rem;color:var(--muted);margin-bottom:12px}.match-row{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid #eef1e9;padding:9px 0;font-size:.85rem}.match-row b{min-width:22px;text-align:right}.match-row.winner{color:#356120;font-weight:800}.match-row.unknown{color:#849085;font-style:italic}.panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px;margin:20px 0}.panel summary{font-weight:800;cursor:pointer}.panel summary+p{margin-top:15px;color:var(--muted);font-size:.9rem}.rules li{margin:8px 0}.rules p{font-size:.86rem;color:var(--muted)}.participant-row{display:flex;align-items:center;gap:14px;border-top:1px solid var(--line);padding:12px 0}.participant-row>span{color:var(--muted);font-size:.8rem;width:24px}.participant-row>div{flex:1;min-width:0}.participant-row strong{overflow-wrap:anywhere}.participant-row small{display:block;color:var(--muted)}.participant-row button{font-size:.8rem;padding:6px 12px;min-height:38px}.test-controls{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}.simulations{display:grid;gap:8px}.sim-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f6f8f2;padding:12px;border-radius:10px}.sim-row>div{display:flex;gap:8px}.sim-row button{padding:8px 12px;font-size:.8rem;white-space:nowrap}.reset-panel p{font-size:.9rem;color:var(--muted)}#feedback{border:1px solid #c4d8ad;background:#f0f8e8;padding:14px 18px;border-radius:10px;margin:12px 0;color:#315226}#feedback.error{border-color:#e4b2ac;background:#fff0ed;color:#8d3029}.gate{max-width:650px;margin:60px auto;background:#fff;border-radius:20px;border:1px solid var(--line);padding:40px}.gate h1{margin-top:18px}.gate .button{margin-bottom:12px}.gate button{margin-left:8px}.gate-actions p{font-size:.9rem}footer{text-align:center;padding:24px;color:var(--muted);font-size:.8rem}dialog{border:0;border-radius:18px;padding:28px;width:min(560px,calc(100% - 28px));max-height:90vh;overflow:auto;color:var(--ink);box-shadow:0 20px 80px #123b3440}dialog::backdrop{background:#102c25a8}dialog form{display:grid;gap:16px}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:15px}.dialog-head h2{margin:0}.help{font-size:.85rem;color:var(--muted);margin:0}.form-error{color:#963d32;margin:0}.form-error:empty{display:none}.vote-note{padding:12px 16px;background:#ebf2e3;border-radius:10px;margin-bottom:18px}.inline-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:18px 0}.inline-actions p{margin:0;font-size:.85rem;color:var(--muted)}
@media(max-width:800px){.workspace-head{align-items:start;flex-direction:column}.actions{width:100%;flex-wrap:wrap}.actions label{flex:1;min-width:200px}.actions select{max-width:none}.hero{padding:28px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.bracket{grid-template-columns:repeat(var(--rounds,3),minmax(235px,1fr))}.section-title{align-items:start;flex-direction:column}.top>span{display:none}}
@media(max-width:520px){main{padding:18px 14px 35px}.top{padding:12px 16px;gap:10px}.top img{width:118px}.top>a:last-child{font-size:.78rem}.private-note{display:block}.private-note strong{display:block;margin-bottom:4px}.tabs{gap:3px}.tabs button{font-size:.83rem;padding:10px}.cards{grid-template-columns:1fr}.candidate-top{min-height:80px}.hero{padding:26px 22px}.sim-row{align-items:start;flex-direction:column}.sim-row>div{width:100%}.sim-row button{flex:1}.gate{margin:24px auto;padding:25px}.gate button{margin-left:0}.inline-actions{align-items:start;flex-direction:column}.panel{padding:18px}}
.hero{display:flex;align-items:center;gap:18px;min-height:280px}.hero:after{display:none}.hero-copy{position:relative;z-index:1;flex:1}.hero-art{width:30%;max-height:240px;object-fit:cover;border-radius:14px}.settings-form{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:20px}.settings-form>label:nth-child(2),.settings-form>p,.settings-form>div{grid-column:1/-1}.settings-form>button{justify-self:start}.criteria-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:15px 0}.rating-criterion{border:0;border-bottom:1px solid var(--line);padding:0 0 14px;margin:0 0 14px}.rating-criterion legend{font-weight:700;font-size:.9rem;margin-bottom:8px}.rating-options{display:flex;gap:10px}.rating-options label{position:relative;flex:1;cursor:pointer}.rating-options input{position:absolute;opacity:0;width:1px;height:1px;min-height:0}.rating-options span{display:flex;align-items:center;justify-content:center;background:#f3f5ef;border:1px solid var(--line);border-radius:8px;height:44px;font-size:1.05rem;font-weight:800}.rating-options input:checked+span{background:var(--green);color:#fff;border-color:var(--green)}.rating-options input:focus-visible+span{outline:3px solid var(--gold);outline-offset:2px}.rating-total{background:#edf3e6;border-radius:12px;padding:16px;display:grid;grid-template-columns:1fr auto;gap:8px}.rating-total strong{font-size:1.5rem;color:var(--green)}.rating-total small{grid-column:1/-1;color:var(--muted)}.criterion-details{margin:0 0 16px;font-size:.8rem}.criterion-details summary{cursor:pointer;font-weight:700;margin-bottom:8px}.criterion-details>div{display:flex;justify-content:space-between;gap:10px;padding:5px 0;border-top:1px solid #edf1e8}.criterion-details b{white-space:nowrap}
@media(max-width:650px){.hero{display:block}.hero-art{width:100%;height:140px;object-fit:contain;margin-top:20px;background:#ffffff08}.settings-form{grid-template-columns:1fr}.criteria-fields{grid-template-columns:1fr 1fr}.settings-form>*{grid-column:1/-1}.rating-options{gap:6px}}
.is-busy button{cursor:progress;pointer-events:none}.rating-options input:checked+span:after{content:'✓';font-size:.7rem;margin-left:5px}
.result-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px 0}.result-summary>div{padding:20px;background:#fff;border:1px solid var(--line);border-radius:12px}.result-summary strong{display:block;color:var(--green);font-size:1.8rem}.result-summary span{font-size:.8rem;color:var(--muted)}.result-filter{max-width:330px;margin:18px 0}.results-table-wrap{overflow-x:auto;background:#fff;border:1px solid var(--line);border-radius:12px}.results-table-wrap table{border-collapse:collapse;width:100%;min-width:740px;text-align:left;font-size:.87rem}.results-table-wrap caption{text-align:left;padding:14px 18px;font-weight:700}.results-table-wrap th{background:#edf2e6;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em}.results-table-wrap td,.results-table-wrap th{padding:13px 15px;border-bottom:1px solid var(--line)}.results-table-wrap small{display:block;color:var(--muted);font-size:.75rem}.result-winner{background:#f4f8ef;color:#315d2b}@media(max-width:520px){.result-summary{grid-template-columns:1fr;gap:8px}.result-summary>div{display:flex;align-items:center;gap:16px;padding:14px}.result-summary strong{font-size:1.4rem;min-width:80px}}
#bracket{display:block;overflow:visible;padding:0}.cup-controls{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}.cup-controls p{font-size:.88rem;color:var(--muted);margin:0}.cup-controls button{white-space:nowrap}.cup-scroll{overflow:auto;border:1px solid #d3dfc9;border-radius:18px;background:#edf1e6}.cup-sizing{position:relative}.cup-board{position:relative;transform-origin:top left;background:radial-gradient(ellipse at center,#fff9e9 0%,#f1f3e6 45%,#e4eddf 100%);color:var(--ink);overflow:hidden}.cup-board:before{content:'';position:absolute;inset:0;background:repeating-linear-gradient(135deg,transparent,transparent 85px,#ffffff35 85px,#ffffff35 100px);pointer-events:none}.cup-title{position:absolute;top:23px;left:20px;right:20px;text-align:center;font-size:24px;font-weight:850;color:var(--green);letter-spacing:.1em}.cup-round-label{position:absolute;text-align:center;font-size:11px;font-weight:800;letter-spacing:.08em;color:var(--muted)}.cup-lines{position:absolute;left:0;top:0;pointer-events:none;fill:none;stroke:#6f8f61;stroke-width:3}.cup-node{position:absolute;padding:0;border:2px solid #8da27f;border-radius:9px;box-shadow:0 7px 16px #254a3010;overflow:hidden}.cup-node.current{border-color:#b48933}.cup-node .match-head{background:var(--green);color:#fff;padding:9px 12px;height:36px;margin:0;font-size:11px;align-items:center}.cup-node.current .match-head{background:#8b692b}.cup-node .match-row{margin:0;padding:7px 11px;font-size:12px;line-height:1.25;height:54px;border-top:0;border-bottom:1px solid #e2e8db;background:#fff}.cup-node .match-row>span{max-width:165px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.cup-node .match-row b{font-size:17px;min-width:44px;color:var(--green)}.cup-node .match-row.winner{background:#eaf3e2}.cup-node .match-row.unknown{font-size:11px;background:#fafbf7}.cup-node-footer{font-size:10px;color:var(--muted);padding:7px 11px;background:#f7f8f2}.cup-final{border:3px solid #c59a49;box-shadow:0 10px 24px #81622020}.cup-final .match-head{background:#ad8031}.cup-champion{position:absolute;text-align:center;color:var(--green);padding:10px}.cup-champion>span{font-size:45px;line-height:1;color:#b48831;display:block;margin-bottom:10px}.cup-champion>strong{display:block;font-size:11px;letter-spacing:.12em}.cup-champion>p{font-size:13px;margin-top:10px;line-height:1.4}.cup-controls+p,.cup-scroll+p{margin-top:12px}@media(max-width:520px){.cup-controls{align-items:start;flex-direction:column}}
.cup-champion>svg{display:block;width:52px;height:52px;margin:0 auto 10px;color:#b48831}
#rating-dialog{padding:24px}#rating-form{gap:12px}.rating-criterion{margin-bottom:8px;padding-bottom:8px}.rating-criterion legend{font-size:.86rem;line-height:1.4;margin-bottom:4px}.rating-total{padding:12px;gap:4px}#rating-submit{position:sticky;bottom:0;box-shadow:0 -4px 12px #fff}
