/* Content-sized frames: artwork headers, lanterns and corner carvings do not stretch. */
aside { display: flex; flex-direction: column; align-items: stretch; }
.leaderboard, .bonus { height: auto; margin: 0; width: 100%; position: relative; }
.leaderboard { --art-top: 140px; --art-bottom: 56px; min-height: 260px; padding: 139px 48px 56px; }
.bonus { --art-top: 96px; --art-bottom: 24px; min-height: 165px; padding: 103px 36px 32px; }
.leaderboard::before, .bonus::before { display: none; }
.widget-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.leader-art { left: -20%; right: auto; width: 125%; }
.bonus-art { left: -5.4%; right: auto; width: 108.7%; }
.widget-piece { position: absolute; left: 0; width: 100%; display: block; overflow: hidden; }
.widget-top { top: 0; height: var(--art-top); }
.widget-bottom { bottom: 0; height: var(--art-bottom); }
.widget-middle { top: var(--art-top); height: calc(100% - var(--art-top) - var(--art-bottom)); }
#leaders { padding: 0; margin: 0; }
.leader-row { min-height: 34px; padding: 3px 0; gap: 13px; }
.rank { display: flex; align-items: center; justify-content: center; width: 30px; flex: 0 0 30px; color: #afbec4; font-size: 17px; font-variant-numeric: tabular-nums; }
.rank-crown { display: block; width: 28px; height: 24px; image-rendering: pixelated; filter: drop-shadow(1px 2px #020e20); }
.leader-name { font-size: 19px; }
.leader-score { font-size: 21px; }
.leader-row:first-child .leader-name { color: #ffe5b3; }
.empty-leaders { margin: 28px 0 0; text-align: center; }
#bonus-words { max-height: none; overflow: visible; gap: 6px; margin: 0; }
.bonus-word { font-size: 16px; line-height: 1.2; padding: 4px 8px; }
.widget-chains { position: relative; inset: auto; flex-shrink: 0; height: 72px; margin: -12px 0 -32px; padding: 0 47px; }
.debug-preview-link { display: block; margin: 20px 0; color: #d8b77d; font-size: 13px; }
.debug-preview #obs-source, .debug-preview .url-field { display: none; }
@media (max-width: 1500px) {
  .leaderboard { --art-top: 118px; --art-bottom: 47px; min-height: 225px; padding: 116px 38px 47px; }
  .bonus { --art-top: 84px; --art-bottom: 21px; min-height: 146px; padding: 91px 28px 28px; }
  .leader-row { min-height: 31px; padding: 3px 0; gap: 10px; }
  .leader-name { font-size: 17px; }
  .leader-score { font-size: 19px; }
  .rank { width: 26px; flex-basis: 26px; font-size: 16px; }
  .rank-crown { width: 25px; height: 22px; }
  .widget-chains { height: 64px; padding: 0 37px; margin: -10px 0 -29px; }
  .bonus-word { font-size: 15px; }
}
@media (max-width: 1000px) {
  .leaderboard { --art-top: 112px; --art-bottom: 44px; min-height: 215px; padding: 111px 29px 44px; }
  .bonus { --art-top: 76px; --art-bottom: 20px; min-height: 137px; padding: 82px 23px 25px; }
  .leader-row { gap: 8px; min-height: 29px; }
  .leader-name { font-size: 15px; }
  .leader-score { font-size: 17px; }
  .rank { flex-basis: 23px; width: 23px; font-size: 15px; }
  .rank-crown { width: 23px; height: 20px; }
  .widget-chains { padding: 0 30px; }
  .bonus-word { font-size: 14px; }
}
@media (max-width: 650px) { aside { display: flex; padding-top: 20px; } }

/* Keep both chain ends behind the artwork, including the transparent sprite margins. */
.widget-chains { height: 132px; margin-top: -52px; margin-bottom: -52px; }
.leader-row { min-height: 32px; }
.leader-name, .leader-score { line-height: 1.15; }
.bonus { padding-top: 100px; padding-bottom: 24px; }
.bonus-word { font-size: 15px; line-height: 1.15; padding: 3px 7px; }
@media (max-width: 1500px) { .widget-chains { height: 116px; margin-top: -44px; margin-bottom: -47px; } .bonus { padding-top: 88px; padding-bottom: 24px; } }
@media (max-width: 1000px) { .bonus { padding-top: 81px; } .bonus-word { font-size: 14px; } }
.leaderboard { padding-bottom: calc(var(--art-bottom) + 10px); }
.bonus { padding-bottom: 32px; }
/* Keep the last line of bonus words clear of the carved bottom rail. */
.bonus { padding-bottom: 44px; }
