/* Pangya World: home page, rebuilt from the 2016 pangya.gamerage.com layout */
:root {
  --page-w: 960px;
  --navy: #2a3a8c;
  --blue: #3d7fc4;
  --sky: #dbebf2;
  --line: #c9dbe6;
  --text: #4a4a55;
  --muted: #8a8f99;
  --panel-head: linear-gradient(#f4f9fc, #dfeef6);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 12px/1.5 Tahoma, Verdana, "Segoe UI", sans-serif;
  color: var(--text);
  background: #0c0c14 url(../img/site/freshup_bg_nologo.jpg) center -45px no-repeat;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

/* ---------- top bar ---------- */
.topbar { background: linear-gradient(#ffffff, #eef3f7); border-bottom: 1px solid #cfd9e2; position: relative; z-index: 5; }
.topbar-inner { width: var(--page-w); margin: 0 auto; height: 40px; display: flex; align-items: center; justify-content: space-between; }
.topbar-brand { font-weight: bold; font-size: 15px; color: var(--navy); }
.topbar-links { list-style: none; display: flex; margin: 0; padding: 0; }
.topbar-links a { display: block; padding: 0 14px; line-height: 40px; color: #6b7280; font-weight: bold; border-left: 1px solid #e3e8ee; }
.topbar-links a:hover { color: var(--navy); background: #f6fafc; text-decoration: none; }

/* ---------- hero ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.footer { flex: 1; }
.hero { position: relative; width: var(--page-w); height: 250px; margin: 0 auto; }
.hero-logo { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); width: 360px; }
.hero-logo img { width: 100%; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.side-btns { position: absolute; left: calc(100% + 10px); top: 185px; width: 140px; display: flex; flex-direction: column; gap: 3px; }

/* ---------- white content box ---------- */
.box {
  width: var(--page-w); margin: 0 auto; padding: 12px;
  background: #fff; border-radius: 8px 8px 0 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.6), 0 6px 30px rgba(60, 20, 80, .25);
}
.grid { display: grid; grid-template-columns: 1fr 191px; gap: 12px; }
.cols { display: grid; grid-template-columns: 215px 1fr; gap: 12px; margin-top: 12px; }

/* ---------- panels ---------- */
.panel { border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; }
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 8px; height: 26px; background: var(--panel-head);
  border-bottom: 1px solid var(--line); font-weight: bold; font-size: 11px; color: #34495e; text-transform: uppercase;
}
.panel-head.center { justify-content: center; background: linear-gradient(#a9b2bb, #8f99a3); color: #fff; }
.panel-head .more { font-size: 10px; color: #7aa6c8; }

/* ---------- calendar strip ---------- */
/* same columns as the rows below (215px | rest, 12px gap) so every edge lines up:
   calendar 215 x 180, slideshow 506 x 180 */
.cal-strip { display: grid; grid-template-columns: 215px 1fr; gap: 12px; }
.calendar { background: var(--sky); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; height: 180px; overflow: hidden; }
.cal-head { display: flex; justify-content: space-between; align-items: center; height: 20px; font-weight: bold; font-size: 12px; color: #3c4b5c; }
.cal-nav { background: none; border: 0; font-size: 16px; line-height: 1; color: #5d7286; padding: 0 6px; }
.cal-grid { width: 100%; border-collapse: collapse; text-align: center; font-size: 11px; }
.cal-grid th { font-size: 10px; height: 15px; color: #5d6b78; font-weight: bold; }
.cal-grid td { height: 19px; padding: 0; border-top: 1px solid #c8dde8; cursor: default; }
.cal-grid td.has-event { cursor: pointer; }
.cal-grid .sun, .cal-grid td:first-child { color: #e04848; }
.cal-grid .sat, .cal-grid td:last-child { color: #3d6fc4; }
.cal-grid td.other { color: #aab6c0; }
.cal-grid td.today span { background: #7b5cd6; color: #fff; border-radius: 3px; padding: 0 4px; }
.cal-grid td.has-event span { background: #e04848; color: #fff; border-radius: 3px; padding: 0 4px; }
.cal-grid td.today.has-event span { background: #7b5cd6; box-shadow: 0 0 0 2px #e04848; }
.cal-more { display: block; text-align: center; font-size: 11px; line-height: 18px; color: #3c4b5c; font-weight: bold; }

/* ---------- slideshow (490 x 180) ---------- */
.slideshow { position: relative; width: 100%; height: 180px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.slide.active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.ss-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.ss-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.35); }
.ss-dots button.active { background: #fff; }
/* small popup when an event day is clicked */
.cal-pop {
  position: absolute; left: 10px; top: 10px; max-width: 300px; padding: 8px 12px; border-radius: 4px;
  background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.2); color: var(--navy); font-weight: bold;
}
.cal-pop-date { font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.cal-pop a, .cal-pop span { display: block; line-height: 1.6; }
.cal-mark { font-size: 11px; line-height: 1; cursor: default; }
.post-cal { font-size: 10px; color: #e04848; font-weight: bold; white-space: nowrap; }

/* ---------- left column ---------- */
.col-left { display: flex; flex-direction: column; gap: 8px; }
.promo img { border-radius: 4px; width: 100%; }
.gm-items { background: linear-gradient(#f7fbfd, #eaf4f9); }
.gm-item { display: none; gap: 8px; padding: 8px; }
.gm-item.active { display: flex; }
.gm-item img { width: 79px; height: 67px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; flex: none; background: #fff; }
.gm-item b { color: #3d7fc4; font-size: 12px; }
.gm-item p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.gm-nav { display: flex; justify-content: flex-end; gap: 2px; padding: 0 6px 6px; }
.gm-nav button { border: 1px solid var(--line); background: #fff; width: 18px; height: 16px; line-height: 12px; padding: 0; color: #6b7d8f; }

/* ---------- middle column ---------- */
.col-mid { min-width: 0; }
.mid-banner img { width: 100%; border-radius: 4px; }
.newsfeed {
  display: flex; align-items: center; gap: 14px; margin-top: 6px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(#fff, #f1f7fa);
}
.newsfeed .label { font-weight: bold; font-size: 10px; color: #2c3e50; }
.newsfeed a { font-weight: bold; color: #4b86c5; }

.tabs { margin-top: 10px; }
.tab-bar { display: flex; gap: 2px; border-bottom: 2px solid #9fc3dc; }
.tab {
  border: 1px solid var(--line); border-bottom: 0; background: #f2f6f9; color: #8a97a3;
  font-size: 10px; font-weight: bold; padding: 6px 16px; border-radius: 4px 4px 0 0;
}
.tab.active { background: #fff; color: #2c3e50; box-shadow: inset 0 3px 0 #9fc3dc; }
.news-list { display: none; list-style: none; margin: 0; padding: 0; }
.news-list.active { display: block; }
.news-list li { padding: 8px 4px; border-bottom: 1px dashed #d7e3ea; }
.news-top { display: flex; align-items: center; gap: 6px; }
.news-top a { font-weight: bold; color: #3d7fc4; font-size: 12px; }
.news-top time { margin-left: auto; font-size: 10px; color: #a0a8b0; white-space: nowrap; }
.news-list p { margin: 4px 0 0 52px; color: #6f7680; font-size: 11px; }
.tag { display: inline-block; width: 44px; text-align: center; font-size: 8px; font-weight: bold; color: #fff; border-radius: 2px; padding: 1px 0; flex: none; }
.tag.notice { background: #6aa6d8; }
.tag.event { background: #e98bb7; }
.tag.patch { background: #8cc56b; }
.new { background: #ff7a3c; color: #fff; font-size: 8px; font-weight: bold; padding: 0 3px; border-radius: 2px; }

/* ---------- galleries ---------- */
.galleries { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
.thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 3px; }

/* ---------- right column ---------- */
.col-right { display: flex; flex-direction: column; gap: 6px; }
.clock { border-radius: 4px; overflow: hidden; background: linear-gradient(#4f87c7, #3a6fae); color: #fff; }
.clock-head { display: flex; justify-content: space-between; padding: 3px 8px; font-size: 9px; font-weight: bold; }
.clock-time { background: #2b2f38; text-align: center; font: bold 22px/38px "Courier New", monospace; letter-spacing: 1px; }

.login { border: 1px solid var(--line); border-radius: 4px; padding: 8px; background: linear-gradient(#fff, #eef5f9); }
.login-out { display: grid; grid-template-columns: 1fr 62px; gap: 6px; }
.login-out[hidden], .login-in[hidden], .login-msg[hidden] { display: none; }
.login-fields { display: flex; flex-direction: column; gap: 4px; }
.login input { width: 100%; border: 1px solid #b9cbd8; height: 20px; font-size: 11px; padding: 0 4px; }
.login-btn { background: linear-gradient(#ffa63d, #f07c12); color: #fff; border: 0; border-radius: 3px; font-weight: bold; font-size: 11px; cursor: pointer; }
.login-btn:disabled { opacity: .6; cursor: default; }
.login-remember { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; margin-top: -2px; font-size: 10px; color: #6b7d8f; cursor: pointer; }
.login .login-remember input { width: auto; height: auto; margin: 0; }
.login-msg { grid-column: 1 / -1; margin: 0; font-size: 10px; line-height: 1.3; color: #d33; text-align: center; }
/* logged in */
.login-in { padding: 4px 0 2px; text-align: center; }
.login-welcome { margin-bottom: 8px; font-size: 11px; color: #6b7d8f; }
.login-nick { font-size: 13px; color: var(--navy); overflow-wrap: anywhere; }
.login-nick .emo { display: inline; width: 22px; height: 20px; margin: 0 1px; vertical-align: -5px; }
.logout-btn { padding: 3px 16px; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-weight: bold; font-size: 10px; color: #3c4b5c; cursor: pointer; }
.logout-btn:hover { color: var(--navy); background: #f6fafc; }
.login-links { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; font-size: 9px; }
.login-links a { color: #6b7d8f; }
.signup { grid-column: 1 / -1; display: block; text-align: center; background: #fff; border: 1px solid var(--line); font-weight: bold; font-size: 10px; color: #3c4b5c; padding: 3px; }

.big-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-weight: bold;
  border-radius: 3px; text-shadow: 0 1px 1px rgba(0,0,0,.25); text-decoration: none !important;
}
.big-btn:hover { filter: brightness(1.08); }
.big-btn.download { height: 68px; background: linear-gradient(#6fdc3f, #2fa81d); font-size: 17px; line-height: 1.05; }
.big-btn.download .icon { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #39b12a; display: grid; place-items: center; font-size: 18px; text-shadow: none; }
.big-btn.small { height: 35px; font-size: 11px; }
.big-btn.teal { background: linear-gradient(#5fd0d6, #2ea5b6); }
.big-btn.blue { background: linear-gradient(#6ab2f0, #3d84d4); }
.big-btn.pink { background: linear-gradient(#ff6f8f, #d8364f); }
/* when original button images are used, they replace the CSS look */
.img-btn img { width: 191px; }

.community-body { padding: 14px 8px; }

/* Rankings box (profile page, under the player card) */
.rk { margin-top: 8px; }
.rk-head { gap: 4px; }
.rk-head img { width: 24px; height: 22px; margin-left: -6px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }   /* owner's ranking_btn_n (44x40) */
.rk-cats, .rk-periods { display: flex; }
.rk-cats button, .rk-periods button { flex: 1; padding: 0; border: 0; background: none; cursor: pointer; font-weight: bold; }
.rk-cats { border-bottom: 2px solid #9fc3dc; background: #f2f6f9; }
.rk-cats button { height: 22px; font-size: 10px; color: #8a97a3; border-left: 1px solid #dde7ee; }
.rk-cats button:first-child { border-left: 0; }
.rk-cats button.active { background: #fff; color: #2c3e50; box-shadow: inset 0 3px 0 #9fc3dc; }
.rk-periods { gap: 2px; padding: 5px 6px 0; }
.rk-periods[hidden] { display: none; }
.rk-periods button { height: 16px; border-radius: 8px; font-size: 9px; color: #7a8896; }
.rk-periods button:hover { color: #2c3e50; }
.rk-periods button.active { background: #3d7fc4; color: #fff; }
.rk-list { list-style: none; margin: 0; padding: 4px 6px 6px; }
.rk-list li { display: flex; align-items: center; gap: 6px; height: 22px; border-bottom: 1px dashed #e1e9ef; font-size: 11px; }
.rk-list li:last-child { border-bottom: 0; }
.rk-pos { flex: none; width: 14px; text-align: center; font-weight: bold; color: #8a97a3; line-height: 0; }
.rk-pos:not(:has(img)) { line-height: normal; }
.rk-pos img { width: 10px; height: 15px; }
.rk-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #2c3e50; font-weight: bold; }
.rk-name .emo { display: inline; width: 18px; height: 17px; margin: 0 1px; vertical-align: -4px; }
.rk-val { flex: none; color: #3d7fc4; font-weight: bold; font-size: 10px; }
.rk-list .rk-open .rk-name { color: #b8c3cc; font-weight: normal; }   /* a place nobody holds yet */
.rk-list .rk-open img { opacity: .45; }
.rk-list .rk-empty { justify-content: center; height: auto; padding: 14px 0; border: 0; color: #8a97a3; font-size: 10px; font-weight: normal; }
.discord { display: block; text-align: center; background: #5865f2; color: #fff; font-weight: bold; padding: 10px; border-radius: 4px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; }
.quick-grid a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; font-size: 9px; font-weight: bold; color: #7d8894; border-right: 1px solid #e3eaf0; border-bottom: 1px solid #e3eaf0; }
.quick-grid a span { font-size: 22px; filter: grayscale(.6); }

/* ---------- boards: board.html (lists) + post.html (single post) ---------- */
.tag.scratch { background: #f0a23c; }
.tag.papel { background: #9b7fd9; }
.tag.gacha { background: #4fbfb3; }
.tag.news { background: #6aa6d8; }

.board { min-width: 0; }
.section-banner {
  display: flex; align-items: center; gap: 12px; height: 86px; padding: 0 26px; border-radius: 4px;
  background: linear-gradient(100deg, #2f5f9e 0%, #4a8fd2 45%, #8cc6ee 100%), url(../img/site/freshup_bg_nologo.jpg) center / cover;
  background-blend-mode: multiply; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.section-banner.has-img { height: auto; padding: 0; background: none; overflow: hidden; }
.section-banner.has-img img { width: 100%; height: auto; }
/* banner picture without text in it (topimg_terms / topimg_support): the title is laid over its empty left side */
.section-banner.sb-photo { height: auto; aspect-ratio: 748 / 135; gap: 10px; padding: 0 0 0 5.5%; background-color: #2f6fb8; background-size: cover; background-position: right center; background-blend-mode: normal; }
.sb-photo .sb-label { font-size: 20px; letter-spacing: .5px; }   /* sized like the text in topimg_download.jpg */
.sb-photo .sb-sep { font-size: 14px; opacity: .45; }
.sb-photo .sb-tag { font-size: 12px; color: #dcecff; }
@media (max-width: 640px) {   /* small screens: the banner is narrow, so only the title (the tagline would run into the picture) */
  .sb-photo .sb-sep, .sb-photo .sb-tag { display: none; }
  .sb-photo .sb-label { font-size: 15px; }
}
.sb-label { font: bold 26px/1 Tahoma, Verdana, sans-serif; letter-spacing: 1px; }
.sb-sep { font-size: 20px; opacity: .6; }
.sb-tag { font-size: 13px; font-weight: bold; opacity: .95; }

.board-head { display: flex; justify-content: space-between; align-items: flex-end; margin: 16px 0 0; padding-bottom: 5px; border-bottom: 2px solid #9fc3dc; }
.board-head h1 { margin: 0; font-size: 13px; text-transform: uppercase; color: #2c3e50; letter-spacing: .3px; }
.crumbs { font-size: 10px; color: var(--muted); }
.crumbs a { color: var(--muted); }

.cat-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 8px 0 4px; }
.cat-tab { padding: 4px 14px; border: 1px solid var(--line); border-radius: 3px; background: #f2f6f9; color: #6b7d8f; font-size: 10px; font-weight: bold; }
.cat-tab:hover { text-decoration: none; background: #fff; }
.cat-tab.active { background: #3d7fc4; border-color: #3d7fc4; color: #fff; }

.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { padding: 12px 6px; border-bottom: 1px solid #e4ecf1; }
.board-list li:nth-child(even) { background: #fafcfd; }
.board-list .news-top a { font-size: 12px; }
.board-summary { display: block; margin: 6px 0 0 52px; color: #6f7680; font-size: 11px; }
.board-summary:hover { color: #4a4a55; text-decoration: none; }
.board-empty { padding: 30px 0; text-align: center; color: var(--muted); }

.pager { display: flex; justify-content: center; align-items: center; gap: 3px; margin: 18px 0 6px; font-size: 11px; }
.pager:empty { display: none; }
.pg-btn { padding: 0 6px; border: 1px solid #c7d3dc; border-radius: 2px; font-size: 9px; line-height: 15px; color: #6b7d8f; background: linear-gradient(#fff, #edf2f5); }
.pg-btn:hover { text-decoration: none; color: var(--navy); }
.pg-num { padding: 0 3px; color: #6b7d8f; }
b.pg-num { color: #2c3e50; text-decoration: underline; }

/* Rankings page (rankings.html) */
.rk-sub { display: flex; gap: 4px; margin: 6px 0 0; }
.rk-sub[hidden] { display: none; }
.rk-sub button { padding: 3px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #7a8896; font-size: 10px; font-weight: bold; cursor: pointer; }
.rk-sub button.active { background: #3d7fc4; border-color: #3d7fc4; color: #fff; }
.rkp-course { margin-top: 8px; }
.rkp-course[hidden] { display: none; }
.rkp-course select { height: 26px; min-width: 200px; border: 1px solid #b9cbd8; font-size: 12px; background: #fff; }
/* content column = the course pictures' real width (531 px); the picture's last 22 rows are transparent, so 531x181 shows */
.rkp-layout { display: grid; grid-template-columns: 1fr 480px; gap: 14px; align-items: start; margin-top: 2px; }
.rkp-wrap { min-width: 0; }
/* left: the clicked player's character (stays in view while the list scrolls) */
.rkp-char { position: sticky; top: 10px; margin-top: 8px; padding: 10px 6px 8px; border: 1px solid #e3e6ea; border-radius: 4px; background: #f2f2f2; text-align: center; }
.rkp-char-name { min-height: 18px; font-size: 13px; font-weight: bold; color: #2c3e50; }
.rkp-char-name .emo { display: inline; width: 22px; height: 20px; margin: 0 1px; vertical-align: -5px; }
.rkp-char-stage { height: 300px; }
.rkp-char-stage canvas { width: 100%; height: 300px; cursor: grab; touch-action: pan-y; user-select: none; }
.rkp-char-stage canvas:active { cursor: grabbing; }
.rkp-char-hint { margin: 4px 0 0; font-size: 10px; color: #8a97a3; }
.rkp-table tbody tr[data-nick] { cursor: pointer; }
.rkp-table tbody tr[data-nick]:hover td { background: #eef5f9; }
.rkp-table tbody tr.sel td { background: #e2eefa; }
@media (max-width: 760px) {
  .rkp-layout { grid-template-columns: 1fr; }
  .rkp-char { position: static; }
  .rkp-char-stage, .rkp-char-stage canvas { height: 240px; }
}
.rkp-course-pic { aspect-ratio: 531 / 181; margin-top: 6px; border-radius: 4px; background: #eef5f9 top center / 100% auto no-repeat; }
.rkp-course-pic[hidden] { display: none; }
.rkp-table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 12px; }
.rkp-table th { padding: 6px 8px; border-top: 2px solid #9fc3dc; border-bottom: 1px solid #dfe8ee; background: #f2f6f9; color: #2c3e50; font-size: 11px; text-align: left; }
.rkp-table td { padding: 6px 8px; border-bottom: 1px dashed #e1e9ef; }
.rkp-table tbody tr:nth-child(-n+3) { background: #fbfdff; }
.rkp-pos { width: 52px; text-align: center !important; color: #8a97a3; font-weight: bold; }
.rkp-pos img { width: 10px; height: 15px; vertical-align: middle; }
.rkp-name { font-weight: bold; color: #2c3e50; }
.rkp-name .emo { display: inline; width: 20px; height: 18px; margin: 0 1px; vertical-align: -4px; }
.rkp-val { text-align: right !important; color: #3d7fc4; font-weight: bold; white-space: nowrap; }
.rkp-level { height: 16px; vertical-align: middle; }
.rkp-empty { padding: 24px 0 !important; text-align: center; color: #8a97a3; font-weight: normal; }
.panel-head .rk-more { position: absolute; right: 8px; font-size: 9px; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.rk-head { position: relative; }

/* Guides page (guides.html): jump menu + the .legal text style */
.gd-toc { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 0; }
.gd-toc a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f2f6f9; color: #3d7fc4; font-size: 10px; font-weight: bold; }
.gd-toc a:hover { text-decoration: none; background: #3d7fc4; border-color: #3d7fc4; color: #fff; }
.gd ol { margin: 0 0 8px; padding-left: 22px; }
.gd ol li { margin-bottom: 5px; }
.gd h2 { scroll-margin-top: 12px; }

/* Support main page (support.html) */
.sp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.sp-card { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(#fff, #eef5f9); color: #4a4a55; }
.sp-card:hover { text-decoration: none; border-color: #9fc3dc; background: #fff; }
.sp-card b { display: block; margin-bottom: 4px; font-size: 12px; color: #2f6fb2; }
.sp-card span { font-size: 11px; color: #6b7d8f; }
.sp-title { margin: 20px 0 8px; padding-bottom: 4px; border-bottom: 2px solid #9fc3dc; font-size: 12px; text-transform: uppercase; color: #2c3e50; }
.sp-faq details { border-bottom: 1px solid #e4ecf1; }
.sp-faq summary { padding: 9px 6px; font-size: 12px; font-weight: bold; color: #2c3e50; cursor: pointer; }
.sp-faq summary:hover { color: #2f6fb2; }
.sp-faq details[open] summary { color: #2f6fb2; }
.sp-faq details p { margin: 0 0 10px; padding: 0 6px 0 18px; font-size: 12px; line-height: 1.6; color: #4a4a55; }
.sp-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-contact > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 11px; color: #6b7d8f; }
.sp-contact b { font-size: 12px; color: #2c3e50; }
.sp-contact p { margin: 4px 0 10px; }
.sp-contact .discord { display: inline-block; }
.sp-mail { font-size: 12px; font-weight: bold; color: #3d7fc4; }
.sp-note { margin: 10px 0 0; font-size: 11px; color: #6b7d8f; }
@media (max-width: 560px) { .sp-cards, .sp-contact { grid-template-columns: 1fr; } }

/* Forgot password / new password (forgot.html, reset.html) */
.acct-box { max-width: 380px; margin: 16px 0 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(#fff, #eef5f9); font-size: 12px; color: #4a4a55; }
.acct-box p { margin: 0 0 10px; }
.acct-box label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: bold; color: #4a4a55; }
.acct-box input { display: block; width: 100%; height: 26px; margin-top: 3px; padding: 0 6px; border: 1px solid #b9cbd8; font-size: 12px; }
.acct-box .login-btn { padding: 6px 22px; }
.acct-hint { font-size: 10px; color: #6b7d8f; }
.acct-msg { font-size: 11px; color: #d33; }
.acct-msg.good { color: #2b8a3e; }
.acct-msg[hidden], .acct-box [hidden] { display: none; }
/* sign-up form (register.html): two columns of fields */
.reg-box { max-width: none; }
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.reg-grid small { display: block; margin-top: 2px; font-size: 10px; font-weight: normal; color: #8a97a3; }
.acct-box select { display: block; width: 100%; height: 26px; margin-top: 3px; border: 1px solid #b9cbd8; font-size: 12px; background: #fff; }
.acct-box select + input { margin-top: 4px; }
.reg-sex { margin-bottom: 8px; font-size: 11px; font-weight: bold; color: #4a4a55; }
.reg-sex > span { display: block; margin-bottom: 6px; }
.reg-sex label { display: inline-flex; align-items: center; gap: 4px; margin: 0 14px 0 0; font-weight: normal; font-size: 12px; }
.acct-box .reg-sex input, .acct-box .reg-agree input { display: inline; width: auto; height: auto; margin: 0; }
.acct-box .reg-agree { display: flex; align-items: center; gap: 6px; margin: 8px 0 10px; font-weight: normal; font-size: 11px; }
.reg-box .bad input, .reg-box .bad select { border-color: #d33; background: #fff6f6; }
.reg-box .reg-sex.bad, .reg-box .reg-agree.bad { color: #d33; }
@media (max-width: 560px) { .reg-grid { grid-template-columns: 1fr; } }

/* Privacy Policy / Terms of Use (privacy.html, terms.html) */
.legal { margin-top: 10px; padding: 4px 6px 10px; font-size: 12px; line-height: 1.65; color: #4a4a55; }
.legal-date { margin: 0 0 10px; font-size: 10px; color: #8a97a3; }
.legal h2 { margin: 18px 0 6px; padding-bottom: 3px; border-bottom: 1px solid #e4ecf1; font-size: 12px; color: #2f6fb2; }
.legal p { margin: 0 0 8px; }
.legal ul { margin: 0 0 8px; padding-left: 20px; }
.legal li { margin-bottom: 4px; }
.legal code { padding: 0 3px; border-radius: 2px; background: #eef3f7; font-size: 11px; }

/* media page (media.html): 3-across thumbnail grid like the old gamerage Wallpapers page, size buttons under each */
.md-grid { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.md-grid li { padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid #e4ecf1; min-width: 0; }
.md-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid #d6e1e9; background: #f2f6f9; }
.md-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.md-thumb:hover img { transform: scale(1.04); }
.md-sizes { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.md-sizes a { padding: 0 5px; border: 1px solid #c7d3dc; border-radius: 2px; font-size: 9px; line-height: 15px; color: #6b7d8f; background: linear-gradient(#fff, #edf2f5); }
.md-sizes a:hover { text-decoration: none; color: var(--navy); }
.md-view { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 20, 35, .85); cursor: zoom-out; }
.md-view[hidden] { display: none; }
.md-view img { max-width: 100%; max-height: 100%; box-shadow: 0 4px 24px rgba(0,0,0,.5); }
.md-close { position: absolute; top: 10px; right: 14px; border: 0; background: none; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
@media (max-width: 560px) { .md-grid { grid-template-columns: repeat(2, 1fr); gap: 0 10px; } }

/* Download > Game Client (download.html), after the archived gamerage page; images in img/download */
.dl-hero { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 0 20px 0 0; border: 1px solid #dfe6ec; background: #fff; }
.dl-art { flex: none; display: block; }
.dl-call { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; }
.dl-call img { max-width: 100%; }
.dl-btn { display: block; line-height: 0; }
.dl-btn:hover img { filter: brightness(1.08); }
.dl-msg { margin: 0; font-size: 11px; color: #3d7fc4; font-weight: bold; }
.dl-sub { margin: 22px 0 8px; line-height: 0; }
/* mirror strip: same look as the old gamerage one (light gradient, soft dividers), one column per host */
.dl-mirrors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid #e4ecf1; background: linear-gradient(#fff 40%, #eef1f3); }
.dl-mirrors li { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 8px 14px;
  border-left: 1px solid; border-image: linear-gradient(transparent, #dde3e8 30%, #dde3e8 70%, transparent) 1; }
.dl-mirrors li:first-child { border-left: 0; }
.dl-mirrors li > img, .dl-gdrive { height: 34px; max-width: 100%; }
.dl-mega { mix-blend-mode: multiply; }   /* the logo has a solid white background */
.dl-mirrors li > img.dl-mf { height: 24px; margin: 5px 0; }   /* wide wordmark: smaller so it matches MEGA / Google Drive */
.dl-credit { margin: 14px 0 0; font-size: 9px; color: #9aa5ae; text-align: right; }
.dl-credit a { color: inherit; text-decoration: underline; }
.dl-gdrive { display: flex; align-items: center; gap: 8px; font: bold 17px/1 Arial, sans-serif; color: #5f6368; white-space: nowrap; }
.dl-gdrive img { height: 30px; }
.dl-mirrors a { line-height: 0; }
.dl-mirrors a img { max-width: 100%; height: auto; }
.dl-table { width: 100%; border-collapse: collapse; border-top: 2px solid #9fc3dc; font-size: 11px; }
.dl-table th, .dl-table td { padding: 8px 10px; border-bottom: 1px solid #e4ecf1; text-align: center; }
.dl-table thead th { background: #f2f6f9; color: #2c3e50; }
.dl-table tbody th { width: 32%; color: #3d7fc4; border-right: 1px solid #e4ecf1; }
.dl-table tbody td { color: #555; }
.dl-drivers thead th:first-child, .dl-drivers td:first-child { border-right: 1px solid #e4ecf1; }
.dl-drivers td { width: 33%; padding: 14px 8px; }
.dl-drv { display: flex; align-items: center; justify-content: center; gap: 10px; }
.dl-drv > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; line-height: 0; }
@media (max-width: 640px) {
  .dl-hero { flex-direction: column; padding: 0 0 16px; }
  .dl-call { align-items: center; }
  .dl-mirrors li > img, .dl-gdrive { height: 22px; }
  .dl-mirrors li > img.dl-mf { height: 16px; margin: 3px 0; }
  .dl-gdrive { font-size: 11px; gap: 4px; }
  .dl-gdrive img { height: 20px; }
  .dl-drivers td { display: block; width: auto; border-right: 0 !important; }
  .dl-drivers thead th[colspan] { display: none; }
}

/* shop boards: Latest | All updates | About */
.sub-tabs { display: flex; margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(#fff, #eef5f9); }
.sub-tabs a { flex: 1; text-align: center; padding: 9px 4px; font-size: 11px; font-weight: bold; color: #7a8896; border-left: 1px solid #dde7ee; }
.sub-tabs a:first-child { border-left: 0; }
.sub-tabs a.active { color: #2c3e50; text-decoration: underline; }
.thumb-list { list-style: none; margin: 0; padding: 0; }
.thumb-list li { display: flex; gap: 16px; padding: 10px 6px; border-bottom: 1px solid #e4ecf1; }
.thumb { flex: none; width: 120px; height: 76px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: #eef5f9; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.no-thumb { display: grid; place-items: center; height: 100%; font-weight: bold; color: #b5c6d3; }
.thumb-text { flex: 1; min-width: 0; }
.thumb-top { display: flex; align-items: center; gap: 6px; }
.thumb-top a { font-weight: bold; color: #3d7fc4; }
.thumb-top time { margin-left: auto; font-size: 10px; color: #a0a8b0; white-space: nowrap; }
.thumb-text p { margin: 4px 0 0; font-size: 11px; color: #6f7680; }

/* shop boards "All updates": 150x95 thumbnail + TITLE / PERIOD / DESCRIPTION (archived gamerage Papel list) */
.thumb-rows { list-style: none; margin: 0; padding: 0; }
.thumb-rows li { display: flex; gap: 6px; margin-bottom: 12px; }
.thumb-rows .thumb { width: 150px; height: 95px; border-radius: 0; }
.thumb-info { flex: 1; min-width: 0; border-collapse: collapse; border: 1px solid #dfe5ea; font-size: 11px; }
.thumb-info th { width: 82px; padding: 6px 8px; background: #f4f6f8; border-bottom: 1px solid #e6ebef; text-align: left; font-size: 9px; font-weight: bold; color: #7a8896; vertical-align: top; }
.thumb-info td { padding: 6px 8px; border-bottom: 1px solid #e6ebef; }
.thumb-info tr:last-child th, .thumb-info tr:last-child td { border-bottom: 0; }
.thumb-info .ti a { font-weight: bold; color: #2c3e50; }
.thumb-info .ti .new { margin-left: 5px; }
.thumb-info .pe { color: #3d7fc4; font-size: 10px; }
.thumb-info .de { color: #555c66; height: 40px; vertical-align: top; }
.post-image { padding: 16px 10px 0; text-align: center; }
.post-image img { display: inline-block; max-width: 100%; height: auto; border-radius: 4px; }
.post-body[hidden] { display: none; }

/* shop.html: item showcase */
.shop-intro { margin: 0 0 12px; padding: 10px 12px; border-radius: 4px; background: #f3f6f8; color: #3d7fc4; font-size: 11px; font-weight: bold; }
.shop-sec { margin-bottom: 14px; }
.shop-sec-head { display: flex; align-items: baseline; gap: 8px; padding: 0 4px 5px; font-size: 10px; color: #8a97a3; }
.shop-sec-head a, .shop-sec-head b { font-size: 11px; font-weight: bold; color: #2f6fb2; white-space: nowrap; }
.shop-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid #dfe8ee; border-radius: 3px; }
.shop-tiles li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-left: 1px solid #edf2f5; text-align: center; font-size: 10px; color: #4a4a55; }
.shop-tiles li:first-child { border-left: 0; }
.shop-icon { display: grid; place-items: center; width: 50px; height: 44px; border: 1px solid #c9d6df; border-radius: 3px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.shop-icon img { width: 44px; height: auto; }
.shop-table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 11px; }
.shop-table th { background: linear-gradient(#a9b2bb, #8f99a3); color: #fff; font-size: 10px; font-weight: bold; padding: 5px 6px; }
.shop-table td { padding: 10px 6px; border-bottom: 1px solid #e4ecf1; vertical-align: middle; }
.shop-table .nm { font-weight: bold; color: #2c3e50; width: 110px; }
.shop-table .ds { color: #6f7680; }
.shop-table .pr, .shop-table .lv { width: 80px; text-align: center; white-space: nowrap; color: #4a4a55; }
.shop-table .ic { width: 62px; }

/* a single post */
.post { margin-top: 10px; }
.post-head { display: flex; align-items: center; gap: 8px; padding: 10px 8px; border-top: 2px solid #9fc3dc; border-bottom: 1px solid var(--line); background: linear-gradient(#fff, #f3f8fb); }
.post-head h2 { margin: 0; font-size: 14px; color: #2f6fb2; }
.post-head time { margin-left: auto; font-size: 10px; color: #a0a8b0; white-space: nowrap; }
.post-body { padding: 16px 10px 20px; font-size: 12px; line-height: 1.7; color: #4a4a55; overflow-wrap: anywhere; }
.post-body img { max-width: 100%; height: auto; margin: 0 auto; border-radius: 3px; }
.post-body h3 { margin: 16px 0 6px; font-size: 12px; color: #2c3e50; }
.post-body ul { padding-left: 20px; }
.post-body .post-table { border-collapse: collapse; margin: 8px 0 12px; min-width: 260px; }
.post-body .post-table th, .post-body .post-table td { border: 1px solid #c9dbe6; padding: 5px 12px; text-align: left; }
.post-body .post-table th { background: linear-gradient(#f4f9fc, #dfeef6); color: #2c3e50; }
/* Papel / Scratch / Gacha post layout, after the archived gamerage "template_event" (py_template_event.css) */
.tpl-event { max-width: 582px; margin: 0 auto; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; line-height: 20px; color: #524d4a; }
.tpl-event .tpl-banner { border: 1px solid #000; line-height: 0; margin-bottom: 20px; }
.tpl-event .tpl-banner img { width: 100%; border-radius: 0; }
.tpl-event > p, .tpl-event > h3, .tpl-event > ul, .tpl-event > .tpl-item, .tpl-event > .tpl-grid { max-width: 540px; margin-left: auto; margin-right: auto; }
.tpl-event p { margin-bottom: 10px; }
.tpl-event .tpl-info { list-style: none; padding: 10px 20px 0; border: 2px solid #5d99fe; margin-bottom: 14px; }
.tpl-event .tpl-info li { position: relative; padding: 0 0 10px 100px; }
.tpl-event .tpl-info b { position: absolute; left: 0; width: 80px; padding-left: 5px; background: #5d99fe; color: #fff; }
.tpl-event h3 { margin: 6px auto 8px; font-size: 16px; color: #084684; }
.tpl-event .tpl-item { display: flex; gap: 20px; padding: 10px; border: 1px solid #5d99fe; margin-bottom: 10px; }
.tpl-event .tpl-item-img { flex: 0 0 170px; height: 170px; background: #ebebeb; }
.tpl-event .tpl-item-img img { width: 170px; height: 170px; border-radius: 0; }
.tpl-event .tpl-item-desc { flex: 1; min-width: 0; }
.tpl-event .tpl-item-desc strong { display: block; padding: 4px 8px; margin-bottom: 4px; background: #5d99fe; color: #fff; }
.tpl-event .tpl-item-desc ul { list-style: none; padding: 0 0 0 4px; margin: 0; }
.tpl-event .tpl-item-desc li::before { content: "* "; }
.tpl-event .tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tpl-event .tpl-gitem { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid #5d99fe; }
.tpl-event .tpl-gitem img { flex: 0 0 64px; width: 64px; height: 64px; margin: 0; border-radius: 0; }
.tpl-event .tpl-gitem strong { display: block; color: #084684; line-height: 16px; }
.tpl-event .tpl-gitem span { display: block; color: #ff3b71; font-size: 11px; line-height: 16px; }
.tpl-event h4 { max-width: 540px; margin: 14px auto 6px; padding: 3px 8px; font-size: 12px; background: #5d99fe; color: #fff; }
/* small = 3-column picture list, text = multi-column name list (very long lists, e.g. the Memorial Shop post) */
.tpl-event > .tpl-sgrid, .tpl-event > .tpl-text { max-width: 540px; margin-left: auto; margin-right: auto; }
.tpl-event .tpl-sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 10px; }
.tpl-event .tpl-sitem { display: flex; gap: 6px; align-items: center; padding: 3px; border: 1px solid #c9dcff; min-width: 0; }
.tpl-event .tpl-sitem img { flex: 0 0 40px; width: 40px; height: 40px; margin: 0; border-radius: 0; }
.tpl-event .tpl-sitem div { min-width: 0; }
.tpl-event .tpl-sitem strong { display: block; color: #084684; font-size: 11px; line-height: 13px; overflow-wrap: anywhere; }
.tpl-event .tpl-sitem span { display: block; color: #ff3b71; font-size: 10px; line-height: 12px; }
.tpl-event .tpl-text { columns: 3; column-gap: 14px; list-style: none; padding: 8px 10px; border: 1px solid #c9dcff; margin-bottom: 10px; }
.tpl-event .tpl-text li { break-inside: avoid; font-size: 11px; line-height: 15px; padding: 1px 0; }
.tpl-event .tpl-text strong { color: #084684; font-weight: normal; }
.tpl-event .tpl-text span { color: #ff3b71; font-size: 10px; }
@media (max-width: 560px) {
  .tpl-event .tpl-item { flex-direction: column; align-items: center; }
  .tpl-event .tpl-item-desc { width: 100%; }
  .tpl-event .tpl-grid { grid-template-columns: 1fr; }
  .tpl-event .tpl-sgrid { grid-template-columns: 1fr 1fr; }
  .tpl-event .tpl-text { columns: 2; }
}
.post-table { border-collapse: collapse; margin: 10px 0; }
.post-table th, .post-table td { border: 1px solid var(--line); padding: 4px 10px; text-align: left; font-size: 11px; }
.post-table th { background: #eef5f9; color: #2c3e50; white-space: nowrap; }
.post-actions { display: flex; justify-content: flex-end; padding: 10px 0; border-top: 1px solid var(--line); }
.list-btn { padding: 4px 18px; border-radius: 3px; background: linear-gradient(#6ab2f0, #3d84d4); color: #fff; font-weight: bold; font-size: 11px; }
.list-btn:hover { text-decoration: none; filter: brightness(1.08); }
.post-nav { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 11px; }
.post-nav th, .post-nav td { padding: 6px 8px; border-top: 1px solid #e4ecf1; border-bottom: 1px solid #e4ecf1; text-align: left; }
.post-nav th { width: 80px; color: #7a8896; font-weight: bold; white-space: nowrap; }
.post-nav .nav-date { width: 90px; text-align: right; color: #a0a8b0; font-size: 10px; }
.post-nav .muted { color: #b5bdc4; }

/* ---------- footer ---------- */
.footer { background: #0c0c14; color: #888; }
.footer-inner { width: var(--page-w); margin: 0 auto; padding: 16px 0 30px; text-align: center; font-size: 11px; }
.footer-links a { color: #aab; }

/* ---------- profile.html (owner's draft): player card | banner | clock ---------- */
.profile-grid { display: grid; grid-template-columns: 200px 1fr 191px; gap: 10px; align-items: start; }
.pf-card { position: relative; padding: 18px 6px 8px; border: 1px solid #e3e6ea; border-radius: 4px; background: #f2f2f2; text-align: center; }
.pf-label { font-size: 11px; font-weight: bold; color: #9aa3ad; }   /* "Nickname" caption: lighter than the name under it */
.pf-nick { margin-top: 2px; font-size: 14px; font-weight: bold; color: #4a4a55; overflow-wrap: anywhere; }
.pf-nick .emo { display: inline; width: 26px; height: 24px; margin: 0 1px; vertical-align: -4px; }
.pf-char { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 300px; margin-top: 14px; }
.pf-char-note { position: absolute; top: 6px; left: 8px; right: 8px; z-index: 1; margin: 0; padding: 5px 6px; border-radius: 4px;
                background: rgba(255,255,255,.85); box-shadow: 0 1px 2px rgba(0,0,0,.1); font-size: 11px; font-weight: bold; line-height: 1.35; color: #3c4b5c; }
.pf-char-note[hidden] { display: none; }
.pf-char img { max-width: 100%; max-height: 300px; filter: drop-shadow(0 10px 6px rgba(0,0,0,.18)); }
.pf-char img.portrait { width: 140px; max-height: none; margin-bottom: 110px; border-radius: 6px; filter: none; }
/* 3D viewer (js/viewer3d.js): drag turns left/right only; pan-y keeps vertical swipes scrolling the page on phones */
.pf-char canvas { width: 100%; height: 300px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pf-char canvas:active { cursor: grabbing; }
.pf-char canvas[hidden] { display: none; }
.pf-level { height: 22px; margin: 4px 0 6px; }
.pf-level img { display: inline-block; height: 20px; }   /* badges are 14px tall; shown ~1.4x */
/* Pang / Cookies boxes: the client's rmr_under_bar (01 left end, 02 middle, 03 right end; 42x57, blue).
   The art is semi-transparent (alpha ~226), so the three slices must touch without overlapping: natural size
   (no scaling), 42px ends and the middle strip exactly between them. Opaque body = y 6..50 (the rest is glow).
   Cookies uses the same art turned orange with hue-rotate. */
.pf-pill { position: relative; height: 57px; margin: -4px 0 -6px; }
.pf-pill::before, .pf-pill::after { content: ""; position: absolute; top: 0; bottom: 0; }
.pf-pill::before { left: 42px; right: 42px; background: url(../img/site/rmr_under_bar_02.png) left top repeat-x; }
.pf-pill::after { left: 0; right: 0; background: url(../img/site/rmr_under_bar_01.png) left top no-repeat,
                                              url(../img/site/rmr_under_bar_03.png) right top no-repeat; }
.pf-pill.cookie::before, .pf-pill.cookie::after { filter: hue-rotate(185deg) saturate(1.15) brightness(1.05); }
.pf-pill span, .pf-pill b { z-index: 1; }
.pf-pill span { position: absolute; left: 24px; top: 6px; font-size: 10px; font-weight: bold; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
/* value box centered in the body (y 6..50 -> middle 28; x inset the same on both sides) */
.pf-pill b { position: absolute; left: 18px; right: 18px; top: 17px; height: 22px; border-radius: 11px; background: rgba(40,50,70,.55);
             font-size: 15px; line-height: 22px; color: #ffd75a; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.pf-note { margin: 8px 4px 2px; font-size: 11px; color: #6b7d8f; }
.pf-note[hidden] { display: none; }
/* gear + menu */
.pf-gear { position: absolute; top: 2px; right: 2px; }
/* option_btn_n / _o (hover) / _d (pressed), 38x38 from the client */
.pf-gear-btn { width: 32px; height: 32px; padding: 0; border: 0; background: url(../img/site/option_btn_n.png) center / 32px 32px no-repeat;
               font-size: 0; color: transparent; cursor: pointer; }
.pf-gear-btn:hover, .pf-gear-btn[aria-expanded="true"] { background-image: url(../img/site/option_btn_o.png); }
.pf-gear-btn:active { background-image: url(../img/site/option_btn_d.png); }
.pf-gear-btn[hidden] { display: none; }
.pf-menu { position: absolute; top: 36px; right: 0; z-index: 10; min-width: 150px; margin: 0; padding: 4px 0; list-style: none; text-align: left;
           border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.pf-menu[hidden] { display: none; }
.pf-menu button { display: block; width: 100%; padding: 6px 12px; border: 0; background: none; text-align: left; font-size: 11px; font-weight: bold; color: #3c4b5c; cursor: pointer; }
.pf-menu button:hover { background: #eef5f9; color: var(--navy); }
/* banner */
/* course backgrounds from the client (img/character_btn/background_NN_MM.png, 531x203, with their own frame) */
.pf-banner { position: relative; aspect-ratio: 531 / 181; overflow: hidden; }   /* the pictures' bottom 22 of 203 rows are transparent: cropped */
.pf-banner img { display: block; width: 100%; height: auto; }
.pf-banner img[hidden] { display: none; }
.pf-menu-sep { margin-top: 4px; padding-top: 4px; border-top: 1px solid #e3e8ee; }
/* Change Password dialog */
.pf-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(20,25,40,.45); }
.pf-modal[hidden] { display: none; }
.pf-dialog { width: 300px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(#fff, #eef5f9); box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.pf-dialog h2 { margin: 0 0 10px; font-size: 14px; color: var(--navy); }
.pf-dialog label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: bold; color: #4a4a55; }
.pf-dialog input { display: block; width: 100%; height: 24px; margin-top: 3px; padding: 0 6px; border: 1px solid #b9cbd8; font-size: 12px; }
.pf-hint { margin: 2px 0 8px; font-size: 10px; color: #6b7d8f; }
/* Change Nickname: input + emoticon button, picker grid under it */
.pf-dialog label[for] { margin-bottom: 3px; }
.nk-row { display: flex; gap: 4px; margin-bottom: 8px; }
.nk-row input { flex: 1; min-width: 0; margin-top: 0; }
.nk-emo-btn { flex: none; width: 26px; height: 24px; padding: 0; border: 1px solid #b9cbd8; border-radius: 3px; background: linear-gradient(#fff, #edf2f5); cursor: pointer; }
.nk-emo-btn:hover, .nk-emo-btn[aria-expanded="true"] { border-color: #3d7fc4; background: #fff; }
.nk-emo-btn img { display: block; width: 20px; height: 18px; margin: auto; }
.nk-emo-panel { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 132px; overflow-y: auto; margin: -4px 0 8px; padding: 4px; border: 1px solid #b9cbd8; border-radius: 3px; background: #fff; }
.nk-emo-panel[hidden] { display: none; }
.nk-emo-panel button { padding: 2px 0; border: 1px solid transparent; border-radius: 3px; background: none; cursor: pointer; line-height: 0; }
.nk-emo-panel button:hover { border-color: #9fc3dc; background: #eef5f9; }
.nk-emo-panel img { width: 24px; height: 22px; }
.pf-preview { margin: -2px 0 8px; font-size: 11px; color: #6b7d8f; }
.pf-preview b { color: var(--navy); font-size: 13px; }
.pf-preview .emo { display: inline; width: 22px; height: 20px; margin: 0 1px; vertical-align: -5px; }
.pf-dialog-msg { margin: 0 0 8px; font-size: 11px; color: #d33; }
.pf-dialog-msg.good { color: #2b8a3e; }
.pf-dialog-msg[hidden] { display: none; }
.pf-dialog-btns { display: flex; gap: 8px; justify-content: flex-end; }
.pf-dialog-btns .login-btn { padding: 5px 18px; }
/* "Shouts": last in-game tickers, between the logo and the page (profile: taller header) */
.hero.hero-shouts { height: 300px; }
.shouts { position: absolute; left: 0; right: 0; bottom: 10px;   /* same width as the page box below (both var(--page-w)) */
          border-radius: 6px; background: rgba(255,255,255,.82); box-shadow: 0 2px 8px rgba(80,30,90,.25); overflow: hidden; }
.shouts[hidden] { display: none; }
.shouts-head { padding: 3px 10px; background: linear-gradient(#f39ad0, #d86aa9); color: #fff; font-size: 10px; font-weight: bold;
               letter-spacing: .5px; text-transform: uppercase; }
.shouts-list { margin: 0; padding: 3px 10px 4px; list-style: none; }
.shouts-list li { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; font-size: 11px; line-height: 16px; border-top: 1px dotted #ecd3e3; }
.shouts-list li:first-child { border-top: 0; }
.shouts-list time { flex: none; width: 82px; font-size: 10px; color: #8a8f99; }
.shouts-list .who { flex: none; font-weight: bold; color: var(--navy); }
.shouts-list .msg { flex: 1; min-width: 0; color: #3c4b5c; overflow-wrap: anywhere; }
.shouts-list .emo { display: inline; width: 18px; height: 17px; margin: 0 1px; vertical-align: -4px; }
/* sliding picture box (events) under the banner: same width, 531:330 (was 531:406, then 531:360) */
.pf-slides { position: relative; margin-top: 10px; aspect-ratio: 531 / 330; overflow: hidden; border-radius: 6px;
             background: #e9eef3; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.pf-slides[hidden], .pf-sl-dots[hidden] { display: none; }
.pf-track { display: flex; height: 100%; transition: transform .6s ease; }
.pf-slide { flex: 0 0 100%; height: 100%; }
.pf-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pf-sl-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 7px; }
.pf-sl-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.35); cursor: pointer; }
.pf-sl-dots button.active { background: #fff; }
/* News under the events box: every post */
.pf-news { margin-top: 10px; }
.pf-news-list { margin: 0; padding: 0 8px; list-style: none; }
.pf-news-list li { display: flex; align-items: center; gap: 6px; padding: 6px 2px; border-bottom: 1px dashed #d7e3ea; }
.pf-news-list li:last-child { border-bottom: 0; }
.pf-news-list li a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: bold; font-size: 12px; color: #3d7fc4; }
.pf-news-list li time { margin-left: auto; flex: none; font-size: 10px; color: #a0a8b0; }
.pf-news-list .pf-news-empty { justify-content: center; padding: 14px 0; color: #8a8f99; font-size: 11px; }
/* banner: Golden Time countdown (top left, over the course picture's frame) */
.pf-gt { position: absolute; left: 12px; top: 12px; padding: 4px 10px 5px; border-radius: 4px; background: rgba(20,24,40,.62);
         box-shadow: 0 1px 3px rgba(0,0,0,.3); line-height: 1.15; }
.pf-gt[hidden] { display: none; }
.pf-gt span { display: block; font-size: 9px; font-weight: bold; color: #fff; letter-spacing: .3px; text-transform: uppercase; }
.pf-gt b { display: block; font: bold 16px "Courier New", monospace; color: #ffd75a; text-shadow: 0 1px 1px rgba(0,0,0,.5); }
/* profile right column: online players + quick access menu */
.pf-online-n { padding: 8px 6px 9px; text-align: center; background: linear-gradient(#fff, #eef5f9); }
.pf-online-n b { display: block; font-size: 22px; line-height: 1.1; color: var(--navy); }
.pf-online-n span { font-size: 10px; color: #6b7d8f; }
.pf-quick-body { padding: 6px 10px 8px; background: linear-gradient(#fff, #eef5f9); }
.pf-quick-body h3 { margin: 4px 0 3px; padding-bottom: 2px; border-bottom: 1px solid #dfe8ee; font-size: 11px; color: #2f6fb2; }
.pf-quick-body ul { margin: 0 0 6px; padding: 0; list-style: none; }
.pf-quick-body li a { display: block; padding: 3px 0 3px 10px; font-size: 11px; color: #3c4b5c; position: relative; }
.pf-quick-body li a::before { content: "\203A"; position: absolute; left: 1px; color: #8fb2cf; }
.pf-quick-body li a:hover { color: var(--navy); background: #f2f8fc; text-decoration: none; }
.pf-quick-msg { margin: 2px 0 0; font-size: 10px; color: #6b7d8f; }
.pf-quick-msg[hidden] { display: none; }
/* login box: the nickname opens the profile */
a.login-nick { text-decoration: none; }
a.login-nick:hover { text-decoration: underline; }

/* profile, wide screens: card, banner, slides, Rankings and News share one grid so their edges line up (owner):
   card bottom = slides bottom, Rankings top = News top. Rows: banner | slides | Rankings + News. The slides row is
   the one that grows (1fr): the card spans banner + slides, so its extra height goes there, and the slide box
   stretches to the card's bottom (the pictures are object-fit: cover, so they just crop a little). After the
   .pf-* rules above so the margins here win. */
@media (min-width: 1001px) {
  /* every rule starts with .profile-grid: .col-right and .rk are used on other pages too */
  .profile-grid { grid-template-rows: auto 1fr auto; }
  .profile-grid .pf-left, .profile-grid .pf-main { display: contents; }
  .profile-grid .pf-card { grid-column: 1; grid-row: 1 / 3; align-self: stretch; }
  .profile-grid .pf-banner { grid-column: 2; grid-row: 1; }
  .profile-grid .pf-slides { grid-column: 2; grid-row: 2; align-self: stretch; margin-top: 0; aspect-ratio: auto; min-height: 200px;
                             contain: size; }   /* its pictures don't set its height: the card / banner do */
  .profile-grid .rk { grid-column: 1; grid-row: 3; margin-top: 0; }
  .profile-grid .pf-news { grid-column: 2; grid-row: 3; margin-top: 0; }
  .profile-grid .col-right { grid-column: 3; grid-row: 1 / 4; }
}

/* ---------- narrow screens: stack the columns ---------- */
@media (max-width: 1000px) {
  .profile-grid { grid-template-columns: 1fr; }
  :root { --page-w: 100%; }
  .box { border-radius: 0; }
  .side-btns { display: none; }
  .grid, .cols, .galleries, .cal-strip { grid-template-columns: 1fr; height: auto; }
  .slideshow, .slide img { width: 100%; }
  .topbar-links { display: none; }
  .hero-logo { width: 240px; }
  .section-banner:not(.has-img) { height: 64px; padding: 0 14px; }
  .sb-label { font-size: 20px; }
  .board-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .board-summary { margin-left: 0; }
  .thumb { width: 96px; height: 62px; }
  .thumb-rows li { flex-direction: column; }
  .thumb-info th { width: 70px; }
  .post-head { flex-wrap: wrap; }
  .shop-tiles { grid-template-columns: repeat(3, 1fr); }
  .shop-sec-head { flex-direction: column; gap: 2px; }
  .shop-table .ds { font-size: 10px; }
  .shop-table .lv, .shop-table th:last-child { display: none; }
}
