/* Original Zincir matchmaking composition: the board is decorative, never a
   queue-progress indicator. Search duration comes from the view controller. */
body #league-panel { width: 100%; max-width: 640px; margin-inline: auto; }
body #league-panel .sub-top { margin-bottom: 14px; }
#league-panel .match-bot-policy { margin: 10px 0 18px; color: var(--ink-2); font-size: 12px; line-height: 1.6; }
#league-panel .match-bot-status { max-width: 38ch; margin: 14px auto 0; padding: 10px 12px; border: 1px solid var(--d-outline); border-radius: 12px; color: var(--d-text); font-size: 12px; line-height: 1.6; text-align: center; font-variant-numeric: tabular-nums; }
.rating-breakdown { display: block; margin-top: 5px; font-size: .88em; line-height: 1.6; }
.leader-rating-breakdown { display: block; margin-top: 4px; color: var(--ink-2); font-size: 10px; line-height: 1.5; white-space: normal; }
body #league-panel .sub-top h2 { font-size: 20px; letter-spacing: -.03em; }
#league-panel .match-mode-label { margin-left: auto; color: var(--ink-2); font-size: 12px; font-weight: 700; }
#league-panel .match-stage { position: relative; overflow: hidden; padding: 26px 28px 24px; border: 1px solid var(--dark); border-radius: 24px; background: var(--dark); color: var(--d-text); }
#league-panel .match-eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 24px; font-size: 10px; line-height: 1.5; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--d-text-2); }
#league-panel .match-eyebrow i { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
#league-panel .match-contenders { display: grid; grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr); align-items: center; gap: 10px; }
#league-panel .match-contender { min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
#league-panel .match-avatar { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 12px; border-radius: 20px; color: var(--dark); background: var(--lime); --tile: var(--lime); }
#league-panel .match-avatar .avatar-icon { width: 32px; height: 32px; }
#league-panel .match-avatar-unknown { background: transparent; border: 1px dashed var(--d-outline); color: var(--d-text-2); font-size: 29px; font-weight: 500; }
#league-panel .match-player-line { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-width: 0; }
#league-panel .match-player-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; line-height: 1.6; }
#league-panel .match-badge { display: flex; flex: none; }
#league-panel .match-badge .profile-marker { width: 18px; height: 18px; margin: 0; color: var(--lime); }
#league-panel .match-contender small { margin-top: 3px; color: var(--d-text-2); font-size: 11px; line-height: 1.5; }
#league-panel .match-versus { align-self: start; display: grid; place-items: center; height: 60px; color: var(--d-text-2); font-size: 10px; font-weight: 700; letter-spacing: .07em; }
#league-panel .match-board-wrap { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 23px 0 19px; }
#league-panel .match-board-line { width: 42px; height: 1px; background: #475044; }
#league-panel .match-mini-board { display: grid; grid-template-columns: repeat(3, 25px); gap: 5px; transform: rotate(-8deg); }
#league-panel .match-mini-board > span { display: grid; place-items: center; height: 25px; border: 1px solid #56604f; border-radius: 6px; background: var(--cell); }
#league-panel .match-mini-board > span::after { content: ""; display: block; width: 4px; height: 4px; border-radius: 50%; background: #85927b; }
#league-panel .match-mini-board > .match-board-seed::after { width: 15px; height: 15px; background: var(--lime); }
#league-panel .match-mini-board > .match-board-center::after { width: 18px; height: 18px; background: var(--lime); }
#league-panel .match-mini-board > .match-board-center { background: #3c4932; border-color: var(--lime); }
#league-panel .match-stage h3 { margin: 0; color: var(--d-text); font-size: clamp(22px, 4.7vw, 28px); font-weight: 750; line-height: 1.2; letter-spacing: -.045em; text-align: center; text-wrap: balance; }
#league-panel #league-status { max-width: 36ch; min-height: 42px; margin: 12px auto 0; color: #c0c8b9; font-size: 13px; line-height: 1.6; text-align: center; text-wrap: pretty; overflow-wrap: anywhere; }
#league-panel .match-time { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; color: var(--d-text-2); font-size: 11px; }
#league-panel .match-time svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
#league-panel .match-time time { color: var(--d-text); font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 600; }
#league-panel .match-motion { display: block; min-height: 32px; margin: 10px auto -12px; padding: 4px 9px; border: 0; border-radius: 6px; color: #c0c8b9; background: transparent; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
#league-panel .match-rating { display: flex; align-items: center; gap: 11px; min-height: 65px; padding: 14px 4px; }
#league-panel .match-rating > svg { width: 23px; height: 23px; flex: none; fill: none; stroke: var(--accent-text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#league-panel #league-current-rating { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
#league-panel .match-actions { display: grid; gap: 10px; }
body #league-panel .match-actions > button { width: 100%; min-height: 52px; margin: 0; justify-content: center; border-radius: 14px; }
body #league-panel #league-find { display: flex; align-items: center; justify-content: space-between; padding-inline: 20px; font-size: 15px; font-weight: 750; }
body #league-panel #league-find > span { font-size: 23px; line-height: 1; }
body #league-panel #league-practice { min-height: 44px; background: transparent; border-color: transparent; font-size: 12px; color: var(--ink-2); }
#league-panel .match-tip { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
#league-panel .match-tip-top { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
#league-panel .match-tip-top > span:first-child { color: var(--accent-text); font-size: 9px; font-weight: 800; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; }
#league-panel .match-tip-count { margin-left: auto; color: var(--ink-2); font-size: 10px; font-variant-numeric: tabular-nums; }
#league-panel .match-tip-next { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; margin: -12px -11px -12px 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); }
#league-panel .match-tip-next:hover { background: var(--lime-soft); }
#league-panel .match-tip-next svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#league-panel .match-tip strong { display: block; font-size: 13px; line-height: 1.5; font-weight: 650; }
#league-panel .match-tip p { min-height: 37px; margin: 6px 0 0; font-size: 12px; line-height: 1.55; color: var(--ink-2); }
#league-panel .match-fairplay { margin: 14px 5px 0; font-size: 10px; line-height: 1.7; color: var(--ink-2); text-align: center; }
#league-panel .match-stage button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
#league-panel[data-match-phase="matched"] .match-avatar-unknown { border-style: solid; border-color: var(--lime); color: var(--lime); }
#league-panel[data-match-phase="error"] .match-stage { border-color: #9a6a51; }
#league-panel[data-match-motion="on"] .match-mini-board > span { animation: match-chain-cell 3s ease-in-out infinite; }
#league-panel[data-match-motion="on"] .match-mini-board > span::after { animation: match-chain-stone 3s ease-in-out infinite; }
#league-panel[data-match-motion="on"] .match-mini-board > span:nth-child(2n) { animation-delay: .35s; }
#league-panel[data-match-motion="on"] .match-mini-board > span:nth-child(2n)::after { animation-delay: .35s; }
#league-panel[data-match-motion="on"] .match-mini-board > span:nth-child(2n + 1) { animation-delay: .7s; }
#league-panel[data-match-motion="on"] .match-mini-board > span:nth-child(2n + 1)::after { animation-delay: .7s; }
#league-panel[data-match-motion="on"] .match-mini-board > .match-board-center,
#league-panel[data-match-motion="on"] .match-mini-board > .match-board-center::after { animation-delay: 0s; }
@keyframes match-chain-cell { 0%, 45%, 100% { border-color: #56604f; } 15%, 30% { border-color: var(--lime); } }
@keyframes match-chain-stone { 0%, 45%, 100% { transform: scale(1); } 15%, 30% { transform: scale(1.55); background: var(--lime); } }
@media (max-width: 420px) {
  body #league-panel .sub-top { margin-bottom: 10px; }
  body #league-panel .sub-top h2 { font-size: 18px; }
  #league-panel .match-mode-label { font-size: 10px; }
  #league-panel .match-stage { padding: 21px 16px 20px; border-radius: 20px; }
  #league-panel .match-eyebrow { margin-bottom: 20px; font-size: 9px; }
  #league-panel .match-contenders { grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 4px; }
  #league-panel .match-avatar { width: 52px; height: 52px; border-radius: 17px; margin-bottom: 10px; }
  #league-panel .match-versus { height: 52px; }
  #league-panel .match-player-line strong { font-size: 12px; }
  #league-panel .match-contender small { font-size: 10px; }
  #league-panel .match-board-wrap { padding: 20px 0 17px; }
  #league-panel #league-status { font-size: 12px; }
  #league-panel .match-tip { padding: 14px 15px; }
  #league-panel .match-tip p { min-height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  #league-panel *, #league-panel *::after { animation: none !important; transition: none !important; }
}
