:root { --bg:#f5f6f8; --surface:#fff; --line:#d9dee7; --text:#18202b; --muted:#667085; --accent:#1b1f5e; --accent-2:#b08a42; --base:#101820; --radius:8px; }
* { box-sizing: border-box; }
body { margin:0; font-family:"Yu Gothic","Meiryo",system-ui,sans-serif; background:var(--bg); color:var(--text); }
a { color: inherit; text-decoration: none; }
button,input,select { font:inherit; }
.site-header { background:var(--base); color:#fff; border-bottom:4px solid var(--accent); }
.topbar { max-width:1320px; margin:0 auto; padding:18px 24px 16px; display:grid; grid-template-columns:270px 1fr auto; gap:18px; align-items:center; }
.brand { display:grid; grid-template-columns:54px minmax(0,1fr); gap:10px; align-items:center; }
.brand strong { font-size:21px; line-height:1.2; }
.brand-logo { width:54px; height:54px; object-fit:cover; border-radius:50%; border:2px solid rgba(255,255,255,.82); background:#000; }
.brand-copy { display:grid; gap:2px; min-width:0; }
.brand-copy span,.stat-strip { color:#d6dde8; font-size:12px; }
.search-panel { display:grid; gap:6px; }
.search-panel input { width:100%; min-height:46px; border:0; background:#fff; color:var(--text); border-radius:0; padding:0 10px 0 0; outline:none; }
.search-panel option { color:#111; }
.search-label { color:#eef4fb; font-size:12px; font-weight:800; }
.search-box { display:grid; grid-template-columns:38px minmax(0,1fr) 86px; align-items:center; min-height:50px; background:#fff; border:2px solid rgba(255,255,255,.72); border-radius:8px; box-shadow:0 8px 22px rgba(0,0,0,.18); overflow:hidden; }
.search-icon { color:var(--accent); display:grid; place-items:center; font-size:17px; }
.search-button { height:100%; border:0; background:var(--accent); color:#fff; font-weight:800; cursor:pointer; }
.search-button:hover { filter:brightness(.96); }
.search-panel:focus-within .search-box { border-color:var(--accent-2); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent-2) 32%,transparent),0 10px 24px rgba(0,0,0,.2); }
.search-panel input::placeholder { color:#6f7b8a; }
.stat-strip { display:flex; gap:14px; white-space:nowrap; }
.page-shell { max-width:1320px; margin:0 auto; padding:18px 24px 36px; }
.crumbs { min-height:28px; display:flex; gap:8px; align-items:center; color:var(--muted); font-size:12px; }
.crumbs a { color:var(--base); font-weight:700; }
.hero { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:18px; align-items:stretch; margin-bottom:16px; }
.hero-main,.panel,.metric,.card,.table-card,.detail-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); }
.hero-main { padding:22px; border-top:5px solid var(--accent); }
.kicker { color:var(--accent); font-weight:800; font-size:12px; margin-bottom:6px; }
h1 { margin:0; font-size:30px; line-height:1.25; }
.lead { margin:10px 0 0; color:var(--muted); line-height:1.75; }
.hero-side { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.metric { padding:14px; min-height:86px; }
.metric strong { display:block; font-size:28px; line-height:1.15; }
.metric span { color:var(--muted); font-size:12px; }
.section { margin-top:18px; }
.section-title { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:0 0 10px; }
.section-title h2 { margin:0; font-size:27px; }
.section-title span { color:var(--muted); font-size:12px; }
.grid { display:grid; gap:10px; }
.team-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.org-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.card { padding:13px; cursor:pointer; transition:border-color .15s, background .15s, transform .15s, box-shadow .15s; }
.card:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); transform:translateY(-1px); box-shadow:0 8px 18px rgba(16,24,32,.08); }
.team-card { display:grid; grid-template-columns:12px 1fr auto; gap:10px; align-items:center; }
.swatch { width:12px; height:44px; border-radius:6px; background:var(--accent); }
.card strong { display:block; line-height:1.35; }
.card .meta,.muted { color:var(--muted); font-size:12px; }
.layout-2 { display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:16px; align-items:start; }
.table-card { overflow:hidden; }
table { width:100%; border-collapse:collapse; background:#fff; }
th,td { padding:10px 12px; border-bottom:1px solid #edf0f4; text-align:left; vertical-align:middle; font-size:13px; }
th { background:#f8fafc; color:var(--muted); font-weight:700; white-space:nowrap; }
tbody tr.clickable { cursor:pointer; }
tbody tr.clickable:hover { background:color-mix(in srgb,var(--accent) 9%,#fff); }
.number { width:48px; text-align:center; font-weight:800; color:var(--base); }
.name-cell strong { display:block; font-size:15px; }
.name-cell span { color:var(--muted); font-size:12px; }
.chips { display:flex; flex-wrap:wrap; gap:5px; }
.chip { display:inline-flex; align-items:center; min-height:24px; padding:0 8px; border:1px solid var(--line); border-radius:999px; background:#fff; color:#344054; font-size:12px; white-space:nowrap; }
.chip.high_school { border-color:#8cc1a5; color:#176247; }
.chip.university { border-color:#8fb4de; color:#275f9f; }
.chip.company { border-color:#d5af6d; color:#8a5d11; }
.chip.independent { border-color:#bb9ed9; color:#68419a; }
.chip.mlb { border-color:#70b8c3; color:#17626f; }
.chip.former { border-color:#e69b95; color:#a83731; }
.detail-card { padding:16px; }
.player-head { display:grid; grid-template-columns:72px 1fr; gap:14px; align-items:center; padding-bottom:14px; border-bottom:1px solid var(--line); }
.uniform { height:72px; border-radius:var(--radius); display:grid; place-items:center; color:#fff; font-weight:900; font-size:22px; background:var(--accent); }
.player-head h1,.player-head h2 { margin:0; font-size:26px; line-height:1.25; }
.summary-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:14px 0; }
.summary-grid div { background:#f7f8fa; border-radius:6px; padding:9px; min-height:58px; }
.summary-grid strong { display:block; font-size:20px; }
.summary-grid span { color:var(--muted); font-size:11px; }
.relation-list { display:grid; gap:8px; }
.relation-card { border:1px solid var(--line); border-radius:var(--radius); padding:10px; background:#fff; cursor:pointer; transition:border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.relation-card:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); box-shadow:0 8px 18px rgba(16,24,32,.08); transform:translateY(-1px); }
.relation-card strong { display:block; margin-bottom:5px; }
.relation-card .line { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:12px; }
.connection-list { display:grid; gap:8px; }
.connection-row { display:grid; grid-template-columns:minmax(210px,260px) 1fr 56px; gap:10px; align-items:center; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:10px; }
.bar-track { height:12px; background:#edf0f4; border-radius:999px; overflow:hidden; }
.bar { height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); border-radius:999px; }
.actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.action { border:1px solid var(--line); background:#fff; border-radius:var(--radius); padding:8px 10px; cursor:pointer; }
.action.primary { background:var(--base); color:#fff; border-color:var(--base); }
.empty { padding:28px; text-align:center; color:var(--muted); background:#fff; border:1px solid var(--line); border-radius:var(--radius); }
@media (max-width:1080px){ .topbar,.hero,.layout-2{grid-template-columns:1fr}.stat-strip{white-space:normal}.team-grid,.org-grid{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:720px){ .topbar,.page-shell{padding-left:14px;padding-right:14px}.search-panel,.hero-side,.summary-grid,.team-grid,.org-grid{grid-template-columns:1fr}.connection-row{grid-template-columns:1fr} th:nth-child(3),td:nth-child(3),th:nth-child(5),td:nth-child(5){display:none} }
.relation-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; }
.relation-tabs button { min-height:34px; border:1px solid var(--line); background:#fff; border-radius:999px; padding:0 12px; cursor:pointer; }
.relation-tabs button.active { background:var(--base); color:#fff; border-color:var(--base); }
.career-list { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.career-list li { display:grid; grid-template-columns:92px minmax(0,1fr) 88px; gap:8px; align-items:center; border:1px solid var(--line); border-radius:var(--radius); background:#fff; padding:8px 10px; }
.career-list span { color:var(--accent); font-size:12px; font-weight:800; }
.career-list strong { min-width:0; }
.career-list em { color:var(--muted); font-style:normal; font-size:12px; text-align:right; }
@media (max-width:720px){ .career-list li { grid-template-columns:1fr; } .career-list em { text-align:left; } }
.team-badge { display:inline-flex; align-items:center; min-height:24px; padding:0 8px; border-radius:999px; background:color-mix(in srgb, var(--accent) 10%, #fff); border:1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); color:var(--base); font-weight:700; font-size:12px; }
.topbar { position: relative; }
.live-search-results { position:absolute; left:312px; right:220px; top:66px; z-index:20; background:#fff; color:var(--text); border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 14px 34px rgba(16,24,32,.18); overflow:hidden; }
.live-search-head { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; background:#f8fafc; border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; }
.live-search-list { display:grid; max-height:360px; overflow:auto; }
.live-result { display:grid; grid-template-columns:74px minmax(0,1fr) auto; gap:10px; align-items:center; padding:10px 12px; border-bottom:1px solid #edf0f4; cursor:pointer; }
.live-result:last-child { border-bottom:0; }
.live-result:hover { background:color-mix(in srgb, var(--accent) 8%, #fff); }
.live-result-type { color:var(--accent); font-weight:800; font-size:12px; }
.live-result strong { display:block; line-height:1.35; }
.live-result span { color:var(--muted); font-size:12px; }
.live-result-count { color:var(--muted); font-size:12px; white-space:nowrap; }
@media (max-width:1080px){ .live-search-results { position:static; grid-column:1 / -1; margin-top:8px; } }
.career-summary { display:flex; flex-wrap:wrap; gap:4px; max-width:460px; }
.career-summary span { display:inline-flex; align-items:center; gap:4px; max-width:100%; min-height:22px; padding:0 7px; border:1px solid var(--line); border-radius:999px; background:#fff; font-size:12px; }
.career-summary strong { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:700; }
.team-distribution { display:grid; gap:5px; margin:0 0 10px; padding:8px 10px; border:1px solid var(--line); border-radius:var(--radius); background:#fbfcfe; }
.team-dist-row { display:grid; grid-template-columns:minmax(112px,170px) minmax(0,1fr) 32px; gap:8px; align-items:center; min-height:20px; font-size:12px; }
.team-dist-row span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); }
.team-dist-row strong { text-align:right; color:var(--base); }
.team-dist-track { height:8px; background:#e9edf3; border-radius:999px; overflow:hidden; }
.team-dist-bar { height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); border-radius:999px; }
@media (max-width:720px){ .career-summary strong { max-width:110px; } .team-dist-row { grid-template-columns:minmax(92px,128px) minmax(0,1fr) 28px; } }
.header-nav { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; align-items:center; font-size:12px; }
.header-nav a { min-height:30px; display:inline-flex; align-items:center; padding:0 9px; border:1px solid rgba(255,255,255,.22); border-radius:999px; color:#eef4fb; background:rgba(255,255,255,.06); }
.header-nav a:hover { background:rgba(255,255,255,.14); }
.site-footer { background:#0f1720; color:#e9eef5; border-top:4px solid var(--accent); margin-top:24px; }
.footer-inner { max-width:1320px; margin:0 auto; padding:28px 24px; display:grid; grid-template-columns:minmax(260px,360px) 1fr; gap:28px; }
.footer-about strong { display:block; font-size:27px; margin-bottom:8px; }
.footer-about p { margin:0 0 12px; color:#c8d2df; line-height:1.7; font-size:13px; }
.footer-meta { display:flex; flex-wrap:wrap; gap:10px; font-size:12px; }
.footer-links { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; }
.footer-links h2 { margin:0 0 8px; font-size:13px; color:#fff; }
.footer-links a { display:block; color:#d8e2ee; font-size:12px; line-height:1.45; padding:4px 0; }
.footer-links a:hover { color:#fff; text-decoration:underline; }
.footer-link-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:10px; }
@media (max-width:1080px){ .header-nav { justify-content:flex-start; } .footer-inner,.footer-links { grid-template-columns:1fr; } .footer-link-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:720px){ .header-nav a { min-height:34px; } .footer-inner { padding:24px 14px; } .footer-link-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.career-list a,.career-summary a { color:var(--base); text-decoration:none; }
.career-list a:hover,.career-summary a:hover { color:var(--accent); text-decoration:underline; }
.hero-simple { grid-template-columns:1fr; }
.featured-player-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.featured-player-card { min-width:0; padding:12px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; cursor:pointer; transition:border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.featured-player-card:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); box-shadow:0 8px 18px rgba(16,24,32,.08); transform:translateY(-1px); }
.featured-player-card > div:first-child { margin-bottom:8px; }
.featured-player-card strong { display:block; line-height:1.35; }
.featured-player-card span:not(.link-arrow) { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.featured-player-card .career-summary { max-width:none; }
@media (max-width:1080px){ .featured-player-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:720px){ .featured-player-grid { grid-template-columns:1fr; } }
.position-groups { display:grid; gap:14px; }
.position-group { min-width:0; }
.position-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 6px; padding:0 2px; }
.position-heading h3 { margin:0; font-size:14px; color:var(--base); }
.position-heading span { color:var(--muted); font-size:12px; }
.related-org-groups { display:grid; gap:14px; }
.related-org-group { min-width:0; }
.related-org-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 6px; padding:0 2px; }
.related-org-heading h3 { margin:0; font-size:14px; color:var(--base); }
.related-org-heading span { color:var(--muted); font-size:12px; }
.related-org-group .org-grid { grid-template-columns:1fr; }
.list-link { position:relative; display:block; color:inherit; text-decoration:none; }
.list-link::after { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; }
.list-link:focus-visible { outline:3px solid color-mix(in srgb,var(--accent-2) 52%,transparent); outline-offset:2px; }
.list-link:hover strong,.primary-row-link:hover strong { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.link-arrow { color:var(--accent); font-weight:900; }
.primary-row-link { display:inline-grid; color:inherit; text-decoration:none; }
.primary-row-link span { color:var(--muted); font-size:12px; }
.linked-row td:last-child { white-space:nowrap; }
.relation-count { margin-right:8px; }


.team-card.list-link,.live-result.list-link { display:grid; }

/* Unified link arrow UI */
.link-arrow { display:inline-grid; place-items:center; width:28px; height:28px; border-radius:999px; background:color-mix(in srgb,var(--accent) 10%,#fff); border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line)); color:var(--accent); font-weight:900; line-height:1; flex:0 0 auto; }
.team-card .link-arrow { justify-self:end; }
.featured-player-card .link-arrow,.card:not(.team-card) .link-arrow,.relation-card .link-arrow { margin-top:10px; }
.featured-player-card .link-arrow,.card .link-arrow,.relation-card .link-arrow { box-sizing:border-box; min-width:28px; max-width:28px; min-height:28px; max-height:28px; text-decoration:none; }
.relation-card .link-arrow { margin-left:auto; }
.row-arrow { width:24px; height:24px; margin-left:6px; vertical-align:middle; }
/* Stable global header/search colors and roster readability */
.site-header { background:#101820; border-bottom-color:#b08a42; }
.search-icon { color:#1b1f5e; }
.search-button { background:#1b1f5e; }
.search-panel:focus-within .search-box { border-color:#b08a42; box-shadow:0 0 0 3px color-mix(in srgb,#b08a42 32%,transparent),0 10px 24px rgba(0,0,0,.2); }
.table-card { overflow-x:auto; }
.table-card table { min-width:720px; }
.name-cell { min-width:136px; }
.name-cell strong,.primary-row-link strong { white-space:nowrap; }
@media (max-width:720px){ .table-card table { min-width:560px; } .name-cell { min-width:128px; } }

/* Page width normalization */
html,body { width:100%; max-width:100%; }
body { overflow-x:hidden; }
.site-header,.site-footer,.page-shell { width:100%; }
.topbar,.page-shell,.footer-inner { width:100%; max-width:1320px; }
#app,.section,.hero,.hero-main,.hero-side,.layout-2,.layout-2 > *,aside,.detail-card,.panel,.metric,.position-groups,.position-group,.related-org-groups,.related-org-group,.grid,.card { min-width:0; }
.table-card { width:100%; max-width:100%; overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; }
.table-card table { width:100%; min-width:620px; }
@media (max-width:720px){ body { overflow-x:hidden; } .table-card table { min-width:420px; } .topbar,.page-shell,.footer-inner { max-width:100%; } }
.search-panel,.header-nav { min-width:0; }
.brand strong,h1,h2,h3,.lead,.card strong,.relation-card strong,.footer-about strong { overflow-wrap:anywhere; }
.relation-card .line span,.live-result strong,.live-result span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
@media (max-width:1200px) and (min-width:1081px){ .topbar { grid-template-columns:minmax(230px,270px) minmax(0,1fr); } .header-nav { grid-column:1 / -1; justify-content:flex-start; } .live-search-results { left:312px; right:24px; } }
/* Floating external account link */
.floating-x-link { position:fixed; right:18px; bottom:18px; z-index:50; width:63px; height:63px; display:grid; place-items:center; border-radius:50%; background:#101820; color:#fff; border:1px solid rgba(255,255,255,.22); box-shadow:0 10px 24px rgba(16,24,32,.22); font-weight:900; font-size:27px; text-decoration:none; transition:transform .15s, box-shadow .15s, background .15s; }
.floating-x-link:hover { transform:translateY(-2px); background:#000; box-shadow:0 14px 28px rgba(16,24,32,.28); }
.floating-x-link:focus-visible { outline:3px solid #b08a42; outline-offset:3px; }
@media (max-width:720px){ .floating-x-link { right:14px; bottom:14px; width:60px; height:60px; } }

.player-table-no-team { min-width:520px; }
@media (max-width:720px){ .player-table-no-team th:nth-child(3),.player-table-no-team td:nth-child(3){display:table-cell} .player-table-no-team th:nth-child(4),.player-table-no-team td:nth-child(4){display:none} }

/* Right-aligned link affordances */
.featured-player-card.list-link,.card.list-link:not(.team-card),.relation-card.list-link,.career-item.list-link { padding-right:52px; }
.featured-player-card .link-arrow,.card:not(.team-card) .link-arrow,.relation-card .link-arrow,.career-item .link-arrow { position:absolute; right:12px; top:50%; transform:translateY(-50%); margin-top:0; margin-left:0; }
.career-list li { display:block; border:0; padding:0; background:transparent; }
.career-list-row { position:relative; display:grid; grid-template-columns:92px minmax(0,1fr) 88px; gap:8px; align-items:center; border:1px solid var(--line); border-radius:var(--radius); background:#fff; padding:8px 10px; min-height:58px; }
.career-item:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); box-shadow:0 8px 18px rgba(16,24,32,.08); transform:translateY(-1px); }
.career-list .link-arrow { width:28px; height:28px; color:var(--accent); font-size:14px; }
@media (max-width:720px){ .career-list-row { grid-template-columns:1fr; padding-right:48px; } .career-list .link-arrow { top:12px; transform:none; } }

/* Relation grade board preview */
.relation-board { position:relative; display:grid; gap:8px; max-width:100%; }
.relation-board-target { color:var(--muted); font-size:12px; font-weight:800; }
.relation-board-scroll { display:grid; gap:8px; max-width:100%; overflow-x:auto; overflow-y:visible; padding:0 2px 8px 0; -webkit-overflow-scrolling:touch; }
.relation-board-head,.relation-grade-row { display:grid; gap:6px; width:max-content; min-width:max-content; align-items:stretch; }
.relation-board-head { position:sticky; top:0; z-index:1; }
.relation-board-head span,.relation-board-head strong { min-height:30px; display:flex; align-items:center; padding:0 7px; border:1px solid var(--line); border-radius:var(--radius); background:#f8fafc; color:var(--muted); font-size:12px; white-space:nowrap; }
.relation-board-head strong { color:var(--base); }
.relation-board-head span { position:sticky; left:0; z-index:3; box-shadow:6px 0 10px rgba(245,246,248,.92); }
.relation-grade-label { position:sticky; left:0; z-index:2; display:flex; align-items:center; justify-content:center; min-height:48px; border:1px solid var(--line); border-radius:var(--radius); background:#f8fafc; color:var(--base); font-size:11px; font-weight:900; white-space:nowrap; padding:0 4px; }
.relation-grade-cell { display:grid; align-content:start; gap:5px; min-width:0; min-height:48px; }
.relation-board-card { position:relative; display:block; width:168px; min-height:50px; padding:7px 32px 7px 8px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; transition:border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.relation-board-card:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); box-shadow:0 8px 18px rgba(16,24,32,.08); transform:translateY(-1px); }
.relation-board-card strong { display:block; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.relation-board-card span:not(.link-arrow),.relation-board-card small { display:block; color:var(--muted); font-size:10px; line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.relation-board-card .link-arrow { position:absolute; right:6px; top:50%; transform:translateY(-50%); margin:0; width:22px; height:22px; }
@media (max-width:720px){ .relation-board-card { width:154px; } }

/* Compact metric rows */
@media (max-width:720px){
  .hero-side { grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
  .metric { min-height:58px; padding:8px 7px; }
  .metric strong { font-size:22px; line-height:1.05; }
  .metric span { font-size:10px; line-height:1.25; }
  .summary-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .summary-grid div { min-height:46px; padding:7px 6px; }
  .summary-grid strong { font-size:18px; line-height:1.05; }
  .summary-grid span { font-size:10px; line-height:1.25; }
}
.relation-scroll-hint { position:absolute; right:10px; top:30px; z-index:5; display:inline-flex; align-items:center; min-height:30px; padding:0 10px; border-radius:999px; background:rgba(16,24,32,.88); color:#fff; font-size:12px; font-weight:800; box-shadow:0 8px 20px rgba(16,24,32,.18); pointer-events:none; animation:scrollHintFade 4.2s ease forwards; }
@keyframes scrollHintFade { 0%,58%{opacity:1; transform:translateX(0)} 74%{opacity:.86; transform:translateX(8px)} 100%{opacity:0; transform:translateX(18px); visibility:hidden} }
@media (prefers-reduced-motion:reduce){ .relation-scroll-hint { animation:none; opacity:0; visibility:hidden; } }
.relation-grade-row-boundary { margin-top:12px; padding-top:12px; border-top:2px solid color-mix(in srgb,var(--accent) 34%,var(--line)); }
.relation-grade-row-upper .relation-grade-label { background:#fff; color:var(--muted); }
.relation-grade-row-same .relation-grade-label { background:color-mix(in srgb,var(--accent) 10%,#fff); color:var(--base); border-color:color-mix(in srgb,var(--accent) 28%,var(--line)); }
.relation-grade-row-lower .relation-grade-label { background:#fbfcfe; color:var(--base); }
/* Relation board cache guard */
.relation-board-scroll > .relation-board-head,
.relation-board-scroll > .relation-grade-row { display:grid !important; }
.relation-board-scroll .relation-board-card { display:block !important; }
/* Origin team index */
.origin-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
.origin-tabs a { min-height:34px; display:inline-flex; align-items:center; justify-content:center; padding:0 13px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--base); font-weight:800; font-size:13px; text-decoration:none; }
.origin-tabs a:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); }
.origin-tabs a.active { background:var(--base); border-color:var(--base); color:#fff; }
.origin-list { display:grid; gap:8px; }
.origin-card { display:grid; grid-template-columns:52px minmax(0,1fr) auto 28px; gap:12px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; transition:border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.origin-card:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); box-shadow:0 8px 18px rgba(16,24,32,.08); transform:translateY(-1px); }
.origin-rank { display:inline-grid; place-items:center; min-width:40px; height:40px; border-radius:10px; background:#f6f8fb; color:var(--base); font-weight:900; font-size:15px; }
.origin-card-main { min-width:0; }
.origin-card-main strong { display:block; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.origin-card-main span { display:block; margin-top:3px; color:var(--muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.origin-card .chip { justify-self:end; white-space:nowrap; }
.origin-card .link-arrow { justify-self:end; margin:0; }
.more-row { display:flex; justify-content:center; margin-top:14px; }
.origin-more-button { min-width:160px; min-height:40px; font-weight:800; }
@media (max-width:720px){ .origin-card { grid-template-columns:42px minmax(0,1fr) 28px; gap:9px; padding:10px; } .origin-card .chip { display:none; } .origin-rank { min-width:34px; height:34px; font-size:13px; } }

/* Game relations */
.game-list { display:grid; gap:8px; }
.game-card { display:grid; grid-template-columns:minmax(0,1fr) auto 28px; align-items:center; gap:10px; min-height:64px; padding:10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: inherit; }
.game-card-copy { min-width:0; }
.game-card strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.98rem; line-height:1.3; }
.game-card span { color:var(--muted); font-size:.78rem; }
.game-card-copy > span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:3px; }
.game-card-meta { display:flex; align-items:center; gap:7px; white-space:nowrap; color:var(--muted); }
.game-card-meta > :empty { display:none; }
.game-card-arrow { justify-self:end; align-self:center; font-size:18px; }
.game-card-meta b { color: var(--text); font-size: 1.05rem; }
.game-card-badge { display:inline-flex; align-items:center; min-height:22px; padding:0 8px; border-radius:999px; background:color-mix(in srgb,var(--accent) 12%,#fff); color:var(--base) !important; border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line)); font-weight:800; font-size:.78rem !important; }
.game-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.game-summary div { background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.game-summary strong { display: block; font-size: 1.35rem; }
.game-summary span { color: var(--muted); font-size: .82rem; }
.game-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.game-rosters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.game-team { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 16px; }
.game-team h2 { margin: 0 0 14px; font-size: 1.4rem; }
.game-team h3 { margin: 16px 0 8px; font-size: .9rem; color: var(--muted); }
.game-player-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.game-player { min-width: 0; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px 11px; color: var(--text); cursor: pointer; }
.game-player:disabled { cursor: default; opacity: .72; }
.game-player strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .96rem; }
.game-player span { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-player.has-connection { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); background: color-mix(in srgb, var(--accent) 7%, #fff); }
.game-player.starter.has-connection { font-weight: 700; }
.game-connection-panel { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 16px; }
.game-connection-panel h2 { margin: 0 0 12px; font-size: 1.15rem; }
.game-connection-list { display: grid; gap: 10px; }
.game-connection-item { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: inherit; text-decoration: none; }
.game-connection-item strong, .game-connection-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-connection-item > span:not(.link-arrow) { color: var(--muted); font-size: .82rem; grid-column: 1; }
.game-source { color: var(--muted); font-size: .86rem; margin: 16px 0 0; }
.game-mobile-sheet { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 60; max-height: 78vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.22); padding: 42px 14px 14px; }
.game-mobile-close { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; }
@media (max-width: 900px) {
  .game-detail-layout { grid-template-columns: 1fr; }
  .game-rosters { grid-template-columns: 1fr; }
  .game-connection-panel { position: static; }
}
@media (max-width: 560px) {
  .game-card { grid-template-columns:minmax(0,1fr) auto 28px; }
  .game-card-meta { grid-column:auto; flex-wrap:nowrap; }
  .game-player-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Game list and matchup detail refinements */
.metric,.summary-grid div,.game-summary div { overflow:hidden; }
.metric strong,.summary-grid strong,.game-summary strong { overflow-wrap:anywhere; }
.metric span,.summary-grid span,.game-summary span { display:block; overflow:hidden; text-overflow:ellipsis; }
.game-hero-side { display:block; }
.game-hero-side .game-summary { height:100%; }
.game-filters { margin:0 0 18px; padding:14px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; }
.game-filter-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.game-filters label { display:block; margin:0 0 6px; color:var(--muted); font-size:12px; font-weight:800; }
.game-filters select { width:100%; min-height:42px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); padding:0 10px; }
.game-card:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); box-shadow:0 8px 18px rgba(16,24,32,.08); transform:translateY(-1px); }
.game-detail-layout { grid-template-columns:minmax(0,1fr) 360px; }
.game-rosters { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
.game-team { min-width:0; }
.game-team-head { display:flex; align-items:center; gap:10px; margin:0 0 12px; }
.game-team-head span { flex:0 0 auto; display:inline-flex; align-items:center; min-height:24px; padding:0 8px; border-radius:999px; background:color-mix(in srgb,var(--accent) 9%,#fff); border:1px solid color-mix(in srgb,var(--accent) 26%,var(--line)); color:var(--accent); font-size:12px; font-weight:900; }
.game-team-head h2 { min-width:0; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.game-player-grid,.starter-lineup,.bench-grid { grid-template-columns:1fr; }
.game-player { display:grid; grid-template-columns:32px minmax(0,1fr); align-items:center; gap:8px; min-height:46px; padding:8px 10px; }
.game-player.bench { grid-template-columns:minmax(0,1fr); }
.game-player.no-order { grid-template-columns:minmax(0,1fr); }
.game-order { display:inline-grid !important; place-items:center; width:28px; height:28px; border-radius:50%; background:#f3f5f8; color:var(--base) !important; font-size:12px !important; font-weight:900; margin:0 !important; }
.game-player-main { min-width:0; display:block !important; margin:0 !important; }
.game-player-main strong { font-size:14px; line-height:1.25; }
.game-player-main em { display:block; margin-top:2px; color:var(--muted); font-size:11px; font-style:normal; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.game-player.has-connection { border-color:color-mix(in srgb,var(--accent) 72%,var(--line)); box-shadow:inset 4px 0 0 var(--accent); }
.bench-position-group { margin-top:10px; }
.bench-position-group h4 { margin:0 0 6px; padding:0 2px; color:var(--base); font-size:12px; font-weight:900; }
.game-connection-panel { max-width:100%; }
.game-mobile-sheet .game-connection-panel { position:static; border:0; padding:0; }
@media (max-width:900px){ .game-detail-layout { grid-template-columns:1fr; } .game-rosters { grid-template-columns:1fr 1fr; overflow-x:auto; padding-bottom:8px; } .game-team { min-width:280px; } }
@media (max-width:720px){ .game-filter-controls { grid-template-columns:1fr; } .game-summary { grid-template-columns:repeat(3,minmax(0,1fr)); } .game-summary div { padding:8px 7px; } .game-summary strong { font-size:20px; } .game-summary span { font-size:10px; } }
@media (max-width:560px){ .game-rosters { grid-template-columns:repeat(2, minmax(270px, 1fr)); } .game-card { grid-template-columns:minmax(0,1fr) auto 28px; min-height:58px; padding:8px 10px; } .game-card-meta { grid-column:auto; flex-wrap:nowrap; white-space:nowrap; } .game-card-status { display:none; } .game-card-meta b { font-size:.9rem; } }

/* Team tabs on game detail */
.game-roster-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0 0 10px; }
.game-roster-tabs button { min-width:0; min-height:46px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:8px; padding:8px 10px; cursor:pointer; text-align:left; }
.game-roster-tabs button span { display:inline-flex; align-items:center; min-height:22px; padding:0 7px; border-radius:999px; background:#f3f5f8; color:var(--muted); font-size:11px; font-weight:900; white-space:nowrap; }
.game-roster-tabs button strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.game-roster-tabs button.active { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 8%,#fff); box-shadow:inset 0 -3px 0 var(--accent); }
.game-rosters-tabbed { display:block; overflow:visible; padding:0; }
.game-rosters-tabbed .game-team-panel { display:none; }
.game-rosters-tabbed .game-team-panel.active { display:block; }
@media (max-width:900px){ .game-rosters-tabbed { display:block; overflow:visible; padding:0; } .game-rosters-tabbed .game-team { min-width:0; } }
@media (max-width:560px){ .game-roster-tabs { grid-template-columns:1fr 1fr; } .game-roster-tabs button { grid-template-columns:1fr; gap:4px; } }
/* Game detail home-away matchup */
.game-starters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0 0 16px; }
.game-starter-team,.game-rosters-tabbed .game-team-panel { border-color:color-mix(in srgb,var(--game-team-color) 46%,var(--line)); box-shadow:inset 0 5px 0 var(--game-team-color); }
.game-starter-team .game-team-head span,.game-rosters-tabbed .game-team-head span { background:color-mix(in srgb,var(--game-team-color) 12%,#fff); border-color:color-mix(in srgb,var(--game-team-color) 36%,var(--line)); color:var(--game-team-base); }
.game-starter-team .game-player.has-connection,.game-rosters-tabbed .game-player.has-connection { border-color:color-mix(in srgb,var(--game-team-color) 70%,var(--line)); box-shadow:inset 4px 0 0 var(--game-team-color); background:color-mix(in srgb,var(--game-team-color) 7%,#fff); }
.game-bench-title { margin:2px 0 10px; font-size:1.1rem; }
.game-roster-tabs button { border-color:color-mix(in srgb,var(--game-team-color) 30%,var(--line)); }
.game-roster-tabs button span { background:color-mix(in srgb,var(--game-team-color) 10%,#fff); color:var(--game-team-base); }
.game-roster-tabs button.active { border-color:var(--game-team-color); background:color-mix(in srgb,var(--game-team-color) 8%,#fff); box-shadow:inset 0 -3px 0 var(--game-team-color); }
.game-connection-item { display:grid; grid-template-columns:1fr; gap:0; padding:0; overflow:hidden; color:inherit; text-decoration:none; }
.game-connection-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:8px; padding:8px; }
.game-connection-player { min-width:0; display:grid; align-content:center; gap:2px; padding:8px 10px; border-radius:8px; color:inherit; text-decoration:none; background:#fff; border:1px solid transparent; }
.game-connection-player:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); }
.game-connection-player strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.game-connection-player span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:.78rem; }
.game-connection-meta { border-top:1px solid var(--line); padding:8px 10px; display:flex; flex-wrap:wrap; gap:6px; }
.game-connection-meta span { display:inline-flex; align-items:center; min-height:22px; padding:0 7px; border-radius:999px; background:#f3f5f8; color:var(--muted); font-size:.78rem; font-weight:700; }
.game-connection-meta .game-connection-note { background:color-mix(in srgb,var(--accent) 10%,#fff); color:var(--base); }
@media (max-width:560px){ .game-starters { gap:8px; } .game-starter-team { padding:10px 8px; } .game-starter-team .game-team-head { display:grid; gap:5px; } .game-starter-team .game-team-head h2 { font-size:.95rem; } .game-starter-team .game-player { grid-template-columns:24px minmax(0,1fr); gap:5px; padding:7px 6px; } .game-starter-team .game-order { width:24px; height:24px; } }
/* Game detail fixed-width two-column rosters */
.game-detail-layout { display:block; }
.game-roster-area { min-width:0; }
.game-section-title { margin:0 0 10px; font-size:1.1rem; }
.game-starters,.game-benches { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; align-items:start; overflow:visible; margin:0 0 18px; }
.game-starters .game-team,.game-benches .game-team { min-width:0 !important; padding:12px; }
.game-bench-team { border-color:color-mix(in srgb,var(--game-team-color) 46%,var(--line)); box-shadow:inset 0 5px 0 var(--game-team-color); }
.game-bench-team .game-team-head span { background:color-mix(in srgb,var(--game-team-color) 12%,#fff); border-color:color-mix(in srgb,var(--game-team-color) 36%,var(--line)); color:var(--game-team-base); }
.game-bench-team .game-player.has-connection { border-color:color-mix(in srgb,var(--game-team-color) 70%,var(--line)); box-shadow:inset 4px 0 0 var(--game-team-color); background:color-mix(in srgb,var(--game-team-color) 7%,#fff); }
.game-benches .bench-position-group h4 { margin:10px 0 6px; font-size:.78rem; color:var(--muted); }
.game-benches .bench-grid,.game-starters .starter-lineup { grid-template-columns:1fr; }
.starting-pitcher-block { margin-top:10px; padding-top:10px; border-top:1px dashed var(--line); }
.starting-pitcher-block h3 { margin:0 0 6px; color:var(--muted); font-size:.72rem; font-weight:900; }
.starting-pitcher-grid { grid-template-columns:1fr; }
.game-connection-bottom { margin-top:18px; }
.game-connection-bottom .game-connection-panel { position:static; top:auto; }
.game-player-popover { position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:16px; }
.game-popover-backdrop { position:absolute; inset:0; background:rgba(15,23,32,.42); }
.game-popover-sheet { position:relative; width:min(560px,100%); max-height:min(78vh,720px); overflow:auto; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 24px 70px rgba(0,0,0,.28); padding:42px 14px 14px; }
.game-popover-sheet .game-connection-panel { position:static; border:0; padding:0; }
@media (max-width:900px){ .game-detail-layout { display:block; } .game-starters,.game-benches { grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; padding-bottom:0; } .game-starters .game-team,.game-benches .game-team { min-width:0 !important; } }
@media (max-width:560px){ .game-starters,.game-benches { gap:6px; } .game-starters .game-team,.game-benches .game-team { padding:8px 6px; } .game-team-head { gap:5px; margin-bottom:8px; } .game-team-head span { min-height:20px; padding:0 6px; font-size:10px; } .game-team-head h2 { font-size:.82rem; line-height:1.25; } .game-player { grid-template-columns:21px minmax(0,1fr); gap:4px; min-height:38px; padding:6px 5px; } .game-order { width:21px; height:21px; font-size:10px; } .game-player-main strong { font-size:.78rem; } .game-player-main em { font-size:.68rem; } .game-benches .bench-position-group h4 { font-size:.7rem; } }
@media (max-width:380px){ .game-starters,.game-benches { gap:5px; } .game-starters .game-team,.game-benches .game-team { padding:7px 5px; } .game-player-main strong { font-size:.74rem; } }
.game-staffs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; align-items:start; overflow:visible; margin:0 0 18px; }
.game-staff-team { min-width:0 !important; padding:12px; border-color:color-mix(in srgb,var(--game-team-color) 46%,var(--line)); box-shadow:inset 0 5px 0 var(--game-team-color); }
.game-staff-team .game-team-head span { background:color-mix(in srgb,var(--game-team-color) 12%,#fff); border-color:color-mix(in srgb,var(--game-team-color) 36%,var(--line)); color:var(--game-team-base); }
.game-player.staff { grid-template-columns:minmax(0,1fr); }
.game-staff-team .game-player.has-connection { border-color:color-mix(in srgb,var(--game-team-color) 70%,var(--line)); box-shadow:inset 4px 0 0 var(--game-team-color); background:color-mix(in srgb,var(--game-team-color) 7%,#fff); }
@media (max-width:900px){ .game-staffs { grid-template-columns:repeat(2,minmax(0,1fr)); } .game-staff-team { min-width:0 !important; } }
@media (max-width:560px){ .game-staffs { gap:6px; } .game-staff-team { padding:8px 6px; } }


/* Game date calendar */
.game-calendar { max-width:560px; margin:0 auto; padding-top:14px; border-top:1px solid var(--line); }
.game-calendar-head { display:grid; grid-template-columns:42px minmax(0,1fr) 42px; align-items:center; gap:8px; margin-bottom:10px; }
.game-calendar-nav { width:42px; height:42px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); font-size:26px; line-height:1; cursor:pointer; }
.game-calendar-nav:hover, .game-calendar-nav:focus-visible { border-color:var(--base); color:var(--base); }
.game-calendar-title { display:flex; justify-content:center; align-items:center; gap:10px; min-width:0; }
.game-calendar-title select { width:auto; min-width:94px; }
.game-calendar-title strong { min-width:42px; font-size:18px; text-align:center; }
.game-calendar-weekdays, .game-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.game-calendar-weekdays { margin-bottom:4px; }
.game-calendar-weekdays span { padding:4px 0; color:var(--muted); font-size:11px; font-weight:800; text-align:center; }
.game-calendar-weekdays span:first-child { color:#a52a2a; }
.game-calendar-weekdays span:last-child { color:#245a9b; }
.game-calendar-blank, .game-calendar-day { aspect-ratio:1; min-width:0; }
.game-calendar-day { position:relative; display:grid; place-items:center; border:1px solid transparent; border-radius:7px; background:#f5f7f9; color:#9aa5b1; font:inherit; cursor:default; }
.game-calendar-day.has-games { border-color:var(--line); background:#fff; color:var(--text); font-weight:800; cursor:pointer; }
.game-calendar-day.has-games::after { position:absolute; bottom:5px; width:5px; height:5px; border-radius:50%; background:var(--base); content:""; }
.game-calendar-day.has-games:hover, .game-calendar-day.has-games:focus-visible { border-color:var(--base); background:#f8fafc; }
.game-calendar-day.selected { border-color:var(--base); background:var(--base); color:#fff; }
.game-calendar-day.selected::after { background:#fff; }
.game-calendar-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px; color:var(--muted); font-size:12px; }
.game-calendar-actions > span { color:var(--base); font-weight:800; }
.game-calendar-actions button { min-height:36px; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--text); padding:0 12px; font-weight:800; cursor:pointer; }
.game-calendar-actions button:disabled { opacity:.45; cursor:default; }
@media (max-width:480px) {
  .game-filters { padding:12px; }
  .game-calendar-weekdays, .game-calendar-grid { gap:3px; }
  .game-calendar-day { border-radius:6px; font-size:13px; }
  .game-calendar-day.has-games::after { bottom:3px; }
}


/* Sharing and favorites */
.page-actions { display:flex; align-items:center; gap:8px; margin-top:12px; }
.page-action { display:inline-flex; align-items:center; gap:6px; min-height:36px; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--text); padding:0 10px; cursor:pointer; }
.page-action span { color:var(--accent); font-size:18px; line-height:1; }
.page-action b { font-size:12px; }
.page-action:hover,.page-action:focus-visible,.page-action.active { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); }
.favorite-action.active span { color:#c69212; }
.site-toast { position:fixed; left:50%; bottom:24px; z-index:100; transform:translateX(-50%); max-width:calc(100vw - 32px); border-radius:7px; background:var(--base); color:#fff; padding:10px 14px; box-shadow:0 10px 30px rgba(0,0,0,.22); font-size:13px; font-weight:800; }
.live-search-empty { padding:18px 14px; color:var(--muted); font-size:13px; text-align:center; }
@media (max-width:560px){ .page-actions { margin-top:9px; } .page-action { min-height:34px; padding:0 9px; } .site-toast { bottom:92px; } }


/* Correction report */
.footer-report-link { display:block; border:0; background:transparent; color:#d8e2ee; padding:4px 0; font:inherit; font-size:12px; line-height:1.45; text-align:left; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.footer-report-link:hover,.footer-report-link:focus-visible { color:var(--accent); }
.report-dialog[hidden] { display:none; }
.report-dialog { position:fixed; inset:0; z-index:120; display:grid; place-items:center; padding:20px; }
.report-dialog-backdrop { position:absolute; inset:0; background:rgba(7,15,26,.66); }
.report-dialog-panel { position:relative; width:min(720px,100%); max-height:calc(100vh - 40px); overflow:auto; border:1px solid var(--line); border-radius:8px; background:#fff; box-shadow:0 24px 70px rgba(0,0,0,.3); padding:22px; }
.report-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.report-dialog-head span { display:block; color:var(--muted); font-size:12px; font-weight:800; }
.report-dialog-head h2 { margin:4px 0 0; font-size:24px; letter-spacing:0; }
.report-dialog-close { flex:0 0 38px; width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; background:#fff; color:var(--text); font-size:24px; line-height:1; cursor:pointer; }
.report-dialog-close:hover,.report-dialog-close:focus-visible { border-color:var(--base); background:#f5f7f9; }
.report-dialog-lead { margin:12px 0; color:var(--muted); font-size:14px; line-height:1.7; }
.report-page-context { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px; margin:0 0 16px; border-left:4px solid var(--accent); background:#f5f7f9; padding:10px 12px; }
.report-page-context span { color:var(--muted); font-size:12px; font-weight:800; }
.report-page-context strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.report-form { display:grid; gap:14px; }
.report-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.report-form label { display:grid; gap:6px; min-width:0; }
.report-form label > span { color:var(--text); font-size:13px; font-weight:800; }
.report-form label small { color:var(--muted); font-size:11px; font-weight:700; }
.report-form label b { color:#a32828; font-size:11px; }
.report-form input,.report-form select,.report-form textarea { width:100%; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--text); padding:10px 11px; font:inherit; font-size:14px; }
.report-form input,.report-form select { min-height:42px; }
.report-form textarea { resize:vertical; line-height:1.55; }
.report-form input:focus,.report-form select:focus,.report-form textarea:focus { outline:3px solid color-mix(in srgb,var(--accent) 24%,transparent); border-color:var(--accent); }
.report-honeypot { position:absolute !important; left:-10000px !important; width:1px !important; height:1px !important; overflow:hidden !important; }
.report-privacy { margin:0; color:var(--muted); font-size:12px; }
.report-form-status { min-height:20px; margin:0; color:#a32828; font-size:13px; font-weight:800; }
.report-form-status.success { color:#18724a; }
.report-form-actions { display:flex; justify-content:flex-end; gap:8px; padding-top:2px; }
.report-form-actions button { min-height:42px; border-radius:7px; padding:0 16px; font:inherit; font-size:13px; font-weight:900; cursor:pointer; }
.report-cancel { border:1px solid var(--line); background:#fff; color:var(--text); }
.report-submit { border:1px solid var(--base); background:var(--base); color:#fff; }
.report-form-actions button:disabled { opacity:.55; cursor:wait; }
body.report-dialog-open { overflow:hidden; }
@media (max-width:620px) {
  .report-dialog { align-items:end; padding:0; }
  .report-dialog-panel { width:100%; max-height:92vh; border-radius:8px 8px 0 0; border-bottom:0; padding:18px 16px max(18px,env(safe-area-inset-bottom)); }
  .report-dialog-head h2 { font-size:21px; }
  .report-form-grid { grid-template-columns:1fr; }
  .report-form-actions { position:sticky; bottom:0; margin:0 -16px -18px; padding:10px 16px max(12px,env(safe-area-inset-bottom)); background:#fff; border-top:1px solid var(--line); }
  .report-form-actions button { flex:1; }
}


/* Retired player filters */
.retired-filters { margin:0 0 18px; padding:14px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; }
.retired-filter-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) auto; gap:12px; align-items:end; }
.retired-filter-controls label { display:grid; gap:6px; min-width:0; }
.retired-filter-controls label > span { color:var(--muted); font-size:12px; font-weight:800; }
.retired-filter-controls select { width:100%; min-height:42px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); padding:0 10px; }
.retired-filter-controls select:focus { outline:3px solid color-mix(in srgb,var(--accent) 24%,transparent); border-color:var(--accent); }
.retired-filter-controls button { min-height:42px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); padding:0 14px; font-weight:800; white-space:nowrap; cursor:pointer; }
.retired-filter-controls button:hover,.retired-filter-controls button:focus-visible { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); }
@media (max-width:680px) { .retired-filter-controls { grid-template-columns:1fr 1fr; } .retired-filter-controls button { grid-column:1/-1; } }
@media (max-width:480px) { .retired-filters { padding:12px; } .retired-filter-controls { grid-template-columns:1fr; gap:10px; } .retired-filter-controls button { grid-column:auto; } }

/* Organization roster view tabs */
.org-player-view-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px; }
.org-player-view-tabs button { min-height:36px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--base); padding:0 14px; font-weight:800; cursor:pointer; }
.org-player-view-tabs button:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); }
.org-player-view-tabs button.active { border-color:var(--base); background:var(--base); color:#fff; }
.org-player-view-tabs button:focus-visible { outline:3px solid color-mix(in srgb,var(--accent) 45%,transparent); outline-offset:2px; }
.grade-group .position-heading h3 { font-variant-numeric:tabular-nums; }


/* Seven-day featured rankings */
.section-more-link { display:inline-flex; align-items:center; gap:7px; color:var(--base); font-weight:800; }
.section-more-link:hover { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.section-more-link .link-arrow { width:26px; height:26px; min-width:26px; min-height:26px; font-size:13px; }
.featured-ranking-filters .retired-filter-controls,.featured-player-filters .retired-filter-controls { grid-template-columns:minmax(240px,420px) auto; justify-content:start; }
.featured-ranking-list { display:grid; gap:8px; }
.featured-ranking-card { display:grid; grid-template-columns:42px minmax(0,1fr) 30px; gap:12px; align-items:center; min-height:68px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; color:var(--text); text-decoration:none; transition:border-color .15s,background .15s,box-shadow .15s,transform .15s; }
.featured-ranking-card:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,#fff); box-shadow:0 8px 18px rgba(16,24,32,.08); transform:translateY(-1px); }
.featured-rank { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:var(--base); color:#fff; font-weight:900; font-size:14px; }
.featured-ranking-body { display:grid; grid-template-columns:minmax(190px,280px) minmax(0,1fr); gap:14px; align-items:center; min-width:0; }
.featured-ranking-main { min-width:0; }
.featured-ranking-main strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.35; }
.featured-ranking-main span { display:block; color:var(--muted); font-size:12px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.featured-ranking-card .career-summary { min-width:0; max-width:none; display:flex; flex-wrap:wrap; gap:5px; overflow:hidden; }
.featured-ranking-card .link-arrow { margin:0; justify-self:end; }
.featured-org-ranking-card { min-height:62px; }
@media(max-width:760px){
  .featured-ranking-filters .retired-filter-controls,.featured-player-filters .retired-filter-controls { grid-template-columns:1fr; }
  .featured-ranking-card { grid-template-columns:36px minmax(0,1fr) 28px; gap:8px; padding:9px 10px; }
  .featured-ranking-body { grid-template-columns:minmax(0,1fr); gap:6px; }
  .featured-ranking-card .career-summary { flex-wrap:nowrap; overflow:hidden; }
  .featured-rank { width:32px; height:32px; }
}

.representative-relation-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.representative-relation-card{position:relative;display:flex;align-items:center;justify-content:space-between;min-width:0;padding:14px 42px 14px 14px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:6px;background:#fff;color:var(--ink);text-decoration:none}
.representative-relation-card>div{display:grid;gap:3px;min-width:0}
.representative-relation-card strong,.representative-relation-card span,.representative-relation-card small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.representative-relation-card span,.representative-relation-card small{color:var(--muted);font-size:13px}
.representative-relation-card small{color:var(--accent);font-weight:700}
.representative-relation-card .link-arrow{position:absolute;right:12px;top:50%;transform:translateY(-50%)}
@media(max-width:760px){.representative-relation-grid{grid-template-columns:1fr}.representative-relation-card{padding-top:12px;padding-bottom:12px}}
