/* Prefer installed fonts so OBS startup does not depend on a font service. */
*{box-sizing:border-box}body{margin:0;font-family:'Noto Sans SC','Microsoft YaHei',sans-serif;color:#eef3fb;background:#080f1d}button,input{font:inherit}button{cursor:pointer}a{color:#60d4be}img{object-fit:contain}img.broken{visibility:hidden}.live{overflow:hidden}.broadcast{width:1920px;height:1080px;transform-origin:top left;padding:32px;background:radial-gradient(ellipse at 15% 0%,#18344c 0,transparent 50%),#080f1d;display:flex;flex-direction:column;gap:22px}header{height:160px;display:flex;align-items:center;justify-content:space-between;padding:24px 30px;background:#111e30;border:1px solid #2a3c51;border-radius:16px}.brand{width:410px}.brand b{font-size:26px}.dot{display:inline-block;background:#50ddbf;width:10px;height:10px;border-radius:50%;margin-right:12px}.brand small{display:block;color:#a5b6cb;font-size:18px;margin-top:14px;line-height:1.5}.scoreboard{display:flex;align-items:center;gap:45px}.team{min-width:190px;display:flex;align-items:center;flex-direction:column;gap:8px;font-size:25px}.team img{height:65px;width:65px}.score{text-align:center;min-width:170px}.score b{font-size:58px;letter-spacing:6px;display:block}.score span{color:#60dfbe;font-size:20px}.signal{width:220px;text-align:right;color:#60dfbe;font-size:18px}.signal small{display:block;color:#8ba1bb;font-size:15px;margin-top:10px}.content{display:flex;gap:22px;flex:1;min-height:0}.pitch{position:relative;flex:1;min-width:0;border:1px solid #2a3c51;border-radius:16px;overflow:hidden;background:#0a151f;display:flex;flex-direction:column}.section-label{height:50px;padding:15px 22px;letter-spacing:2px;color:#73e8ca;font-size:15px}.section-label span{float:right;color:#8ba1bb;letter-spacing:0}.pitch iframe{width:100%;flex:1;border:0;background:#0a151f}.pitch-bottom{height:44px;padding:12px 22px;color:#a6bbd0;font-size:16px}.pitch-bottom span:last-child{float:right}#pitchEmpty{position:absolute;left:0;right:0;top:44%;text-align:center;color:#adc1d5;font-size:25px;pointer-events:none}aside{width:440px;display:flex;flex-direction:column;gap:18px}aside section{background:#111e30;border:1px solid #2a3c51;border-radius:16px;padding:20px 22px;overflow:hidden}h2{font-size:22px;margin:0 0 17px}h2 small{float:right;font-size:12px;color:#869bb6;font-weight:400;padding-top:8px}#statsPanel{flex:none}#eventsPanel{flex:1;min-height:0}#events{overflow:hidden;height:100%}.stat{margin-bottom:12px}.stat-head{display:flex;justify-content:space-between;font-size:18px}.stat-head span{color:#a7bad0;font-size:16px}.bar{display:flex;height:5px;gap:4px;margin-top:8px}.bar i{background:#4fdcb7;border-radius:3px}.bar i:last-child{background:#699ffa}#statsError{color:#f5b45a;font-size:14px}.event{display:flex;gap:12px;align-items:center;border-top:1px solid #25364b;padding:12px 0}.event time{color:#60dfbe;width:54px;flex-shrink:0;font-size:16px}.event img{width:38px;height:38px;border-radius:50%;background:#263750}.event .event-type{font-size:17px}.event small{display:block;color:#9fb2cb;font-size:14px;margin-top:3px}.event.away time{color:#80adff}footer{height:72px;display:flex;align-items:center;gap:20px;padding:0 24px;background:#111e30;border-radius:12px;border:1px solid #2a3c51}footer b{background:#50ddbf;color:#082b24;font-size:17px;padding:7px 14px;border-radius:5px}footer span{font-size:20px;flex:1}footer small{font-size:14px;color:#8ba1bb}#goal{position:absolute;top:35%;left:15%;right:15%;background:#072b29ed;border:2px solid #60dfbe;padding:35px;text-align:center;font-size:40px;font-weight:bold;border-radius:15px}#goal[hidden]{display:none}.control{background:radial-gradient(ellipse at top,#173047,#080f1d 65%);min-height:100vh}.dashboard{max-width:1100px;padding:45px 24px;margin:auto}.eyebrow{color:#60dfbe;letter-spacing:3px;font-size:12px}h1{font-size:34px;margin:12px 0}.dashboard p{color:#a7bbcf;line-height:1.7}.dashboard form,.obs-help{padding:25px;border:1px solid #2a3c51;background:#111e30;border-radius:14px;margin:24px 0}.dashboard label{display:block;margin-bottom:18px;color:#c2d0e0}.dashboard input:not([type=checkbox]){display:block;width:100%;margin-top:9px;padding:13px;background:#091423;border:1px solid #34516e;color:#fff;border-radius:7px}.dashboard button{border:0;border-radius:7px;padding:12px 22px;background:#50ddbf;color:#09251f;font-weight:bold}.dashboard button:disabled{opacity:.5}.dashboard a{margin-left:20px}.options{display:flex;gap:25px}.copy-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.copy-row code{font-size:18px}.preview{width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:12px;border:1px solid #2a3c51}.preview iframe{width:100%;height:100%;border:0}#feedback{margin-bottom:0;color:#60dfbe}

#channelSelect{background:#091423;color:#fff;border:1px solid #34516e;border-radius:7px;padding:12px;min-width:250px;font:inherit}

/* Match analysis rotation and commentary strip. */
[hidden]{display:none!important}.rotation-tabs{display:flex;justify-content:space-between;color:#60dfbe;font-size:16px;border-bottom:1px solid #2a3c51;padding-bottom:12px;margin-bottom:16px}.rotation-tabs small{color:#8ba1bb}#statsPanel{height:480px}.shot-pitch{display:block;width:100%;height:235px}.shot-legend{font-size:13px;color:#a7bad0}.data-note{font-size:12px;color:#8ba1bb;margin:8px 0}.shot-detail{font-size:14px;padding:6px 0;border-top:1px solid #25364b}.player-card{display:grid;grid-template-columns:48px 1fr 44px;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #25364b}.player-card img{width:46px;height:46px;border-radius:50%;background:#263750}.player-card strong{font-size:16px}.player-card small{display:block;font-size:12px;color:#9fb2cb;margin-top:5px}.player-card p{grid-column:2/4;font-size:12px;margin:0;color:#a7bad0}.player-rating{background:#254e44;color:#60dfbe;text-align:center;border-radius:6px;padding:8px;font-size:18px}footer{height:132px;flex-shrink:0;gap:18px}footer b{white-space:nowrap}.commentary-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:9px}.commentary-copy span{font-size:18px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.commentary-copy small{color:#a7bad0;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}footer>small{width:150px;font-size:12px;line-height:1.7}#goal{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:18px;padding:24px;font-size:30px}#goal img{width:72px;height:72px;border-radius:50%;background:#263750}#goal span{width:100%;font-size:25px}.shot-legend{background:linear-gradient(90deg,#50ddbf,#80adff);background-clip:text;color:transparent}

#statsPanel{height:450px}.stat{margin-bottom:7px}.bar{margin-top:6px}h2{margin-bottom:12px}.rotation-tabs{margin-bottom:12px}.shot-pitch{height:200px}.player-card{padding:7px 0;gap:5px 10px;grid-template-columns:40px 1fr 44px}.player-card img{width:38px;height:38px}.player-card p{font-size:12px}.player-card small{margin-top:3px}

/* Keep the competition on one line and reserve the scoreboard position. */
.broadcast header::after{content:"";width:220px;flex-shrink:0}
.broadcast .brand{width:650px;min-width:0}
.broadcast #competition{white-space:nowrap;font-size:16px}

/* Fit the entire 16:9 tracker instead of clipping its lower edge. */
.broadcast{padding:16px;gap:16px}
.broadcast header{height:112px;flex-shrink:0;padding:16px 30px}
.broadcast footer{height:80px}
.broadcast aside{width:480px;flex-shrink:0}
.tracker-viewport{flex:1;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.pitch .tracker-viewport iframe{flex:none;display:block}
.pitch-bottom{flex-shrink:0}
.broadcast header .team img{width:48px;height:48px}.broadcast header .team{gap:4px;font-size:22px}.broadcast header .score b{font-size:48px}.broadcast header .brand small{margin-top:8px}

/* Trim the outer grass margin while keeping both goals and touchlines. */
.tracker-viewport iframe{flex-shrink:0!important;max-width:none}

/* Match selection stays in the control panel; broadcasts retain their layout. */
.dashboard select{font:inherit;color:#eef3fb;background:#091423;border:1px solid #34516e;border-radius:7px;padding:12px;width:100%;margin-top:9px}.dashboard [hidden]{display:none!important}.fixture-filters{display:grid;grid-template-columns:2fr 1.3fr 1fr 1.6fr;gap:14px}.fixture-filters label{min-width:0}.fixture-filters input{height:46px}#customLeagueLabel{grid-column:1/-1}.fixture-row{display:grid;grid-template-columns:minmax(0,1fr) 70px auto;gap:18px;align-items:center;padding:18px 0;border-top:1px solid #2a3c51}.fixture-teams{display:flex;gap:20px;margin-top:10px;flex-wrap:wrap}.fixture-teams span{display:flex;align-items:center;gap:8px}.fixture-teams img{width:30px;height:30px}.fixture-state{color:#9fb2cb}.fixture-state.live{color:#50ddbf}.fixture-score{text-align:center}.fixture-row button{font-size:13px;padding:11px 15px}#fixtureFeedback{color:#60dfbe}#fixtureTarget{color:#c2d0e0}.copy-row select{width:auto;flex:1;margin-top:0}@media(max-width:750px){.fixture-filters{grid-template-columns:1fr 1fr}.fixture-row{grid-template-columns:minmax(0,1fr) 60px}.fixture-row button{grid-column:1/-1}.fixture-teams{gap:10px}}
/* Larger date picker target for the control panel. */
.dashboard #fixtureDate{height:54px;font-size:18px;padding:9px 12px;color-scheme:dark}
.dashboard #fixtureDate::-webkit-calendar-picker-indicator{width:28px;height:28px;padding:6px;margin-left:6px;cursor:pointer;background-color:#203c51;border-radius:6px}
.dashboard #fixtureDate:focus{outline:2px solid #50ddbf;outline-offset:2px}
/* Portrait broadcast: shared channel data, dedicated 1080 x 1920 canvas. */
.vertical .broadcast{width:1080px;height:1920px;padding:20px 64px 100px 20px;gap:18px}
.vertical .broadcast header{height:234px;padding:20px;flex-direction:column;gap:16px}
.vertical .broadcast header::after{display:none}
.vertical .broadcast .brand{width:100%}.vertical .brand b{font-size:25px}
.vertical .broadcast #competition{font-size:19px;overflow:hidden;text-overflow:ellipsis;margin-top:6px}
.vertical .scoreboard{width:100%;justify-content:space-around;gap:12px}
.vertical .broadcast header .team{min-width:0;width:280px;font-size:27px;text-align:center}
.vertical .broadcast header .team img{width:62px;height:62px}
.vertical .broadcast header .score b{font-size:64px}.vertical .score span{font-size:23px}
.vertical .content{flex-direction:column;gap:18px}
.vertical .pitch{flex:none;height:560px}
.vertical .broadcast aside{width:100%;flex:1;min-height:0;gap:18px}
.vertical aside section{padding:20px 24px}.vertical h2{font-size:28px}.vertical h2 small{display:none}
.vertical #statsPanel{height:438px}.vertical .rotation-tabs{font-size:22px}
.vertical .stat{margin-bottom:10px}.vertical .stat-head{font-size:24px}.vertical .stat-head span{font-size:22px}
.vertical .bar{height:7px}.vertical .shot-pitch{height:260px}
.vertical .player-card{grid-template-columns:52px 1fr 60px;padding:9px 0}
.vertical .player-card img{width:48px;height:48px}.vertical .player-card strong{font-size:23px}
.vertical .player-card small,.vertical .player-card p{font-size:17px}.vertical .player-rating{font-size:24px}
.vertical .event{padding:12px 0}.vertical .event time{font-size:23px;width:65px}
.vertical .event img{width:48px;height:48px}.vertical .event .event-type{font-size:24px}.vertical .event small{font-size:19px}
.vertical .broadcast footer{height:142px;flex-direction:column;align-items:flex-start;gap:10px;padding:15px 20px}
.vertical footer b{font-size:20px}.vertical .commentary-copy span{font-size:23px}.vertical .commentary-copy small{font-size:19px;max-width:900px}
.vertical #goal{left:6%;right:6%;top:28%}
.dashboard .portrait-preview{aspect-ratio:9/16;max-width:430px;margin:auto}
.vertical #stats{display:grid;grid-template-columns:1fr 1fr;gap:22px 32px}
.vertical .stat{margin:0}.vertical .stat-head{font-size:25px}.vertical .stat-head span{font-size:20px}
/* The OBS source has no painted background outside its broadcast canvas. */
html:has(body.live),body.live{background:transparent}
.vertical .broadcast{padding:16px;gap:16px}
.vertical .pitch{height:590px}

/* Keep all four player rows inside the portrait analysis panel. */
.vertical .player-card{padding:6px 0;gap:3px 10px}.vertical .player-card strong{font-size:21px}.vertical .player-card small,.vertical .player-card p{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.player-card>div{min-width:0}

/* Give the portrait cards enough room for their full content. */
.vertical .pitch{height:540px}
.vertical .broadcast footer{height:210px;flex:0 0 auto;overflow:hidden}
.vertical #statsPanel{height:560px;flex:0 0 auto}
.vertical .commentary-copy{width:100%;min-height:0}
.vertical .commentary-copy span{display:block;line-clamp:unset;max-height:calc(2 * 1.45em);overflow:hidden}
.vertical .commentary-copy small{display:block;width:100%;line-height:1.35;max-width:none}

.dashboard button.danger{background:#542632;color:#ffd2d8;border:1px solid #9a4457}

/* Pre-match canvas: fixed countdown with automatically rotating preview cards. */
.prematch .content,.prematch .broadcast>footer{display:none}
#preMatch{flex:1;min-height:0;display:grid;grid-template-columns:0.9fr 1.1fr;gap:24px;align-items:stretch}
.kickoff{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:28px;border:1px solid #285b59;border-radius:20px;background:radial-gradient(ellipse at center,#19463d,#101f30 75%)}
.kickoff small{font-size:26px;letter-spacing:5px;color:#60dfbe}.kickoff b{font-size:105px;font-variant-numeric:tabular-nums;letter-spacing:4px}.kickoff span{font-size:22px;color:#a7bad0;text-align:center;padding:0 20px}
.preview-card{display:flex;flex-direction:column;justify-content:center;background:#111e30;border:1px solid #2a3c51;border-radius:20px;padding:44px;min-width:0;overflow:hidden}
.preview-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}.preview-heading h2{font-size:32px;margin:0}.preview-heading small{font-size:20px;color:#60dfbe;white-space:nowrap}
.preview-row{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:22px 0;border-bottom:1px solid #2a3c51;font-size:26px}.preview-row strong{font-weight:500}.preview-row b{color:#60dfbe;white-space:nowrap}
#previewNote{font-size:19px;color:#a7bad0;line-height:1.5;margin-top:26px}.preview-dots{display:flex;justify-content:center;gap:9px;margin-top:20px}.preview-dots i{width:8px;height:8px;border-radius:50%;background:#34516e}.preview-dots .active{background:#60dfbe;width:28px;border-radius:8px}
.player-pair{display:grid;grid-template-columns:1fr 1fr;gap:24px}.preview-player{display:flex;flex-direction:column;align-items:center;text-align:center;gap:15px;min-width:0}.preview-player img{height:150px;width:150px;border-radius:50%;background:#20364a}.preview-player strong{font-size:26px}.preview-player span{font-size:22px;color:#60dfbe}.preview-player small{font-size:18px;color:#a7bad0}
.vertical #preMatch{display:flex;flex-direction:column;gap:24px}.vertical .kickoff{height:430px;flex-shrink:0}.vertical .kickoff b{font-size:130px}.vertical .preview-card{flex:1;padding:46px}.vertical .preview-heading h2{font-size:38px}.vertical .preview-row{font-size:30px;padding:26px 0}.vertical .preview-player img{height:200px;width:200px}.vertical .preview-player strong{font-size:32px}.vertical #previewNote{font-size:24px}

/* User-supplied stadium photography, confined to the pre-match scene. */
.prematch .broadcast{position:relative;isolation:isolate;overflow:hidden;background:#071426;padding:40px;gap:30px}
.prematch .broadcast::before{content:"";position:absolute;inset:-4px;z-index:-2;background:url('/assets/stadium-landscape.png') center/cover no-repeat;filter:blur(1.2px)}
.prematch .broadcast::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(3,12,27,.35),rgba(3,12,27,.12) 65%,rgba(3,12,27,.36))}
.prematch .broadcast header{background:rgba(8,22,40,.48);border-color:rgba(180,219,240,.2);backdrop-filter:blur(8px);box-shadow:0 12px 40px #0002}
.prematch #preMatch{align-items:center;gap:44px;padding-bottom:155px}
.prematch .kickoff{height:auto;min-height:380px;background:transparent;border:0;box-shadow:none;text-shadow:0 3px 22px #0009}
.prematch .kickoff b{color:#fff;font-size:112px;letter-spacing:2px}
.prematch .kickoff small{color:#9fffe4}.prematch .kickoff span{color:#e0eafa}
.prematch .preview-card{background:rgba(7,21,38,.64);border-color:rgba(186,227,249,.24);backdrop-filter:blur(10px);box-shadow:0 22px 60px #0003;min-height:430px;max-height:690px}
.prematch .preview-row{border-color:#d7eaff26}.prematch #previewNote{color:#c3d2e4}
.vertical.prematch .broadcast{padding:30px;gap:28px}
.vertical.prematch .broadcast::before{background-image:url('/assets/stadium-portrait.png');filter:blur(.8px)}
.vertical.prematch .broadcast::after{background:linear-gradient(180deg,rgba(3,12,27,.22),rgba(3,12,27,.18) 60%,rgba(3,12,27,.12))}
.vertical.prematch #preMatch{flex:none;gap:24px;padding:0}
.vertical.prematch .kickoff{height:330px;min-height:0;gap:24px}
.vertical.prematch .kickoff b{font-size:130px}
.vertical.prematch .preview-card{flex:none;min-height:480px;max-height:780px;padding:38px 42px;background:rgba(7,21,38,.6)}
.vertical.prematch .preview-row{padding:20px 0;font-size:28px}
.vertical.prematch .preview-heading h2{font-size:34px}
.vertical.prematch #preMatch{align-items:stretch}.vertical.prematch .kickoff,.vertical.prematch .preview-card{width:100%}
.prematch .broadcast::before,.vertical.prematch .broadcast::before{background-image:var(--stadium-background)}
.background-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;margin:16px 0 24px}.dashboard .background-option{padding:6px;background:#091423;color:#c2d0e0;border:2px solid transparent;text-align:left;overflow:hidden}.background-option img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:4px}.portrait-gallery .background-option img{aspect-ratio:9/16;max-height:240px}.background-option span{display:block;padding:9px 5px}.dashboard .background-option[aria-pressed=true]{border-color:#50ddbf;background:#16392f}.background-option:focus-visible{outline:2px solid white;outline-offset:2px}
