:root{--portal-bg:#f0f5f9;--portal-ink:#122e43;--portal-edge:var(--stl-line);--portal-brand:var(--stl-action);--portal-accent:var(--stl-ice);--portal-panel:#fff}
body.portal-mode{background:var(--portal-bg);color:var(--portal-ink);font-family:"Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif}
.app-splash img.stl-emblem{width:96px;height:auto;object-fit:contain}.portal-mode .app-splash{display:none!important}.portal-mode .header{display:flex!important;box-shadow:inset 0 -3px var(--stl-blue);max-width:none;margin:0;padding:0 clamp(16px,5vw,72px);height:auto;min-height:68px;background:var(--stl-navy);color:#eaf6ff;border:0;align-items:center;justify-content:space-between;gap:20px}.portal-mode .portal-brand{margin:6px 0;text-decoration:none}.portal-mode #portal-nav{display:flex;align-items:center;justify-content:flex-end;gap:clamp(10px,2vw,30px);flex-wrap:wrap}.portal-mode #portal-nav a{color:#dfedf7;display:inline-flex;align-items:center;min-height:44px;text-decoration:none;font-size:14px;font-weight:600;white-space:nowrap;border-bottom:2px solid transparent}.portal-mode #portal-nav a:hover,.portal-mode #portal-nav a.active{color:white;background:var(--stl-deep);border-bottom-color:var(--stl-ice)}
.portal-mode .container{max-width:none;width:100%;padding:0}.portal-mode #main{min-height:60vh}.portal-wrap{max-width:1220px;margin:auto;padding:30px 46px 48px}.portal-heading{padding:4px 0 22px}.portal-heading h1{margin:0;font-size:clamp(32px,4.4vw,54px);line-height:1.13;letter-spacing:-.055em}.portal-heading p{margin:9px 0 0;color:#456075}.portal-kicker{font-size:11px;letter-spacing:.16em;font-weight:700;color:#a6d6ed;margin-bottom:8px}
.portal-hero{position:relative;min-height:440px;display:flex;align-items:center;padding:48px max(46px,calc((100vw - 1128px)/2));overflow:hidden;color:#fff;background:#08253b url(../assets/stl/A.jpg) 57% 42%/cover no-repeat}.portal-hero:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#051f38f5 0%,#051f38c7 35%,#051f3850 65%,transparent 85%)}.portal-hero-copy{position:relative;max-width:600px}.portal-hero h1{font-size:clamp(54px,7vw,90px);line-height:1.02;letter-spacing:-.065em;margin:0;font-weight:900}.portal-hero h1 em{font-style:normal;color:var(--stl-ice)}.portal-hero p{max-width:30em;color:#e3f2fc;line-height:1.8;margin:17px 0 24px}.portal-primary{display:inline-flex;gap:22px;align-items:center;padding:12px 18px;min-height:48px;background:var(--stl-action);color:#fff;font-weight:750;text-decoration:none;border-radius:3px}.portal-primary:hover{background:var(--stl-deep)}.portal-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));max-width:1220px;margin:auto;padding:20px 46px;gap:14px;background:#0a3654;color:#eff9ff}.portal-stats a{display:flex;align-items:baseline;gap:10px;color:inherit;text-decoration:none}.portal-stats b{font:700 29px Arial,sans-serif;color:var(--stl-ice)}.portal-stats span{font-size:13px}.portal-home-grid{max-width:1220px;margin:auto;padding:28px 46px 42px;display:grid;grid-template-columns:1.15fr 1fr;gap:48px}.portal-section{background:#fff;border:1px solid #d6e2ec;padding:20px 22px;margin:0 0 18px;min-width:0}.portal-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;border-bottom:2px solid var(--portal-ink);padding-bottom:10px;margin-bottom:8px}.portal-section-title h2,.portal-section h2{font-size:21px;margin:0}.portal-section-title a,.portal-link{color:var(--portal-brand);font-weight:700;text-decoration:none;font-size:13px}.portal-row{display:grid;grid-template-columns:minmax(0,1fr) auto 20px;align-items:center;gap:14px;min-height:48px;border-bottom:1px solid #dbe7f0;color:var(--portal-ink);text-decoration:none}.portal-row>span{font-weight:650;overflow:hidden;text-overflow:ellipsis}.portal-row small{color:#50697c;font-size:12px;white-space:nowrap}.portal-row>b{color:var(--portal-brand)}.portal-row:hover{color:var(--portal-brand)}
.portal-content{min-height:160px}.portal-mode .portal-content .card{border:1px solid #d6e2ec;box-shadow:none}.portal-mode .portal-content .card-header{background:#e6f2f9;color:#113e58}.portal-mode .search-bar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.portal-mode .search-bar input,.portal-mode .search-bar select{min-height:38px;padding:7px 10px;border:1px solid var(--portal-edge);background:#fff;color:var(--portal-ink);font:inherit}.portal-mode .search-bar .search-input{flex:1;min-width:170px}.portal-mode .standings-table{background:#fff}.portal-mode .standings-table th{background:#e4f0f7;color:#24475d}.portal-mode .pager button.active{background:var(--stl-action);border-color:var(--stl-action)}.portal-prose{line-height:1.9;color:#456075}.portal-prose h2{margin-top:20px}.portal-chip,.portal-switches a{display:inline-flex;align-items:center;min-height:36px;padding:6px 12px;margin:3px;border:1px solid var(--stl-line);border-radius:4px;background:#fff;color:#154a69;text-decoration:none;font-size:13px}.portal-chip.selected{background:var(--stl-deep);color:#fff;border-color:var(--stl-deep)}.portal-switches{display:flex;gap:4px;flex-wrap:wrap;margin:12px 0}.portal-table-scroll{overflow:auto}.portal-table{width:auto;min-width:min(100%,650px);border-collapse:collapse;background:#fff;font-variant-numeric:tabular-nums}.portal-table th,.portal-table td{padding:10px 13px;text-align:left;border-bottom:1px solid #d8e4ed;white-space:nowrap}.portal-table th{background:#e6f2f9;font-size:13px}.portal-table td a{color:var(--stl-action)}.portal-rounds{display:flex;gap:3px;flex-wrap:wrap;width:100%}.portal-game{display:grid;grid-template-columns:minmax(110px,1fr) auto auto minmax(110px,1fr) 18px;gap:12px;align-items:center;min-height:68px;padding:10px 7px;border-bottom:1px solid #d8e4ed;color:var(--portal-ink);text-decoration:none}.portal-game small{grid-column:1/-1;color:#576f82;font-size:11px;margin-bottom:-8px}.portal-game b:last-of-type{text-align:right}.portal-score{font-weight:800;background:var(--stl-deep);color:white;padding:4px 10px;border-radius:3px;white-space:nowrap}.portal-game i{font-style:normal;color:var(--stl-action)}.portal-manage{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:0 0 16px}.portal-manage b{margin-right:6px}.portal-manage a,.portal-search button{color:#fff;background:var(--stl-deep);padding:8px 13px;text-decoration:none;border:0;border-radius:3px;font:600 13px inherit}.portal-search{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.portal-search input,.portal-search select{font:inherit;min-height:40px;padding:7px 11px;border:1px solid var(--stl-line);background:#fff;color:var(--stl-deep)}.portal-search input{flex:1;min-width:180px}.portal-search button{cursor:pointer}.portal-count{font-size:13px;color:#4a6578;margin:6px 0}.portal-directory-row{display:grid;grid-template-columns:minmax(150px,1fr) 120px 110px 18px;gap:12px;align-items:center;min-height:54px;padding:8px 12px;border-bottom:1px solid #d8e4ed;background:#fff;color:var(--stl-deep);text-decoration:none}.portal-directory-row span,.portal-directory-row small{font-size:13px;color:#536c7e}.portal-directory-row i{font-style:normal;color:var(--stl-action)}.portal-mode .breadcrumb a{color:var(--stl-action)}.portal-mode .footer{margin-top:20px;border-color:var(--stl-line);color:#56697a}.empty{color:#5c7183;padding:14px 4px}
@media(max-width:800px){.portal-mode .header{padding:8px 18px;align-items:flex-start;flex-direction:column;gap:4px}.portal-mode #portal-nav{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px}.portal-mode #portal-nav a{justify-content:center;font-size:12px;min-height:40px}.portal-wrap{padding:22px 20px 36px}.portal-hero{min-height:390px;padding:32px 24px;background-position:60% center}.portal-hero:before{background:linear-gradient(90deg,#051f38ef,#051f38b8 56%,#051f3838)}.portal-stats{padding:16px 20px;gap:9px}.portal-stats a{display:block}.portal-stats b{display:block;font-size:24px}.portal-stats span{font-size:11px}.portal-home-grid{grid-template-columns:1fr;gap:18px;padding:22px 20px 32px}.portal-game{grid-template-columns:minmax(70px,1fr) auto minmax(70px,1fr) 12px;gap:6px;font-size:13px}.portal-score{grid-column:2;grid-row:2}.portal-game b:nth-of-type(1){grid-column:1;grid-row:2}.portal-game b:nth-of-type(2){grid-column:3;grid-row:2}.portal-game i{grid-column:4;grid-row:2}.portal-directory-row{grid-template-columns:minmax(110px,1fr) 78px 70px 14px;gap:7px;font-size:13px;padding:8px 4px}.portal-directory-row span,.portal-directory-row small{font-size:11px}}
@media(max-width:430px){.portal-mode #portal-nav{grid-template-columns:repeat(4,minmax(0,1fr))}.portal-hero{min-height:410px;padding:28px 18px;background-position:64% center}.portal-hero h1{font-size:55px}.portal-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.portal-row{grid-template-columns:minmax(0,1fr) auto 16px;gap:8px}.portal-wrap{padding-left:14px;padding-right:14px}.portal-section{padding:16px 13px}.portal-directory-row{grid-template-columns:minmax(100px,1fr) 64px 58px 12px}.portal-directory-row b{font-size:12px}.portal-table th,.portal-table td{padding:8px 7px}}

/* Use the same artwork pool for the title screen and the compact archive mastheads. */
.portal-hero,
.portal-sub-banner {
  background-image: var(--portal-art, url(../assets/stl/A.jpg));
  background-position: var(--portal-focus, 65% 39%);
  background-size: cover;
}
.portal-sub-banner {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(155px, 15vw, 222px);
  background-color: #0b263e;
  color: white;
}
.portal-sub-banner[hidden] { display: none; }
.portal-sub-banner::before {
  position: absolute;
  content: "";
  inset: 0;
  background: linear-gradient(90deg, #051f38ed, #051f3890 44%, transparent 82%);
}
.portal-banner-copy { position: relative; padding: 28px max(46px, calc((100vw - 1128px)/2)); }
.portal-banner-copy h1 { margin: 0; font-size: clamp(32px, 3.5vw, 52px); line-height: 1.15; color: #f4faff; }
.portal-banner-copy p { margin: 10px 0 0; color: #e3f3ff; max-width: 55ch; }
.portal-archive { gap: 18px 24px; }
.portal-archive .portal-section { margin: 0; }
.portal-archive-wide { grid-column: 1 / -1; }
.portal-story p, .portal-rules li { line-height: 1.85; }
.portal-story h3 { font-size: 16px; margin: 20px 0 4px; }
.portal-story p { margin: 8px 0 12px; }
.portal-timeline { display: grid; grid-template-columns: auto 1fr; gap: 0 18px; margin: 10px 0 0; }
.portal-timeline dt, .portal-timeline dd { padding: 12px 0; border-bottom: 1px solid #dae5ee; }
.portal-timeline dt { color: var(--stl-action); font-weight: bold; }
.portal-timeline dd { margin: 0; }
.portal-archive-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 9px; }
.portal-archive-links a { display: inline-flex; align-items: center; min-height: 38px; font-weight: 650; color: var(--stl-action); }
.portal-rules { padding-left: 20px; }
.portal-rules li { margin-bottom: 12px; }
.portal-archive .mini-rank-table td.left { overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .portal-banner-copy { padding: 20px; }
  .portal-sub-banner { min-height: 140px; }
  .portal-sub-banner::before { background: linear-gradient(90deg, #051f38de, #051f3880 78%, #051f3830); }
}
@media (max-width: 430px) {
  .portal-banner-copy { padding: 16px; }
  .portal-banner-copy h1 { font-size: 30px; }
  .portal-banner-copy p { font-size: 13px; }
  .portal-timeline { gap: 0 12px; }
}

.portal-memory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: #192932;
  color: #fff7e7;
  text-decoration: none;
}
.portal-memory img { width: 100%; height: 100%; max-height: 340px; object-fit: cover; }
.portal-memory-copy { align-self: center; padding: clamp(24px,4vw,54px); }
.portal-memory h2 { margin: 0; color: inherit; font: 700 clamp(25px,2.55vw,38px)/1.4 "Songti SC","SimSun",serif; text-wrap: balance; }
.portal-memory p { margin: 14px 0 22px; color: #e6dfd3; font-size: 16px; line-height: 1.85; }
.portal-memory span { color: #f2ce96; font-weight: 700; }
.portal-memory b { margin-left: 8px; }
.portal-memory:hover { color: #fff7e7; text-decoration: none; }
.portal-memory:hover span, .portal-memory:focus-visible span { text-decoration: underline; text-underline-offset: 4px; }
.portal-memory:focus-visible { outline: 3px solid var(--stl-action); outline-offset: 3px; }
@media (max-width: 660px) {
  .portal-memory { grid-template-columns: 1fr; }
  .portal-memory img { height: auto; }
}

.replay-link { display:inline-block; color:var(--stl-action); font-weight:700; font-size:13px; white-space:nowrap; padding:5px 8px; text-underline-offset:3px }
.replay-game-action { text-align:center }
.replay-fixture { display:flex; align-items:center; gap:6px }
.replay-fixture .portal-game { flex:1; min-width:0 }
#replay-form .replay-round { flex:0 1 80px; min-width:68px }
.replay-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--portal-edge) }
.replay-row>div { min-width:0; overflow-wrap:anywhere }
.replay-row small { display:block; color:#546b79 }
.replay-game { display:block; color:var(--portal-ink); font-weight:650; padding:3px 0 }
.replay-pages { display:flex; align-items:center; justify-content:center; gap:20px; margin-top:16px }

.portal-mode .archive-article { width:min(1000px,calc(100% - 32px)); margin:clamp(16px,3vw,36px) auto; }
.archive-article h1.card-header { margin:0; font-size:clamp(24px,3vw,36px); line-height:1.4; }
.archive-article .card-body { padding:clamp(16px,4vw,44px); }
.archive-article-meta { color:#50697c; font-size:14px; margin-bottom:24px; }
.archive-article-content { font-size:clamp(18px,1.5vw,21px); line-height:1.9; overflow-wrap:anywhere; overflow-x:auto; }
.archive-article-content p { font-size:inherit !important; line-height:inherit !important; }
.archive-article-content p :where(span,font) { font-size:inherit !important; line-height:inherit !important; }
.archive-article-content img { max-width:100%; height:auto; }
