.panel { max-height: 100%; overflow-y: auto; }
.rating-summary { width: 100%; border: 1px solid #d8e1d3; background: #eaf0e4; border-radius: 10px; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; }
.rating-summary:hover { background: #e0ead9; }
.rating-summary small { color: #647564; font-size: 10px; font-weight: 400; }
.rating-summary strong { display: block; font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rating-summary sup, .your-rating sup, .rating-value sup { font-size: 11px; color: var(--muted); margin-left: 2px; }
.rating-summary-meta { font-size: 10px; text-align: right; }
.result-rating { margin: 4px 0 14px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.result-rating span { font-size: 13px; color: var(--muted); }
.result-rating .rating-up { color: #398b68; }
.result-rating .rating-down { color: #b65b4e; }
.board-stage { container-type: inline-size; }
.result-card { max-width: 100%; max-height: 100%; overflow-y: auto; }
@container (max-width: 340px) {
  .result { padding: 8px; }
  .result-card { padding: 12px; gap: 7px; border-radius: 14px; }
  .result-title { font-size: 18px; }
  .result-why { font-size: 11px; margin-bottom: 0; }
  .result-rating { font-size: 16px; margin: 0; }
  .result-card .btn { padding: 7px 9px; font-size: 11px; }
}
.player-rating { color: var(--muted); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.leaderboard-dialog { width: min(640px, calc(100vw - 24px)); }
.leaderboard-content { padding: 20px 24px; }
.leaderboard-header-actions { display: flex; align-items: center; gap: 8px; margin-left: 12px; }
.rating-help-toggle { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.rating-help-toggle:hover, .rating-help-toggle[aria-expanded='true'] { background: var(--surface-2); color: var(--ink); }
.rating-help-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rating-help { margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.rating-help h3 { margin: 0; font-size: 13px; }
.rating-help .rating-note { margin-top: 8px; }
.your-rating { background: #eaf0e4; border-radius: 12px; padding: 15px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.your-rating > div:first-child { display: grid; }
.your-rating strong { font-size: 32px; line-height: 1.3; }
.your-rating small, .your-rating span { font-size: 11px; color: #647564; }
.rating-stats { display: flex; gap: 18px; text-align: center; }
.rating-stats b { display: block; font-size: 18px; color: var(--ink); }
.leaderboard-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.leaderboard-toolbar p, .rating-note { font-size: 11px; color: var(--muted); }
.leaderboard-scroll { overflow-x: auto; }
#leaderboard-table { width: 100%; border-collapse: collapse; font-size: 12px; }
#leaderboard-table th, #leaderboard-table td { text-align: left; padding: 11px 6px; border-bottom: 1px solid var(--line); }
#leaderboard-table thead th { font-size: 10px; font-weight: 500; color: var(--muted); }
#leaderboard-table th[scope=row] { max-width: 220px; overflow-wrap: anywhere; font-weight: 500; }
#leaderboard-table td:nth-last-child(-n+2), #leaderboard-table thead th:nth-last-child(-n+2) { text-align: right; font-variant-numeric: tabular-nums; }
#leaderboard-table .is-you { background: #eaf0e4; }
#leaderboard-table small { margin-left: 6px; color: var(--accent); font-size: 9px; }
.rating-value { font-weight: 700; }
.rank { display: inline-grid; place-items: center; width: 25px; height: 25px; }
.rank.podium { border-radius: 50%; background: #f1e5b9; color: #7e632c; font-weight: 700; }
.rating-note { line-height: 1.6; margin: 15px 0 0; }
@media (max-width: 719px) and (orientation: portrait) {
  .rating-summary { padding: 7px 10px; }
  .rating-summary strong { font-size: 20px; }
  .leaderboard-content { padding: 14px; }
  .rating-stats { gap: 9px; }
  .your-rating { padding: 12px; }
}
