:root {--tour-border:#19405b;--tour-panel:#081d2e;--tour-muted:#85a5be;--tour-blue:#39aaff;--tour-soft:#b6d7ef}
.tour-page{color:#e8f4ff;min-height:calc(100vh - 88px);background:linear-gradient(135deg,#071420 0,#06101d 65%,#071b2b 100%);padding:24px 22px 55px}
.tour-page *{box-sizing:border-box}.tour-page button,.tour-page select,.tour-page textarea{font:inherit}
.tour-hero{max-width:1780px;margin:0 auto 21px;padding:28px 34px 26px;border-radius:16px;border:1px solid #1d4968;display:flex;justify-content:space-between;align-items:center;min-height:205px;background:radial-gradient(ellipse at 82% 10%,rgba(21,103,162,.19),transparent 52%),linear-gradient(116deg,#0d2236,#071724 78%);overflow:hidden}
.tour-kicker,.tour-eyebrow{color:#65bdff;font-size:10px;font-weight:900;letter-spacing:.14em}.tour-kicker{display:flex;align-items:center;gap:9px}.tour-dot{width:9px;height:9px;background:#3febaa;border-radius:50%;box-shadow:0 0 12px #24b881}.tour-hero h1{font-size:clamp(24px,3.2vw,42px);font-weight:1000;letter-spacing:-.035em;margin:14px 0 8px}.tour-hero h1 span{color:#4eb9fc}.tour-hero p{font-size:12px;line-height:1.6;color:#9dbbd0;margin:0 0 20px}.tour-hero-logo{font-weight:1000;font-size:100px;opacity:.17;transform:skew(-13deg);color:#4eaef0;letter-spacing:-.16em;padding-right:65px;display:grid;line-height:1}.tour-hero-logo small{font-size:13px;letter-spacing:.33em;margin-left:4px}
.tour-regions{display:flex;flex-wrap:wrap;gap:9px}.tour-regions button{display:flex;gap:8px;align-items:center;border:1px solid #2d5270;background:#0b253b;border-radius:9px;color:#cce5f8;padding:10px 14px;cursor:pointer;font-size:13px;transition:all .2s}.tour-regions button.active{background:#133e5c;color:#fff;border-color:#44abf2;box-shadow:inset 0 -2px #3daefe}.tour-regions button small{color:#7a9bb3;font-size:10px}.tour-regions button.active small{color:#b3d8ec}
.tour-main{max-width:1780px;margin:auto}.tour-notice{border:1px solid #2b8bcb;border-radius:9px;background:#0e304a;color:#b8e4ff;padding:12px 16px;margin:0 0 15px;font-size:12px}.tour-notice.error{border-color:#ad4e63;background:#2f111e;color:#ffb1bf}.tour-notice[hidden]{display:none!important}
.tour-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:15px 0}.tour-heading{display:flex;align-items:center;gap:13px}.tour-heading-icon{border:1px solid #255a80;border-radius:12px;width:50px;height:50px;display:grid;place-items:center;background:#0c3047;font-size:24px}.tour-heading h2{font-size:20px;margin:3px 0}.tour-heading p{font-size:11px;color:var(--tour-muted);margin:0}.tour-tools{display:flex;align-items:end;gap:9px;flex-wrap:wrap}.tour-tools button,.tour-header-signin,.tour-editor-actions button,.tour-head-right button{min-height:38px;border:1px solid #2a5678;border-radius:8px;background:#0e2c44;color:#d3eaff;cursor:pointer;padding:0 14px;font-size:11px;font-weight:850;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.tour-tools .tour-primary,.tour-editor-actions .tour-primary{color:white;border-color:#128de9;background:linear-gradient(125deg,#138ceb,#095fb2)}.tour-history-label{display:grid;gap:4px;color:#8bafc9;font-size:10px;font-weight:800}.tour-history-label select{height:38px;border:1px solid #2a5678;background:#0a2133;color:#e5f6ff;border-radius:8px;padding:0 13px;min-width:166px;max-width:240px}.tour-header-signin{padding:8px 15px}
.tour-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px}.tour-stats>div{border:1px solid var(--tour-border);border-radius:11px;padding:17px 16px;background:linear-gradient(160deg,#0d2436,#0b1c2d);min-height:91px}.tour-stats small{display:block;color:#7cb5de;font-size:10px;font-weight:900;letter-spacing:.08em;margin-bottom:10px}.tour-stats strong{font-size:24px;font-weight:900;color:#f5fbff;overflow-wrap:anywhere}.tour-stats .tour-status-text{font-size:16px;color:#60dca6}.tour-stats .tour-champion{font-size:18px;color:#ffda83}
.tour-studio{background:linear-gradient(140deg,#0d2a40,#0c1e2c);border:1px solid #2875a6;border-radius:13px;margin-bottom:17px;padding:23px;box-shadow:0 10px 40px #02091555}.tour-studio[hidden]{display:none!important}.tour-studio-top{display:flex;align-items:start;justify-content:space-between;gap:14px}.tour-studio h3{font-size:20px;margin:8px 0}.tour-studio p{font-size:11px;color:#91bad2;line-height:1.6;margin:5px 0 16px}.tour-close{border:0;background:transparent;color:#bed7e6;font-size:17px;cursor:pointer}.tour-studio-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.tour-players-edit label{display:flex;justify-content:space-between;color:#bfe7ff;font-weight:850;font-size:12px;margin-bottom:9px}.tour-players-edit label span{font-weight:600;color:#779bb6}.tour-players-edit textarea{display:block;width:100%;height:236px;resize:vertical;background:#061726;color:#f1faff;padding:13px 15px;line-height:1.7;border:1px solid #2d6183;border-radius:9px;outline:0}.tour-players-edit textarea:focus{border-color:#43a6f0}.tour-players-edit p{margin-top:6px}.tour-editor-tip{background:#062335;border:1px solid #245774;border-radius:10px;padding:14px}.tour-editor-tip b{font-size:12px;color:#7ecbff}.tour-editor-tip p{margin:8px 0 0}.tour-seed-preview{margin-top:12px;min-height:53px;border:1px dashed #2b5270;border-radius:8px;padding:12px;color:#a6cce5;font-size:11px;line-height:1.7;overflow-wrap:anywhere}.tour-editor-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}.tour-editor-actions button{min-height:41px}.tour-editor-actions button:disabled{opacity:.45;cursor:wait}
.tour-bracket-card{background:linear-gradient(180deg,#0b2031,#081725);border:1px solid var(--tour-border);border-radius:13px;overflow:hidden;min-height:400px}.tour-bracket-head{padding:20px 23px;display:flex;justify-content:space-between;gap:15px;align-items:center;border-bottom:1px solid #1c4661;background:#0e2639}.tour-bracket-head h3{margin:7px 0 5px;font-size:19px}.tour-bracket-head p{font-size:11px;color:#89b2cf;margin:0}.tour-head-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.tour-tag{font-weight:900;font-size:10px;letter-spacing:.06em;border:1px solid #275e7c;border-radius:30px;background:#0c3248;padding:8px 12px;color:#8bd0ff}.tour-bracket-scroll{overflow:auto;width:100%;padding:35px 26px 45px;scrollbar-color:#255d85 #071521;scrollbar-width:thin}.tour-bracket{display:flex;gap:70px;align-items:stretch;min-height:260px;width:max-content;min-width:100%}.tour-round{width:240px;flex:0 0 240px;display:flex;flex-direction:column}.tour-round-heading{text-align:center;margin-bottom:21px;padding:0 4px;height:32px}.tour-round-heading b{color:#a7d5f5;font-weight:900;font-size:12px}.tour-round-heading small{display:block;color:#6f94af;font-size:10px;margin-top:5px}.tour-round-games{flex:1;display:flex;flex-direction:column;justify-content:space-around;gap:20px}.tour-match{position:relative;background:#102c42;border:1px solid #285a78;border-radius:9px;overflow:visible;min-height:86px;box-shadow:0 6px 16px #0003}.tour-match:not(.tour-last-match):after{content:"";position:absolute;right:-35px;top:50%;width:35px;border-top:2px solid #28648a}.tour-match-number{font-weight:900;color:#6098bb;font-size:9px;letter-spacing:.08em;padding:7px 11px 5px;border-bottom:1px solid #204560}.tour-match-player{display:flex;justify-content:space-between;gap:6px;align-items:center;min-height:32px;border:0;border-bottom:1px solid #214661;border-radius:0;padding:7px 11px;color:#d6eafa;background:transparent;width:100%;text-align:left;font-size:11px}.tour-match-player:last-child{border-bottom:0}.tour-match-player span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tour-match-player small{font-size:10px;color:#7092a9;flex-shrink:0}.tour-match-player.winner{background:#133e40;color:#83efbd;font-weight:900}.tour-match-player.winner small{color:#76e6b0}.tour-match-player.awaiting{color:#6c8ca1;font-style:italic}.tour-match-player.can-select{cursor:pointer}.tour-match-player.can-select:hover{background:#1c4e6d;color:white}.tour-match-player:disabled{cursor:default}.tour-match-player.auto{opacity:.94}.tour-round:last-child .tour-match{border-color:#876b32;box-shadow:0 0 16px #cf942015}.tour-round:last-child .tour-round-heading b{color:#ffd785}.tour-round:last-child .tour-match-number{color:#d8aa5c}.tour-round-empty{font-size:11px;color:#708ca4;margin:auto}.tour-no-players-inline{display:flex;align-items:center;justify-content:center;width:100%;height:240px;color:#82acc8;font-size:12px}
.tour-empty{text-align:center;padding:65px 20px}.tour-empty[hidden]{display:none!important}.tour-empty>div{font-size:45px;color:#70b6f0}.tour-empty h3{font-size:20px;margin:12px 0}.tour-empty p{font-size:12px;color:#8faec4;max-width:480px;margin:auto;line-height:1.65}.tour-bracket-footer{padding:13px 23px;border-top:1px solid #1d4159;display:flex;justify-content:space-between;gap:15px;font-size:10px;color:#7ba0bc}.tour-bottom{margin-top:16px;display:flex;gap:17px;justify-content:space-between;align-items:center;border:1px solid #1b4560;background:#0b2132;border-radius:11px;padding:16px 20px}.tour-bottom-info strong{font-size:10px;color:#9dd5fb;letter-spacing:.1em}.tour-bottom-info p{color:#82a4bc;font-size:11px;max-width:790px;line-height:1.6;margin:7px 0 0}.tour-bottom-next{text-align:right;display:grid;gap:5px;white-space:nowrap}.tour-bottom-next small{color:#6994b1;font-size:9px;font-weight:900}.tour-bottom-next b{font-size:14px}.tour-bottom-next span{color:#79a4be;font-size:10px}.tour-page.tour-expanded .tour-bracket-card{position:fixed;inset:10px;z-index:9999;border-radius:12px;display:flex;flex-direction:column;box-shadow:0 0 0 100vh #000d}.tour-page.tour-expanded .tour-bracket-scroll{flex:1}
@media(max-width:900px){.tour-hero-logo{display:none}.tour-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.tour-toolbar{flex-wrap:wrap}.tour-studio-grid{grid-template-columns:1fr}.tour-editor-actions{justify-content:flex-start}}
@media(max-width:620px){.tour-page{padding:13px 10px 35px}.tour-hero{padding:22px 16px}.tour-regions button small{display:none}.tour-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.tour-stats>div{padding:12px;min-height:70px}.tour-stats strong{font-size:20px}.tour-bracket-head{padding:16px 13px;flex-wrap:wrap}.tour-bracket-scroll{padding:25px 15px}.tour-round{width:220px;flex-basis:220px}.tour-bracket{gap:50px}.tour-match:not(.tour-last-match):after{width:25px;right:-25px}.tour-bottom{flex-direction:column;align-items:start}.tour-bottom-next{text-align:left}.tour-history-label select{min-width:140px}.tour-tools{width:100%}}

/* Bracket junctions drawn from actual rendered round positions. */
.tour-bracket{position:relative}
.tour-connections{position:absolute;top:0;left:0;pointer-events:none;z-index:0;overflow:visible}
.tour-round{position:relative;z-index:1}
.tour-match:not(.tour-last-match):after{display:none}
@media(max-width:1050px){html[data-page="tournament"] .site-header{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between}html[data-page="tournament"] .main-nav{order:3;width:100%;display:flex!important;overflow:auto;justify-content:flex-start}html[data-page="tournament"] .main-nav .nav-item{display:flex!important;flex-shrink:0}}
/* v71 tournament management and completed archives */
.tour-tools .tour-danger{background:#2b1422;border-color:#a23c53;color:#ffd6db}
.tour-tools .tour-danger:hover{background:#522032;border-color:#fa6b80}
.tour-late-player{margin-top:16px;padding:16px;background:#0a2232;border:1px solid #386580;border-radius:10px;display:grid;gap:9px}
.tour-late-player label{font-size:12px;font-weight:800;color:#c1e5ff}
.tour-late-row{display:flex;gap:8px;flex-wrap:wrap}
.tour-late-row input{min-width:180px;flex:1;background:#051826;color:white;border:1px solid #39749a;border-radius:8px;padding:11px 12px}
.tour-late-player button{min-height:38px;border-radius:8px;border:1px solid #3975a1;background:#113b59;color:white;font-weight:800;padding:0 12px;cursor:pointer}
.tour-late-player .tour-wide-shuffle{width:100%;border-color:#a17437;background:#322414;color:#ffdfad}
.tour-late-player small{color:#8bafc8;line-height:1.5}
.tour-archive{margin-top:20px;padding:22px 23px;background:linear-gradient(145deg,#10283a,#0a1b29);border:1px solid #2d526c;border-radius:12px}
.tour-archive-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.tour-archive-head h3{font-size:21px;margin:6px 0}.tour-archive-head p{font-size:11px;color:#91b6d0;margin:0}
.tour-archive-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:11px}
.tour-archive-entry{display:grid;gap:7px;text-align:left;border:1px solid #285a75;border-radius:10px;background:#0b253a;color:#e4f5ff;cursor:pointer;padding:15px}
.tour-archive-entry:hover,.tour-archive-entry.active{border-color:#54aeea;background:#12405c}
.tour-archive-entry strong{font-size:15px;color:#ffd88c;overflow-wrap:anywhere}
.tour-archive-entry small,.tour-archive-date,.tour-archive-empty{font-size:11px;color:#94b8d1}
.tour-archive-empty{padding:10px}

/* v74: completed tournaments leave the active bracket and move to history. */
.tour-completed-banner{display:flex;align-items:center;gap:16px;justify-content:space-between;padding:20px 23px;background:linear-gradient(110deg,#123a34,#0b2635);border:1px solid #258c74;border-radius:13px;margin:0 0 17px;color:#d5fff3}
.tour-completed-banner[hidden],.tour-bracket-card[hidden]{display:none!important}
.tour-completed-banner .tour-completed-icon{font-size:28px}.tour-completed-banner div{flex:1}.tour-completed-banner strong{font-size:17px}.tour-completed-banner p{margin:4px 0 0;color:#a6d2c5;font-size:12px}
.tour-completed-banner button{min-height:37px;border-radius:8px;padding:0 14px;background:#0e6655;color:#fff;border:1px solid #36ae91;cursor:pointer;font-weight:850}
@media(max-width:760px){.tour-completed-banner{flex-wrap:wrap}.tour-completed-banner button{width:100%}}
