/* U-16プロコン トーナメント表 */
.u16pc {
  --u-accent: #1f6fb2;
  --u-accent-soft: #e8f1fa;
  --u-win: #fff6cf;
  --u-winbar: #e2a500;
  --u-line: #c5ccd6;
  --u-text: #1d2430;
  --u-sub: #687280;
  --u-bad: #c0392b;
  --u-good: #1e8e3e;
  --u-live: #e67e22;
  --u-bg: #f5f7fa;
  --u-border: #d6dce4;
  --u-gap: 36px;
  --u-cw: 276px;
  color: var(--u-text);
  font-size: 14px;
  line-height: 1.45;
  margin: 1em 0;
}
.u16pc *, .u16pc *::before, .u16pc *::after { box-sizing: border-box; }
.u16pc [hidden] { display: none !important; }

/* 見出し・お知らせ */
.u16pc-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 8px; }
.u16pc-title { font-size: 1.25em; font-weight: 700; }
.u16pc-meta { font-size: 12px; color: var(--u-sub); }
.u16pc-meta .sep { margin: 0 6px; color: var(--u-line); }
.u16pc-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--u-good); margin-right: 4px; vertical-align: 1px; animation: u16pc-pulse 2s infinite; }
@keyframes u16pc-pulse { 50% { opacity: .3; } }
.u16pc-note { background: var(--u-accent-soft); border-left: 4px solid var(--u-accent); padding: 8px 12px; border-radius: 4px; margin-bottom: 10px; }
.u16pc-empty, .u16pc-closed, .u16pc-preview-note { color: var(--u-sub); }
.u16pc-preview-note { font-size: 12px; }

/* 順位・次の試合 */
.u16pc-podium { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.u16pc-podium .pd { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--u-border); background: #fff; }
.u16pc-podium .rk { display: inline-block; min-width: 4.2em; text-align: center; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; color: #fff; }
.u16pc-podium .pn { font-weight: 700; }
.u16pc-podium .pd-1 .rk { background: #c99a06; }
.u16pc-podium .pd-2 .rk { background: #8a96a3; }
.u16pc-podium .pd-3 .rk { background: #b0703c; }
.u16pc-next { display: inline-block; background: #fff; border: 1px solid var(--u-accent); border-radius: 6px; padding: 6px 12px; margin-bottom: 10px; }
.u16pc-next .lab { display: inline-block; background: var(--u-accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 3px; padding: 1px 6px; margin-right: 8px; }
.u16pc-next .vs { color: var(--u-sub); font-size: 12px; margin: 0 2px; }

/* タブ */
.u16pc-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--u-border); margin-bottom: 10px; }
.u16pc .u16pc-tabs button { appearance: none; border: 0; background: transparent; color: var(--u-sub); font: inherit; font-weight: 700; padding: 8px 14px; margin: 0 0 -2px; border-bottom: 3px solid transparent; cursor: pointer; border-radius: 0; box-shadow: none; text-transform: none; letter-spacing: 0; }
.u16pc .u16pc-tabs button.on { color: var(--u-accent); border-bottom-color: var(--u-accent); }

/* トーナメント表 */
.u16pc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
.u16pc-tree { display: flex; align-items: stretch; min-width: max-content; }
.u16pc-col { display: flex; flex-direction: column; width: calc(var(--u-cw) + var(--u-gap)); flex: none; }
.u16pc-col.is-champ { width: calc(170px + var(--u-gap) / 2); }
.u16pc-col-title { font-size: 13px; font-weight: 700; color: var(--u-sub); padding: 0 calc(var(--u-gap) / 2) 4px; height: 26px; white-space: nowrap; }
.u16pc-col-body { flex: 1; display: flex; flex-direction: column; }
.u16pc-mw { flex: 1 1 0; display: flex; align-items: center; position: relative; padding: 5px calc(var(--u-gap) / 2); }
.u16pc-col.is-champ .u16pc-mw { padding-right: 0; }
.u16pc-mw::before, .u16pc-mw::after { content: ""; position: absolute; width: calc(var(--u-gap) / 2); border: 0 solid var(--u-line); pointer-events: none; }
.u16pc-col + .u16pc-col .u16pc-mw::before { left: 0; top: 50%; margin-top: -1px; border-top-width: 2px; }
.u16pc-col.has-next .u16pc-mw:nth-child(odd)::after { right: 0; top: 50%; height: 50%; margin-top: -1px; border-top-width: 2px; border-right-width: 2px; }
.u16pc-col.has-next .u16pc-mw:nth-child(even)::after { right: 0; bottom: 50%; height: 50%; margin-bottom: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.u16pc-col.is-final .u16pc-mw::after { right: 0; top: 50%; margin-top: -1px; border-top-width: 2px; }
.u16pc-mw.is-decided::after { border-color: var(--u-accent); }
.u16pc-col.is-champ .u16pc-mw.is-decided::before { border-color: var(--u-accent); }

.u16pc-third { margin-top: 14px; width: calc(var(--u-cw) + var(--u-gap) / 2); padding-left: calc(var(--u-gap) / 2); }
.u16pc-third .u16pc-col-title { padding-left: 0; }

/* 試合カード */
.u16pc-card { width: 100%; background: #fff; border: 1px solid var(--u-border); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.u16pc-card.is-click { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.u16pc-card.is-click:hover, .u16pc-card.is-click:focus { border-color: var(--u-accent); box-shadow: 0 2px 8px rgba(31, 111, 178, .18); outline: none; }
.u16pc-card.st-live { border-color: var(--u-live); box-shadow: 0 0 0 2px rgba(230, 126, 34, .2); }
.u16pc-card.is-next { border-color: var(--u-accent); box-shadow: 0 0 0 2px rgba(31, 111, 178, .2); }
.u16pc-card.is-stale { border-color: var(--u-bad); }
.u16pc-card.st-tbd { background: #fbfcfd; }
.u16pc-card.st-bye { opacity: .85; }
.u16pc-card-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px; font-size: 11px; color: var(--u-sub); background: var(--u-bg); border-bottom: 1px solid #e6eaf0; min-height: 22px; }
.u16pc-card-h .no { font-weight: 700; color: var(--u-text); }
.u16pc-badge { display: inline-block; font-size: 10.5px; line-height: 1.5; padding: 0 6px; border-radius: 3px; background: #e9edf2; color: var(--u-sub); font-weight: 700; }
.u16pc-badge.b-done { background: #e9edf2; color: #56606c; }
.u16pc-badge.b-live { background: var(--u-live); color: #fff; }
.u16pc-badge.b-next { background: var(--u-accent); color: #fff; }
.u16pc-badge.b-warn { background: var(--u-bad); color: #fff; }

.u16pc-r { display: grid; grid-template-columns: 16px minmax(0, 1fr) 54px 54px 34px; align-items: center; gap: 0 4px; padding: 4px 8px; min-height: 42px; }
.u16pc-r + .u16pc-r { border-top: 1px dashed #e1e5ea; }
.u16pc-r.u16pc-rh { min-height: 0; padding-top: 2px; padding-bottom: 0; font-size: 10px; color: var(--u-sub); text-align: center; }
.u16pc-r.u16pc-rh + .u16pc-r { border-top: 0; }
.u16pc-r.u16pc-rh span:last-child { text-align: right; }
.u16pc-r.is-win { background: var(--u-win); box-shadow: inset 4px 0 0 var(--u-winbar); }
.u16pc-r.is-win .nm { font-weight: 700; }
.u16pc-r.is-lose .nm, .u16pc-r.is-lose .tot { color: var(--u-sub); }
.u16pc-r .slot { font-size: 10px; font-weight: 700; color: var(--u-sub); }
.u16pc .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u16pc .nm small { display: block; font-size: 10.5px; color: var(--u-sub); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.u16pc .nm.is-empty { color: #9aa3ad; font-size: 12px; }
.u16pc-r .g { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 32px; border-radius: 4px; background: #f3f5f8; }
.u16pc-r .g b { font-size: 15px; line-height: 1.1; }
.u16pc-r .g i { font-style: normal; font-size: 9.5px; line-height: 1.2; letter-spacing: -.03em; white-space: nowrap; }
.u16pc-r .g-win { background: #e2f3e7; }
.u16pc-r .g-win i { color: var(--u-good); font-weight: 700; }
.u16pc-r .g-lose { background: #fbecea; }
.u16pc-r .g-lose i { color: var(--u-bad); font-weight: 700; }
.u16pc-r .g-self b { color: var(--u-bad); }
.u16pc-r .g-draw i { color: var(--u-sub); }
.u16pc-r .tot { text-align: right; font-weight: 700; font-size: 15px; }
.u16pc-card-f { font-size: 11px; color: var(--u-accent); padding: 2px 8px 3px; border-top: 1px solid #eef1f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.u16pc-champ { width: 100%; border: 2px dashed var(--u-line); border-radius: 10px; padding: 10px; text-align: center; color: var(--u-sub); background: #fff; }
.u16pc-champ .cr { display: block; font-size: 20px; line-height: 1; opacity: .35; }
.u16pc-champ .cn { display: block; font-weight: 700; font-size: 16px; margin-top: 4px; }
.u16pc-champ.is-set { border: 2px solid var(--u-winbar); background: var(--u-win); color: var(--u-text); }
.u16pc-champ.is-set .cr { opacity: 1; }

/* 試合結果の一覧 */
.u16pc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.u16pc-list-r { grid-column: 1 / -1; font-weight: 700; color: var(--u-sub); border-bottom: 1px solid var(--u-border); padding: 6px 0 2px; margin-top: 4px; }
.u16pc-detail { background: #fff; border: 1px solid var(--u-border); border-radius: 8px; overflow: hidden; }
.u16pc-detail.st-live { border-color: var(--u-live); }
.u16pc-detail-h { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--u-bg); border-bottom: 1px solid #e6eaf0; font-size: 13px; }
.u16pc-detail-h .u16pc-badge { margin-left: auto; }
.u16pc-detail-f { padding: 6px 10px; font-size: 12.5px; border-top: 1px solid #eef1f5; color: var(--u-accent); }
.u16pc-detail-f b { color: var(--u-text); }
.u16pc table.u16pc-dt { width: 100%; border-collapse: collapse; margin: 0; border: 0; table-layout: fixed; font-size: 13px; background: transparent; }
.u16pc .u16pc-dt th, .u16pc .u16pc-dt td { border: 0; border-bottom: 1px solid #eef1f5; padding: 6px 6px; vertical-align: middle; background: transparent; text-align: center; }
.u16pc .u16pc-dt thead th { font-size: 11px; color: var(--u-sub); font-weight: 700; padding: 4px 6px; }
.u16pc .u16pc-dt th:first-child { text-align: left; width: 34%; font-weight: 400; }
.u16pc .u16pc-dt tr.is-win th, .u16pc .u16pc-dt tr.is-win td { background: var(--u-win); }
.u16pc .u16pc-dt tr.is-win th { box-shadow: inset 4px 0 0 var(--u-winbar); font-weight: 700; }
.u16pc .u16pc-dt tr.is-lose .nm { color: var(--u-sub); }
.u16pc-dc span { display: block; font-size: 10.5px; line-height: 1.3; color: var(--u-sub); }
.u16pc-dc .lbl { font-weight: 700; font-size: 11px; }
.u16pc-dc .lbl-win { color: var(--u-good); }
.u16pc-dc .lbl-lose { color: var(--u-bad); }
.u16pc-dc .ded { color: var(--u-bad); }
.u16pc-dc .sc { display: block; font-size: 16px; line-height: 1.2; }
.u16pc-dc.is-none { color: #b0b7c0; }
.u16pc-dsum b { display: block; font-size: 17px; }
.u16pc-dsum span { font-size: 10.5px; color: var(--u-sub); }
.u16pc .u16pc-dt tr.u16pc-drem th, .u16pc .u16pc-dt tr.u16pc-drem td { font-size: 11px; color: var(--u-sub); border-bottom: 0; padding-top: 3px; padding-bottom: 4px; }

/* ルール */
.u16pc-rules { margin-top: 14px; font-size: 13px; background: var(--u-bg); border-radius: 6px; padding: 6px 12px; }
.u16pc-rules summary { cursor: pointer; font-weight: 700; color: var(--u-sub); }
.u16pc-rules ul { margin: 6px 0 4px 1.2em; padding: 0; }
.u16pc-rules li { margin: 2px 0; }

/* 詳細ポップアップ */
.u16pc-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 16px; margin: 0; }
.u16pc-modal-box { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: #fff; border-radius: 10px; padding: 36px 12px 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.u16pc-modal .u16pc-x { position: absolute; top: 4px; right: 6px; appearance: none; border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--u-sub); cursor: pointer; padding: 4px 8px; box-shadow: none; }
.u16pc-modal .u16pc-detail { border: 0; }

@media (max-width: 640px) {
  .u16pc { --u-cw: 268px; --u-gap: 28px; font-size: 13.5px; }
  .u16pc-list { grid-template-columns: 1fr; }
  .u16pc-r { grid-template-columns: 14px minmax(0, 1fr) 50px 50px 30px; }
}
