/* "Neueste Meldungen" is the model for every page title: same edges as the menu bar, same size, font and height.
   Loaded last; the doubled ids outrank the per-page layouts. */
@media(min-width:761px){
 html body :is(#page-dataroom#page-dataroom,#page-duell#page-duell,#page-community#page-community){--bar-w:min(1250px,calc(100vw - 32px));width:var(--bar-w);max-width:none;margin-left:calc((100% - var(--bar-w)) / 2);margin-right:0;padding-inline:0!important;box-sizing:border-box}
 html body :is(#page-dataroom,#page-duell,#page-community) .page-title{font-size:clamp(30px,3.3vw,48px)!important;line-height:.95!important;margin:0!important}
 /* No dotted kicker above the Duell title. */
 html body #page-duell .duel-page-identity .duel-eyebrow{display:none!important}
}
@media(min-width:761px){
 html body #page-duell .duel-page-identity .page-title{margin-top:14px!important}
 html body #page-community .page-title{margin-top:-10px!important}
}
@media(min-width:761px){
 html body #page-aufstellungen .bn-lineups-toolbar,html body #page-dataroom .page-head.analysis-head{align-items:flex-start!important}
}
@media(min-width:761px){
 html body #page-aufstellungen .bn-lineups-toolbar h2{margin-top:8px!important}
 html body #page-dataroom .page-head.analysis-head .page-title{position:relative;top:-6px}
}

/* Club view: the match sits in the club header (right), no Aufstellung/Kader switch; the pitch gets the height back. */
html body #page-aufstellungen .bl-team-head{display:flex;align-items:center;gap:16px}
html body #page-aufstellungen .bl-team-head>div:not(.bl-team-match){min-width:0}
html body #page-aufstellungen .bl-team-match{display:flex;align-items:center;gap:14px;margin-left:auto;min-width:0}
html body #page-aufstellungen .bl-team-fixture{display:flex;align-items:center;gap:9px;min-width:0;font:400 13.5px/1.3 var(--font-ui,Inter,sans-serif);color:#a9b0b5;white-space:nowrap}
html body #page-aufstellungen .bl-team-fixture>i{width:3px;height:3px;border-radius:50%;background:#5c646b;flex:none}
html body #page-aufstellungen .bl-team-fixture img{width:22px;height:24px;object-fit:contain;flex:none}
html body #page-aufstellungen .bl-team-fixture b{font-weight:600;color:#eef0f2;overflow:hidden;text-overflow:ellipsis}
html body #page-aufstellungen .bl-team-fixture time{color:#d6dade;font-variant-numeric:tabular-nums}
html body #page-aufstellungen .bl-team-match .bl-editorial-badge{flex:none}
html body #page-aufstellungen .bl-lineup-v2{padding-top:16px}
@media(min-width:761px){
 html body #page-aufstellungen .bl-tactical-pitch{--club-card-size:clamp(78px,calc((100svh - 300px) / var(--formation-rows,4) * .95),132px)!important}
}
@media(max-width:1100px) and (min-width:761px){
 html body #page-aufstellungen .bl-team-fixture>span:first-child,html body #page-aufstellungen .bl-team-fixture>span:first-child+i{display:none}
}
@media(max-width:760px){
 html body #page-aufstellungen .bl-team-head{flex-wrap:wrap}
 html body #page-aufstellungen .bl-team-match{flex-basis:100%;margin-left:0;flex-wrap:wrap;gap:8px}
 html body #page-aufstellungen .bl-team-fixture{flex-wrap:wrap;white-space:normal}
}

/* Club box: the match as a stat row (label above, value below, hairlines between cells). */
html body #page-aufstellungen .bl-team-head{padding:0 0 0 22px;min-height:84px;overflow:hidden}
html body #page-aufstellungen .bl-team-match{display:flex;align-items:stretch;align-self:stretch;gap:0;margin-left:auto;border-left:1px solid #262626}
html body #page-aufstellungen .bl-stat{display:flex;flex-direction:column;justify-content:center;gap:6px;min-width:0;padding:0 24px;border-right:1px solid #262626}
html body #page-aufstellungen .bl-stat:last-child{border-right:0;padding-right:26px}
html body #page-aufstellungen .bl-stat>span{font:500 12.5px/1 var(--font-ui,Inter,sans-serif);color:#8a929b;white-space:nowrap}
html body #page-aufstellungen .bl-stat>strong{display:flex;align-items:center;gap:9px;min-width:0;font:700 19px/1.1 var(--font-ui,Inter,sans-serif);color:#f4f5f6;white-space:nowrap;font-variant-numeric:tabular-nums}
html body #page-aufstellungen .bl-stat-opponent img{width:24px;height:26px;object-fit:contain;flex:none}
html body #page-aufstellungen .bl-stat-opponent b{font-weight:700;overflow:hidden;text-overflow:ellipsis}
html body #page-aufstellungen .bl-stat-status>strong{font-size:15px;font-weight:600;color:#d6dade}
html body #page-aufstellungen .bl-stat-status i{width:8px;height:8px;border-radius:50%;background:#f2cf4a;box-shadow:0 0 8px #f2cf4a88;flex:none}
html body #page-aufstellungen .bl-stat-status.is-confirmed i{background:#3ddc84;box-shadow:0 0 8px #3ddc8488}
@media(max-width:1100px) and (min-width:761px){
 html body #page-aufstellungen .bl-stat{padding:0 16px}
 html body #page-aufstellungen .bl-stat>strong{font-size:16px}
 html body #page-aufstellungen .bl-stat-opponent b{max-width:150px}
}
@media(max-width:760px){
 html body #page-aufstellungen .bl-team-head{padding:14px 0 0 14px;overflow:visible}
 html body #page-aufstellungen .bl-team-match{flex-basis:100%;margin:12px 0 0 -14px;border-left:0;border-top:1px solid #262626;flex-wrap:wrap}
 html body #page-aufstellungen .bl-stat{flex:1 1 40%;padding:12px 14px;border-bottom:1px solid #262626}
}
html body #page-aufstellungen .bl-stat>strong{min-height:24px}
html body #page-aufstellungen .bl-stat-opponent{flex:0 1 auto;min-width:0}
@media(max-width:1100px) and (min-width:761px){html body #page-aufstellungen .bl-stat-opponent b{max-width:none}}
/* The News/Aufstellungen switch sits at the same spot in both views (the lineups view is the reference). */
@media(min-width:761px){html body #page-aufstellungen#page-aufstellungen .bn-feed-head{align-items:flex-start!important}}
@media(min-width:761px){html body #page-aufstellungen#page-aufstellungen .bn-feed-head>.bn-hub-tabs{margin-top:-8px!important}}

/* Club lineup on the same green turf as the matchday board: mown stripes, soft light, white lines. */
html body #page-aufstellungen .bl-arena{background:#123d23;border:1px solid #ffffff1a;border-radius:14px;overflow:hidden}
html body #page-aufstellungen .bl-tactical-pitch{background:radial-gradient(90% 50% at 50% 0,#ffffff1a,transparent 60%),radial-gradient(90% 50% at 50% 100%,#ffffff10,transparent 60%),repeating-linear-gradient(180deg,#1d6337 0 7.14%,#1a5a32 7.14% 14.28%)!important;box-shadow:inset 0 0 80px #000a,inset 0 0 0 1px #ffffff14!important;border:0!important;border-radius:14px}
html body #page-aufstellungen .bl-field-drawing{stroke:#ffffff52!important;color:#ffffff40!important;stroke-width:1.6}
html body #page-aufstellungen .bl-arena-top>span{color:#ffffffa6!important}
html body #page-aufstellungen .bl-arena-top>b{color:#fff!important}

/* Club box v3: only what matters, the next match (opponent + kickoff); the prediction status sits on the pitch. */
html body #page-aufstellungen .bl-next{display:flex;align-items:center;gap:22px;margin-left:auto;padding-right:24px;min-width:0}
html body #page-aufstellungen .bl-next-match{display:grid;gap:6px;min-width:0;text-align:right}
html body #page-aufstellungen .bl-next-label{font:500 12.5px/1 var(--font-ui,Inter,sans-serif);color:#8a929b;white-space:nowrap}
html body #page-aufstellungen .bl-next-opponent{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0}
html body #page-aufstellungen .bl-next-opponent img{width:28px;height:30px;object-fit:contain;flex:none}
html body #page-aufstellungen .bl-next-opponent b{font:700 20px/1.1 var(--font-ui,Inter,sans-serif);color:#f4f5f6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #page-aufstellungen .bl-next-time{display:grid;justify-items:center;gap:4px;padding:8px 14px;border:1px solid #2a2a2a;border-radius:12px;background:#151515}
html body #page-aufstellungen .bl-next-time span{font:500 12px/1 var(--font-ui,Inter,sans-serif);color:#9aa1a8}
html body #page-aufstellungen .bl-next-time strong{font:italic 800 24px/1 var(--font-display,'Barlow Condensed',sans-serif);color:#fff;font-variant-numeric:tabular-nums}
html body #page-aufstellungen .bl-next-countdown{padding:6px 10px;border-radius:999px;background:#c8f25a1a;color:#d9f59b;font:600 12px/1 var(--font-ui,Inter,sans-serif);white-space:nowrap}
html body #page-aufstellungen .bl-arena-top{display:flex;align-items:center;gap:8px}
html body #page-aufstellungen .bl-arena-status{display:inline-flex;align-items:center;gap:6px;margin-right:10px;padding:4px 9px;border-radius:999px;background:#00000059;color:#fff;font:600 11px/1 var(--font-ui,Inter,sans-serif)}
html body #page-aufstellungen .bl-arena-status i{width:7px;height:7px;border-radius:50%;background:#f2cf4a;box-shadow:0 0 6px #f2cf4a}
html body #page-aufstellungen .bl-arena-status.is-confirmed i{background:#3ddc84;box-shadow:0 0 6px #3ddc84}
@media(max-width:1100px) and (min-width:761px){html body #page-aufstellungen .bl-next-countdown{display:none}}
@media(max-width:760px){
 html body #page-aufstellungen .bl-next{flex-basis:100%;margin:12px 0 0;padding:12px 14px 0 0;border-top:1px solid #262626;justify-content:space-between}
 html body #page-aufstellungen .bl-next-match{text-align:left}
 html body #page-aufstellungen .bl-next-opponent{justify-content:flex-start}
}
html body #page-aufstellungen .bl-arena-top>span:not(.bl-arena-status){font:500 11.5px/1 var(--font-ui,Inter,sans-serif)!important;letter-spacing:0!important;text-transform:none!important}
/* The News/Aufstellungen switch starts where the title letters start (cap top ≈ 0.143 × title size), in both views. */
@media(min-width:761px){
 html body #page-aufstellungen#page-aufstellungen .bn-feed-head>.bn-hub-tabs{margin-top:calc(clamp(30px,3.3vw,48px) * .143)!important}
 html body #page-aufstellungen#page-aufstellungen .bn-lineups-actions>.bn-hub-tabs{position:relative;top:calc(8px + clamp(30px,3.3vw,48px) * .143)}
}

/* Slimmer club box (no countdown) → more height for the pitch. */
html body #page-aufstellungen .bl-team-head{min-height:64px;padding-block:8px}
html body #page-aufstellungen .bl-team-head>img{width:40px;height:44px}
html body #page-aufstellungen .bl-next-time{padding:5px 12px}
html body #page-aufstellungen .bl-next-time strong{font-size:20px}
html body #page-aufstellungen .bl-next-match{gap:4px}
html body #page-aufstellungen .bl-next-opponent b{font-size:18px}
html body #page-aufstellungen .bl-result{min-width:76px}
html body #page-aufstellungen .bl-result[data-result=Sieg] strong{color:#5fe39a}
html body #page-aufstellungen .bl-result[data-result=Niederlage] strong{color:#ff6b78}
@media(min-width:761px){html body #page-aufstellungen .bl-tactical-pitch{--club-card-size:clamp(80px,calc((100svh - 270px) / var(--formation-rows,4) * .95),136px)!important}}

/* Matchday switcher, top left on the pitch. */
html body #page-aufstellungen .bl-arena{position:relative}
html body #page-aufstellungen .bl-day-switch{position:absolute;z-index:3;top:10px;left:12px;display:flex;align-items:center;gap:4px;padding:4px;border:1px solid #ffffff26;border-radius:12px;background:#0b1a10d9;backdrop-filter:blur(6px)}
html body #page-aufstellungen .bl-day-switch>span{display:grid;justify-items:center;gap:2px;min-width:104px;padding:0 4px}
html body #page-aufstellungen .bl-day-switch b{font:700 13px/1 var(--font-ui,Inter,sans-serif);color:#fff}
html body #page-aufstellungen .bl-day-switch small{font:500 10.5px/1 var(--font-ui,Inter,sans-serif);color:#ffffffa0}
html body #page-aufstellungen .bl-day-switch button{display:grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid #ffffff2e;border-radius:50%;background:#ffffff12;color:#fff;cursor:pointer}
html body #page-aufstellungen .bl-day-switch button:hover:not(:disabled){background:#ffffff26}
html body #page-aufstellungen .bl-day-switch button:disabled{opacity:.35;cursor:default}
html body #page-aufstellungen .bl-tactical-pitch{padding-top:56px!important}

/* Played match on the cards: Kickbase points badge, goals/cards/substitution marks. */
html body #page-aufstellungen .bl-card{position:relative}
html body #page-aufstellungen .bl-card-points{position:absolute;z-index:4;top:6%;right:4%;min-width:30px;padding:3px 6px;border-radius:8px;background:#1e2a22;border:1px solid #ffffff33;color:#fff;font:800 12px/1 var(--font-ui,Inter,sans-serif);text-align:center;font-variant-numeric:tabular-nums;box-shadow:0 2px 6px #0008}
html body #page-aufstellungen .bl-card-points[data-tone=top]{background:#1f9d57;border-color:#5fe39a}
html body #page-aufstellungen .bl-card-points[data-tone=mid]{background:#8a6d12;border-color:#f2cf4a}
html body #page-aufstellungen .bl-card-points[data-tone=neg]{background:#9b2733;border-color:#ff6b78}
html body #page-aufstellungen .bl-card-marks{position:absolute;z-index:4;left:50%;bottom:-6px;transform:translateX(-50%);display:flex;gap:3px;white-space:nowrap}
html body #page-aufstellungen .bl-card-marks i{display:inline-grid;place-items:center;min-width:14px;height:14px;padding:0 3px;border-radius:7px;background:#0d0d0d;border:1px solid #ffffff33;color:#fff;font:700 8.5px/1 var(--font-ui,Inter,sans-serif);font-style:normal}
html body #page-aufstellungen .bl-card-marks .bl-mk-goal{width:14px;padding:0;border-radius:50%;background:#fff radial-gradient(circle at 50% 50%,#111 0 2.2px,transparent 2.4px)}
html body #page-aufstellungen .bl-card-marks .bl-mk-yellow{width:10px;min-width:10px;border-radius:2px;background:#f2cf4a;border:0}
html body #page-aufstellungen .bl-card-marks .bl-mk-red{width:10px;min-width:10px;border-radius:2px;background:#ff4d5e;border:0}
html body #page-aufstellungen .bl-card-marks .bl-mk-off{color:#ff9aa3}
html body #page-aufstellungen .bl-card-marks .bl-mk-off::before{content:'↓';margin-right:2px}

/* Substitutions under the pitch. */
html body #page-aufstellungen .bl-subs{margin:12px 0 0;padding:12px 14px;border:1px solid #262626;border-radius:12px;background:#111}
html body #page-aufstellungen .bl-subs h4{margin:0 0 8px;font:600 13px/1 var(--font-ui,Inter,sans-serif);color:#d6dade}
html body #page-aufstellungen .bl-subs ul{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px 18px;margin:0;padding:0;list-style:none}
html body #page-aufstellungen .bl-subs li{display:flex;align-items:baseline;gap:8px;font:400 13px/1.3 var(--font-ui,Inter,sans-serif);color:#a9b0b5}
html body #page-aufstellungen .bl-sub-min{min-width:34px;color:#8a929b;font-variant-numeric:tabular-nums}
html body #page-aufstellungen .bl-sub-in{color:#5fe39a;font-weight:600}
html body #page-aufstellungen .bl-sub-in::before{content:'↑ '}
html body #page-aufstellungen .bl-sub-in em{font-style:normal;color:#fff;font-weight:700;margin-left:4px}
html body #page-aufstellungen .bl-sub-out{color:#ff9aa3}
html body #page-aufstellungen .bl-arena-wait{min-height:320px;padding-top:60px;border-radius:14px;background:#123d23}

/* Club view: lineup box and club news end on one line. The lineup sets the height; the news column fills
   exactly that height and scrolls its list inside (no visible scrollbar), "Weitere Meldungen" stays at the bottom. */
@media(min-width:1001px){
 html body #page-aufstellungen .bl-club-layout{align-items:stretch!important}
 html body #page-aufstellungen .bl-club-layout>div,html body #page-aufstellungen .bl-club-layout>div>.bl-lineup{height:100%;box-sizing:border-box}
 html body #page-aufstellungen .bl-club-layout>aside{position:relative;min-height:0}
 html body #page-aufstellungen .bl-club-layout>aside>.bl-news-compact{position:absolute;inset:0;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}
 html body #page-aufstellungen .bl-club-layout>aside .bl-news-grid{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-width:none;align-content:start}
 html body #page-aufstellungen .bl-club-layout>aside .bl-news-grid::-webkit-scrollbar{display:none}
 html body #page-aufstellungen .bl-club-layout>aside .bl-news-compact>:last-child{flex:none}
}

/* Lineups toolbar: "Legende ?" as plain text, opens on hover; the divider sits below the switch with air. */
@media(min-width:761px){
 html body #page-aufstellungen .bn-lineups-toolbar{padding-bottom:calc(26px + clamp(30px,3.3vw,48px) * .143)!important}
 html body #page-aufstellungen .bn-lineups-actions{align-items:flex-start;gap:22px}
}
html body #page-aufstellungen .bn-lineups-actions .mb-legend-toggle{position:relative;top:calc(8px + clamp(30px,3.3vw,48px) * .143 + 13px)}
html body #page-aufstellungen .bn-lineups-actions .mb-legend-toggle summary{height:auto!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;gap:6px;font:500 14px/1 var(--font-ui,Inter,sans-serif);color:#a9b0b5;flex-direction:row}
html body #page-aufstellungen .bn-lineups-actions .mb-legend-toggle summary::before{order:2;width:17px;height:17px;border:1px solid #ffffff40;background:none;color:#d6dade;font-size:10px}
html body #page-aufstellungen .bn-lineups-actions .mb-legend-toggle:is(:hover,[open]) summary{color:#fff}
html body #page-aufstellungen .bn-lineups-actions .mb-legend-toggle .mb-legend{top:calc(100% + 12px)}
