#sec-rank { height:auto; min-height:0; overflow-anchor:none; width: 100%; padding: 1.8rem 0 3rem; }
.portal-layout { width: 76.875rem; max-width: 94%; margin: auto; display: grid; grid-template-columns: 19rem minmax(0,1fr); gap: 1.5rem; align-items: start; color: #ded0be; font-size: 1rem; }
.portal-card { background: linear-gradient(135deg,#240d11ef,#10090ced 70%); border: 1px solid #8e633b70; box-shadow: inset 0 0 0 4px #11090a, inset 0 0 0 5px #74513030,0 10px 25px #0003; }
.portal-sidebar { display: grid; gap: 1.2rem; }
.portal-sidebar .portal-card { padding: 1.4rem; }
.portal-sidebar h2 { font-size: 1.1rem; color:#ebce99; padding-bottom: 1rem; margin:0 0 1rem; border-bottom: 1px solid #a6783d50; letter-spacing:.04em; }
.portal-layout button { cursor:pointer; }
.portal-layout label { display:block; font-size:.85rem; color:#bca897; margin-bottom: .9rem; }
.portal-layout input,.portal-layout select { display:block; width:100%; min-height: 2.9rem; margin-top:.4rem; padding:.7rem; background:#080507; color:#eee0cd; border:1px solid #77513880; border-radius:2px; font:inherit; }
.portal-layout input:focus,.portal-layout select:focus { outline:1px solid #d2a361; }
.portal-layout button:focus-visible,.portal-layout summary:focus-visible { outline:2px solid #d2a361; outline-offset:3px; }
.portal-layout button[data-panel] { display:flex; width:100%; align-items:center; justify-content:space-between; gap:.7rem; background:transparent; border:0; color:#d3c3b1; padding:.8rem .3rem; text-align:left; font:inherit; border-bottom:1px solid #c38d4520; }
.portal-layout button[data-panel]:hover,.portal-layout button.is-active { color:#ffe0a7; background:#8f35201a; }
.portal-layout .portal-primary { width:100%; padding:.85rem; border:1px solid #c59356; background:linear-gradient(#81422a,#4c231d); color:#ffdfaa; font-weight:700; }
.portal-note { display:block; font-size:.8rem; line-height:1.7; color:#a68d81; margin-top:.8rem; }
.portal-auth-links { display:flex; gap:1rem; font-size:.8rem; }
.portal-layout details { border-bottom:1px solid #c38d4520; }
.portal-layout summary { padding:.9rem .1rem; color:#e1c49a; cursor:pointer; }
.portal-layout details button[data-panel] { padding-left:1rem; font-size:.9rem; }
.portal-main { min-height:48rem; overflow:hidden; }
.portal-heading { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1.6rem 1.8rem; border-bottom:1px solid #a6783d50; background:linear-gradient(100deg,#61301f42,transparent); }
.portal-heading small { font-size:.65rem; letter-spacing:.15em; color:#a98154; }
.portal-heading h2 { margin:.4rem 0 0; font-size:1.65rem; color:#edcf9c; }
.portal-mode { font-size:.65rem; color:#b4967b; border:1px solid #79563870; padding:.4rem .6rem; white-space:nowrap; }
#portal-content { padding:1.6rem 1.8rem 2.5rem; }
.portal-intro { padding:1.7rem; border:1px solid #8f563440; background:radial-gradient(ellipse at right,#63202a50,transparent 75%),#160b0e; margin-bottom:1.5rem; }
.portal-intro>span,.portal-article>small { color:#bc915c; font-size:.75rem; letter-spacing:.07em; }
.portal-intro h3,.portal-article h3 { font-size:1.6rem; color:#f0d9b3; margin:.7rem 0 1rem; line-height:1.5; }
.portal-intro p,.portal-article p { line-height:1.9; color:#c7b3a3; }
.portal-news-tabs { display:flex; gap:2rem; padding:.6rem 0 1rem; color:#9e8171; border-bottom:1px solid #765236; }
.portal-news-tabs b { color:#e5c18b; }
.portal-layout .portal-news-row { padding:1.2rem 0!important; gap:1rem!important; }
.portal-news-number { font-size:1.5rem; color:#95633e; }
.portal-news-row>span:nth-child(2) { flex:1; }
.portal-news-row small { display:block; color:#b18755; font-size:.65rem; margin-bottom:.4rem; }
.portal-news-row strong { font-size:.96rem; line-height:1.6; font-weight:400; }
.portal-news-row time { color:#9d8172; font-size:.75rem; white-space:nowrap; }
.portal-user { display:grid; justify-items:center; gap:.65rem; padding:0 0 1.2rem; }
.portal-avatar { border:1px solid #bd8e51; border-radius:50%; padding:1rem; color:#edd3a3; background:#4f231c; font-family:Georgia,serif; }
.portal-user>span { font-size:.8rem; color:#a58c7d; }
.portal-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; }
.portal-stats>div { border:1px solid #976c393d; padding:1.2rem; }
.portal-stats small,.portal-stats strong { display:block; margin-bottom:.5rem; }
.portal-stats small { color:#9d8172; }
.portal-ranking { overflow:auto; }
.portal-ranking .rank { width:100%; height:auto; min-height:30rem; transform:none; padding:0; background:none; }
.portal-ranking .rank-header { display:none; }
.portal-ranking .rank-body { min-width:35rem; }
@media(max-width:767px) { .portal-layout { grid-template-columns:1fr; width:94%; font-size:14px; } .portal-main { min-height:38rem; } .portal-mode { display:none; } .portal-stats { grid-template-columns:1fr; } .portal-news-row time { display:none; } }

html, body { overflow-anchor: none; }
/* HT layout: compact login, grouped menu and clean editorial news list. */
.portal-layout { width:80.625rem; grid-template-columns:19rem minmax(0,1fr); gap:1.25rem; }
.portal-card { position:relative; border-color:#ad7b407a; border-radius:3px; box-shadow:inset 0 0 0 3px #10090b,inset 0 0 0 4px #a3773b55,0 6px 20px #0004; }
.portal-card::before,.portal-card::after { content:''; position:absolute; width:9px; height:9px; border:1px solid #c79b56; background:#632c23; transform:rotate(45deg); pointer-events:none; z-index:1; }
.portal-card::before { top:0; left:0; }
.portal-card::after { bottom:0; right:0; }
.portal-sidebar .portal-card { padding:0 1.15rem 1rem; }
.portal-sidebar h2 { min-height:3.8rem; display:flex; align-items:center; gap:.7rem; margin:0 -1.15rem 1rem; padding:.8rem 1.2rem; font-size:1.05rem; background:linear-gradient(100deg,#64302238,transparent); }
.portal-sidebar h2::before,.portal-heading h2::before { content:'♜'; color:#c59855; font-size:1.5rem; text-shadow:0 2px 4px #000; }
.portal-field { margin:0 0 .65rem!important; }
.portal-field input,.portal-field select { margin:0; min-height:2.9rem; padding:.7rem .85rem; }
.portal-captcha { display:grid; grid-template-columns:minmax(0,1fr) 5.3rem 2rem; gap:.4rem; align-items:center; margin:.7rem 0 .3rem; }
.portal-captcha input { margin:0; font-size:.8rem; padding:.5rem; min-height:2.5rem; }
.portal-captcha span { display:grid; place-items:center; height:2.5rem; color:#e1c28f; background:repeating-linear-gradient(15deg,#49332c 0 1px,#291d1b 1px 13px); font-size:1.05rem; letter-spacing:.14em; font-weight:700; }
.portal-captcha button { height:2.5rem; background:#201216; border:1px solid #78523480; color:#d7b481; }
.portal-layout .portal-primary { padding:.7rem; font:700 1.1rem Georgia,serif; box-shadow:inset 0 0 0 2px #e0b56633,0 3px 6px #0005; border-radius:3px; }
#portal-login .portal-note { font-size:.64rem; text-align:center; margin:.45rem 0 0; }
.portal-auth-links { justify-content:center; gap:.7rem; }
.portal-auth-links button[data-panel] { border:0; width:auto; font-family:Georgia,serif; font-size:.85rem; padding:.5rem 0 0; }
.portal-auth-links button span { display:none; }
.portal-auth-links button+button::before { content:'|'; color:#8c7668; margin-right:.5rem; }
.portal-menu { padding-bottom:0!important; }
.portal-menu h2 { margin-bottom:0; }
.portal-menu>button[data-panel],.portal-menu>details { margin:0 -1.15rem; width:calc(100% + 2.3rem); }
.portal-menu>button[data-panel] { padding:.9rem 1.2rem; }
.portal-menu summary { display:flex; align-items:center; gap:.75rem; list-style:none; padding:1rem 1.2rem; font-family:Georgia,serif; font-size:1.08rem; }
.portal-menu summary::-webkit-details-marker { display:none; }
.portal-menu summary::before { content:'♧'; font-size:1.35rem; color:#bb8c54; }
.portal-menu summary::after { content:'+'; display:grid; place-items:center; width:1.35rem; height:1.35rem; border:1px solid #92704780; border-radius:3px; margin-left:auto; color:#d09264; font:bold 1rem Arial; }
.portal-menu details[open]>summary::after { content:'−'; }
.portal-menu details button[data-panel] { padding:.75rem 1.4rem .75rem 2.8rem; }
.portal-main { min-height:0; }
.portal-heading { padding:.8rem 1.3rem; min-height:4rem; gap:1rem; justify-content:flex-start; flex-wrap:wrap; }
.portal-heading>div>small { display:none; }
.portal-heading h2 { display:flex; align-items:center; gap:.65rem; margin:0; font:700 1.1rem Georgia,'Times New Roman',serif; }
.portal-news-tabs { padding:0; border:0; gap:.1rem; margin-left:.3rem; flex-wrap:wrap; }
.portal-news-tabs button { color:#b6a297; padding:.8rem .65rem; border:0; border-bottom:2px solid transparent; background:none; font: .8rem Georgia,serif; }
.portal-news-tabs button.selected { color:#edcc91; border-bottom-color:#bd8949; background:linear-gradient(#ad6b2222,transparent); }
#portal-content { padding:0 1.3rem; min-height:35rem; }
.portal-bulletin { display:flex; justify-content:space-between; gap:1rem; padding:.85rem 0 .6rem; color:#bca58c; font-size:.65rem; letter-spacing:.05em; }
.portal-bulletin small { color:#8c7870; letter-spacing:0; font-size:.55rem; }
.portal-layout .portal-news-row { min-height:3.1rem; padding:.65rem 0!important; gap:.85rem!important; border-bottom:1px solid #c38d4526; }
.portal-prefix { flex:0 0 6.3rem; text-align:center; padding:.36rem .25rem; border:1px solid #ad814b80; border-radius:3px; color:#eedab7; background:linear-gradient(#71402b,#42251e); box-shadow:inset 0 1px #e3b46b44,0 2px 3px #0004; font:700 .73rem Georgia,serif; }
.prefix-notice { background:linear-gradient(#a1462f,#6b241e); border-color:#d07b4b90; }
.prefix-event { background:linear-gradient(#71444e,#42202c); }
.prefix-update { background:linear-gradient(#7c633a,#493719); }
.portal-news-row>strong { flex:1; color:#d6c3b1; font: .99rem/1.65 Georgia,'Times New Roman',serif; }
.portal-news-row time { font-size:.78rem; color:#a89081; padding-left:.7rem; }
.portal-news-row em { color:#e2a056; font:700 .6rem Arial; margin-left:.6rem; white-space:nowrap; }
.portal-news-footer { display:flex; justify-content:space-between; padding:.9rem 0; font:.8rem Georgia,serif; color:#b09a87; }
.portal-news-footer button { background:none; border:0; color:#d0ae82; font:inherit; }
.portal-article { padding:1.5rem 0; }
.portal-intro { margin-top:1.4rem; }
.portal-empty { padding:3rem 1rem; color:#b09a87; text-align:center; }
@media(max-width:767px) { .portal-layout { grid-template-columns:1fr; } .portal-news-tabs { margin-left:0; } .portal-bulletin small { display:none; } .portal-prefix { flex-basis:5.5rem; } .portal-news-row>strong { font-size:.9rem; } }
.portal-sidebar h2::before,.portal-heading h2::before { content:''; display:block; flex:0 0 1.7rem; width:1.7rem; height:2.3rem; background:url('./portal-crest-opt.webp') center/contain no-repeat; filter:sepia(.65) saturate(.65); }
.portal-news-row>strong { font-size:1.1rem; }
.portal-layout .portal-news-row { min-height:3.3rem; }
.portal-menu summary::before { content:'◫'; font-size:1.3rem; }
/* Original ranking palette: midnight sidebar, bronze heading, ivory content. */
.portal-sidebar .portal-card { background:#0e101c; border-color:#977340; box-shadow:inset 0 0 0 3px #0b0e18,inset 0 0 0 4px #6a533439,0 6px 20px #0004; }
.portal-sidebar h2 { background:linear-gradient(100deg,#202333,#0e101c); color:#eeead3; border-bottom-color:#84704455; }
.portal-sidebar input,.portal-sidebar select { background:#090c15; border-color:#515367; color:#e4dfcd; }
.portal-sidebar .portal-menu summary,.portal-sidebar button[data-panel] { color:#d8d3c0; }
.portal-sidebar .portal-menu>button.is-active,.portal-sidebar button[data-panel]:hover { background:#242936; color:#fff2cf; }
.portal-sidebar details,.portal-sidebar button[data-panel] { border-bottom-color:#64647435; }
.portal-sidebar .portal-primary { background:linear-gradient(#986332,#65401f); border-color:#c09a5c; }
.portal-main { background:#fff5e9; border-color:#927345; box-shadow:inset 0 0 0 3px #252832,inset 0 0 0 5px #62616a,inset 0 0 0 7px #1a1c25,0 6px 20px #0006; color:#29231f; }
.portal-heading { margin:7px 7px 0; background:linear-gradient(105deg,#82532a,#5e351a 65%,#342b24); border-bottom:1px solid #a27437; }
.portal-heading h2 { color:#fff8e9; }
.portal-news-tabs button { color:#e0c9aa; }
.portal-news-tabs button.selected { color:#fff7db; border-bottom-color:#eacb89; background:#a66f3440; }
#portal-content { margin:0 7px 7px; }
.portal-bulletin { color:#796c5e; }
.portal-bulletin small { color:#948373; }
.portal-layout .portal-news-row { border-bottom-color:#d8c9b9; }
.portal-layout .portal-main button[data-panel]:hover { background:#eddcc566; color:#4a2715; }
.portal-news-row>strong { color:#302b26; }
.portal-news-row time { color:#766c61; }
.portal-news-row em { color:#ad5c25; }
.portal-prefix { color:#fff3df; }
.portal-news-footer { color:#756453; }
.portal-news-footer button { color:#79502a; }
.portal-main .portal-note,.portal-main .portal-empty { color:#807060; }
.portal-intro { background:linear-gradient(110deg,#f1dfc8,#fcf0df); border-color:#cdb48e; }
.portal-intro>span,.portal-article>small { color:#96632f; }
.portal-intro h3,.portal-article h3 { color:#51371f; }
.portal-intro p,.portal-article p { color:#615348; }
.portal-stats>div { border-color:#d7c2a7; background:#f8ead8; }
.portal-stats small { color:#8c735a; }
.portal-main button[data-panel] { color:#73502d; border-bottom-color:#d7c8b9; }
.portal-news-tabs[hidden] { display:none; }
/* Sliced directly from the supplied original rank-box PNG. */
.portal-layout { gap:0; align-items:start; }
.portal-sidebar { padding-top:.2rem; gap:.85rem; padding-right:.2rem; }
.portal-sidebar .portal-card {
  border:solid transparent;
  border-width:14px 9px 15px;
  border-image-source:url('./portal-sidebar-original-opt.webp');
  border-image-slice:24 10 24 10 fill;
  border-image-width:14px 9px 15px;
  border-image-repeat:stretch;
  background:#0e101b;
  border-radius:0;
  box-shadow:none;
  padding:0 .65rem .25rem;
}
.portal-card::before,.portal-card::after { display:none; }
.portal-sidebar h2 { margin:0 -.65rem .75rem; padding:.7rem .65rem; background:none; }
.portal-menu h2 { margin-bottom:0; }
.portal-menu>button[data-panel],.portal-menu>details { margin:0 -.65rem; width:calc(100% + 1.3rem); }
.portal-menu summary { padding:.9rem .65rem; }
.portal-main {
  border:solid transparent;
  border-width:30px 18px 20px;
  border-image-source:url('./portal-content-original-opt.webp');
  border-image-slice:33 19 21 19;
  border-image-width:30px 18px 20px;
  border-image-repeat:stretch;
  background:#fff5e9;
  background-clip:padding-box;
  box-shadow:none;
  border-radius:0;
  overflow:visible;
}
.portal-heading {
  margin:0;
  background:#382b24 url('./portal-header-original-opt.webp') center/100% 100% no-repeat;
  border-bottom:1px solid #9f7736;
  min-height:4.4rem;
}
#portal-content { margin:0; }
.portal-bulletin { margin:0 -1.3rem; padding:.85rem 1.3rem; background:#2e2925; color:#dfd0b8; }
.portal-bulletin small { color:#b6a78f; }
@media(max-width:767px) { .portal-layout { gap:1rem; } .portal-main { border-width:25px 12px 15px; border-image-width:25px 12px 15px; } }
@font-face { font-family:'Beaufort'; src:url('./beaufort-regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Beaufort'; src:url('./beaufort-bold.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }
.portal-layout, .portal-layout input, .portal-layout select, .portal-layout button,
.portal-layout summary, .portal-layout h2, .portal-layout h3,
.portal-layout .portal-news-row>strong, .portal-layout .portal-prefix,
.portal-layout .portal-news-footer, .portal-layout .portal-news-footer button,
.portal-layout .portal-auth-links button, .portal-layout .portal-news-tabs button,
.portal-layout .portal-primary { font-family:'Beaufort',Georgia,serif; }
/* Both desktop columns share their grid row height; only the menu fills slack. */
@media(min-width:768px) {
  .portal-layout { align-items:stretch; }
  .portal-sidebar { display:flex; flex-direction:column; padding-top:0; min-height:0; }
  .portal-sidebar #portal-auth { flex:0 0 auto; }
  .portal-sidebar .portal-menu { flex:1 0 auto; }
  .portal-main { align-self:stretch; display:flex; flex-direction:column; }
  #portal-content { flex:1 0 auto; }
}
