:root{--portal-page:#edf2f4;--portal-paper:#fff;--portal-ink:#15222b;--portal-muted:#71808a;--portal-line:#dbe5e8;--portal-teal:#087f8c;--portal-teal-dark:#055f6b;--portal-navy:#101d2e;--portal-coral:#ef565d;--portal-blue:#3e7be7;--portal-gold:#d6a94c;color-scheme:light}
html{scroll-padding-top:154px;background:var(--portal-page)}
body.portal-home{min-width:320px;min-height:100%;padding:0 0 calc(72px + env(safe-area-inset-bottom));color:var(--portal-ink);background:var(--portal-page);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
.portal-home::before,.portal-home::after{display:none}
.portal-sticky{position:fixed;z-index:100;top:0;left:50%;width:min(100%,540px);padding-top:env(safe-area-inset-top);overflow:hidden;background:#fff;border-right:1px solid var(--portal-line);border-bottom:1px solid var(--portal-line);border-left:1px solid var(--portal-line);box-shadow:0 7px 24px rgba(21,51,63,.09);transform:translateX(-50%)}
.portal-brandbar{height:56px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf2f3}
.portal-brand{display:flex;align-items:center;gap:10px;color:var(--portal-ink);text-decoration:none}.portal-brand-sign{width:34px;height:34px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,var(--portal-teal),#10a1ae);border-radius:8px;font-family:"Songti SC",serif;font-size:1.2rem;font-weight:800;box-shadow:0 4px 11px rgba(8,127,140,.22)}.portal-brand strong,.portal-brand small{display:block}.portal-brand strong{font-family:"Songti SC",serif;font-size:1.16rem;letter-spacing:.12em}.portal-brand small{margin-top:1px;color:#8d9aa2;font:700 .625rem/1 Arial,sans-serif;letter-spacing:.16em}.portal-history-link{display:flex;align-items:center;gap:7px;color:var(--portal-teal-dark);text-decoration:none;font-size:.82rem;font-weight:700}.portal-history-link b{width:23px;height:23px;display:grid;place-items:center;color:#fff;background:var(--portal-teal);border-radius:50%;font-size:1.1rem;line-height:1}
.portal-drawbar{min-height:78px;padding:8px 12px 9px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px;color:inherit;background:#fff;text-decoration:none}.portal-draw-meta{width:64px;padding-right:8px;border-right:1px solid #e8edef}.portal-draw-meta strong,.portal-draw-meta small{display:block}.portal-draw-meta strong{font-size:.76rem;white-space:nowrap}.portal-draw-meta small{margin-top:5px;color:#8a969d;font-size:.625rem;line-height:1.25}.portal-draw-balls{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:3px}.portal-draw-balls>i{color:#a3adb2;font-style:normal;font-weight:800}.portal-ball{position:relative;width:clamp(27px,7.7vw,32px);height:clamp(27px,7.7vw,32px);display:grid;place-items:center;flex:0 0 auto;color:#fff;border-radius:50%;font-size:.72rem;box-shadow:inset 0 -2px 0 rgba(0,0,0,.11)}.portal-ball.red{background:#ef5d63}.portal-ball.blue{background:#4283e5}.portal-ball.green{background:#2da779}.portal-ball small{position:absolute;top:calc(100% + 2px);left:50%;color:#75828a;font-size:.5625rem;font-weight:500;transform:translateX(-50%)}.portal-special-ball{box-shadow:0 0 0 2px #fff,0 0 0 3px var(--portal-gold)}.portal-ball-empty{color:#a2acb2;background:#edf1f2;box-shadow:none}
.portal-feed{width:min(100%,540px);min-height:100vh;margin:0 auto;padding:calc(150px + env(safe-area-inset-top)) 10px 18px;background:#f5f7f8;border-right:1px solid var(--portal-line);border-left:1px solid var(--portal-line)}
.portal-feature{position:relative;min-height:214px;margin:10px 0 12px;padding:24px 154px 22px 20px;overflow:hidden;color:#fff;background:linear-gradient(135deg,#111f32 0%,#123f4c 64%,#087f8c 100%);border-radius:14px;box-shadow:0 12px 28px rgba(17,47,59,.18)}.portal-feature::before{content:"";position:absolute;inset:0;background:linear-gradient(120deg,rgba(255,255,255,.09),transparent 35%,transparent 70%,rgba(78,218,218,.08));pointer-events:none}.portal-feature-copy{position:relative;z-index:2}.portal-feature-copy>p:first-child{margin:0 0 9px;color:#b8e7e8;font-size:.75rem;font-weight:700;letter-spacing:.06em}.portal-feature-copy>p:first-child span{margin-right:6px;padding:3px 7px;color:#073c44;background:#a8e3df;border-radius:4px}.portal-feature h1{margin:0;font-family:"Songti SC",serif;font-size:1.8rem;letter-spacing:.08em}.portal-feature-status{margin-top:11px;display:flex;align-items:center;gap:9px;font-size:.75rem}.portal-feature-status b{color:#ffd879}.portal-feature-status span{color:#c7d8dc}.portal-feature-subtitle{min-height:36px;margin:12px 0;color:#d8e4e7;font-size:.78rem;line-height:1.55}.portal-feature-copy>a{display:inline-flex;align-items:center;gap:14px;padding:9px 14px;color:#0b3440;background:#fff;border-radius:6px;text-decoration:none;font-size:.78rem;font-weight:800}.portal-feature-copy>a span{font-size:1rem}.portal-orbit{position:absolute;z-index:1;right:22px;top:35px;width:108px;height:108px;display:grid;place-items:center;border:1px solid rgba(180,239,237,.35);border-radius:50%}.portal-orbit::before,.portal-orbit::after{content:"";position:absolute;border:1px solid rgba(180,239,237,.2);border-radius:50%}.portal-orbit::before{inset:10px}.portal-orbit::after{inset:24px}.portal-orbit span{position:relative;z-index:2;width:50px;height:50px;display:grid;place-items:center;color:#fff4c8;background:rgba(255,255,255,.08);border:1px solid rgba(255,240,183,.6);border-radius:50%;font-family:"Songti SC",serif;font-size:1.55rem}.portal-orbit i{position:absolute;width:7px;height:7px;background:#ffe39a;border-radius:50%;box-shadow:0 0 12px #ffe39a}.portal-orbit i:first-of-type{top:7px;left:28px}.portal-orbit i:last-of-type{right:4px;bottom:31px}.portal-feature-streak{position:absolute;z-index:3;right:18px;bottom:17px;width:118px;padding:7px 10px;overflow:hidden;text-align:center;color:#ffe7a8;background:rgba(5,27,37,.48);border:1px solid rgba(255,225,146,.45);border-radius:6px;font-size:.72rem}.portal-feature-streak strong{font-size:1rem}.portal-streak-line::after{content:"";position:absolute;top:-50%;bottom:-50%;width:22px;background:linear-gradient(90deg,transparent,rgba(255,244,197,.95),transparent);transform:skewX(-18deg);animation:portalStreak 2.7s ease-in-out infinite}@keyframes portalStreak{0%,25%{left:-35%;opacity:0}38%{opacity:1}72%,100%{left:125%;opacity:0}}
.portal-section{margin:0 0 12px;overflow:hidden;background:var(--portal-paper);border:1px solid var(--portal-line);border-radius:11px;box-shadow:0 4px 14px rgba(36,65,75,.05)}.portal-section-head{min-height:58px;padding:9px 12px;display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:9px;background:linear-gradient(90deg,#087f8c,#1196a3)}.portal-section-head>span{width:34px;height:34px;display:grid;place-items:center;color:#fff6cf;border:1px solid rgba(255,255,255,.42);border-radius:50%;font-family:"Songti SC",serif;font-size:.9rem;font-weight:800}.portal-section-head h2{margin:0;color:#fff;font-size:1rem;letter-spacing:.03em}.portal-section-head p{margin:3px 0 0;color:#c9eef0;font-size:.66rem}.portal-section-head>a,.portal-section-head>em{color:#e9ffff;text-decoration:none;font-size:.69rem;font-style:normal}
.portal-arena-grid{padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.portal-arena-grid>a{min-width:0;padding:9px 8px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:2px 5px;color:inherit;background:#fbfcfc;border:1px solid #dce5e8;border-radius:6px;text-decoration:none}.portal-arena-grid>a>span{color:#75838b;font-size:.66rem}.portal-arena-grid>a>strong{overflow:hidden;color:var(--portal-coral);font-size:.79rem;text-overflow:ellipsis;white-space:nowrap}.portal-arena-grid>a:nth-child(even)>strong{color:var(--portal-blue)}.portal-arena-grid>a>small{grid-column:1/-1;color:#97a2a8;font-size:.625rem}.portal-empty{grid-column:1/-1;margin:20px;text-align:center;color:var(--portal-muted);font-size:.8rem}
.portal-rank-list{padding:0 10px}.portal-rank-row{min-height:82px;padding:10px 2px;display:grid;grid-template-columns:27px 43px minmax(0,1fr) auto;align-items:center;gap:9px;color:inherit;border-bottom:1px solid #e9eef0;text-decoration:none}.portal-rank-row:last-child{border-bottom:0}.portal-rank-number{color:#a0abb1;font:700 .7rem/1 Georgia,serif}.portal-rank-row:nth-child(-n+3) .portal-rank-number{color:#e19a2e}.portal-avatar{width:42px;height:42px;display:grid;place-items:center;color:#fff;border-radius:50%;font-family:"Songti SC",serif;font-size:1.05rem;font-weight:800;box-shadow:inset 0 0 0 3px rgba(255,255,255,.22)}.portal-avatar-1{background:linear-gradient(145deg,#258e98,#125c68)}.portal-avatar-2{background:linear-gradient(145deg,#e08d58,#a95038)}.portal-avatar-3{background:linear-gradient(145deg,#5b82cf,#3958a1)}.portal-avatar-4{background:linear-gradient(145deg,#9b75b5,#684782)}.portal-avatar-5{background:linear-gradient(145deg,#52a778,#337654)}.portal-rank-copy{min-width:0}.portal-rank-copy strong,.portal-rank-copy small,.portal-rank-copy em{display:block}.portal-rank-copy strong{color:#e44752;font-family:"Songti SC",serif;font-size:.94rem}.portal-rank-copy small{margin-top:3px;overflow:hidden;color:#65737c;font-size:.7rem;text-overflow:ellipsis;white-space:nowrap}.portal-rank-copy em{margin-top:4px;color:#9aa4aa;font-size:.625rem;font-style:normal}.portal-rank-score{text-align:right}.portal-rank-score b,.portal-rank-score small{display:block}.portal-rank-score b{color:var(--portal-teal);font-size:.7rem}.portal-rank-score small{margin-top:8px;color:#97a3aa;font-size:.625rem}
.portal-more-list{padding:4px 11px}.portal-more-list>a{min-height:65px;padding:8px 0;display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:9px;color:inherit;border-bottom:1px dashed #dde6e9;text-decoration:none}.portal-more-list>a:last-child{border-bottom:0}.portal-more-mark{width:34px;height:34px;display:grid;place-items:center;color:var(--portal-teal-dark);background:#e4f3f3;border-radius:8px;font-family:"Songti SC",serif;font-weight:800}.portal-more-list strong,.portal-more-list small{display:block}.portal-more-list strong{color:#e44c55;font-size:.84rem}.portal-more-list small{margin-top:5px;overflow:hidden;color:#7a878f;font-size:.66rem;text-overflow:ellipsis;white-space:nowrap}.portal-more-list>a>b{color:#2f7ec8;font-size:.69rem}
.portal-footer{padding:20px 12px 12px;text-align:center}.portal-footer strong{color:#6c7c84;font-family:"Songti SC",serif;letter-spacing:.12em}.portal-footer p{margin:7px 0;color:#9aa5aa;font-size:.66rem}.portal-bottom-nav{position:fixed;z-index:105;right:0;bottom:0;left:0;height:calc(58px + env(safe-area-inset-bottom));padding:5px max(16px,calc((100% - 520px)/2)) env(safe-area-inset-bottom);display:grid;grid-template-columns:repeat(2,1fr);background:rgba(255,255,255,.97);border-top:1px solid var(--portal-line);box-shadow:0 -5px 18px rgba(28,54,64,.08);backdrop-filter:blur(12px)}.portal-bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;color:#87949b;text-decoration:none;font-size:.66rem}.portal-bottom-nav a span{font-size:1rem}.portal-bottom-nav a.active{color:var(--portal-teal);font-weight:800}
.portal-home .announcement-card{color:var(--portal-ink);background:#fff;border-color:#c9d7da;border-radius:12px;box-shadow:0 24px 70px rgba(15,35,44,.24)}.portal-home .announcement-content{color:#5e6d76}.portal-home .announcement-mark{color:var(--portal-teal);border-color:var(--portal-teal)}.portal-home .gold-action{color:#fff;background:var(--portal-teal);border-radius:6px}
@media(min-width:541px){body.portal-home{background:linear-gradient(135deg,#dfeaec,#f5f8f9 45%,#e7eff1)}.portal-feed{box-shadow:0 0 42px rgba(37,65,75,.09)}}
@media(max-width:390px){.portal-feed{padding-inline:7px}.portal-feature{padding-right:132px}.portal-orbit{right:14px;width:96px;height:96px}.portal-feature-streak{right:11px;width:108px}.portal-rank-row{grid-template-columns:22px 39px minmax(0,1fr) auto;gap:7px}.portal-avatar{width:38px;height:38px}.portal-rank-score b{font-size:.64rem}}
@media(prefers-reduced-motion:reduce){.portal-streak-line::after{animation:none}}
.portal-generated-sections{display:contents}.test-expert-list{padding:0 8px}.test-expert-row{min-height:66px;padding:7px 2px;display:grid;grid-template-columns:38px 48px minmax(0,1fr) 92px;align-items:center;gap:5px;color:inherit;border-bottom:1px solid #e7ecee;text-decoration:none}.test-expert-row:last-child{border-bottom:0}.test-avatar{width:36px;height:36px;display:grid;place-items:center;color:#fff;border-radius:50%;font-family:"Songti SC",serif;font-size:.9rem;font-weight:800;box-shadow:inset 0 0 0 2px rgba(255,255,255,.28)}.test-avatar-1{background:#177d88}.test-avatar-2{background:#d86c48}.test-avatar-3{background:#4e71c5}.test-avatar-4{background:#885aa2}.test-avatar-5{background:#3c9467}.test-issue{color:#414b51;font-size:.73rem;white-space:nowrap}.test-title{overflow:hidden;font-family:"Songti SC",serif;font-size:.92rem;text-overflow:ellipsis;white-space:nowrap}.test-title.red,.test-arena-grid strong.red,.test-plan-list strong.red{color:#ed2834}.test-title.pink,.test-arena-grid strong.pink,.test-plan-list strong.pink{color:#ed24c4}.test-title.blue,.test-arena-grid strong.blue,.test-plan-list strong.blue{color:#164ee0}.test-author{text-align:right}.test-author small,.test-author b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.test-author small{color:#3158c6;font-size:.64rem}.test-author b{margin-top:4px;color:#e23a3f;font-size:.68rem}
.test-arena-grid{padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.test-arena-grid>a{min-width:0;min-height:45px;padding:7px 6px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:3px;color:inherit;background:#fff;border:1px solid #cdd6d9;border-radius:7px;text-decoration:none;box-shadow:0 1px 2px rgba(20,49,59,.06)}.test-arena-grid span{color:#454e53;font-size:.67rem;white-space:nowrap}.test-arena-grid strong{overflow:hidden;font-size:.78rem;text-overflow:ellipsis;white-space:nowrap}.test-arena-grid small{padding:2px 3px;color:#ef3b3e;border:1px solid #ef6d6e;border-radius:3px;font-size:.56rem}
.test-plan-list{padding:8px}.test-plan-list>a{min-height:51px;padding:8px 10px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:7px;color:inherit;background:#fff;border:1px solid #d6dee1;border-radius:7px;text-decoration:none}.test-plan-list>a+a{margin-top:6px}.test-plan-list span{color:#3e474c;font-size:.72rem;font-weight:700}.test-plan-list strong{font-size:.88rem}.test-plan-list b{color:#e33a3f;font-size:.72rem}.test-record-list{padding:0 8px 8px}.test-record-list>a{min-height:55px;display:grid;grid-template-columns:94px minmax(0,1fr) 78px;align-items:center;color:inherit;border-right:1px solid #b9d1d5;border-bottom:1px solid #b9d1d5;border-left:1px solid #b9d1d5;text-decoration:none}.test-record-list>a:first-child{border-top:1px solid #b9d1d5}.test-record-list span,.test-record-list strong,.test-record-list b{padding:8px 6px}.test-record-list span{color:#262e33;font-size:.75rem;font-weight:800}.test-record-list strong{color:#138b36;border-right:1px solid #b9d1d5;border-left:1px solid #b9d1d5;font-size:.8rem;text-align:center}.test-record-list b{color:#e43b3f;font-size:.71rem;text-align:center}.test-keyword-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid #d7dddf;border-left:1px solid #d7dddf}.test-keyword-grid>a{min-height:44px;padding:7px 3px;display:grid;place-items:center;color:#283137;background:#fff;border-right:1px solid #d7dddf;border-bottom:1px solid #d7dddf;text-align:center;text-decoration:none;font-size:.72rem;font-weight:700}.test-feed-banner{margin:0 0 12px;padding:13px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#fff;background:linear-gradient(90deg,#172b3d,#087f8c);border-radius:9px}.test-feed-banner strong{font-family:"Songti SC",serif;font-size:.9rem;letter-spacing:.05em}.test-feed-banner span{color:#c7eef0;font-size:.66rem}.portal-to-top{position:fixed;z-index:110;right:max(14px,calc((100% - 540px)/2 + 14px));bottom:calc(72px + env(safe-area-inset-bottom));width:44px;height:44px;display:grid;place-items:center;color:#fff;background:#ed3d45;border:3px solid rgba(255,255,255,.9);border-radius:50%;box-shadow:0 5px 14px rgba(181,39,46,.25);text-decoration:none;font-size:.65rem;font-weight:800}
@media(max-width:390px){.test-expert-row{grid-template-columns:34px 43px minmax(0,1fr) 78px;gap:4px}.test-avatar{width:32px;height:32px}.test-issue{font-size:.66rem}.test-title{font-size:.82rem}.test-author small{font-size:.58rem}.test-record-list>a{grid-template-columns:82px minmax(0,1fr) 69px}.test-record-list span,.test-record-list strong{font-size:.68rem}.test-record-list b{font-size:.62rem}.test-keyword-grid>a{font-size:.66rem}}

/* UI test page: collision-safe text colors and denser vertical rhythm. */
.test-color-red{color:#ed2834!important;background:transparent!important}
.test-color-pink{color:#ed24c4!important;background:transparent!important}
.test-color-blue{color:#164ee0!important;background:transparent!important}
.test-title,.test-arena-grid strong,.test-plan-list strong{background:transparent!important}
.portal-section{margin-bottom:6px;border-radius:8px}
.portal-section-head{min-height:46px;padding:5px 9px;grid-template-columns:32px minmax(0,1fr) auto;gap:7px}
.portal-section-head>span{width:30px;height:30px}
.portal-section-head p{margin-top:1px}
.portal-arena-grid{padding:5px;gap:4px}
.portal-arena-grid>a{padding:5px 6px}
.test-expert-list{padding:0 6px}
.test-expert-row{min-height:48px;padding:4px 2px}
.test-avatar{width:30px;height:30px}
.test-author b{margin-top:1px}
.test-arena-grid{padding:5px;gap:4px}
.test-arena-grid>a{min-height:38px;padding:4px 5px}
.test-plan-list{padding:5px}
.test-plan-list>a{min-height:42px;padding:5px 8px}
.test-plan-list>a+a{margin-top:4px}
.test-record-list{padding:0 6px 5px}
.test-record-list>a{min-height:44px}
.test-record-list span,.test-record-list strong,.test-record-list b{padding:5px 4px}
.test-keyword-grid>a{min-height:34px;padding:4px 2px}
.test-feed-banner{margin-bottom:6px;padding:9px 12px}
.portal-feature-button{display:inline-flex;align-items:center;gap:14px;padding:9px 14px;color:#0b3440;background:#fff;border-radius:6px;font-size:.78rem;font-weight:800;text-decoration:none;cursor:pointer}.portal-feature-button span{font-size:1rem}
.portal-arena-grid>.portal-arena-card{min-width:0;padding:5px 6px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:2px 5px;color:inherit;background:#fbfcfc;border:1px solid #dce5e8;border-radius:6px;text-decoration:none}.portal-arena-card>span{color:#75838b;font-size:.66rem}.portal-arena-card>strong{overflow:hidden;color:var(--portal-coral);font-size:.79rem;text-overflow:ellipsis;white-space:nowrap}.portal-arena-card:nth-child(even)>strong{color:var(--portal-blue)}.portal-arena-card>small{grid-column:1/-1;color:#97a2a8;font-size:.625rem}
.test-plan-list>a{grid-template-columns:minmax(0,1fr) minmax(116px,1.05fr) minmax(62px,.72fr)}.test-plan-list strong{text-align:center;letter-spacing:.14em}.test-plan-list b{text-align:right}
.test-expert-section-centered .test-title{text-align:center;letter-spacing:.12em}
.test-record-pending strong{color:#164ee0}

/* UI test page: larger, heavier typography throughout. */
html{font-size:18px}
body.portal-home{font-weight:700}
body.portal-home :where(h1,h2,h3,p,a,span,small,strong,b,em,button){font-weight:700}

/* Keep the special feature at its original scale and on one line. */
.portal-feature-copy>p:first-child,.portal-feature-status{font-size:12px}
.portal-feature h1{font-size:28.8px;white-space:nowrap}
.portal-feature-subtitle,.portal-feature-button{font-size:12.5px}
.portal-feature-streak{font-size:11.5px}.portal-feature-streak strong{font-size:16px}
.portal-orbit span{font-size:24.8px}

/* Enlarge the material sections by another two pixels. */
.portal-section-head h2{font-size:calc(1rem + 2px)}
.portal-section-head p{font-size:calc(.66rem + 2px)}
.portal-section-head>a,.portal-section-head>em{font-size:calc(.69rem + 2px)}
.portal-arena-grid>a>span,.portal-arena-card>span{font-size:calc(.66rem + 2px)}
.portal-arena-grid>a>strong,.portal-arena-card>strong{font-size:calc(.79rem + 2px)}
.portal-arena-grid>a>small,.portal-arena-card>small{font-size:calc(.625rem + 2px)}
.test-issue{font-size:calc(.73rem + 2px)}
.test-title{font-size:calc(.92rem + 2px)}
.test-author small{font-size:calc(.64rem + 2px)}
.test-author b{font-size:calc(.68rem + 2px)}
.test-arena-grid span{font-size:calc(.67rem + 2px)}
.test-arena-grid strong{font-size:calc(.78rem + 2px)}
.test-arena-grid small{font-size:calc(.56rem + 2px)}
.test-plan-list span,.test-plan-list b{font-size:calc(.72rem + 2px)}
.test-plan-list strong{font-size:calc(.88rem + 2px)}
.test-record-list span{font-size:calc(.75rem + 2px)}
.test-record-list strong{font-size:calc(.8rem + 2px)}
.test-record-list b{font-size:calc(.71rem + 2px)}

/* Narrow-screen cards: preserve enlarged titles without truncation. */
.test-arena-grid>a{min-height:58px;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"issue space badge" "title title title";gap:3px 5px}
.test-arena-grid span{grid-area:issue}
.test-arena-grid strong{grid-area:title;width:100%;overflow:visible;text-align:center;text-overflow:clip;white-space:nowrap}
.test-arena-grid small{grid-area:badge;justify-self:end}
@media(max-width:420px){.test-expert-row{grid-template-columns:28px 44px minmax(0,1fr) 84px;gap:3px}.test-avatar{width:28px;height:28px}.test-author small{overflow:visible;font-size:11.5px;letter-spacing:-.02em;text-overflow:clip}.test-author b{font-size:13px}}
.test-author small{overflow:visible;font-size:11.5px;letter-spacing:-.02em;text-overflow:clip}

/* Local portrait avatars with a text fallback for failed image loads. */
.test-avatar{overflow:hidden;background:#e9f1f3;border:1px solid rgba(15,91,102,.2);box-shadow:0 1px 4px rgba(18,54,63,.16)}
.test-avatar img{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
.test-avatar-fallback{width:100%;height:100%;place-items:center;color:#fff;font-size:.9rem;font-weight:800}
.test-avatar-fallback:not([hidden]){display:grid}

/* Keep PK cards on one row while allowing titles to remain fully visible. */
.test-arena-grid>a{min-height:42px;padding:4px;grid-template-columns:auto auto auto;grid-template-areas:none;justify-content:space-between;gap:2px}
.test-arena-grid span,.test-arena-grid strong,.test-arena-grid small{grid-area:auto}
.test-arena-grid span{font-size:clamp(11px,3vw,13px)}
.test-arena-grid strong{width:auto;min-width:0;overflow:visible;font-size:clamp(12px,3.25vw,14px);letter-spacing:-.04em;text-align:center;text-overflow:clip;white-space:nowrap}
.test-arena-grid small{padding:1px 2px;font-size:clamp(10px,2.7vw,12px);justify-self:auto}

/* Compact record columns and outcome highlighting. */
.test-record-list>a{grid-template-columns:64px minmax(0,1fr) 64px}
.test-record-list span{padding-inline:4px;text-align:center}
.test-record-list mark{padding:0 2px;color:#e02932;background:#fff05a;border-radius:2px;font-weight:800}
.test-record-list b.is-hit{color:#e02932}.test-record-list b.is-miss{color:#7d8990}.test-record-list b.is-pending{color:#286ac7}
@media(max-width:360px){.test-arena-grid span{font-size:9.5px}.test-arena-grid strong{font-size:11px}.test-arena-grid small{font-size:8.5px}}

/* Current production homepage refinements. */
.portal-brand img.portal-brand-sign{display:block;padding:0;object-fit:cover}
.portal-section-head p{display:none}
.portal-update-strip{min-height:34px;margin:-1px 0 7px;padding:7px 10px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:6px;color:#e8ffff;background:linear-gradient(90deg,#153042,#087f8c 55%,#0b929c);border-radius:0 0 8px 8px;box-shadow:0 3px 10px rgba(22,60,70,.08);font-size:clamp(9px,2.7vw,12px);line-height:1.2;white-space:nowrap}
.portal-update-strip strong{color:var(--strip-text-color,#fff)}.portal-update-strip b{justify-self:center;color:var(--strip-text-color,#ffe49a)}.portal-update-strip span{justify-self:end;color:var(--strip-text-color,#d6f4f3)}

/* Teal mobile draw page. */
.portal-draw-feed{padding-top:calc(66px + env(safe-area-inset-top));padding-bottom:26px}
.portal-draw-page .hidden{display:none!important}
.portal-latest-draw,.portal-draw-history,.portal-draw-empty{margin:10px 0 12px;overflow:hidden;background:#fff;border:1px solid var(--portal-line);border-radius:11px;box-shadow:0 5px 17px rgba(28,65,75,.07)}
.portal-draw-section-title{min-height:56px;padding:8px 11px;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:8px;color:#fff;background:linear-gradient(90deg,#086f7c,#1096a2)}
.portal-draw-section-title>span{width:32px;height:32px;display:grid;place-items:center;color:#fff3bd;border:1px solid rgba(255,255,255,.45);border-radius:50%;font-family:"Songti SC",serif;font-size:16px;font-weight:800}
.portal-draw-section-title h1,.portal-draw-section-title h2{margin:0;color:#fff;font-size:18px;line-height:1.2;letter-spacing:.04em}
.portal-draw-section-title>div>small{display:block;margin-top:3px;color:#c9eef0;font-size:11px;font-weight:600}
.portal-draw-section-title em{color:#e8ffff;font-size:12px;font-style:normal;white-space:nowrap}
.portal-live-link{min-height:32px;padding:7px 10px;display:inline-flex;align-items:center;justify-content:center;color:#075966;background:#fff;border:1px solid rgba(255,255,255,.7);border-radius:6px;text-decoration:none;font-size:12px;font-weight:800;white-space:nowrap;box-shadow:0 2px 7px rgba(0,45,54,.12)}
.portal-latest-balls{min-height:104px;padding:20px 9px 16px;display:flex;align-items:center;justify-content:center;gap:clamp(4px,1.6vw,8px)}
.portal-latest-balls>i,.portal-history-balls>i{color:#91a0a7;font-style:normal;font-weight:900}
.portal-latest-ball-wrap{position:relative;display:grid;justify-items:center;gap:5px}
.portal-latest-ball-wrap>b{width:clamp(34px,9vw,46px);height:clamp(34px,9vw,46px);display:grid;place-items:center;color:#fff;border-radius:50%;font-size:clamp(14px,4vw,17px);box-shadow:inset 0 -3px 0 rgba(0,0,0,.11)}
.portal-latest-ball-wrap>b.red,.portal-history-balls b.red{background:#ef5d63}.portal-latest-ball-wrap>b.blue,.portal-history-balls b.blue{background:#4283e5}.portal-latest-ball-wrap>b.green,.portal-history-balls b.green{background:#2da779}
.portal-latest-ball-wrap>b.empty{color:#98a5ab;background:#edf1f2;box-shadow:none}
.portal-latest-ball-wrap.special>b{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--portal-gold),inset 0 -3px 0 rgba(0,0,0,.1)}
.portal-latest-ball-wrap small{color:#66767f;font-size:12px;white-space:nowrap}
.portal-draw-summary{padding:10px;display:grid;grid-template-columns:repeat(6,auto);justify-content:center;gap:7px;color:#54636b;background:#f2f7f8;border-top:1px solid #deeaec;font-size:12px}
.portal-draw-summary span{min-height:28px;padding:5px 7px;display:flex;align-items:center;justify-content:center;gap:4px;background:#fff;border:1px solid #dbe6e9;border-radius:5px;white-space:nowrap}
.portal-draw-summary i{width:7px;height:7px;border-radius:50%}.portal-draw-summary i.red{background:#ef5d63}.portal-draw-summary i.blue{background:#4283e5}.portal-draw-summary i.green{background:#2da779}.portal-draw-summary b{color:#173039}
.portal-draw-live-status{min-height:49px;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#63747c;background:#f2f7f8;border-top:1px solid #deeaec;font-size:13px}.portal-draw-live-status b{color:var(--portal-teal);white-space:nowrap}
.portal-draw-history{scroll-margin-top:66px}.portal-history-filters{padding:8px;display:grid;grid-template-columns:1fr 1fr minmax(92px,1.2fr);gap:6px;background:#f3f7f8;border-bottom:1px solid #dce7e9}
.portal-history-filters button,.portal-history-filters select{min-height:36px;padding:5px 8px;color:#526169;background:#fff;border:1px solid #cad9dc;border-radius:6px;font:700 13px/1.2 inherit;text-align:center}
.portal-history-filters button.selected{color:#fff;background:var(--portal-teal);border-color:var(--portal-teal)}
.portal-history-row{padding:10px;border-bottom:1px solid #e0e8ea}.portal-history-row:last-child{border-bottom:0}
.portal-history-meta{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;margin-bottom:9px}
.portal-history-meta strong{color:#16303a;font-size:15px}.portal-history-meta span{color:#7a898f;font-size:12px}.portal-history-meta b{color:#e14b52;font-size:13px;white-space:nowrap}
.portal-history-balls{display:flex;align-items:flex-start;justify-content:center;gap:clamp(5px,2vw,10px)}
.portal-history-balls>span{display:grid;justify-items:center;gap:3px}.portal-history-balls b{width:clamp(28px,7.6vw,34px);height:clamp(28px,7.6vw,34px);display:grid;place-items:center;color:#fff;border-radius:50%;font-size:12px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.1)}
.portal-history-balls b.special{box-shadow:0 0 0 2px #fff,0 0 0 3px var(--portal-gold)}.portal-history-balls small{color:#77868d;font-size:10px}
.portal-history-summary{margin-top:9px;display:flex;align-items:center;justify-content:flex-end;gap:6px}.portal-history-summary span{padding:3px 7px;color:#718087;background:#f2f6f7;border-radius:4px;font-size:11px}.portal-history-summary b{color:#174450}
.portal-history-empty{margin:0;padding:28px;text-align:center;color:#78888f;font-size:14px}
.portal-draw-empty{padding:45px 18px;text-align:center}.portal-draw-empty img{width:52px;height:52px}.portal-draw-empty h1{margin:15px 0 7px;font-size:20px}.portal-draw-empty p{margin:0;color:#75848b;font-size:14px}
@media(max-width:430px){.portal-draw-summary{grid-template-columns:repeat(3,1fr)}.portal-draw-section-title em{font-size:11px}.portal-history-meta{grid-template-columns:auto 1fr auto}.portal-history-meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.portal-history-balls{gap:clamp(3px,1.2vw,6px)}}
@media(max-width:350px){.portal-draw-section-title{grid-template-columns:31px minmax(0,1fr) auto}.portal-draw-section-title h1,.portal-draw-section-title h2{font-size:16px}.portal-draw-section-title em{font-size:9px}.portal-latest-balls{padding-inline:5px;gap:3px}.portal-history-row{padding-inline:6px}.portal-history-filters{grid-template-columns:1fr 1fr 86px}.portal-history-filters button,.portal-history-filters select{padding-inline:3px;font-size:11px}}

/* Larger two-line bookmark strip: keep every label visible on narrow phones. */
.portal-update-strip{width:100%;min-height:58px;margin-top:-1px;padding:7px 11px;grid-template-columns:auto 1fr;grid-template-areas:"status domain" "action action";gap:3px 8px;border:0;border-radius:0 0 8px 8px;font-family:inherit;line-height:1.2;text-align:left;white-space:normal;cursor:default}
.portal-update-strip strong{grid-area:status;align-self:center;color:var(--strip-text-color,#fff);font-size:clamp(13px,3.7vw,15px);white-space:nowrap}
.portal-update-strip b{grid-area:domain;align-self:center;justify-self:end;color:var(--strip-text-color,#ffe08a);font-size:clamp(17px,5vw,21px);letter-spacing:.02em;white-space:nowrap}
.portal-update-strip span{grid-area:action;justify-self:center;color:var(--strip-text-color,#e7ffff);font-size:clamp(13px,3.6vw,15px);white-space:nowrap}
.portal-drawbar{cursor:default;user-select:none}
.portal-bottom-nav{display:grid!important;visibility:visible!important;opacity:1!important}
.portal-history-filters{grid-template-columns:repeat(3,1fr)}

/* Safe rich text configured for every material update strip. */
.portal-update-strip{display:block;width:100%;min-height:0;margin:-1px 0 7px;padding:7px 10px;color:#e8ffff;white-space:normal;overflow-wrap:anywhere;cursor:default}
.portal-update-strip .strip-rich-content{width:100%;line-height:1.35}
.portal-update-strip .strip-rich-content div,.portal-update-strip .strip-rich-content p{min-height:1.35em;margin:0}
.portal-update-strip .strip-rich-content strong,.portal-update-strip .strip-rich-content b,.portal-update-strip .strip-rich-content span,.portal-update-strip .strip-rich-content em,.portal-update-strip .strip-rich-content i,.portal-update-strip .strip-rich-content u{display:inline;grid-area:auto;justify-self:auto;color:inherit;font-size:inherit;letter-spacing:normal;white-space:normal}
@media(max-width:350px){.portal-history-filters{grid-template-columns:repeat(3,1fr)}}

/* Additional homepage section styles. */
.test-medal-list{padding:4px 8px 8px;display:grid}.test-medal-list>a{min-height:52px;padding:6px 5px;display:grid;grid-template-columns:36px minmax(0,1fr) auto;grid-template-areas:"rank title streak" "rank issue streak";align-items:center;column-gap:8px;color:#23343c;border-bottom:1px solid #e2e9eb;text-decoration:none}.test-medal-list>a:last-child{border-bottom:0}.test-medal-rank{grid-area:rank;width:31px;height:31px;display:grid;place-items:center;color:#fff;background:#7f959d;border-radius:50%;font-size:14px;font-weight:900}.test-medal-list>a:nth-child(1) .test-medal-rank{color:#684800;background:linear-gradient(145deg,#fff0a7,#dfad2d);box-shadow:0 0 0 3px #fff6ce}.test-medal-list>a:nth-child(2) .test-medal-rank{color:#46545a;background:linear-gradient(145deg,#f7fbfd,#aebdc3)}.test-medal-list>a:nth-child(3) .test-medal-rank{color:#6a3518;background:linear-gradient(145deg,#ffd0a6,#c87a43)}.test-medal-list strong{grid-area:title;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}.test-medal-list small{grid-area:issue;color:#87949a;font-size:12px}.test-medal-list b{grid-area:streak;color:#e54b52;font-size:14px;white-space:nowrap}
.test-tile-grid{padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.test-tile-grid>a{min-width:0;min-height:92px;padding:10px;display:grid;grid-template-columns:1fr auto;grid-template-areas:"issue issue" "title title" "label streak";align-content:center;gap:4px;color:#263940;background:linear-gradient(155deg,#fff,#f2f8f9);border:1px solid #d9e4e7;border-radius:9px;text-decoration:none;box-shadow:0 3px 8px rgba(17,72,83,.06)}.test-tile-grid small{grid-area:issue;color:#7a8b92;font-size:12px}.test-tile-grid strong{grid-area:title;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}.test-tile-grid span{grid-area:label;color:#087a87;font-size:12px}.test-tile-grid b{grid-area:streak;color:#e64a52;font-size:13px;white-space:nowrap}
.test-ticker-list{padding:4px 8px 8px;display:grid}.test-ticker-list>a{min-height:45px;padding:5px 2px;display:grid;grid-template-columns:30px 46px minmax(0,1fr) auto 12px;align-items:center;gap:5px;color:#263940;border-bottom:1px dashed #d8e2e5;text-decoration:none}.test-ticker-list>a:last-child{border-bottom:0}.test-ticker-list i{width:26px;height:26px;display:grid;place-items:center;color:#087985;background:#e4f4f5;border-radius:6px;font-size:11px;font-style:normal;font-weight:900}.test-ticker-list span{color:#718189;font-size:12px;white-space:nowrap}.test-ticker-list strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}.test-ticker-list b{color:#e34a51;font-size:13px;white-space:nowrap}.test-ticker-list em{color:#84a0a6;font-size:20px;font-style:normal}
.test-showcase-grid{padding:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.test-showcase-grid>a{min-width:0;min-height:95px;padding:10px;display:grid;align-content:center;gap:3px;color:#263940;background:#f7fafb;border:1px solid #dce6e8;border-radius:9px;text-decoration:none}.test-showcase-grid>a:first-child{min-height:112px;grid-column:1/-1;padding:14px 16px;color:#fff;background:linear-gradient(125deg,#11394a,#078593);border-color:#168f99;box-shadow:0 8px 18px rgba(7,96,108,.2)}.test-showcase-grid span{color:#087985;font-size:12px;font-weight:800}.test-showcase-grid>a:first-child span,.test-showcase-grid>a:first-child small{color:#c9f1f2}.test-showcase-grid strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px}.test-showcase-grid>a:first-child strong{color:#fff!important;font-size:21px}.test-showcase-grid small{color:#829096;font-size:12px}.test-showcase-grid b{color:#e64a52;font-size:13px}.test-showcase-grid>a:first-child b{color:#ffe083;font-size:15px}
@media(max-width:360px){.test-tile-grid,.test-showcase-grid{gap:5px;padding:6px}.test-tile-grid>a,.test-showcase-grid>a{padding:8px}.test-tile-grid strong,.test-ticker-list strong,.test-medal-list strong{font-size:15px}.test-medal-list>a{grid-template-columns:32px minmax(0,1fr) auto;column-gap:5px}.test-ticker-list>a{grid-template-columns:27px 40px minmax(0,1fr) auto 10px;gap:3px}.test-ticker-list b{font-size:12px}}
