/**************************************/
/*   ブラケット
/**************************************/
/* 日程表示切り替え */
div.schedule-sort {
    margin: 2em 0;
}
div.schedule-sort div.accordion {
    margin-top: 0;
}
div.schedule-sort table tr:not([data-schedule-sort-title]) > * {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: opacity;
}
div.schedule-sort.schedule-effect-fade.is-switching-out table tr:not([data-schedule-sort-title]) > * {
    animation: schedule-sort-out .16s ease forwards;
}
div.schedule-sort.schedule-effect-fade.is-switching-in table tr:not([data-schedule-sort-title]) > * {
    animation: schedule-sort-in .22s ease forwards;
}
@keyframes schedule-sort-out {
    from {
        opacity: 1;
    }
    to {
        opacity: .18;
    }
}
@keyframes schedule-sort-in {
    from {
        opacity: .18;
    }
    to {
        opacity: 1;
    }
}
/* Codex追加：試合中ラベル */
span.schedule-live-label {
    display: inline-block;
    color: #d93025;
    animation: schedule-live-blink 1s ease-in-out infinite;
}
span.schedule-live-score {
    margin-top: .2em;
    color: #333;
    font-weight: 700;
}
span.schedule-live-elapsed {
    margin-top: .18em;
    color: #666;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}
span.schedule-live-scorers {
    margin-top: .35em;
    color: #555;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    white-space: normal;
}
span.schedule-live-scorer-minute {
    color: #333;
    font-weight: 800;
}
/* Codex追加：順位表 */
table.schedule-standings td,
table.schedule-standings th {
    white-space: nowrap;
}
table.schedule-standings td.schedule-standings-team {
    text-align: left;
}
table.schedule-standings span.schedule-standings-team-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .45em;
    min-width: 0;
}
table.schedule-standings span.schedule-standings-flag {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
}
table.schedule-standings span.schedule-standings-team-name {
    min-width: 0;
    white-space: normal;
}
table.schedule-standings td.schedule-standings-position,
table.schedule-standings td.schedule-standings-points {
    color: #222;
    font-weight: 800;
}
table.schedule-standings span.schedule-standings-group-title {
    display: inline-block;
    vertical-align: middle;
}
table.schedule-standings span.schedule-standings-finalized-label {
    display: inline-flex;
    align-items: center;
    margin-left: .55em;
    padding: 2px 8px;
    border-radius: 999px;
    background: #178a4b;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
    vertical-align: middle;
    white-space: nowrap;
}
table.schedule-standings span.schedule-standings-live {
    display: inline-flex;
    align-items: center;
    gap: .3em;
    color: #d93025;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
table.schedule-standings span.schedule-standings-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #d93025;
    box-shadow: 0 0 0 0 rgba(217, 48, 37, .24);
    animation: schedule-standings-live-pulse 1.8s ease-in-out infinite;
}
table.schedule-standings tr.schedule-standings-live-row td {
    animation: schedule-standings-live-number 1.8s ease-in-out infinite;
}
@keyframes schedule-standings-live-pulse {
    0%,
    100% {
        opacity: .95;
        box-shadow: 0 0 0 0 rgba(217, 48, 37, .2);
    }
    50% {
        opacity: .55;
        box-shadow: 0 0 0 5px rgba(217, 48, 37, 0);
    }
}
@keyframes schedule-standings-live-number {
    0%,
    100% {
        background-color: transparent;
        color: inherit;
    }
    50% {
        background-color: rgba(217, 48, 37, .06);
        color: #d93025;
    }
}
/* Codex追加：順位表をスマホでは1チーム1行の要約表示にする */
@media ( max-width: 640px ) {
    div.schedule-standings-accordion.accordion.long {
        height: 560px;
    }
    div.schedule-standings-accordion div.table_wrap.long {
        overflow-x: visible;
    }
    table.schedule-standings {
        display: block;
        width: 100%;
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }
    table.schedule-standings thead,
    table.schedule-standings tbody {
        display: block;
        width: 100%;
    }
    table.schedule-standings thead tr:first-child,
    table.schedule-standings thead tr:first-child th {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    table.schedule-standings thead tr:first-child th {
        padding: 10px 12px;
        text-align: left;
        white-space: normal;
    }
    table.schedule-standings span.schedule-standings-finalized-label {
        margin-left: .45em;
        padding: 2px 7px;
    }
    table.schedule-standings thead tr:nth-child(2) {
        display: none;
    }
    table.schedule-standings tbody tr {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px 8px;
        padding: 10px;
        border-bottom: 1px solid rgba(var(--table-border-green-rgb), .18);
    }
    table.schedule-standings tbody tr:last-child {
        border-bottom: 0;
    }
    table.schedule-standings td {
        display: block;
        width: auto;
        box-sizing: border-box;
        padding: 0;
        border: 0;
        white-space: normal;
    }
    table.schedule-standings td.schedule-standings-position {
        order: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        border-radius: 999px;
        background: rgba(var(--table-border-green-rgb), .12);
        color: #2f3d38;
        font-size: 14px;
        line-height: 1;
    }
    table.schedule-standings td.schedule-standings-position::after {
        content: '位';
        margin-left: 1px;
        font-size: 10px;
        font-weight: 700;
    }
    table.schedule-standings td.schedule-standings-team {
        order: 2;
        flex: 1 1 calc(100% - 104px);
        min-width: 0;
        font-weight: 800;
    }
    table.schedule-standings span.schedule-standings-team-wrap {
        display: flex;
        width: 100%;
        gap: .5em;
    }
    table.schedule-standings span.schedule-standings-flag img.emoji {
        width: 20px;
        height: 20px;
    }
    table.schedule-standings td.schedule-standings-points {
        order: 3;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 54px;
        flex-direction: column;
        min-height: 38px;
        padding: 5px 4px;
        border-radius: 6px;
        background: rgba(var(--table-border-green-rgb), .12);
        color: #222;
        font-size: 20px;
        line-height: 1;
    }
    table.schedule-standings tr.schedule-standings-live-row td.schedule-standings-points {
        animation: schedule-standings-live-number-box 1.8s ease-in-out infinite;
    }
    table.schedule-standings td.schedule-standings-points::before {
        content: attr(data-label);
        color: #60706a;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
    }
    table.schedule-standings td.schedule-standings-played,
    table.schedule-standings td.schedule-standings-won,
    table.schedule-standings td.schedule-standings-drawn,
    table.schedule-standings td.schedule-standings-lost,
    table.schedule-standings td.schedule-standings-goal-diff {
        order: 4;
        display: inline-flex;
        align-items: baseline;
        justify-content: center;
        flex: 1 1 calc(20% - 8px);
        min-width: 44px;
        gap: 3px;
        padding: 5px 4px;
        border-radius: 4px;
        background: rgba(var(--table-border-green-rgb), .07);
        color: #333;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.2;
    }
    table.schedule-standings td.schedule-standings-played::before,
    table.schedule-standings td.schedule-standings-won::before,
    table.schedule-standings td.schedule-standings-drawn::before,
    table.schedule-standings td.schedule-standings-lost::before,
    table.schedule-standings td.schedule-standings-goal-diff::before {
        content: attr(data-label);
        color: #60706a;
        font-size: 10px;
        font-weight: 700;
    }
    table.schedule-standings td.schedule-standings-goals-for,
    table.schedule-standings td.schedule-standings-goals-against {
        display: none;
    }
}
@keyframes schedule-standings-live-number-box {
    0%,
    100% {
        background: rgba(var(--table-border-green-rgb), .12);
        color: #222;
    }
    50% {
        background: rgba(217, 48, 37, .08);
        color: #d93025;
    }
}
@keyframes schedule-live-blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: .25;
    }
}
div.schedule-sort table tr[data-schedule-sort-title] th {
    padding: 0;
}
div.schedule-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
}
div.schedule-sort-bar span.schedule-sort-title {
    color: #2f3d38;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}
div.schedule-sort-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
div.schedule-sort-control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
div.schedule-sort-controls {
    --schedule-switch-pad: 4px;
    --schedule-option-count: 2;
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
    padding: var(--schedule-switch-pad);
    box-sizing: border-box;
    border: 1px solid rgba(var(--table-button-border-green-rgb), .34);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(var(--table-border-green-rgb), .12);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .32),
        0 1px 3px rgba(var(--table-button-border-green-rgb), .1);
}
div.schedule-sort-controls.is-count-2 {
    --schedule-option-count: 2;
    min-width: 206px;
}
div.schedule-stage-controls.is-count-2 {
    min-width: 240px;
}
div.schedule-sort-controls.is-count-3 {
    --schedule-option-count: 3;
    min-width: 318px;
}
div.schedule-sort-controls.is-count-4 {
    --schedule-option-count: 4;
    min-width: min(424px, 100%);
}
div.schedule-sort-controls.is-count-5 {
    --schedule-option-count: 5;
    min-width: min(520px, 100%);
}
div.schedule-sort-controls::before {
    content: '';
    position: absolute;
    top: var(--schedule-switch-pad);
    bottom: var(--schedule-switch-pad);
    left: var(--schedule-switch-pad);
    width: calc((100% - (var(--schedule-switch-pad) * 2)) / var(--schedule-option-count));
    border-radius: 999px;
    background: rgba(var(--table-button-background-green-rgb), 1);
    box-shadow:
        0 2px 7px rgba(var(--table-button-border-green-rgb), .18),
        inset 0 1px 0 rgba(255, 255, 255, .2);
    transform: translateX(0);
    transition: transform .16s ease, box-shadow .16s ease;
}
div.schedule-sort-controls[data-active-index="1"]::before {
    transform: translateX(100%);
}
div.schedule-sort-controls[data-active-index="2"]::before {
    transform: translateX(200%);
}
div.schedule-sort-controls[data-active-index="3"]::before {
    transform: translateX(300%);
}
div.schedule-sort-controls[data-active-index="4"]::before {
    transform: translateX(400%);
}
div.schedule-sort-controls button.schedule-sort-toggle {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex: 1 1 0;
    justify-content: center;
    gap: 6px;
    height: 100%;
    min-height: 30px;
    min-width: 0;
    width: auto;
    box-sizing: border-box;
    bottom: auto;
    left: auto;
    right: auto;
    top: auto;
    border: 0;
    border-radius: 999px;
    padding: 6px 11px;
    background: transparent;
    box-shadow: none;
    color: #333;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    transition: color .14s ease;
    -webkit-tap-highlight-color: transparent;
}
div.schedule-sort-controls button.schedule-sort-toggle::before {
    content: '';
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: .35;
    box-shadow: 0 0 0 3px rgba(var(--table-button-border-green-rgb), .08);
}
div.schedule-sort-controls button.schedule-sort-toggle:hover {
    background: rgba(var(--table-border-green-rgb), .1);
    box-shadow: none;
    color: #333;
}
div.schedule-sort-controls button.schedule-sort-toggle:disabled,
div.schedule-sort-controls button.schedule-sort-toggle.is-disabled {
    opacity: .45;
}
div.schedule-sort-controls button.schedule-sort-toggle:disabled:hover,
div.schedule-sort-controls button.schedule-sort-toggle.is-disabled:hover {
    background: transparent;
    color: #333;
}
div.schedule-sort-controls button.schedule-sort-toggle:hover::before {
    opacity: .75;
    background: rgba(var(--table-button-background-green-rgb), 1);
    box-shadow: 0 0 0 3px rgba(var(--table-button-border-green-rgb), .14);
}
div.schedule-sort-controls button.schedule-sort-toggle:disabled:hover::before,
div.schedule-sort-controls button.schedule-sort-toggle.is-disabled:hover::before {
    opacity: .35;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(var(--table-button-border-green-rgb), .08);
}
div.schedule-sort-controls button.schedule-sort-toggle.is-active {
    color: #fff;
}
div.schedule-sort-controls button.schedule-sort-toggle.is-active:hover {
    background: transparent;
    color: #fff;
}
div.schedule-sort-controls button.schedule-sort-toggle.is-active::before {
    opacity: .95;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}
div.schedule-sort-controls button.schedule-sort-toggle.is-active:hover::before {
    opacity: .95;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}
div.schedule-sort-controls button.schedule-sort-toggle:focus-visible {
    outline: 2px solid rgba(var(--table-button-border-green-rgb), .38);
    outline-offset: 3px;
}
/* Codex追加：Apple価格改定表のカテゴリ切り替え */
div.apple-price-sort div.apple-price-sort-bar {
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 4px 0 6px;
}
div.apple-price-sort div.schedule-sort-actions,
div.apple-price-sort div.schedule-sort-control-group {
    justify-content: center;
    width: 100%;
}
div.apple-price-sort div.apple-price-sort-controls {
    width: 100%;
    max-width: 680px;
}
div.apple-price-sort span.schedule-sort-title {
    text-align: center;
}
div.apple-price-sort div.apple-price-sort-controls button.schedule-sort-toggle {
    min-height: 40px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 14px;
    white-space: normal;
}
div.apple-price-sort div.accordion {
    margin-top: 4px;
}
div.apple-price-sort div.table_wrap {
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
div.apple-price-sort table.apple-price-increase-table {
    min-width: 760px;
    table-layout: fixed;
}
div.apple-price-sort table.apple-price-increase-table th,
div.apple-price-sort table.apple-price-increase-table td {
    font-size: 15px;
    letter-spacing: 0;
}
div.apple-price-sort table.apple-price-increase-table thead th:first-child,
div.apple-price-sort table.apple-price-increase-table td:first-child {
    width: auto;
    min-width: 300px;
    text-align: left;
}
div.apple-price-sort table.apple-price-increase-table td:first-child {
    padding-left: 1.75em;
}
div.apple-price-sort table.apple-price-increase-table th:nth-child(n+2),
div.apple-price-sort table.apple-price-increase-table td:nth-child(n+2) {
    width: 14%;
    min-width: 92px;
    white-space: nowrap;
}
div.apple-price-sort table.apple-price-increase-table tr.apple-price-model-heading th {
    background: #eefafa;
    color: #2f3d38;
    font-weight: 800;
    text-align: left;
}
div.apple-price-sort table.apple-price-increase-table tr.apple-price-chip-heading th,
div.apple-price-sort table.apple-price-increase-table tr.apple-price-size-heading th,
div.apple-price-sort table.apple-price-increase-table tr.apple-price-network-heading th {
    background: #f6fbfb;
    color: #5f6f69;
    font-size: 15px;
    font-weight: 800;
    padding-left: 1.75em;
    text-align: left;
}
div.apple-price-sort table.apple-price-increase-table tr.is-apple-price-visible-last > * {
    border-bottom: 0.5px solid rgba(var(--table-border-green-rgb), 1);
}
div.apple-price-sort div.accordion.apple-price-accordion-fit::before {
    display: none;
}
div.apple-price-sort div.apple-price-sticky-label {
    display: none;
}
@media ( max-width: 480px ) {
    div.schedule-sort-bar {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }
    div.schedule-sort-actions,
    div.schedule-sort-control-group {
        align-items: stretch;
        flex-direction: column;
    }
    div.schedule-sort-controls {
        width: 100%;
        min-width: 0;
    }
    div.apple-price-sort table.apple-price-increase-table {
        min-width: 720px;
    }
    div.apple-price-sort table.apple-price-increase-table thead th,
    div.apple-price-sort table.apple-price-increase-table tbody th,
    div.apple-price-sort table.apple-price-increase-table tbody td {
        padding: 8px 6px;
    }
    div.apple-price-sort table.apple-price-increase-table td:first-child {
        padding-left: 1em;
    }
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-chip-heading th,
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-size-heading th,
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-network-heading th {
        padding-left: 1em;
    }
}
/* Codex追加：Apple価格改定表をスマホでは横スクロールなしの要約表示にする */
@media ( max-width: 640px ) {
    div.apple-price-sort div.table_wrap {
        overflow-x: visible;
        overflow-y: visible !important;
    }
    div.apple-price-sort div.accordion,
    div.apple-price-sort div.accordion.expanded,
    div.apple-price-sort div.accordion.apple-price-accordion-fit {
        display: block !important;
        height: auto !important;
        overflow-y: visible !important;
    }
    div.apple-price-sort div.accordion::before,
    div.apple-price-sort div.accordion > button {
        display: none !important;
    }
    div.apple-price-sort,
    div.apple-price-sort div.apple-price-sort-bar,
    div.apple-price-sort div.schedule-sort-actions,
    div.apple-price-sort div.schedule-sort-control-group {
        position: static !important;
        top: auto !important;
        z-index: auto !important;
    }
    div.apple-price-sort div.apple-price-sort-controls {
        position: relative !important;
        top: auto !important;
        z-index: auto !important;
    }
    div.apple-price-sort table.apple-price-increase-table {
        display: block;
        width: 100%;
        min-width: 0;
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0;
    }
    div.apple-price-sort table.apple-price-increase-table thead {
        display: none;
    }
    div.apple-price-sort table.apple-price-increase-table tbody {
        display: block;
        width: 100%;
    }
    div.apple-price-sort table.apple-price-increase-table tbody tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        box-sizing: border-box;
        margin: 0 0 10px;
        border: 0.5px solid rgba(var(--table-border-green-rgb), 1);
        border-radius: 6px;
        background: #fff;
        overflow: hidden;
    }
    div.apple-price-sort table.apple-price-increase-table tbody tr.apple-price-category-heading,
    div.apple-price-sort table.apple-price-increase-table tbody tr.apple-price-model-heading,
    div.apple-price-sort table.apple-price-increase-table tbody tr.apple-price-chip-heading,
    div.apple-price-sort table.apple-price-increase-table tbody tr.apple-price-size-heading,
    div.apple-price-sort table.apple-price-increase-table tbody tr.apple-price-network-heading {
        display: block;
        margin: 14px 0 6px;
        border: 0;
        border-radius: 0;
        background: transparent;
        overflow: visible;
    }
    div.apple-price-sort table.apple-price-increase-table tbody tr:first-child {
        margin-top: 0;
    }
    div.apple-price-sort table.apple-price-increase-table tbody th,
    div.apple-price-sort table.apple-price-increase-table tbody td {
        display: block;
        width: auto;
        min-width: 0;
        box-sizing: border-box;
        border: 0;
        padding: 7px 5px;
        font-size: 15px;
        line-height: 1.35;
    }
    div.apple-price-sort table.apple-price-increase-table tbody td:first-child {
        grid-column: 1 / -1;
        padding: 10px;
        border-bottom: 0.5px solid rgba(var(--table-border-green-rgb), .35);
        background: rgba(var(--table-border-green-rgb), .06);
        font-size: 15px;
        font-weight: 700;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    div.apple-price-sort table.apple-price-increase-table tbody td:nth-child(n+2) {
        width: auto;
        min-width: 0;
        text-align: center;
        white-space: nowrap;
    }
    div.apple-price-sort table.apple-price-increase-table tbody td:nth-child(5) {
        display: none;
    }
    div.apple-price-sort table.apple-price-increase-table tbody td:nth-child(2)::before,
    div.apple-price-sort table.apple-price-increase-table tbody td:nth-child(3)::before,
    div.apple-price-sort table.apple-price-increase-table tbody td:nth-child(4)::before {
        display: block;
        margin-bottom: 2px;
        color: #60706a;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.2;
    }
    div.apple-price-sort table.apple-price-increase-table tbody td:nth-child(2)::before {
        content: '旧価格';
    }
    div.apple-price-sort table.apple-price-increase-table tbody td:nth-child(3)::before {
        content: '新価格';
    }
    div.apple-price-sort table.apple-price-increase-table tbody td:nth-child(4)::before {
        content: '値上げ幅';
    }
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-category-heading th,
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-model-heading th,
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-chip-heading th,
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-size-heading th,
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-network-heading th {
        width: auto;
        min-width: 0;
        border: 0;
        border-radius: 6px;
        padding: 8px 10px;
        box-shadow: 0 1px 5px rgba(0, 0, 0, .08);
        white-space: normal;
    }
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-chip-heading th,
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-size-heading th,
    div.apple-price-sort table.apple-price-increase-table tr.apple-price-network-heading th {
        padding-left: 10px;
    }
    div.apple-price-sort div.apple-price-sticky-label {
        display: block;
        position: fixed;
        top: 80px;
        z-index: 9998;
        box-sizing: border-box;
        border: 1px solid rgba(var(--table-border-green-rgb), .45);
        border-radius: 6px;
        padding: 8px 10px;
        background: #eefafa;
        background-color: #eefafa;
        background-image: none;
        box-shadow: 0 1px 8px rgba(0, 0, 0, .12);
        color: #2f3d38;
        font-size: 15px;
        font-weight: 800;
        line-height: 1.35;
        white-space: normal;
    }
    div.apple-price-sort div.apple-price-sticky-label[hidden] {
        display: none;
    }
    div.apple-price-sort table.apple-price-increase-table tr.is-apple-price-visible-last > * {
        border-bottom: 0;
    }
}
/* Codex修正：スマホ向けの日程カード表示を公開版にも適用 */
@media ( max-width: 640px ) {
    table.schedule-card-preview {
        display: block;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }
    table.schedule-card-preview thead,
    table.schedule-card-preview tbody {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    table.schedule-card-preview tr[data-schedule-sort-title],
    table.schedule-card-preview tr[data-schedule-section-title] {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    table.schedule-card-preview tr[data-schedule-sort-title] th,
    table.schedule-card-preview tr[data-schedule-section-title] th {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    table.schedule-card-preview tr[data-schedule-header] {
        display: none;
    }
    table.schedule-card-preview tr[data-schedule-sort-title] th {
        padding: 0;
        border: 0;
        background: transparent;
    }
    table.schedule-card-preview tr[data-schedule-sort-title] div.schedule-sort-bar {
        display: flex;
        align-items: stretch;
        flex-direction: column;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
        margin: 0 0 14px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    table.schedule-card-preview tr[data-schedule-sort-title] span.schedule-sort-title {
        display: block;
        width: 100%;
        color: #333;
        font-size: 18px;
        font-weight: 800;
        line-height: 1.35;
        text-align: left;
    }
    table.schedule-card-preview tr[data-schedule-sort-title] div.schedule-sort-actions,
    table.schedule-card-preview tr[data-schedule-sort-title] div.schedule-sort-control-group,
    table.schedule-card-preview tr[data-schedule-sort-title] div.schedule-sort-controls {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    table.schedule-card-preview tr[data-schedule-sort-title] div.schedule-sort-actions,
    table.schedule-card-preview tr[data-schedule-sort-title] div.schedule-sort-control-group {
        align-items: stretch;
        justify-content: stretch;
    }
    table.schedule-card-preview tr[data-schedule-section-title] {
        margin: 16px 0 8px;
    }
    table.schedule-card-preview tr[data-schedule-section-title] th {
        border-radius: 6px;
        padding: 8px 10px;
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px 10px;
        margin: 0 0 10px;
        padding: 10px;
        border: 1px solid rgba(var(--table-border-green-rgb), .45);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td {
        display: block;
        width: auto;
        min-width: 0;
        border: 0;
        padding: 0;
        background: transparent;
        line-height: 1.35;
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: 1;
        color: #666;
        font-size: 12px;
        text-align: left;
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(2) {
        grid-column: 3;
        grid-row: 1;
        color: #333;
        font-size: 12px;
        font-weight: 700;
        text-align: right;
        white-space: nowrap;
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(3),
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(5) {
        align-self: center;
        text-align: center;
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
        align-self: center;
        min-width: 58px;
        border-radius: 6px;
        padding: 6px 8px;
        background: rgba(var(--table-border-green-rgb), .12);
        color: #333;
        font-size: 12px;
        font-weight: 700;
        text-align: center;
        white-space: nowrap;
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(5) {
        grid-column: 3;
        grid-row: 2;
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(6) {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-top: 2px;
        padding-top: 8px;
        border-top: 1px solid rgba(var(--table-border-green-rgb), .28);
        color: #555;
        font-size: 12px;
        text-align: center;
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(3) .fs-36,
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(5) .fs-36 {
        font-size: 30px;
        line-height: 1;
    }
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(3) .fs-13,
    table.schedule-card-preview tbody tr[data-schedule-card-row] > td:nth-child(5) .fs-13 {
        font-size: 12px;
        line-height: 1.35;
    }
}
@media ( prefers-reduced-motion: reduce ) {
    div.schedule-sort table tr:not([data-schedule-sort-title]) > *,
    div.schedule-sort-controls::before,
    div.schedule-sort-controls button.schedule-sort-toggle,
    span.schedule-live-label {
        transition: none;
        animation: none;
    }
    div.schedule-sort.is-switching-out table tr:not([data-schedule-sort-title]) > *,
    div.schedule-sort.is-switching-in table tr:not([data-schedule-sort-title]) > * {
        transform: none;
        opacity: 1;
    }
}
/* ラッパー */
div.bracket {
    background: rgba( 249, 248, 241, 0.75 );
    padding: .5em;
    position: relative;
    overflow-x: scroll;
}
/* ラベル */
div.bracket div.label {
    text-align: center;
    font-weight: bold;
    margin-bottom: .5em;
}
/* ラッパー */
body.single div#entry div.bracket ul {
    border: none;
    margin-top: 0;
    display: inline-grid;
    position: relative;
    padding: initial;
}
/* マッチ */
div.bracket ul li.match {
    padding: .5em 0;
    margin: 1.25em 0 0 0;
    border: 1px solid #eee;
    display: block;
    box-shadow: 0 0 2px;
    border-radius: .5em;
    background: #fff;
    width: 180px;
    text-align: center;
    text-indent: 0;
    position: relative;
}
div.bracket li.match:nth-of-type(1) {
    margin-top: 0;
}
body.single div#entry div.bracket li.match:before {
    content: '';
    position: absolute;
    top: initial;
    left: initial;
    border-radius: initial;
    background: initial;
}
div.bracket.wider li.match {
    width: 270px;
}
/* チーム */
div.bracket li.match span.team {
    display: inline-block;
    text-align: center;
    width: 40%;
    height: 90px;
    font-weight: bold;
}
div.bracket li.match span.team span.emoji {
    height: 50px;
    display: block;
    font-size: 3em;
    line-height: 1;
}
div.bracket li.match span.team span.country {
    font-size: .5em;
    line-height: 1.5;
    display: inline-block;
}
div.bracket li.match span.team span.holder {
    display: block ;
    font-size: .75em;
    height: 50px;
    line-height: 50px;
    background: rgba(51, 51, 51, 0.1);
    border: 1px solid #ddd;
    box-sizing: border-box;
    margin: .25em;
}
/* スコア */
div.bracket li.match span.score {
    display: inline-block;
    text-align: center;
    vertical-align: top;
    padding-top: 10px;
}
div.bracket li.match span.score span.number {
    font-weight: bold;
    font-size: 16px;
    color: brown;
}
div.bracket li.match div.score span {
    width: 8%;
    font-weight: bold;
    display: inline-block;
    font-size: .9em;
    color: #555;
}
div.bracket li.match div.score span.left {
    width: 25%;
}
div.bracket li.match div.score span.right {
    width: 25%;
}
/* 試合日時 */
div.bracket li.match span.date {
    display: block;
    font-size: .75em;
    margin: 0 .5em;
    padding: 0;
    text-align: center;
    vertical-align: text-bottom;
}
div.bracket li.match span.time {
    display: block;
    font-size: .95em;
}
div.bracket li.match span.program {
    display: block;
    font-size: 0.7em;
    margin: 0 .5em;
    padding: 0;
}

/* ライン */
div.bracket ul div.line-downer,
div.bracket ul div.line-upper,
div.bracket ul div.line-middler {
    transition: transform 300ms ease-in-out 0s;
    box-sizing: border-box;
    position: absolute;
}
div.bracket.wider ul div.line-downer,
div.bracket.wider ul div.line-upper,
div.bracket.wider ul div.line-middler {
    width: 30px;
    right: -32px;
}
div.bracket.wider ul div.line-middler {
    left: -32px;
}
/* ライン：▔| */
div.bracket ul div.line-downer {
    height: 200px;
    border: 3px solid #dadce0;
    border-bottom: 0;
    border-left: 0;
    width: 18px;
    top: calc(50% - 0px);
    right: -20px;
}
div.bracket ul.first-round.right div.line-downer {
    right: 0;
    left: -20px;
    border-left: 3px solid #dadce0;
    border-right: 0;
}
div.bracket ul.second-round li.match div.line-downer,
div.bracket ul.final li.match div.line-middler {
    height: 397px;
}
/* ライン：ー */
div.bracket ul div.line-upper {
    border-top: 3px solid #dadce0;
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
    width: 18px;
    top: calc(50% + -4px);
    right: -20px;
}
div.bracket ul.first-round.right div.line-upper {
    left: -20px;
}
div.bracket ul div.line-middler {
    border-top: 3px solid #dadce0;
    width: 18px;
    height: 50px;
    left: -18px;
    top: calc(50% - 0px);
}
div.bracket ul li.match.bottom div.line-middler {
    top: calc(50% + -4px);
}
div.bracket ul.second-round.right div.line-middler,
div.bracket ul.second-round.right div.line-middler.after,
div.bracket ul.final div.line-middler,
div.bracket ul.final div.line-middler.after {
    border-left: 3px solid #dadce0;
    height: 397px;
}
div.bracket ul.second-round.right div.line-middler.after,
div.bracket ul.final div.line-middler.after {
    border-right: 3px solid #dadce0;
    border-left: 0;
}
div.bracket ul.second-round.right div.line-middler.after {
    border-right: 0;
}
div.bracket ul.second-round div.line-middler.top {
    top: 60px;
}
div.bracket ul.second-round div.line-middler.bottom {
    top: 315px;
}
div.bracket ul.second-round li.match.bottom div.line-middler,
div.bracket ul.final li.match.bottom div.line-middler {
    height: 0;
}
div.bracket ul li.match div.line-middler.after {
    right: -20px;
    left: initial;
}
/* ベスト16 */
body.single div#entry div.bracket ul.first-round.right {
    /*padding-left: 64.55em;*/
    padding-left: 1112px;
    position: absolute;
    padding-right: .5em;
}
/* 準々決勝 */
body.single div#entry div.bracket ul.second-round {
    /*padding-left: 1.5em;*/
    padding-left: 35px;
    position: absolute;
    top: 14%;
}
div.bracket ul.second-round li.match.bottom {
    margin-top: 13.6em;
}
body.single div#entry div.bracket ul.second-round.right {
    /*padding-left: 51.9em;*/
    padding-left: 895px;
}
div.bracket.wider ul.second-round {
    padding-left: 3em;
}
/* 準決勝 */
body.single div#entry div.bracket ul.semi-final {
    position: absolute;
    top: 37.5%;
    /*padding-left: 14.25em;*/
    padding-left: 250px;
}
body.single div#entry div.bracket ul.semi-final.right {
    /*padding-left: 39.35em;*/
    padding-left: 680px;
}
div.bracket.wider ul.semi-final {
    /*padding-left: 22.5em;*/
    padding-left: 465px;
}
/* 決勝 */
body.single div#entry div.bracket ul.final {
    position: absolute;
    top: 14%;
    /*padding-left: 26.8em;*/
    padding-left: 465px;
}
div.bracket ul.final li.match+div.label {
    /*margin-top: 8.75em;*/
    margin-top: 182px;
}
div.bracket ul.final li.match.bottom {
    /*margin-top: -0.5em;*/
    margin-top: 4px;
}
ul.final li.match.bottom div.blank {
    height: 182px;
    display: flex;
    align-items: center;
    width: 100%;
}
ul.final li.match.bottom div.blank span {
    margin: 0 auto;
}

div.bracket.best-16 {
    height: 800px;
}
div.bracket.best-16 ul.second-round {
    top: 5%;
}
div.bracket.best-16 ul.second-round.right {
    padding-right: 2em
}
div.bracket.best-16 ul.semi-final {
    top: 33%;
}
div.bracket.best-16 ul.final {
    top: 5%;
}

/*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 スコア付きブラケットの調整  
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
/* ベスト16：ライン右折れ */
div.bracket.score ul.first-round li div.line-downer {
    height: 210px;
}
/* 準々決勝・決勝 */
div.bracket.score ul.second-round li div.line-downer,
div.bracket.score ul.second-round li div.line-middler,
div.bracket.score ul.final li div.line-middler,
div.bracket.score ul.final li div.line-middler.after {
    height: 414px;
}
/* 準々決勝・下側 */
div.bracket.score ul.second-round li.match.bottom {
    margin-top: 235px;
}
/* 3位決定戦 */
div.bracket.score ul.final li.match+div.label {
    margin-top: 181px;
}
div.bracket.score ul.final li.match.bottom {
    margin-top: 22px;
}
/* Codex追加：ラウンド別トーナメント */
div.tournament-rounds {
    display: grid;
    gap: 28px;
    margin: 2.5em 0;
}
div.tournament-round-section {
    display: grid;
    gap: 12px;
}
div.tournament-round-section h3.tournament-round-title {
    margin: 0;
    padding: 0 0 8px;
    border-bottom: 2px solid rgba(var(--main-color), .65);
    color: #222;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}
div.tournament-match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}
article.tournament-match-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(var(--main-color), .22);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
article.tournament-match-card div.tournament-match-date span.date {
    display: block;
    margin: 0;
    color: #555;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}
article.tournament-match-card div.tournament-match-date span.time {
    display: inline-block;
    margin-left: .45em;
    color: #222;
}
article.tournament-match-card div.tournament-match-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}
article.tournament-match-card div.tournament-match-team {
    min-width: 0;
}
article.tournament-match-card span.team {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 5px;
    text-align: center;
}
article.tournament-match-card span.team span.emoji {
    display: block;
    height: 36px;
    font-size: 36px;
    line-height: 1;
}
article.tournament-match-card span.team span.emoji img.emoji {
    width: 36px;
    height: 36px;
}
article.tournament-match-card span.team span.country {
    display: block;
    max-width: 100%;
    color: #222;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    line-break: strict;
    overflow-wrap: normal;
    word-break: keep-all;
}
article.tournament-match-card span.team span.country.is-long-country {
    font-size: 11px;
}
article.tournament-match-card span.team span.country.is-very-long-country {
    font-size: 10px;
}
article.tournament-match-card span.team span.country.is-extra-long-country {
    font-size: 9px;
}
span.tournament-advancement-result {
    display: block;
}
article.tournament-match-card span.team span.holder {
    display: block;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #f3f4f5;
}
article.tournament-match-card div.tournament-match-score {
    align-self: center;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;
    border-radius: 8px;
    background: rgba(var(--main-color), .1);
}
article.tournament-match-card div.score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #333;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
article.tournament-match-card div.score span,
article.tournament-match-card div.score span.left,
article.tournament-match-card div.score span.right {
    display: inline-block;
    width: auto;
    min-width: 10px;
    font-size: 13px;
    text-align: center;
}
/* Codex追加：トーナメント表の試合中ラベル */
span.tournament-live-label {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    color: #d93025;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
}
span.tournament-live-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
}
span.tournament-live-dot {
    display: inline-block;
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #d93025;
    animation: schedule-live-blink 1s ease-in-out infinite;
}
span.tournament-live-text {
    display: inline-block;
}
span.tournament-live-elapsed {
    display: inline-block;
}
@media ( max-width: 640px ) {
    div.tournament-rounds {
        gap: 24px;
        margin: 2em 0;
    }
    div.tournament-round-section h3.tournament-round-title {
        font-size: 17px;
    }
    div.tournament-match-grid {
        grid-template-columns: 1fr;
    }
    article.tournament-match-card {
        padding: 11px 10px;
    }
    article.tournament-match-card div.tournament-match-body {
        grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
        gap: 6px;
    }
}
/* Codex追加：勝ち上がりを追えるトーナメント表 */
div.tournament-bracket {
    --tournament-card-width: 280px;
    --tournament-column-gap: 44px;
    --tournament-line-color: rgba(92, 108, 102, .34);
    --tournament-winner-line-color: #d93025;
    --tournament-body-height: 780px;
    --tournament-card-height: 158px;
    --tournament-card-half-height: 79px;
    margin: 2.5em 0;
}
div.tournament-bracket[data-side-size="1"] {
    --tournament-body-height: 300px;
}
div.tournament-bracket[data-side-size="2"] {
    --tournament-body-height: 500px;
}
div.tournament-bracket[data-side-size="4"] {
    --tournament-body-height: 820px;
}
div.tournament-bracket[data-side-size="8"] {
    --tournament-body-height: 1480px;
}
div.tournament-bracket[data-side-size="16"] {
    --tournament-body-height: 2840px;
}
div.tournament-bracket-scroll {
    overflow-x: auto;
    padding: 4px 2px 18px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}
div.tournament-bracket-scroll.is-dragging {
    scroll-behavior: auto;
    -webkit-user-select: none;
    user-select: none;
}
div.tournament-bracket-scroll.is-dragging * {
    -webkit-user-select: none;
    user-select: none;
}
div.tournament-bracket-board {
    display: grid;
    grid-auto-columns: var(--tournament-card-width);
    grid-auto-flow: column;
    align-items: stretch;
    gap: var(--tournament-column-gap);
    min-width: max-content;
}
@media ( hover: hover ) and ( pointer: fine ) {
    div.tournament-bracket-scroll {
        cursor: grab;
    }
    div.tournament-bracket-scroll.is-dragging {
        cursor: grabbing;
    }
}
section.tournament-bracket-column {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 12px;
    min-width: 0;
}
section.tournament-bracket-column h3.tournament-bracket-title {
    margin: 0;
    padding: 0 0 7px;
    border-bottom: 2px solid rgba(var(--main-color), .55);
    color: #222;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}
div.tournament-bracket-column-body {
    position: relative;
    height: var(--tournament-body-height);
    min-height: 0;
}
section.tournament-bracket-center div.tournament-bracket-column-body {
    position: relative;
    min-height: 0;
}
/* Codex修正：準決勝から決勝・3位決定戦へ分岐する接続線 */
section.tournament-bracket-center div.tournament-bracket-column-body::before,
section.tournament-bracket-center div.tournament-bracket-column-body::after {
    content: '';
    position: absolute;
    top: calc(25% - 1px);
    bottom: calc(25% - 1px);
    z-index: 0;
    width: 2px;
    background: var(--tournament-line-color);
    pointer-events: none;
}
section.tournament-bracket-center div.tournament-bracket-column-body::before {
    left: calc(var(--tournament-column-gap) / -2);
}
section.tournament-bracket-center div.tournament-bracket-column-body::after {
    right: calc(var(--tournament-column-gap) / -2);
}
/* Codex修正：決勝と3位決定戦を2試合ラウンドと同じ縦位置に置く */
div.tournament-bracket-center-match {
    position: absolute;
    right: 0;
    left: 0;
    display: block;
}
div.tournament-bracket-center-match.tournament-bracket-center-final {
    top: calc(25% - var(--tournament-card-half-height));
}
div.tournament-bracket-center-match.tournament-bracket-center-final div.tournament-bracket-center-label {
    display: none;
}
div.tournament-bracket-center-match.tournament-bracket-center-3pm {
    top: calc(75% - var(--tournament-card-half-height));
}
div.tournament-bracket-center-match.tournament-bracket-center-3pm div.tournament-bracket-center-label {
    position: absolute;
    top: -34px;
    right: 0;
    left: 0;
}
/* Codex修正：中央カードから左右の分岐点へ接続線を伸ばす */
div.tournament-bracket-center-match::before,
div.tournament-bracket-center-match::after {
    content: '';
    position: absolute;
    top: calc(var(--tournament-card-half-height) - 1px);
    z-index: 0;
    height: 2px;
    width: calc(var(--tournament-column-gap) / 2);
    background: var(--tournament-line-color);
    pointer-events: none;
}
div.tournament-bracket-center-match::before {
    left: calc(var(--tournament-column-gap) / -2);
}
div.tournament-bracket-center-match::after {
    right: calc(var(--tournament-column-gap) / -2);
}
article.tournament-bracket-match-card::before,
div.tournament-bracket-connector::before,
div.tournament-bracket-connector::after {
    content: '';
    position: absolute;
    z-index: 0;
    pointer-events: none;
}
article.tournament-bracket-match-card::before {
    top: calc(50% - 1px);
    display: none;
    height: 2px;
    width: calc(var(--tournament-column-gap) / 2);
    background: var(--tournament-line-color);
}
section.tournament-bracket-side-left article.tournament-bracket-match-card::before {
    display: block;
    right: calc(var(--tournament-column-gap) / -2);
}
section.tournament-bracket-side-right article.tournament-bracket-match-card::before {
    display: block;
    left: calc(var(--tournament-column-gap) / -2);
}
section.tournament-bracket-side-left article.tournament-bracket-match-card.has-winner::before,
section.tournament-bracket-side-right article.tournament-bracket-match-card.has-winner::before {
    background: var(--tournament-winner-line-color);
}
div.tournament-bracket-connector {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
div.tournament-bracket-connector::before {
    display: none;
    top: calc(var(--connector-start) - 1px);
    bottom: calc(100% - var(--connector-end) - 1px);
    width: 2px;
    background: var(--tournament-line-color);
}
div.tournament-bracket-connector.is-pair-count-2::before {
    display: block;
}
div.tournament-bracket-connector::after {
    top: calc(var(--connector-middle) - 1px);
    height: 2px;
    width: calc(var(--tournament-column-gap) / 2);
    background: var(--tournament-line-color);
}
section.tournament-bracket-side-left div.tournament-bracket-connector::before {
    right: calc(var(--tournament-column-gap) / -2);
}
section.tournament-bracket-side-left div.tournament-bracket-connector::after {
    right: calc(var(--tournament-column-gap) * -1);
}
section.tournament-bracket-side-left div.tournament-bracket-connector.has-winner::after {
    background: var(--tournament-winner-line-color);
}
section.tournament-bracket-side-right div.tournament-bracket-connector::before {
    left: calc(var(--tournament-column-gap) / -2);
}
section.tournament-bracket-side-right div.tournament-bracket-connector::after {
    left: calc(var(--tournament-column-gap) * -1);
}
section.tournament-bracket-side-right div.tournament-bracket-connector.has-winner::after {
    background: var(--tournament-winner-line-color);
}
/* Codex修正：準決勝列の線は中央分岐点で止める */
section.tournament-bracket-round-final_4 div.tournament-bracket-connector::after {
    display: none;
}
div.tournament-bracket-connector.is-top-winner.is-bottom-winner::before {
    background: var(--tournament-winner-line-color) !important;
}
div.tournament-bracket-connector.is-top-winner:not(.is-bottom-winner)::before {
    background: linear-gradient(to bottom, var(--tournament-winner-line-color) 0 50%, var(--tournament-line-color) 50% 100%) !important;
}
div.tournament-bracket-connector.is-bottom-winner:not(.is-top-winner)::before {
    background: linear-gradient(to bottom, var(--tournament-line-color) 0 50%, var(--tournament-winner-line-color) 50% 100%) !important;
}
article.tournament-bracket-match-card {
    position: relative;
    z-index: 1;
    height: var(--tournament-card-height);
    box-sizing: border-box;
    padding: 12px;
    border-color: rgba(var(--main-color), .24);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .045);
}
section.tournament-bracket-side-left article.tournament-bracket-match-card,
section.tournament-bracket-side-right article.tournament-bracket-match-card {
    position: absolute;
    top: calc(var(--tournament-match-center, 50%) - var(--tournament-card-half-height));
    right: 0;
    left: 0;
}
article.tournament-bracket-match-card.has-winner {
    border-color: rgba(217, 48, 37, .32);
}
article.tournament-bracket-match-card div.tournament-match-date span.date {
    font-size: 13px;
}
article.tournament-bracket-match-card div.tournament-match-body {
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    gap: 10px;
    height: 100%;
}
article.tournament-bracket-match-card div.tournament-match-date + div.tournament-match-body {
    height: calc(100% - 30px);
}
article.tournament-bracket-match-card div.tournament-match-team.is-winner span.team {
    color: #d93025;
}
article.tournament-bracket-match-card div.tournament-match-team.is-winner span.team span.country {
    color: #d93025;
}
article.tournament-bracket-match-card span.team {
    gap: 5px;
}
article.tournament-bracket-match-card span.team span.emoji {
    height: 36px;
    font-size: 36px;
}
article.tournament-bracket-match-card span.team span.emoji img.emoji {
    width: 36px;
    height: 36px;
}
article.tournament-bracket-match-card span.team span.country {
    font-size: 13px;
}
article.tournament-bracket-match-card span.team span.country.is-long-country {
    font-size: 10px;
}
article.tournament-bracket-match-card span.team span.country.is-very-long-country {
    font-size: 9.5px;
}
article.tournament-bracket-match-card span.team span.country.is-extra-long-country {
    font-size: 9px;
}
article.tournament-bracket-match-card span.team span.holder {
    width: 36px;
    height: 36px;
}
article.tournament-bracket-match-card div.tournament-match-score {
    border-radius: 7px;
    min-height: 74px;
}
article.tournament-bracket-match-card span.tournament-live-label {
    font-size: 10px;
}
article.tournament-bracket-match-card span.tournament-live-dot {
    flex-basis: 6px;
    width: 6px;
    height: 6px;
}
article.tournament-bracket-match-card.is-home-winner div.tournament-match-score,
article.tournament-bracket-match-card.is-away-winner div.tournament-match-score {
    background: rgba(217, 48, 37, .08);
}
article.tournament-bracket-match-card div.score span,
article.tournament-bracket-match-card div.score span.left,
article.tournament-bracket-match-card div.score span.right {
    font-size: 15px;
}
div.tournament-bracket-center-match {
    display: block;
}
div.tournament-bracket-center-label {
    color: #333;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}
section.tournament-bracket-center article.tournament-bracket-match-card {
    border-color: rgba(var(--main-color), .4);
    background: rgba(var(--main-color), .045);
}
@media ( max-width: 640px ) {
    div.tournament-bracket {
        --tournament-card-width: 250px;
        --tournament-column-gap: 34px;
        --tournament-card-height: 148px;
        --tournament-card-half-height: 74px;
        margin: 2em 0;
    }
    div.tournament-bracket[data-side-size="4"] {
        --tournament-body-height: 760px;
    }
    div.tournament-bracket[data-side-size="8"] {
        --tournament-body-height: 1380px;
    }
    div.tournament-bracket[data-side-size="16"] {
        --tournament-body-height: 2640px;
    }
    div.tournament-bracket-scroll {
        padding-bottom: 16px;
    }
    section.tournament-bracket-column h3.tournament-bracket-title {
        font-size: 13px;
    }
    article.tournament-bracket-match-card {
        padding: 11px;
    }
    article.tournament-bracket-match-card div.tournament-match-body {
        grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
        gap: 8px;
    }
}
/* Codex追加：スマホではブラケットをラウンド別カードで表示 */
@media ( max-width: 640px ) {
    body.single div#entry div.bracket {
        display: block;
        height: auto;
        padding: 0;
        overflow-x: visible;
        background: transparent;
    }
    body.single div#entry div.bracket.best-16,
    body.single div#entry div.bracket.score {
        height: auto;
    }
    body.single div#entry div.bracket ul {
        display: block;
        position: static;
        width: 100%;
        box-sizing: border-box;
        margin: 0 0 14px;
        padding: 0;
    }
    body.single div#entry div.bracket ul.right {
        margin-top: -6px;
    }
    body.single div#entry div.bracket ul.right > div.label {
        display: none;
    }
    div.bracket div.label {
        margin: 18px 0 8px;
        padding: 7px 10px;
        border-radius: 6px;
        background: rgba(var(--table-border-green-rgb), .12);
        color: #333;
        font-size: 13px;
        line-height: 1.35;
        text-align: left;
    }
    div.bracket ul.final li.match+div.label {
        margin-top: 14px;
    }
    div.bracket.score ul.final li.match+div.label {
        margin-top: 14px;
    }
    div.bracket ul.final li.match.bottom,
    div.bracket.score ul.final li.match.bottom,
    div.bracket.score ul.second-round li.match.bottom {
        margin-top: 0;
    }
    div.bracket ul li.match {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px 10px;
        width: 100%;
        box-sizing: border-box;
        margin: 0 0 10px;
        padding: 10px;
        border: 1px solid rgba(var(--table-border-green-rgb), .45);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    }
    div.bracket ul li.match:nth-of-type(1) {
        margin-top: 0;
    }
    div.bracket ul div.line-downer,
    div.bracket ul div.line-upper,
    div.bracket ul div.line-middler {
        display: none;
    }
    div.bracket li.match span.date {
        order: 1;
        flex: 0 0 100%;
        margin: 0;
        color: #666;
        font-size: 12px;
        line-height: 1.35;
        text-align: left;
    }
    div.bracket li.match span.time {
        display: inline;
        margin-left: .45em;
        font-size: 1em;
    }
    div.bracket li.match span.team {
        order: 2;
        display: flex;
        align-items: center;
        flex: 1 1 0;
        flex-direction: column;
        justify-content: center;
        width: auto;
        min-width: 0;
        height: auto;
        gap: 3px;
    }
    div.bracket li.match span.team+span.team {
        order: 4;
    }
    div.bracket li.match span.team span.emoji {
        display: block;
        height: auto;
        font-size: 30px;
        line-height: 1;
    }
    div.bracket li.match span.team span.emoji img.emoji {
        width: 30px;
        height: 30px;
    }
    div.bracket li.match span.team span.country {
        max-width: 100%;
        font-size: 12px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
    div.bracket li.match span.team span.holder {
        width: 32px;
        height: 32px;
        margin: 0 auto 4px;
        line-height: 32px;
    }
    div.bracket li.match div.score {
        order: 3;
        flex: 0 0 58px;
        align-self: center;
        padding: 6px 4px;
        border-radius: 6px;
        background: rgba(var(--table-border-green-rgb), .12);
        color: #333;
        text-align: center;
        white-space: nowrap;
    }
    div.bracket li.match div.score span,
    div.bracket li.match div.score span.left,
    div.bracket li.match div.score span.right {
        display: inline;
        width: auto;
        font-size: 12px;
    }
    ul.final li.match.bottom div.blank {
        min-height: 64px;
        height: auto;
    }
}
