:root {
  color-scheme: dark;
  --gold: #e9c778;
  --cream: #fff2bd;
  --serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; }
body {
  margin: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e8d7ac;
  background: #0c0907;
  background-image: radial-gradient(ellipse at 50% 350px, #65410d33, transparent 55%), repeating-linear-gradient(115deg, transparent 0 70px, #b08b4410 71px, transparent 72px);
  font-family: Arial, 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #91d8ff;
  outline-offset: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.masthead {
  width: 100%;
  max-width: 1360px;
  height: 70px;
  flex: none;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: 2px; }
.brand small { display: block; margin-top: 6px; font: 8px Arial, sans-serif; letter-spacing: 3px; color: #ac956f; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 43px;
  border: 1px solid #c9a25a;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  background: linear-gradient(135deg, #d3b76e22, #b7781722);
  color: #ffe1a0;
  font-family: var(--serif);
  font-size: 22px;
}
.edition { font: 10px var(--serif); letter-spacing: 5px; color: #ad9875; white-space: nowrap; }
.edition i { margin-left: 14px; font: 12px Georgia, serif; letter-spacing: 1px; }
#live-clock { display: inline-block; margin-left: 18px; color: #f5d789; font: 15px / 1.3 Georgia, serif; font-variant-numeric: tabular-nums; letter-spacing: 2px; text-shadow: 0 0 12px #efbe5833; }
.actions { display: flex; align-items: center; gap: 11px; flex: none; }
.actions button { padding: 10px 13px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #d0bc92; font-size: 11px; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.actions button:hover { color: #ffe6a5; background: #cda34a0d; border-color: #876632; }
.actions .admin { display: flex; align-items: center; gap: 7px; border-color: #6b512a; }
.admin svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }

main {
  width: 100%;
  max-width: 1360px;
  flex: 1;
  min-height: 0;
  margin: 0 auto;
  padding: 0 26px 12px;
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  grid-template-rows: minmax(0, 1fr) 33px;
  gap: 12px 18px;
}
.hero {
  grid-area: 1 / 1 / 2 / 2;
  position: relative;
  min-height: 0;
  border: 1px solid #806230;
  border-radius: 4px;
  overflow: hidden;
  background: radial-gradient(ellipse at 74% 60%, #9b621e45, transparent 56%), linear-gradient(135deg, #38280e33, #090706 60%);
  box-shadow: inset 0 0 40px #c58a1720, 0 0 55px #c58a170d;
}
.hero::before, .hero::after { content: ''; position: absolute; inset: 7px; border: 1px solid #73502070; pointer-events: none; z-index: 3; }
.hero::after { inset: 12px; border-color: #b2813020; }
.hero-ray { position: absolute; inset: -150%; background: repeating-conic-gradient(from 0deg at 50% 58%, #e8c07010 0 5deg, transparent 6deg 16deg); transform: rotate(-8deg); }
.hero-ray::after { content: ''; position: absolute; left: 50%; top: 56%; width: 26%; height: 18%; transform: translate(-50%, -50%); background: radial-gradient(ellipse, #ffd57950 0%, #e9ad2927 35%, #e9ad2908 58%, transparent 73%); filter: blur(12px); opacity: .42; animation: bear-halo 5.5s ease-in-out infinite; }
.hero-copy { position: relative; z-index: 2; padding: 42px 20px 0; text-align: center; }
.overline { display: flex; align-items: center; justify-content: center; gap: 12px; color: #c7a768; font: 7px Arial, sans-serif; letter-spacing: 2px; white-space: nowrap; }
.overline span { display: inline-block; width: 22px; height: 1px; background: #a77d32; }
.title-top { margin-top: 16px; font: 900 58px / 1.08 var(--serif); letter-spacing: 16px; text-indent: 16px; }
.hero h1 { margin: 4px 0 0; font: 900 78px / 1.18 var(--serif); letter-spacing: 1px; white-space: nowrap; }
.title-top, .hero h1 { color: #ffdd80; background-image: linear-gradient(112deg, transparent 28%, #fffdeba6 44%, transparent 57%), linear-gradient(180deg, #fffbd8 0%, #ffd969 20%, #b36b15 38%, #ffed9c 44%, #fff9dc 49%, #c98519 68%, #ffeaa1 85%, #9c590e 100%); background-size: 260% 100%, 100% 100%; background-position: 100% 50%, 0 0; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; -webkit-text-stroke: .55px #f3ca70; filter: drop-shadow(0 1px #fff2b1) drop-shadow(0 3px #9d5f12) drop-shadow(0 5px #402006) drop-shadow(0 0 15px #ffc74f45); animation: royal-title-gleam 8s ease-in-out infinite; }
@keyframes royal-title-gleam { 0%, 18%, 100% { background-position: 100% 50%, 0 0; } 65%, 82% { background-position: 0% 50%, 0 0; } }
.hero-sub { margin: 15px 0; color: #ddc38e; font-size: 10px; letter-spacing: 3px; }
.hero-seal { display: inline-block; border-top: 1px solid #85632f; border-bottom: 1px solid #85632f; padding: 8px 14px; color: #f4d995; font: 10px var(--serif); letter-spacing: 2px; }
.hero-seal b { font-size: 10px; margin: 0 12px; }
.gold-bear { position: absolute; z-index: 1; left: 50%; bottom: -20px; width: min(100%, 460px); height: auto; max-height: 64%; object-fit: contain; transform: translateX(-50%); mix-blend-mode: screen; -webkit-mask-image: linear-gradient(0deg, transparent, #000 12%); mask-image: linear-gradient(0deg, transparent, #000 12%); }
@keyframes bear-halo { 0%, 100% { opacity: .42; } 50% { opacity: .9; } }
.side-word { position: absolute; top: 60px; opacity: .025; font: 180px var(--serif); }
.side-left { left: 0; }
.side-right { right: 0; }
.floating { position: absolute; z-index: 4; color: #fff0a9; text-shadow: 0 0 10px #ffbc2d; }
.f1 { top: 48%; right: 12%; font-size: 35px; }
.f2 { top: 64%; right: 85%; font-size: 24px; }
.f3 { right: 12%; bottom: 15%; font-size: 24px; }
.ticker { grid-area: 2 / 1 / 3 / 2; display: flex; align-items: center; justify-content: space-between; padding: 7px 11px; border: 1px solid #715224; background: linear-gradient(90deg, #2d1d0b, #0c0907, #2d1d0b); font-size: 8px; letter-spacing: 1px; }
.ticker p { margin: 0; font-size: 9px; color: #dbc28e; }

.ranking { grid-area: 1 / 2 / 3 / 3; min-width: 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid #6f5429; border-radius: 4px; background: #151008c9; box-shadow: 0 15px 60px #0005; overflow: hidden; }
.ranking-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 58px; flex: none; padding: 15px 20px; border-bottom: 1px solid #715122; background: linear-gradient(90deg, #31220cbb, #151008); }
.ranking-heading h2 { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 19px var(--serif); letter-spacing: 2px; white-space: nowrap; }
.ranking-heading small { display: inline-block; margin-left: 4px; font: 8px Arial, sans-serif; letter-spacing: 1px; color: #b29b73; white-space: nowrap; flex: none; }
.status { display: flex; align-items: center; gap: 7px; color: #bbaa86; font-size: 9px; white-space: nowrap; }
.status i { width: 5px; height: 5px; border-radius: 50%; background: #c5ad69; box-shadow: 0 0 9px #cfb871; flex: none; }
.table-head, .rank-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) 180px 124px; align-items: center; column-gap: 6px; padding: 0 18px; }
.table-head { height: 46px; flex: none; border-bottom: 1px solid #59421c66; color: #cfb887; font-size: 12.5px; font-weight: 600; line-height: 1.4; letter-spacing: 1px; }
.table-head > span:nth-child(3) { text-align: left; }
.table-head > span:last-child { text-align: center; }
#ranking-list { display: grid; grid-template-rows: repeat(10, minmax(0, 1fr)); flex: 1; min-height: 0; }
.rank-row { min-height: 0; border-bottom: 1px solid #8a6a2c22; }
.rank-row:last-child { border-bottom: 0; }
.rank-top { background: linear-gradient(90deg, #b37d1810, transparent); }
.rank-number { display: flex; align-items: center; gap: 4px; color: #a28a5e; font-size: 12px; }
.rank-number b { font: italic 22px Georgia, serif; }
.rank-top .rank-number { color: #dfbe72; }
.rank-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rank-person > div { min-width: 0; }
.xr-avatar { display: block; object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.rank-person .xr-avatar { width: 37px; height: 37px; border: 1px solid #947036; background: #34250f; }
.rank-top .xr-avatar { border-color: #cba451; box-shadow: 0 0 12px #d6a54214; }
.rank-person h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e3d0a8; font-size: 17px; font-weight: 600; line-height: 1.25; }
.rank-person small { color: #a18c64; font-size: 7px; letter-spacing: 0; }
.rank-reason { display: -webkit-box; min-width: 0; max-height: 100%; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: #d9c59d; font-size: 16px; line-height: 1.35; letter-spacing: .2px; overflow-wrap: anywhere; }
.rank-top .rank-reason { color: #f0d79f; }
.rank-tag, .rank-person .rank-mobile-tag { color: #ffe2a0; background: linear-gradient(110deg, #d3a041 0%, #ffe7a1 24%, #fffbe0 40%, #e1b650 53%, #fff1b5 68%, #d5a347 100%); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 13px #f7c85645; animation: honor-shine 5s ease-in-out infinite; }
.rank-tag { justify-self: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 7px; border: 1px solid #a77b3155; border-radius: 2px; font-family: var(--serif); font-size: 16px; font-weight: 700; text-align: center; letter-spacing: .5px; }
.rank-person .rank-mobile-tag { display: none; }
@keyframes honor-shine { 0%, 100% { background-position: 100% 50%; } 50% { background-position: 0% 50%; } }
.table-foot { height: 29px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 18px; border-top: 1px solid #73532444; background: #201708; color: #a58c61; font-size: 8px; letter-spacing: 0; white-space: nowrap; }
.loading-state { grid-row: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; color: #c6ad78; font-size: 12px; letter-spacing: 2px; }
.loading-state > span { color: #e1c078; }
.load-error { margin: 14px 18px 0; padding: 12px; border: 1px solid #8a5b36; border-radius: 3px; color: #edd2ad; background: #6c331c22; font-size: 12px; line-height: 1.6; }
.retry-button { align-self: center; margin: 12px; padding: 9px 20px; border: 1px solid #a47e3b; border-radius: 3px; color: #f1d18b; background: #30220d; font-size: 12px; }

footer { width: calc(100% - 52px); max-width: 1308px; height: 30px; min-height: 30px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 auto; padding: 8px 0; border-top: 1px solid #49371b; color: #9b835b; font-size: 8px; letter-spacing: .5px; }
footer b { margin: 0 10px; font-weight: 400; }

/* Keep the administrator panels in the same golden hall. */
.xr-dialog { background: #171109; border-color: #806332; color: #f3e4c0; border-radius: 10px; }
.xr-dialog::backdrop { background: #000c; }
.xr-note { color: #c0af8d; background: #c59b4b0a; }
.xr-edit-fields input, .xr-dialog input, .xr-dialog select, .xr-dialog textarea { color: #fff0cf; background: #231a0e; border-color: #66502d; }
.xr-dialog-actions button { color: #d5c19b; border-color: #68522f; }
.xr-dialog-actions .xr-save { color: #251b0b; background: #f4d287; border-color: #f4d287; }
.xr-order button { color: #fbe5b9; background: #30220f; border-color: #62502f; }
.xr-toast { color: #fff0ce; background: #21190ff5; border-color: #75603b; border-radius: 8px; }

@media (min-width: 1450px) {
  .hero h1 { font-size: 82px; }
  .gold-bear { width: min(100%, 470px); }
}

@media (max-width: 1100px) and (min-width: 751px) {
  .hero-copy { padding-top: 30px; }
  .hero h1 { font-size: clamp(40px, 5vw, 56px); }
  .title-top { font-size: clamp(42px, 5vw, 52px); }
  .hero-seal, .hero-sub { font-size: 8px; }
  .overline { font-size: 6px; letter-spacing: 1px; gap: 6px; }
  .overline span { width: 12px; }
  .table-head, .rank-row { grid-template-columns: 38px minmax(0, 1fr) 130px; }
  .table-head > span:last-child, .rank-tag, .rank-person small { display: none; }
  .rank-person .rank-mobile-tag { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; line-height: 1.15; }
  .rank-person { gap: 8px; }
  .rank-person .xr-avatar { width: 32px; height: 32px; }
  .rank-reason { font-size: 14px; line-height: 1.35; }
  .rank-person h3 { font-size: 14px; margin: 0; }
  .status { font-size: 8px; }
  .ranking-heading { padding-right: 15px; padding-left: 15px; }
  .ranking-heading h2 { font-size: 16px; }
}

@media (min-width: 751px) and (max-height: 800px) {
  .hero-copy { padding-top: 24px; }
  .title-top { margin-top: 10px; }
  .hero-sub { margin: 6px 0; }
  .hero-seal { display: none; }
  .rank-reason { -webkit-line-clamp: 2; }
}

@media (min-width: 751px) and (max-height: 650px) {
  .hero-copy { padding-top: 16px; }
  .title-top { font-size: 46px; }
  .hero h1 { font-size: 68px; }
  .hero-sub { display: none; }
  .table-head { height: 40px; font-size: 12px; }
  .rank-reason { font-size: 14px; line-height: 1.3; }
}

@media (max-width: 750px) {
  .masthead { height: 51px; padding: 0 15px; gap: 8px; }
  .brand { gap: 8px; font-size: 12px; letter-spacing: 1px; }
  .brand-icon { width: 27px; height: 31px; font-size: 17px; }
  .brand small { margin-top: 4px; font-size: 5px; letter-spacing: 2px; }
  .edition { display: block; flex: none; font-size: 0; letter-spacing: 0; }
  .edition > span, .edition > i { display: none; }
  #live-clock { margin-left: 0; font-size: 12px; letter-spacing: 1px; }
  .actions { gap: 2px; }
  .actions button { padding: 8px 7px; font-size: 9px; }
  .actions .admin { gap: 5px; padding: 7px; }
  .actions svg { width: 10px; height: 10px; }
  main { grid-template-columns: minmax(0, 1fr); grid-template-rows: 150px minmax(0, 1fr); gap: 8px; padding: 0 12px 8px; }
  .hero { grid-area: 1 / 1 / 2 / 2; display: flex; align-items: center; justify-content: flex-start; }
  .hero::before { inset: 5px; }
  .hero::after { inset: 8px; }
  .hero-ray::after { left: 58%; top: 50%; width: 15%; height: 25%; filter: blur(7px); }
  .hero-copy { flex: 0 0 68%; padding: 12px 0 12px 17px; text-align: left; }
  .overline { justify-content: flex-start; gap: 5px; font-size: 4px; letter-spacing: 1px; }
  .overline span { width: 8px; }
  .title-top { margin-top: 8px; font-size: 32px; letter-spacing: 6px; text-indent: 0; }
  .hero h1 { margin-top: 3px; font-size: 31px; line-height: 1.18; letter-spacing: 0; }
  .title-top, .hero h1 { -webkit-text-stroke-width: .35px; filter: drop-shadow(0 1px #fff2b1) drop-shadow(0 2px #874b10) drop-shadow(0 3px #402006) drop-shadow(0 0 9px #ffc74f40); }
  .hero-sub { margin: 7px 0; font-size: 6px; letter-spacing: 1px; }
  .hero-seal { padding: 5px 7px; font-size: 5px; letter-spacing: 0; }
  .hero-seal b { margin: 0 6px; font-size: 5px; }
  .gold-bear { left: auto; right: 0; top: auto; bottom: -8px; width: 150px; height: 150px; max-height: none; transform: none; opacity: .98; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%); mask-image: linear-gradient(90deg, transparent, #000 14%); }
  .side-word { top: -10px; font-size: 140px; }
  .floating, .ticker { display: none; }
  .ranking { grid-area: 2 / 1 / 3 / 2; }
  .ranking-heading { height: 37px; padding: 9px 12px; gap: 6px; }
  .ranking-heading h2 { gap: 4px; font-size: 13px; letter-spacing: 1px; }
  .ranking-heading small { margin-left: 2px; font-size: 7px; }
  .status { gap: 4px; font-size: 7px; }
  .status i { width: 4px; height: 4px; }
  .table-head, .rank-row { grid-template-columns: 28px minmax(0, 1fr) 116px; column-gap: 5px; padding: 0 10px; }
  .table-head { height: 32px; font-size: 10.5px; letter-spacing: 0; }
  .rank-number { gap: 1px; font-size: 8px; }
  .rank-number b { font-size: 16px; }
  .rank-person { gap: 7px; }
  .rank-person .xr-avatar { width: 29px; height: 29px; }
  .rank-person h3 { margin: 0; font-size: 13px; }
  .rank-person small, .rank-tag, .table-head > span:last-child { display: none; }
  .rank-person .rank-mobile-tag { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; line-height: 1.15; letter-spacing: 0; }
  .rank-reason { font-size: 12.5px; line-height: 1.3; letter-spacing: 0; -webkit-line-clamp: 3; }
  .table-foot { height: 21px; padding: 5px 10px; font-size: 6px; }
  .loading-state { font-size: 10px; letter-spacing: 1px; }
  .load-error { margin: 10px 12px 0; padding: 10px; font-size: 11px; }
  footer { width: calc(100% - 24px); height: 21px; min-height: 21px; padding: 5px 0; gap: 4px; font-size: 6px; line-height: 1.4; letter-spacing: 0; }
  footer > span:last-child { font-size: 5px; text-align: right; }
  footer b { margin: 0 2px; }
}

@media (max-width: 750px) and (max-height: 740px) {
  main { grid-template-rows: 110px minmax(0, 1fr); }
  .hero-copy { padding-top: 8px; padding-bottom: 8px; }
  .overline { display: none; }
  .title-top { margin-top: 4px; font-size: 26px; }
  .hero h1 { margin-top: 2px; font-size: 28px; }
  .hero-sub { margin: 4px 0; font-size: 5px; }
  .hero-seal { padding: 3px 5px; font-size: 5px; }
  .gold-bear { width: 125px; height: 125px; right: 0; bottom: -13px; }
  .ranking-heading { height: 32px; }
  .table-head { height: 32px; }
  .rank-person .xr-avatar { width: 25px; height: 25px; }
  .rank-person h3 { font-size: 12px; }
  .rank-person .rank-mobile-tag { margin-top: 3px; font-size: 10.5px; }
  .rank-reason { font-size: 12.5px; line-height: 1.25; -webkit-line-clamp: 2; }
  .table-foot { height: 18px; padding: 4px 10px; }
}

@media (max-width: 350px) {
  .masthead { padding: 0 12px; }
  .brand { gap: 6px; font-size: 11px; }
  .brand small { letter-spacing: 1.5px; }
  #live-clock { font-size: 11px; letter-spacing: .5px; }
  .actions button { padding-right: 5px; padding-left: 5px; }
  .actions .admin { padding-right: 5px; padding-left: 5px; }
  .hero-copy { padding-left: 13px; }
  .hero h1 { font-size: 28px; }
  .gold-bear { right: 0; }
  .table-head, .rank-row { grid-template-columns: 25px minmax(0, 1fr) 105px; padding-right: 8px; padding-left: 8px; }
  .rank-person { gap: 5px; }
  .rank-person h3 { font-size: 12px; }
  .ranking-heading { padding-right: 9px; padding-left: 9px; }
  .ranking-heading h2 { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
