/* ================================================
   SportHub — Tournament Styles
   ================================================ */

/* ─── Tournament Detail ─── */
#page-tournaments #tournament-timeline {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding-bottom: .4rem;
}

#page-tournaments #tournament-timeline > .tl-event-row {
  margin: 0;
}

.tc-freshness-strip {
  min-height: 1.75rem;
  display: flex;
  align-items: center;
  gap: .42rem;
  padding: .32rem .58rem;
  border: 1px solid rgba(59, 130, 246, .18);
  border-radius: 8px;
  background: rgba(59, 130, 246, .07);
  color: var(--text-secondary);
  font-size: .72rem;
  line-height: 1.25;
}
.tc-freshness-strip[data-state="fresh"] {
  border-color: rgba(16, 185, 129, .2);
  background: rgba(16, 185, 129, .08);
}
.tc-freshness-strip[data-state="warn"] {
  border-color: rgba(245, 158, 11, .24);
  background: rgba(245, 158, 11, .09);
}
.tc-freshness-dot {
  width: .42rem;
  height: .42rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #3b82f6;
  box-shadow: 0 0 0 .18rem rgba(59, 130, 246, .12);
}
.tc-freshness-strip[data-state="fresh"] .tc-freshness-dot {
  background: #10b981;
  box-shadow: 0 0 0 .18rem rgba(16, 185, 129, .12);
}
.tc-freshness-strip[data-state="warn"] .tc-freshness-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 .18rem rgba(245, 158, 11, .14);
}
.tc-freshness-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-freshness-age {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: .68rem;
  white-space: nowrap;
}
.tc-list-loading {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  padding: .72rem .8rem;
}
.tc-list-loading-title {
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
}
.tc-list-loading-sub {
  margin-top: .16rem;
  color: var(--text-muted);
  font-size: .72rem;
  line-height: 1.4;
}
.tc-list-skeleton {
  display: grid;
  gap: .38rem;
  margin-top: .62rem;
}
.tc-list-skeleton span {
  height: .58rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bg-elevated), var(--border), var(--bg-elevated));
  background-size: 220% 100%;
  animation: tc-list-shimmer 1.25s ease-in-out infinite;
}
.tc-list-skeleton span:nth-child(2) { width: 76%; }
.tc-list-skeleton span:nth-child(3) { width: 48%; }
[data-theme="dark"] .tc-freshness-strip {
  border-color: rgba(96, 165, 250, .24);
  background: rgba(96, 165, 250, .12);
}
[data-theme="dark"] .tc-freshness-strip[data-state="fresh"] {
  border-color: rgba(52, 211, 153, .26);
  background: rgba(52, 211, 153, .12);
}
[data-theme="dark"] .tc-freshness-strip[data-state="warn"] {
  border-color: rgba(251, 191, 36, .28);
  background: rgba(251, 191, 36, .13);
}
@keyframes tc-list-shimmer {
  0% { background-position: 110% 0; }
  100% { background-position: -110% 0; }
}

.td-img-placeholder {
  width: 100%;
  aspect-ratio: 2.5/1;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: monospace;
  background: var(--bg-elevated);
  margin-bottom: .75rem;
}

/* ─── Tournament Info Card ─── */
.tfd-detail-loading,
.tfd-tab-loading {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: .85rem .9rem;
  text-align: center;
}
.tfd-tab-loading {
  margin: .4rem .8rem 1rem;
}
.tfd-detail-loading-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}
.tfd-detail-loading-sub {
  margin-top: .18rem;
  font-size: .74rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.tfd-info-skeleton {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.tfd-skeleton-row {
  width: 100%;
  height: .7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bg-elevated), var(--border), var(--bg-elevated));
  background-size: 220% 100%;
  animation: tfd-skeleton-shimmer 1.35s ease-in-out infinite;
}
.tfd-skeleton-row.short {
  width: 68%;
}
@keyframes tfd-skeleton-shimmer {
  0% { background-position: 110% 0; }
  100% { background-position: -110% 0; }
}

.td-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .15rem 0;
}
.td-info-row {
  display: flex;
  align-items: flex-start;
  padding: .45rem .75rem;
  gap: .6rem;
  border-bottom: 1px solid var(--border);
}
.td-info-row:last-child { border-bottom: none; }
.td-info-label {
  flex-shrink: 0;
  width: 4rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: .1rem;
}
.td-info-value {
  flex: 1;
  font-size: .82rem;
  color: var(--text-primary);
  min-width: 0;
}
.td-info-value-venues,
.td-info-value-referee {
  min-width: 0;
}
.td-venue-list {
  display: flex;
  flex-direction: column;
  gap: .42rem;
  width: 100%;
}
.td-venue-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  width: 100%;
  min-height: 2rem;
  padding: .42rem .58rem;
  border: 1px solid rgba(239, 27, 45, .18);
  border-radius: 8px;
  background: rgba(239, 27, 45, .045);
  color: var(--text-primary);
  font-size: .82rem;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.td-venue-link:hover {
  border-color: rgba(239, 27, 45, .36);
  background: rgba(239, 27, 45, .075);
  transform: translateY(-1px);
}
.td-venue-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.td-venue-pin {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  color: #ef1b2d;
}
.td-organizer-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .32rem .62rem;
  border: 1px solid rgba(20, 184, 166, .24);
  border-radius: 999px;
  background: rgba(20, 184, 166, .08);
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.td-info-row-referee {
  align-items: center;
}
.td-info-row-referee .td-info-label {
  padding-top: 0;
}
.td-referee-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .45rem;
  width: 100%;
  min-height: 2.15rem;
  padding: .32rem .46rem;
  border: 1px solid rgba(99, 102, 241, .2);
  border-radius: 8px;
  background: rgba(99, 102, 241, .055);
}
.td-referee-card-list {
  border-color: rgba(99, 102, 241, .2);
  background: rgba(99, 102, 241, .055);
}
.td-referee-card-head {
  border-color: rgba(245, 158, 11, .32);
  background: linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(99, 102, 241, .055));
}
.td-referee-card-meta {
  display: flex;
  align-items: center;
  gap: .34rem;
  flex: 1 1 auto;
  min-width: 0;
}
.td-referee-role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 1.16rem;
  padding: 0 .42rem;
  border: 1px solid rgba(99, 102, 241, .22);
  border-radius: 999px;
  background: rgba(99, 102, 241, .12);
  color: #4338ca;
  font-size: .64rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.td-referee-card-head .td-referee-role-chip {
  border-color: rgba(245, 158, 11, .34);
  background: rgba(245, 158, 11, .16);
  color: #92400e;
}
.td-referee-role-note {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: .64rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-referee-people {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: .24rem;
  max-width: 54%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-block: .02rem;
  scrollbar-width: none;
}
.td-referee-people::-webkit-scrollbar {
  display: none;
}
.td-referee-people > * {
  flex: 0 0 auto;
}
[data-theme="dark"] .td-venue-link {
  border-color: rgba(248, 113, 113, .28);
  background: rgba(248, 113, 113, .09);
}
[data-theme="dark"] .td-venue-link:hover {
  border-color: rgba(248, 113, 113, .44);
  background: rgba(248, 113, 113, .13);
}
[data-theme="dark"] .td-organizer-pill {
  border-color: rgba(45, 212, 191, .34);
  background: rgba(45, 212, 191, .12);
}
[data-theme="dark"] .td-referee-card {
  border-color: rgba(129, 140, 248, .28);
  background: rgba(129, 140, 248, .12);
}
[data-theme="dark"] .td-referee-card-head {
  border-color: rgba(251, 191, 36, .38);
  background: linear-gradient(135deg, rgba(251, 191, 36, .18), rgba(129, 140, 248, .12));
}
[data-theme="dark"] .td-referee-role-chip {
  color: #c7d2fe;
}
[data-theme="dark"] .td-referee-card-head .td-referee-role-chip {
  color: #fde68a;
}

#page-tournament-detail .page-header h2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-tabs-row {
  display: flex;
  align-items: stretch;
  gap: .6rem;
  margin: 0 .8rem .8rem;
}
.td-tabs-row .tab-bar {
  flex: 1;
  margin-bottom: 0;
  min-height: 44px;
}
.td-toolbar {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: .4rem;
}
.td-edit-btn,
.td-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 32px;
  padding: 0 .65rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #16a34a;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: filter var(--transition), transform var(--transition);
}
.td-delete-btn {
  border-color: var(--danger);
  background: var(--bg-card);
  color: var(--danger);
}
.td-edit-btn:hover,
.td-delete-btn:hover {
  filter: brightness(.95);
}
.td-edit-btn:active,
.td-delete-btn:active {
  transform: translateY(1px);
}

/* ─── Tournament Content ─── */
.tfd-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .7rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.tfd-action-main {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.tfd-action-main .tfd-apply-glow-wrap {
  display: flex;
  width: 100%;
  margin-top: .5rem;
  transition: margin-bottom var(--transition);
}
.tfd-action-main .tfd-apply-glow-wrap.loading {
  margin-bottom: 1.35rem;
}
.tfd-action-main .tfd-apply-glow-wrap .signup-flipper {
  width: 100%;
}
.tfd-action-main .tfd-apply-glow-wrap .primary-btn.full-width {
  margin-top: 0;
}
.tfd-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}
.tfd-action-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tfd-status-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  box-shadow: none;
  cursor: pointer;
}
.tfd-status-btn:hover,
.tfd-status-btn:focus {
  background: var(--bg-secondary);
  color: var(--text-muted);
  transform: none;
}
.tfd-action-withdraw {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.tfd-action-meta {
  font-size: .74rem;
  color: var(--text-muted);
  text-align: center;
}
.tfd-action-note {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.tfd-team-select {
  width: 100%;
  margin: 0;
}
.tfd-team-select-reapply {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 42%, var(--border));
}
.tfd-team-select-disabled {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--bg-secondary);
}
.tfd-apply-option-reapply {
  color: var(--danger);
}
.tfd-apply-option-disabled {
  color: var(--text-muted);
  background: var(--bg-secondary);
}
.tfd-reapply-note {
  margin-top: -.15rem;
  font-size: .74rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.tfd-reapply-note span {
  color: var(--danger);
  font-weight: 700;
}
.tfd-team-board {
  padding: .05rem .35rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .46rem;
}
.tfd-team-summary {
  font-size: .76rem;
  color: var(--text-muted);
  padding: 0 .05rem .05rem;
  font-weight: 700;
  letter-spacing: 0;
}
.tfd-team-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .58rem .66rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "side action"
    "roster action";
  align-items: center;
  column-gap: .72rem;
  row-gap: .3rem;
  min-height: 74px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}
.tfd-team-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62rem;
  bottom: .62rem;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: rgba(20, 184, 166, .42);
}
.tfd-team-row-pending {
  background: linear-gradient(180deg, rgba(20, 184, 166, .06), rgba(148, 163, 184, .08));
  border-color: rgba(20, 184, 166, .22);
}
.tfd-team-row-pending::before {
  background: rgba(20, 184, 166, .64);
}
.tfd-team-row-rejected {
  background: rgba(254, 202, 202, 0.08);
  border-color: rgba(239, 68, 68, .22);
}
.tfd-team-row-rejected::before {
  background: rgba(239, 68, 68, .58);
}
[data-theme="dark"] .tfd-team-row-pending {
  background: linear-gradient(180deg, rgba(20, 184, 166, .10), rgba(148, 163, 184, .12));
}
[data-theme="dark"] .tfd-team-row-rejected {
  background: rgba(254, 202, 202, 0.10);
}
.tfd-team-row-slot {
  min-height: 60px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "side roster";
  border-style: dashed;
  background: rgba(148, 163, 184, .05);
  opacity: .86;
}
.tfd-team-row-slot::before {
  background: rgba(148, 163, 184, .36);
}
.tfd-team-row-slot .tfd-team-roster {
  justify-content: flex-end;
}
.tfd-team-side {
  grid-area: side;
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}
.tfd-team-thumb {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
}
.tfd-team-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tfd-team-thumb-slot {
  border: 1px dashed var(--border);
  background: rgba(148, 163, 184, .08);
}
.tfd-team-row-slot .tfd-team-thumb {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}
.tfd-team-meta {
  min-width: 0;
}
.tfd-team-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tfd-team-status {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .12rem;
  line-height: 1.5;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tfd-team-roster {
  grid-area: roster;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.tfd-team-footer {
  display: contents;
  min-width: 0;
}
.tfd-team-action {
  grid-area: action;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .36rem;
}
.tfd-team-action-multi {
  flex-wrap: nowrap;
}
.tfd-team-withdraw-btn,
.tfd-entry-remove-btn,
.tfd-entry-withdraw-btn,
.tfd-roster-join-btn,
.tfd-roster-leave-btn,
.tfd-roster-blocked-btn,
.tfd-roster-joined-btn,
.tfd-roster-loading-btn {
  min-width: 92px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: .35rem .7rem;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.tfd-team-withdraw-btn,
.tfd-entry-remove-btn,
.tfd-entry-withdraw-btn,
.tfd-roster-leave-btn {
  border: 1.5px solid var(--danger);
  color: var(--danger);
}
.tfd-roster-join-btn {
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.tfd-roster-blocked-btn,
.tfd-roster-joined-btn,
.tfd-roster-loading-btn {
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-elevated);
}
.tfd-roster-blocked-btn {
  cursor: not-allowed;
}
.tfd-roster-joined-btn {
  cursor: default;
}
.tfd-roster-loading-btn {
  cursor: progress;
}
.tfd-team-withdraw-btn[data-btn-loading="1"],
.tfd-entry-remove-btn[data-btn-loading="1"],
.tfd-entry-withdraw-btn[data-btn-loading="1"],
.tfd-roster-join-btn[data-btn-loading="1"],
.tfd-roster-leave-btn[data-btn-loading="1"],
.tfd-review-actions .primary-btn[data-btn-loading="1"],
.tfd-review-actions .outline-btn[data-btn-loading="1"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  cursor: progress;
  pointer-events: none;
}
.tfd-team-withdraw-btn[data-btn-loading="1"]::before,
.tfd-entry-remove-btn[data-btn-loading="1"]::before,
.tfd-entry-withdraw-btn[data-btn-loading="1"]::before,
.tfd-roster-join-btn[data-btn-loading="1"]::before,
.tfd-roster-leave-btn[data-btn-loading="1"]::before,
.tfd-review-actions .primary-btn[data-btn-loading="1"]::before,
.tfd-review-actions .outline-btn[data-btn-loading="1"]::before {
  content: "";
  width: .72rem;
  height: .72rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: tfd-entry-remove-spin .72s linear infinite;
}
.tfd-team-withdraw-btn:hover,
.tfd-entry-remove-btn:hover,
.tfd-entry-withdraw-btn:hover,
.tfd-roster-leave-btn:hover {
  background: rgba(239, 68, 68, .10);
}
.tfd-roster-join-btn:hover {
  background: rgba(20, 184, 166, .10);
}
.tfd-team-withdraw-btn:active,
.tfd-entry-remove-btn:active,
.tfd-entry-withdraw-btn:active,
.tfd-roster-join-btn:active,
.tfd-roster-leave-btn:active {
  transform: translateY(1px);
}
@keyframes tfd-entry-remove-spin {
  to { transform: rotate(360deg); }
}
.tfd-member-chip {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .24rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, .16);
  background: rgba(37, 99, 235, .08);
  font-size: .74rem;
  color: var(--text-secondary);
}
.tfd-member-chip-editable {
  padding-right: .18rem;
}
.tfd-member-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tfd-jersey-btn {
  flex: 0 0 auto;
  min-height: 22px;
  padding: .12rem .32rem;
  border: 1px solid rgba(20, 184, 166, .28);
  border-radius: 999px;
  background: rgba(20, 184, 166, .08);
  color: #0f766e;
  cursor: pointer;
  font-size: .62rem;
  font-weight: 800;
  line-height: 1;
}
.tfd-jersey-btn:hover {
  background: rgba(20, 184, 166, .14);
}
.tfd-roster-summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .36rem;
  min-width: 0;
}
.tfd-roster-summary > span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: .13rem .46rem;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 999px;
  background: rgba(37, 99, 235, .06);
  color: var(--text-secondary);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tfd-roster-list-btn {
  min-height: 26px;
  padding: .2rem .52rem;
  border: 1.5px solid rgba(20, 184, 166, .32);
  border-radius: var(--radius-sm);
  background: rgba(20, 184, 166, .08);
  color: #0f766e;
  cursor: pointer;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.tfd-roster-list-btn:hover {
  background: rgba(20, 184, 166, .14);
}
.tfd-roster-list-modal {
  width: min(720px, calc(100vw - 24px));
  max-height: min(82vh, 760px);
}
.tfd-roster-list-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .78rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  margin-bottom: .72rem;
}
.tfd-roster-list-summary > div {
  display: flex;
  flex-direction: column;
  gap: .16rem;
  min-width: 0;
}
.tfd-roster-list-summary strong {
  color: var(--text-primary);
  font-size: .88rem;
  line-height: 1.25;
}
.tfd-roster-list-summary span {
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
}
.tfd-roster-list-mode {
  flex: 0 0 auto;
  padding: .18rem .48rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  color: #1d4ed8 !important;
}
.tfd-roster-list-table {
  display: grid;
  gap: .42rem;
}
.tfd-roster-list-head,
.tfd-roster-list-row {
  display: grid;
  grid-template-columns: 68px minmax(130px, 1.15fr) minmax(86px, .7fr) minmax(120px, 1fr) minmax(88px, auto);
  align-items: center;
  gap: .5rem;
}
.tfd-roster-list-head {
  padding: 0 .28rem;
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 900;
}
.tfd-roster-list-row {
  padding: .52rem .56rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  font-size: .76rem;
}
.tfd-roster-list-row-edit {
  align-items: end;
  background: var(--bg-elevated);
}
.tfd-roster-list-row label {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  min-width: 0;
}
.tfd-roster-list-row label span {
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 800;
}
.tfd-roster-list-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: .34rem .45rem;
  font-size: .74rem;
}
.tfd-roster-cell {
  min-width: 0;
}
.tfd-roster-cell-label {
  display: none;
  margin-bottom: .16rem;
  color: var(--text-muted);
  font-size: .6rem;
  font-weight: 900;
}
.tfd-roster-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  width: fit-content;
  max-width: 100%;
  padding: .18rem .45rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, .10);
  color: #0f766e;
  font-weight: 900;
}
.tfd-roster-name-pill {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tfd-roster-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}
.tfd-roster-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .34rem;
}
.tfd-roster-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid rgba(239, 68, 68, .48);
  border-radius: 999px;
  background: rgba(239, 68, 68, .08);
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}
.tfd-roster-delete-btn:hover {
  background: rgba(239, 68, 68, .14);
}
.tfd-roster-delete-btn[data-btn-loading="1"] {
  font-size: 0;
  pointer-events: none;
}
.tfd-roster-delete-btn[data-btn-loading="1"]::before {
  content: "";
  width: .72rem;
  height: .72rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: tfd-entry-remove-spin .72s linear infinite;
}
.tfd-roster-list-empty {
  padding: 1.4rem .8rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: .82rem;
  text-align: center;
}
.tfd-empty-text {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: .12rem .48rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, .10);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-muted);
}
.tfd-review-actions {
  grid-area: action;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .32rem;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.tfd-review-actions .primary-btn,
.tfd-review-actions .outline-btn {
  min-width: 50px;
  min-height: 30px;
  padding: .28rem .56rem;
  border-radius: var(--radius-sm);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.tfd-review-actions .outline-btn {
  border-color: rgba(239, 68, 68, .42);
  color: var(--danger);
  background: var(--bg-card);
}
.tfd-empty-state {
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
  padding: 2rem 1rem;
}
.tfd-picker-modal {
  max-height: 70vh;
}
.tfd-picker-meta {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: .8rem;
}
.tfd-picker-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.tfd-picker-option {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: .8rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  text-align: left;
}
.tfd-picker-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary);
}
.tfd-picker-sub {
  font-size: .74rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .td-tabs-row {
    display: block;
  }
  .td-toolbar {
    width: auto;
    flex-direction: row;
    margin-left: auto;
  }
  .td-edit-btn,
  .td-delete-btn {
    min-width: 48px;
    height: 30px;
    padding: 0 .55rem;
  }
  .tfd-action-grid {
    grid-template-columns: 1fr;
  }
  .tfd-team-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "side action"
      "roster action";
    align-items: center;
    gap: .32rem .5rem;
    padding: .5rem .56rem;
    min-height: 68px;
  }
  .tfd-team-row-slot {
    min-height: 56px;
    grid-template-areas: "side roster";
  }
  .tfd-team-side {
    width: auto;
    gap: .48rem;
  }
  .tfd-team-thumb {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    flex: 0 0 42px;
  }
  .tfd-team-row-slot .tfd-team-thumb {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
  .tfd-team-name {
    font-size: .84rem;
  }
  .tfd-team-status {
    font-size: .69rem;
    margin-top: .05rem;
  }
  .tfd-team-footer {
    width: auto;
    display: contents;
  }
  .tfd-team-roster {
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
  }
  .tfd-roster-summary {
    width: 100%;
    justify-content: flex-start;
    gap: .34rem;
  }
  .tfd-roster-summary > span {
    max-width: min(48vw, 150px);
    font-size: .68rem;
    padding: .1rem .4rem;
  }
  .tfd-roster-list-btn {
    min-height: 26px;
    padding: .18rem .44rem;
    font-size: .68rem;
    border-radius: var(--radius-sm);
  }
  .tfd-team-action {
    width: auto;
    justify-content: flex-end;
    align-self: center;
    justify-self: end;
    gap: .28rem;
  }
  .tfd-team-withdraw-btn,
  .tfd-entry-remove-btn,
  .tfd-entry-withdraw-btn,
  .tfd-roster-join-btn,
  .tfd-roster-leave-btn,
  .tfd-roster-blocked-btn,
  .tfd-roster-joined-btn,
  .tfd-roster-loading-btn {
    min-width: 54px;
    min-height: 28px;
    padding: .22rem .42rem;
    font-size: .68rem;
    border-radius: var(--radius-sm);
  }
  .tfd-team-action .tfd-team-withdraw-btn,
  .tfd-team-action .tfd-entry-remove-btn,
  .tfd-team-action .tfd-entry-withdraw-btn,
  .tfd-team-action .tfd-roster-join-btn,
  .tfd-team-action .tfd-roster-leave-btn,
  .tfd-team-action .tfd-roster-blocked-btn,
  .tfd-team-action .tfd-roster-joined-btn,
  .tfd-team-action .tfd-roster-loading-btn {
    width: auto;
  }
  .tfd-team-action-multi {
    flex-direction: row;
    gap: .28rem;
  }
  .tfd-review-actions {
    grid-area: action;
    width: auto;
    flex-direction: row;
    align-self: center;
    justify-self: end;
    gap: .28rem;
  }
  .tfd-review-actions .primary-btn,
  .tfd-review-actions .outline-btn {
    flex: 0 0 auto;
    min-width: 46px;
    min-height: 28px;
    padding: .24rem .46rem;
    font-size: .68rem;
  }
  .tfd-member-chip {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tfd-picker-option {
    padding: .72rem;
  }
  .tfd-roster-list-overlay.open {
    display: flex;
    align-items: flex-end;
  }
  .tfd-roster-list-modal {
    width: 100vw;
    height: calc(100dvh - 18px);
    max-height: calc(100dvh - 18px);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .tfd-roster-list-modal .modal-header {
    flex: 0 0 auto;
    padding: .72rem .88rem;
  }
  .tfd-roster-list-modal .modal-header h3 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .92rem;
  }
  .tfd-roster-list-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: .62rem .72rem;
    overflow-y: auto;
  }
  .tfd-roster-list-modal .modal-actions {
    flex: 0 0 auto;
    padding: .54rem .72rem calc(.54rem + env(safe-area-inset-bottom, 0px));
  }
  .tfd-roster-list-modal .modal-actions .outline-btn {
    min-height: 34px;
    padding: .35rem .9rem;
  }
  .tfd-roster-list-summary {
    margin-bottom: .46rem;
    padding: .5rem .58rem;
    border-radius: 9px;
  }
  .tfd-roster-list-summary strong {
    font-size: .78rem;
  }
  .tfd-roster-list-summary span {
    font-size: .66rem;
  }
  .tfd-roster-list-mode {
    padding: .14rem .38rem;
    font-size: .66rem !important;
  }
  .tfd-roster-list-head {
    display: grid;
    grid-template-columns: 42px minmax(72px, 1fr) 42px minmax(42px, .65fr) 74px;
    gap: .3rem;
    min-width: 0;
    padding: 0 .1rem .22rem;
    font-size: .6rem;
  }
  .tfd-roster-list-table {
    overflow-x: hidden;
    gap: 0;
    padding-bottom: .1rem;
  }
  .tfd-roster-list-row {
    min-width: 0;
    grid-template-columns: 42px minmax(72px, 1fr) 42px minmax(42px, .65fr) 74px;
    gap: .3rem;
    align-items: center;
    padding: .42rem .1rem;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    font-size: .72rem;
  }
  .tfd-roster-cell-label {
    display: none;
  }
  .tfd-roster-cell,
  .tfd-roster-cell > span:not(.tfd-roster-number) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tfd-roster-list-actions {
    justify-content: flex-end;
    gap: .22rem;
  }
  .tfd-roster-number {
    min-width: 34px;
    padding: .14rem .32rem;
    font-size: .72rem;
  }
  .tfd-roster-note,
  .tfd-roster-name-pill {
    max-width: 100%;
    font-size: .72rem;
  }
  .tfd-roster-list-actions .outline-btn.small {
    min-width: 0;
    min-height: 28px;
    padding: .24rem .4rem;
    font-size: .68rem;
  }
  .tfd-roster-delete-btn {
    width: 26px;
    height: 26px;
    font-size: .9rem;
  }
  .tfd-roster-list-row-edit {
    min-width: 0;
    grid-template-columns: 44px minmax(60px, 1fr) 54px 70px 76px;
    gap: .28rem;
    align-items: end;
  }
  .tfd-roster-list-row-edit label {
    grid-column: auto;
  }
  .tfd-roster-list-row-edit label span {
    font-size: .56rem;
  }
  .tfd-roster-list-row-edit input {
    padding: .3rem .34rem;
    font-size: .68rem;
  }
  .tfd-roster-list-row-edit .tfd-roster-list-actions {
    flex-wrap: wrap;
  }
  .tfd-roster-list-row-edit .primary-btn.small,
  .tfd-roster-list-row-edit .outline-btn.small {
    min-height: 26px;
    padding: .22rem .34rem;
    font-size: .66rem;
  }
}

.tournament-content { padding: .5rem 0; }
.match-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; margin-bottom: .5rem; }
.match-teams { display: flex; align-items: center; justify-content: center; gap: .8rem; font-weight: 700; font-size: .95rem; }
.match-score { background: var(--bg-elevated); padding: .2rem .6rem; border-radius: var(--radius-sm); font-family: var(--font-display); }
.match-meta { display: flex; justify-content: center; gap: 1rem; font-size: .72rem; color: var(--text-muted); margin-top: .4rem; }
.match-cards-display { display: flex; justify-content: center; gap: .5rem; font-size: .72rem; margin-top: .3rem; }
.yellow-card { color: #eab308; }
.red-card { color: #ef4444; }
.standings-table { width: 100%; font-size: .78rem; border-collapse: collapse; }
.standings-table th { text-align: left; padding: .5rem .4rem; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); font-size: .7rem; }
.standings-table td { padding: .5rem .4rem; border-bottom: 1px solid var(--border); }
.standings-table tr:first-child td { font-weight: 600; color: var(--accent); }
.trade-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; margin-bottom: .5rem; font-size: .82rem; }
.trade-status { display: inline-block; padding: .1rem .4rem; border-radius: var(--radius-full); font-size: .7rem; font-weight: 600; }
.trade-status.success { background: rgba(52,211,153,.15); color: var(--success); }
.trade-status.pending { background: rgba(251,191,36,.15); color: var(--warning); }

/* ─── Match Card Compact ─── */
.match-card-compact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .6rem;
  margin-bottom: .4rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.mc-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 600;
}
.mc-team.away { justify-content: flex-end; text-align: right; }
.mc-emblem {
  width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; flex-shrink: 0;
}
.mc-score {
  min-width: 48px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .85rem;
  padding: .15rem .3rem;
  background: var(--bg-elevated);
  border-radius: 6px;
}
.mc-meta {
  display: flex;
  justify-content: space-between;
  font-size: .65rem;
  color: var(--text-muted);
  padding: 0 .2rem;
  margin-top: .15rem;
}

/* ─── Bracket (Cup) ─── */
.bracket-container {
  overflow-x: auto;
  padding: .35rem 0 .6rem;
  -webkit-overflow-scrolling: touch;
}
.bracket {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: .7rem;
  width: 100%;
  min-width: 0;
  align-items: start;
}
.bracket-round {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(148px, 100%), 1fr));
  gap: .48rem;
  min-width: 0;
  align-items: start;
}
.bracket-round-title {
  grid-column: 1 / -1;
  text-align: center;
  font-size: .64rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: -.1rem;
  text-transform: uppercase;
}
.bracket-match {
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.bracket-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .32rem;
  padding: .28rem .42rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, #0f766e 6%, var(--bg-card));
}
.bracket-match-status {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: .1rem .32rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  color: #1d4ed8;
  font-size: .58rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.bracket-match-status-finished { background: rgba(16, 185, 129, .13); color: #047857; }
.bracket-match-status-walkover { background: rgba(245, 158, 11, .15); color: #b45309; }
.bracket-match-status-bye { background: rgba(100, 116, 139, .12); color: var(--text-muted); }
.bracket-game-label {
  min-width: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: .58rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bracket-team {
  display: flex;
  align-items: center;
  gap: .28rem;
  padding: .34rem .42rem;
  font-size: .7rem;
  font-weight: 650;
  border-bottom: 1px solid var(--border);
}
.bracket-team:last-child { border-bottom: none; }
.bracket-team.winner { font-weight: 700; color: var(--accent); }
.bracket-team span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bracket-team .bt-score {
  margin-left: auto;
  font-weight: 700;
  font-family: var(--font-display);
}
.bracket-match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .3rem;
  padding: .26rem .42rem .32rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .58rem;
  font-weight: 700;
  line-height: 1.35;
}
.bracket-series-badge {
  display: inline-flex;
  align-items: center;
  padding: .08rem .3rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, .11);
  color: #0f766e;
  font-size: .56rem;
  font-weight: 900;
  white-space: nowrap;
}
.bracket-connector {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 20px;
  position: relative;
}
.bracket-connector::before {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 1.5px;
  background: var(--border);
}
.bracket-connector::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 20px;
  height: 1.5px;
  background: var(--border);
}

/* ─── Round Robin Table ─── */
.rr-table-wrap {
  overflow-x: auto;
  padding: .5rem 0;
  -webkit-overflow-scrolling: touch;
}
.rr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .72rem;
  min-width: 320px;
}
.rr-table th, .rr-table td {
  padding: .4rem .3rem;
  text-align: center;
  border: 1px solid var(--border);
}
.rr-table th {
  background: var(--bg-elevated);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: .65rem;
  white-space: nowrap;
}
.rr-table .rr-team-cell {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  padding-left: .5rem;
}
.rr-table .rr-self {
  background: var(--bg-elevated);
}
.rr-table .rr-win { color: var(--success); font-weight: 700; }
.rr-table .rr-draw { color: var(--warning); }
.rr-table .rr-loss { color: var(--danger); }

[data-theme="dark"] .trade-status.success { background: rgba(52,211,153,.20); }
[data-theme="dark"] .trade-status.pending { background: rgba(251,191,36,.20); }

/* Dark theme overrides */
[data-theme="dark"] .td-info-label { color: var(--text-muted); }
[data-theme="dark"] .td-edit-btn { background: #166534; }
[data-theme="dark"] .td-edit-btn:hover { background: #15803d; }
[data-theme="dark"] .td-delete-btn { background: transparent; color: var(--danger); border-color: var(--danger); }

/* ─── Form validation error state ─── */
.ce-row.tf-field-error input,
.ce-row.tf-field-error select,
.ce-row.tf-field-error textarea {
  border-color: var(--danger, #dc2626) !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}
.tf-error-msg {
  font-size: .72rem;
  color: var(--danger, #dc2626);
  margin-top: .2rem;
  display: none;
}
.ce-row.tf-field-error .tf-error-msg {
  display: block;
}

/* Tournament form: registration period */
.tournament-reg-period-row.ce-row-half {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  padding: .72rem .75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt, var(--bg-elevated));
}
.tournament-reg-period-row.ce-row-half > div,
.tournament-reg-period-row.ce-row-half > div:first-child {
  flex: initial;
  min-width: 0;
  overflow: visible;
}
.tournament-reg-period-row label {
  display: flex;
  align-items: baseline;
  gap: .28rem;
  min-width: 0;
  color: var(--text-primary);
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
}
.tournament-reg-period-row .tournament-reg-start-note {
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 600;
  white-space: normal;
}
.tournament-reg-period-row .required {
  flex-shrink: 0;
  color: var(--danger, #dc2626);
  font-size: .68rem;
  font-weight: 800;
}
.tournament-reg-period-row input[type="datetime-local"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: .52rem .48rem;
  font-size: .86rem;
}
.tournament-reg-period-row .tf-error-msg {
  grid-column: 1 / -1;
  margin-top: -.08rem;
  padding: .45rem .55rem;
  border: 1px solid rgba(220, 38, 38, .22);
  border-radius: 9px;
  background: rgba(220, 38, 38, .07);
  line-height: 1.45;
}
.tournament-reg-period-helper {
  margin: -.15rem 0 .2rem !important;
  padding: .45rem .6rem;
  border-left: 3px solid rgba(20, 184, 166, .45);
  border-radius: 8px;
  background: rgba(20, 184, 166, .07);
  color: var(--text-muted) !important;
  font-size: .72rem !important;
  line-height: 1.5;
}
@media (max-width: 420px) {
  .tournament-reg-period-row.ce-row-half {
    grid-template-columns: 1fr;
  }
}

/* ═══ 2026-06-12 盃賽/聯賽升級（competition）═══ */

/* ─── 賽制徽章 ─── */
.td-mode-badge {
  display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  padding: .14rem .55rem; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, #0d9488, #065f46);
}
.td-mode-single { background: linear-gradient(135deg, #0f766e, #115e59); }
.td-mode-cup { background: linear-gradient(135deg, #d97706, #b45309); }
.td-mode-league { background: linear-gradient(135deg, #2563eb, #1e40af); }

/* ─── 詳情工具列：賽程管理按鈕（比照 td-edit-btn）─── */
.td-schedule-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: .32rem .72rem;
  border: 1px solid #1d4ed8;
  border-radius: 8px;
  background: #1d4ed8;
  color: #fff;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.td-schedule-btn:hover { background: #1e40af; }
[data-theme="dark"] .td-schedule-btn { background: #1e3a8a; }

/* ─── 賽程列表 ─── */
.tc-schedule {
  display: flex;
  flex-direction: column;
  gap: .72rem;
  padding: .7rem .6rem 1rem;
}
.tc-schedule-head {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(300px, 1.28fr);
  gap: .8rem;
  align-items: stretch;
  padding: .8rem .82rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, #0f766e 8%, var(--bg-card));
}
.tc-schedule-title-block {
  min-width: 0;
}
.tc-schedule-kicker,
.tc-round-kicker,
.tc-manager-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: .18rem;
  padding: .12rem .42rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, .12);
  color: #0f766e;
  font-size: .62rem;
  font-weight: 800;
  line-height: 1.25;
}
.tc-schedule-title-block h3 {
  margin: 0 0 .15rem;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.25;
}
.tc-schedule-title-block p {
  margin: 0;
  color: var(--text-muted);
  font-size: .72rem;
  line-height: 1.45;
}
.tc-schedule-stats {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: 352px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.tc-schedule-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: 0 0 .45rem;
  border-bottom: 1px solid var(--border);
}
.tc-schedule-summary-head div:first-child {
  min-width: 0;
}
.tc-schedule-summary-head strong {
  display: block;
  overflow: hidden;
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-schedule-summary-head span {
  display: block;
  margin-top: .1rem;
  overflow: hidden;
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-summary-totals {
  flex: 0 0 auto;
  min-width: 58px;
  padding: .22rem .42rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  text-align: center;
}
.tc-summary-totals b {
  display: block;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: .82rem;
  line-height: 1.1;
}
.tc-summary-totals span {
  margin: .04rem 0 0;
  color: var(--text-muted);
  font-size: .56rem;
  font-weight: 800;
  line-height: 1.1;
}
.tc-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  padding: .45rem 0 .38rem;
}
.tc-summary-meta span {
  padding: .12rem .36rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  color: #1d4ed8;
  font-size: .58rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.tc-schedule-summary-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: .46rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: .14rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text-muted) 42%, transparent) transparent;
}
.tc-summary-match {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: .56rem .62rem;
  border: 1px solid color-mix(in srgb, var(--border) 84%, transparent);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tc-summary-match:hover,
.tc-summary-match:focus-visible {
  border-color: rgba(37, 99, 235, .4);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}
.tc-summary-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .42rem;
  margin-bottom: .34rem;
}
.tc-summary-match-head span {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-summary-match-head time {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: .58rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}
.tc-summary-scoreboard {
  position: relative;
  display: grid;
  gap: .2rem;
  padding-right: .58rem;
}
.tc-summary-scoreboard::after {
  content: "";
  position: absolute;
  top: .05rem;
  right: .12rem;
  bottom: .05rem;
  width: 1px;
  background: color-mix(in srgb, var(--text-muted) 32%, transparent);
}
.tc-summary-team {
  display: flex;
  align-items: center;
  gap: .42rem;
  min-width: 0;
  color: var(--text-primary);
}
.tc-summary-team-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 5px;
  background: var(--bg-main);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
}
.tc-summary-team-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tc-summary-team-logo-fallback {
  background: color-mix(in srgb, var(--primary) 12%, var(--bg-card));
  color: var(--primary);
  font-size: .58rem;
  font-weight: 900;
  line-height: 1;
}
.tc-summary-team-name {
  min-width: 0;
  overflow: hidden;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-summary-team b {
  flex: 0 0 2.2rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: right;
}
.tc-summary-team.is-winner {
  color: var(--accent);
}
.tc-summary-team.is-winner .tc-summary-team-name,
.tc-summary-team.is-winner b {
  color: var(--accent);
}
.tc-summary-team.is-winner::after {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  margin-left: .1rem;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-right: 6px solid currentColor;
}
.tc-summary-match-foot {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  margin-top: .4rem;
}
.tc-summary-match-foot span,
.tc-summary-status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: .1rem .34rem;
  border-radius: 999px;
  background: rgba(100, 116, 139, .1);
  color: var(--text-muted);
  font-size: .56rem;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}
.tc-summary-status-finished { background: rgba(16, 185, 129, .12); color: #047857; }
.tc-summary-status-live { background: rgba(239, 68, 68, .11); color: #b91c1c; }
.tc-summary-status-walkover { background: rgba(245, 158, 11, .14); color: #b45309; }
.tc-summary-status-bye { background: rgba(100, 116, 139, .12); color: var(--text-muted); }
.tc-manager-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
  min-width: 0;
}
.tc-manager-summary-stats span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  padding: .42rem .48rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 700;
  line-height: 1.2;
}
.tc-manager-summary-stats b {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.1;
}
.tc-schedule-empty,
.tc-manager-empty {
  padding: 1.25rem .95rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  text-align: center;
}
.tc-schedule-empty-title,
.tc-manager-empty-title {
  color: var(--text-primary);
  font-size: .9rem;
  font-weight: 800;
}
.tc-schedule-empty-body,
.tc-manager-empty-body {
  margin-top: .28rem;
  color: var(--text-muted);
  font-size: .76rem;
  line-height: 1.55;
}
.tc-bracket-section {
  padding: .65rem .7rem .2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}
.tc-bracket-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .55rem;
  margin-bottom: .35rem;
}
.tc-bracket-section-head span {
  color: var(--text-primary);
  font-size: .84rem;
  font-weight: 800;
}
.tc-bracket-section-head small {
  color: var(--text-muted);
  font-size: .66rem;
  line-height: 1.35;
  text-align: right;
}
.tc-round-card {
  margin: 0;
  padding: .65rem .68rem;
}
.tc-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .58rem;
}
.tc-round-head h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: .93rem;
  line-height: 1.3;
}
.tc-round-count {
  flex-shrink: 0;
  padding: .16rem .45rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  color: #1d4ed8;
  font-size: .66rem;
  font-weight: 800;
  white-space: nowrap;
}
.tc-round-match-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.tc-match-row,
.tc-match-card {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(240px, 1.1fr) minmax(170px, .7fr) minmax(180px, .8fr);
  gap: .55rem;
  align-items: stretch;
  min-width: 0;
  margin: 0;
  padding: .55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tc-match-row:hover,
.tc-match-row:focus-visible {
  border-color: rgba(37, 99, 235, .34);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}
.tc-match-state {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  justify-content: center;
  min-width: 0;
}
.tc-match-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: .14rem .38rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  color: #1d4ed8;
  font-size: .63rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.tc-match-status-finished { background: rgba(16, 185, 129, .12); color: #047857; }
.tc-match-status-live { background: rgba(239, 68, 68, .11); color: #b91c1c; }
.tc-match-status-walkover { background: rgba(245, 158, 11, .14); color: #b45309; }
.tc-match-status-bye { background: rgba(100, 116, 139, .12); color: var(--text-muted); }
.tc-match-number {
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.25;
}
.tc-match-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: .45rem;
  align-items: center;
  min-width: 0;
  padding: .42rem .5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt, var(--bg-elevated));
}
.tc-match-team {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
}
.tc-match-team.away {
  justify-content: flex-end;
  text-align: right;
}
.tc-match-team-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-match-team-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 .25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 900;
}
.tc-match-scoreline {
  min-width: 3.1rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.tc-match-events-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .34rem;
  min-width: 0;
  margin-top: .32rem;
  padding-top: .38rem;
  border-top: 1px dashed var(--border);
}
.tc-match-event-card,
.tc-match-event-more {
  min-width: 0;
  min-height: 2.1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-card) 92%, #f8fafc);
  color: var(--text-secondary);
  font-size: .64rem;
  font-weight: 800;
  line-height: 1.2;
}
.tc-match-event-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: .34rem;
  padding: .34rem .42rem;
  text-align: left;
}
.tc-match-event-card b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: currentColor;
  font-size: .58rem;
  font-weight: 900;
}
.tc-match-event-card .tc-match-event-copy {
  display: grid;
  gap: .04rem;
  min-width: 0;
}
.tc-match-event-card strong,
.tc-match-event-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-match-event-card strong {
  color: var(--text-primary);
  font-size: .66rem;
  font-weight: 900;
}
.tc-match-event-card small {
  color: var(--text-secondary);
  font-size: .6rem;
  font-weight: 760;
}
.tc-match-event-more {
  display: inline-grid;
  place-items: center;
  padding: .34rem .42rem;
  text-align: center;
}
.tc-match-event-goal {
  border-color: rgba(16, 185, 129, .28);
  background: rgba(16, 185, 129, .09);
  color: #047857;
}
.tc-match-event-own_goal {
  border-color: rgba(245, 158, 11, .28);
  background: rgba(245, 158, 11, .1);
  color: #b45309;
}
.tc-match-event-yellow {
  border-color: rgba(234, 179, 8, .34);
  background: rgba(234, 179, 8, .12);
  color: #92400e;
}
.tc-match-event-red {
  border-color: rgba(239, 68, 68, .28);
  background: rgba(239, 68, 68, .09);
  color: #b91c1c;
}
.tc-match-event-stoppage_time {
  border-color: rgba(59, 130, 246, .28);
  background: rgba(59, 130, 246, .09);
  color: #1d4ed8;
}
.tc-match-event-substitution {
  border-color: rgba(20, 184, 166, .28);
  background: rgba(20, 184, 166, .09);
  color: #0f766e;
}
.tc-match-event-more {
  color: var(--text-muted);
}
.tc-match-public-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .42rem;
  align-content: center;
  min-width: 0;
  padding: .46rem .52rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(248, 250, 252, .72);
}
.tc-match-timebox {
  min-width: 0;
}
.tc-match-timebox span {
  display: block;
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 800;
  line-height: 1.2;
}
.tc-match-timebox strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.25;
}
.tc-match-meta-line {
  grid-column: 1 / -1;
  min-width: 0;
  color: var(--text-secondary);
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.35;
}
.tc-match-live-slot {
  min-width: 0;
}
.tc-match-live-box {
  position: relative;
  display: grid;
  gap: .32rem;
  min-width: 0;
}
.tc-match-live-box.compact {
  height: 100%;
  align-content: center;
}
.tc-match-live-frame,
.tc-match-live-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f172a;
}
.tc-match-live-frame {
  display: block;
}
.tc-match-live-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .16rem;
  color: rgba(255, 255, 255, .88);
  text-align: center;
}
.tc-match-live-placeholder span {
  padding: .1rem .4rem;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: 0;
}
.tc-match-live-placeholder small {
  color: rgba(255, 255, 255, .7);
  font-size: .64rem;
  font-weight: 700;
}
.tc-match-staff-panel {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  padding: .42rem .5rem;
  border: 1px dashed rgba(37, 99, 235, .35);
  border-radius: 8px;
  background: rgba(37, 99, 235, .06);
  cursor: default;
}
.tc-match-staff-panel span {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: .68rem;
  font-weight: 900;
}
.tc-match-staff-panel small {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--text-muted);
  font-size: .65rem;
  font-weight: 700;
  line-height: 1.35;
}
.tc-match-detail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .4rem;
  min-width: 0;
}
.tc-match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .32rem .48rem;
  min-width: 0;
  margin: 0;
  color: var(--text-secondary);
  font-size: .68rem;
  line-height: 1.45;
}
.tc-match-meta span {
  display: inline-flex;
  gap: .22rem;
  min-width: 0;
  max-width: 100%;
}
.tc-match-meta b {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 800;
}
.tc-match-meta-empty {
  color: var(--text-muted);
}
.tc-match-action {
  display: flex;
  justify-content: flex-end;
}
.tc-match-row .mc-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-match-bye { opacity: .78; }
.tc-winner { color: var(--accent); font-weight: 800; }
.tc-winner .tc-match-team-name { color: var(--accent); }
.tc-winner .tc-match-team-score { border-color: rgba(16, 185, 129, .35); background: rgba(16, 185, 129, .12); color: #047857; }
.tc-pending { color: var(--text-muted); font-style: italic; font-weight: 500; }
.tc-pending .tc-match-team-name { color: var(--text-muted); font-weight: 700; }
.tc-pk { display: block; font-size: .58rem; color: var(--text-muted); font-weight: 700; }
.tc-wo {
  display: inline-block;
  padding: .08rem .38rem;
  border-radius: 6px;
  background: rgba(251, 191, 36, .18);
  color: #b45309;
  font-size: .62rem;
  font-weight: 800;
}
.tc-record-btn {
  flex-shrink: 0;
  min-height: 30px;
  padding: .25rem .62rem;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.tc-record-btn:hover { background: var(--primary); color: #fff; }

.tc-match-info-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: min(760px, calc(100vw - 1.5rem));
}
.tc-match-info-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
}
.tc-match-info-modal .modal-header {
  align-items: flex-start;
  gap: .72rem;
}

.tc-match-detail-shell {
  display: grid;
  gap: .72rem;
}
.tc-match-detail-hero {
  display: grid;
  gap: .48rem;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .94));
  color: #fff;
}
.tc-match-detail-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: .6rem;
  align-items: center;
}
.tc-match-detail-score strong {
  min-width: 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-match-detail-score strong:last-child {
  text-align: right;
}
.tc-match-detail-score span {
  min-width: 4.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}
.tc-match-detail-hero > small {
  color: rgba(255, 255, 255, .72);
  font-weight: 800;
}
.tc-match-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(240px, 1.1fr);
  gap: .72rem;
}
.tc-match-detail-card {
  min-width: 0;
  padding: .72rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.tc-match-detail-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .58rem;
}
.tc-match-detail-section-title strong {
  color: var(--text-primary);
  font-size: .86rem;
  font-weight: 900;
}
.tc-match-detail-section-title span {
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 800;
  text-align: right;
}
.tc-match-detail-list {
  display: grid;
  gap: .42rem;
  margin: 0;
}
.tc-match-detail-list div {
  display: flex;
  justify-content: space-between;
  gap: .7rem;
  min-width: 0;
}
.tc-match-detail-list dt {
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 800;
}
.tc-match-detail-list dd {
  min-width: 0;
  margin: 0;
  color: var(--text-primary);
  font-size: .72rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: right;
}
.tc-match-kickoff-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
.tc-match-kickoff-grid div {
  display: grid;
  gap: .14rem;
  padding: .5rem .56rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-secondary) 78%, var(--bg-card));
}
.tc-match-kickoff-grid dd {
  text-align: left;
}
.tc-match-detail-empty {
  padding: .65rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 800;
  text-align: center;
}
.tc-match-detail-timeline {
  display: grid;
  gap: .42rem;
}
.tc-match-detail-event {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: .5rem;
  align-items: center;
  padding: .46rem .5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(248, 250, 252, .72);
}
.tc-match-detail-event-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  color: var(--primary);
  font-size: .64rem;
  font-weight: 900;
}
.tc-match-detail-event-copy {
  min-width: 0;
}
.tc-match-detail-event-copy strong,
.tc-match-detail-event-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-match-detail-event-copy strong {
  color: var(--text-primary);
  font-size: .76rem;
  font-weight: 900;
}
.tc-match-detail-event-copy small {
  color: var(--text-secondary);
  font-size: .68rem;
  font-weight: 700;
}
.tc-match-referee-list {
  display: grid;
  gap: .42rem;
}
.tc-match-referee-row {
  display: grid;
  gap: .12rem;
  padding: .48rem .55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(248, 250, 252, .72);
}
.tc-match-referee-row strong {
  color: var(--text-primary);
  font-size: .76rem;
  font-weight: 900;
}
.tc-match-referee-row small {
  color: var(--text-muted);
  font-size: .67rem;
  font-weight: 700;
  line-height: 1.35;
}
.tc-match-detail-staff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-style: dashed;
  border-color: rgba(37, 99, 235, .34);
  background: rgba(37, 99, 235, .06);
}

/* ─── 積分榜 ─── */
.tc-standings-note { font-size: .64rem; color: var(--text-muted); padding: .4rem .5rem 0; line-height: 1.5; }

/* ─── 射手榜 / 紅黃牌 ─── */
.tc-stat-row {
  display: flex; align-items: center; gap: .45rem;
  padding: .32rem .5rem; border-bottom: 1px solid var(--border); font-size: .76rem;
}
.tc-stat-row:last-child { border-bottom: none; }
.tc-stat-rank { width: 1.4rem; text-align: center; font-weight: 800; color: var(--text-muted); flex-shrink: 0; }
.tc-stat-name { flex: 1; min-width: 0; }
.tc-stat-team { font-size: .64rem; color: var(--text-muted); max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-stat-num { font-weight: 800; white-space: nowrap; }
.tc-suspend-hint { font-size: .6rem; color: #dc2626; font-weight: 700; }

/* ─── 賽程管理 Modal ─── */
.tc-schedule-modal, .tc-record-modal {
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.tc-schedule-modal {
  max-width: 720px;
  width: min(720px, 100%);
}
.tc-schedule-modal .modal-body, .tc-record-modal .modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.tc-schedule-manager-body {
  display: flex;
  flex-direction: column;
  gap: .52rem;
}
.tc-manager-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .8fr);
  gap: .7rem;
  align-items: start;
  padding: .72rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, #2563eb 7%, var(--bg-card));
}
.tc-manager-summary-copy {
  min-width: 0;
}
.tc-manager-summary-copy strong {
  display: block;
  color: var(--text-primary);
  font-size: .95rem;
  line-height: 1.35;
}
.tc-manager-summary-copy small {
  display: block;
  margin-top: .2rem;
  color: var(--text-muted);
  font-size: .7rem;
  line-height: 1.45;
}
.tc-manager-summary-note {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.35;
}
.tc-schedule-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  flex-wrap: wrap;
  margin: 0;
  padding: .55rem .62rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}
.tc-schedule-generate-btn {
  min-height: 34px;
}
.tc-schedule-generate-controls {
  display: flex;
  align-items: flex-end;
  gap: .55rem;
  flex: 1 1 320px;
  flex-wrap: wrap;
  min-width: 0;
}
.tc-schedule-repeat-control {
  display: grid;
  grid-template-columns: minmax(0, auto) 76px;
  gap: .2rem .42rem;
  align-items: center;
  min-width: min(100%, 270px);
  color: var(--text-primary);
}
.tc-schedule-repeat-control span {
  min-width: 0;
  color: var(--text-secondary);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
}
.tc-schedule-repeat-control input {
  width: 76px;
  height: 34px;
  padding: .3rem .42rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
}
.tc-schedule-repeat-control small {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.35;
}
.tc-schedule-warn {
  flex: 1 1 220px;
  padding: .34rem .48rem;
  border: 1px solid rgba(217, 119, 6, .22);
  border-radius: 8px;
  background: rgba(245, 158, 11, .09);
  color: #b45309;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.45;
}
.tc-schedule-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: -.18rem;
  padding-top: .12rem;
  background: linear-gradient(180deg, rgba(255,255,255,0), var(--bg-primary) 36%, var(--bg-primary));
}
.tc-schedule-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .48rem;
  min-height: 42px;
  padding: .38rem .48rem;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  box-shadow: 0 -5px 14px rgba(15, 23, 42, .07);
}
.tc-schedule-sticky-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .36rem;
}
.tc-schedule-sticky-copy strong {
  color: var(--text-primary);
  font-size: .78rem;
  line-height: 1.25;
  white-space: nowrap;
}
.tc-schedule-sticky-copy span {
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
.tc-save-all-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: .32rem .72rem;
  font-size: .74rem;
  font-weight: 800;
  white-space: nowrap;
}
.tc-schedule-manage-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.tc-manage-row {
  min-width: 0;
  margin: 0;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}
.tc-manage-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .6rem;
  min-width: 0;
  margin-bottom: .58rem;
}
.tc-manage-title-block {
  flex: 1 1 auto;
  min-width: 0;
}
.tc-manage-round {
  display: block;
  margin-bottom: .12rem;
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 800;
  line-height: 1.25;
}
.tc-manage-title {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
  margin: 0;
  color: var(--text-primary);
  font-size: .84rem;
  font-weight: 800;
  line-height: 1.35;
}
.tc-manage-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-manage-title b {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 900;
}
.tc-manage-status,
.tc-manage-lock {
  flex: 0 0 auto;
  max-width: 42%;
  padding: .14rem .42rem;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 999px;
  background: rgba(37, 99, 235, .09);
  color: #1d4ed8;
  font-size: .66rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}
.tc-manage-status-locked {
  border-color: rgba(16, 185, 129, .22);
  background: rgba(16, 185, 129, .1);
  color: #047857;
}
.tc-manage-status-bye {
  border-color: rgba(100, 116, 139, .2);
  background: rgba(100, 116, 139, .1);
  color: var(--text-muted);
}
.tc-manage-fields {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(0, 1fr);
  gap: .5rem;
  margin-bottom: .56rem;
}
.tc-manage-field {
  display: flex;
  flex-direction: column;
  gap: .22rem;
  min-width: 0;
}
.tc-manage-field > span,
.tc-manage-section-title {
  color: var(--text-muted);
  font-size: .67rem;
  font-weight: 800;
  line-height: 1.3;
}
.tc-manage-fields input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: .78rem;
}
.tc-manage-ref-panel {
  padding: .56rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, #2563eb 4%, var(--surface-alt, var(--bg-elevated)));
}
.tc-manage-section-title {
  margin-bottom: .36rem;
}
.tc-manage-refs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: .4rem;
  margin: 0;
}
.tc-ref-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: .38rem;
  max-width: 100%;
  min-height: 38px;
  padding: .42rem .5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  box-sizing: border-box;
  color: var(--text-secondary);
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tc-ref-check:has(input:checked) {
  border-color: rgba(13, 148, 136, .42);
  background: rgba(13, 148, 136, .1);
  color: var(--text-primary);
}
.tc-ref-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  justify-self: center;
}
.tc-ref-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}
.tc-ref-role {
  padding: .08rem .3rem;
  border-radius: 6px;
  background: rgba(245, 158, 11, .14);
  color: #b45309;
  font-size: .58rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
.tc-manage-refs-empty {
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 700;
}
.tc-manage-actions {
  display: flex;
  gap: .4rem;
  justify-content: flex-end;
  margin-top: .56rem;
}
.tc-manage-actions .outline-btn.small {
  min-height: 30px;
  padding: .28rem .7rem;
}
.tc-manage-delete { color: var(--danger); border-color: var(--danger); }

.tfg-schedule {
  display: flex;
  flex-direction: column;
  gap: .58rem;
  padding: .5rem .36rem .9rem;
}
.tfg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  min-height: 40px;
  padding: .18rem .1rem .28rem;
}
.tfg-head > div:first-child {
  min-width: 0;
}
.tfg-head span,
.tfg-head-actions span {
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.2;
}
.tfg-head strong {
  display: block;
  margin-top: .08rem;
  overflow: hidden;
  color: var(--text-primary);
  font-size: .98rem;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tfg-head-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: .45rem;
}
.tfg-manage-btn,
.tfg-record-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}
.tfg-manage-btn {
  padding: .36rem .74rem;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
}
.tfg-record-btn {
  padding: .3rem .62rem;
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #fff;
}
.tfg-date-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.tfg-date-row {
  display: flex;
  align-items: baseline;
  gap: .42rem;
  padding: 0 .18rem;
}
.tfg-date-row strong {
  color: var(--text-primary);
  font-size: .8rem;
  font-weight: 900;
  line-height: 1.2;
}
.tfg-date-row span {
  color: var(--text-muted);
  font-size: .67rem;
  font-weight: 800;
  line-height: 1.2;
}
.tfg-match-list {
  display: flex;
  flex-direction: column;
  gap: .42rem;
}
.tfg-match-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: .36rem;
  width: 100%;
  min-height: 74px;
  padding: .58rem .66rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 5px 16px rgba(15, 23, 42, .05);
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.tfg-match-card:hover,
.tfg-match-card:focus-visible {
  border-color: rgba(37, 99, 235, .42);
  box-shadow: 0 9px 22px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}
.tfg-match-finished { background: color-mix(in srgb, var(--bg-card) 92%, #f8fafc); }
.tfg-match-live { border-color: rgba(220, 38, 38, .34); }
.tfg-match-walkover { border-style: dashed; }
.tfg-match-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 112px);
  align-items: stretch;
  gap: .58rem;
}
.tfg-score-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .22rem;
  min-width: 0;
}
.tfg-score-team-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: .42rem;
  min-height: 30px;
}
.tfg-team {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .48rem;
}
.tfg-team-away {
  justify-content: flex-end;
  text-align: right;
}
.tfg-team-away .tfg-team-logo { order: 2; }
.tfg-score-team-row .tfg-team-away {
  justify-content: flex-start;
  text-align: left;
}
.tfg-score-team-row .tfg-team-away .tfg-team-logo { order: 0; }
.tfg-team-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-card) 70%, #eef2ff);
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 900;
}
.tfg-score-team-row .tfg-team-logo {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  font-size: .68rem;
}
.tfg-team-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tfg-team-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: .94rem;
  font-weight: 900;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tfg-side-score {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
}
.tfg-match-state {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  min-width: 0;
  padding-left: .74rem;
  border-left: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
}
.tfg-match-state span {
  color: var(--text-primary);
  font-size: .9rem;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}
.tfg-match-state small {
  margin-top: .18rem;
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 750;
  line-height: 1.12;
  white-space: nowrap;
}
.tfg-match-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding-top: .34rem;
  border-top: 1px dashed color-mix(in srgb, var(--border) 72%, transparent);
}
.tfg-match-meta > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 750;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tfg-match-time {
  justify-self: end;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.tfg-match-events {
  display: grid;
  gap: .34rem;
  min-width: 0;
  padding-top: .18rem;
}
.tfg-match-event-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: .36rem;
  min-width: 0;
  padding: .34rem .42rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-card) 92%, var(--bg-secondary));
  color: var(--text-secondary);
  line-height: 1.22;
}
.tfg-match-event-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  color: var(--text-muted);
  font-size: .6rem;
  font-weight: 900;
  text-align: center;
}
.tfg-match-event-copy {
  display: grid;
  gap: .04rem;
  min-width: 0;
}
.tfg-match-event-copy strong,
.tfg-match-event-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tfg-match-event-copy strong {
  color: var(--text-primary);
  font-size: .7rem;
  font-weight: 900;
}
.tfg-match-event-copy small {
  color: var(--text-secondary);
  font-size: .62rem;
  font-weight: 760;
}
.tfg-match-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: .1rem;
}
.tfg-live-slot {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 96px;
  margin-top: .12rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 8px;
  background: #0f172a;
  color: #e5e7eb;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.tfg-live-slot .tc-match-live-box {
  width: 100%;
  min-height: 96px;
}
.tfg-live-slot .tc-match-live-frame,
.tfg-live-slot .tc-match-live-placeholder {
  min-height: 96px;
  border: 0;
  border-radius: 7px;
}
.tfg-live-stage {
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  gap: .34rem;
  text-align: center;
}
.tfg-live-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: .08rem .42rem;
  border: 1px solid rgba(226, 232, 240, .5);
  border-radius: 999px;
  color: #f8fafc;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
}
.tfg-live-label {
  color: rgba(226, 232, 240, .9);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.2;
}
.tfg-live-slot.has-live .tfg-live-pill {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}
.tfg-empty {
  display: flex;
  flex-direction: column;
  gap: .22rem;
  padding: 1rem .85rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-card) 82%, var(--bg-muted));
  color: var(--text-muted);
  font-size: .78rem;
  line-height: 1.45;
}
.tfg-empty strong {
  color: var(--text-primary);
  font-size: .9rem;
  line-height: 1.25;
}

@media (max-width: 560px) {
  .tfg-schedule {
    padding: .42rem .18rem .8rem;
  }
  .tfg-head,
  .tfg-head-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .tfg-head-actions {
    width: 100%;
  }
  .tfg-manage-btn,
  .tfg-record-btn {
    width: 100%;
  }
  .tfg-match-card {
    padding: .54rem .52rem;
  }
  .tfg-match-main {
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: .36rem;
  }
  .tfg-team {
    gap: .34rem;
  }
  .tfg-team-logo {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }
  .tfg-score-team-row .tfg-team-logo {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
    border-radius: 5px;
  }
  .tfg-team-name {
    font-size: .86rem;
  }
  .tfg-side-score {
    font-size: .98rem;
  }
  .tfg-match-state {
    padding-left: .58rem;
  }
  .tfg-match-meta {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .tfg-match-meta > span,
  .tfg-match-event-copy strong,
  .tfg-match-event-copy small {
    white-space: nowrap;
  }
  .tfg-live-slot {
    min-height: 84px;
  }
}
@media (max-width: 680px) {
  .tc-schedule {
    padding: .6rem .34rem .9rem;
  }
  .tc-schedule-head,
  .tc-manager-summary {
    grid-template-columns: 1fr;
  }
  .tc-schedule-head {
    gap: .62rem;
    padding: .62rem;
  }
  .tc-schedule-stats {
    max-height: 370px;
  }
  .tc-summary-match {
    padding: .54rem .56rem;
  }
  .tc-summary-team b {
    flex-basis: 1.8rem;
  }
  .tc-manager-summary-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tc-match-row,
  .tc-match-card {
    grid-template-columns: 1fr;
    gap: .45rem;
  }
  .tc-match-state {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .tc-match-detail {
    flex-direction: row;
    align-items: center;
  }
  .tc-match-public-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tc-match-live-frame,
  .tc-match-live-placeholder {
    min-height: 150px;
  }
  .tc-match-staff-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .tc-match-detail-grid {
    grid-template-columns: 1fr;
  }
  .tc-match-detail-staff {
    align-items: stretch;
    flex-direction: column;
  }
  .tc-match-action {
    flex: 0 0 auto;
  }
  .tc-manage-card-head {
    align-items: stretch;
  }
  .tc-manage-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .tc-manager-summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tc-bracket-section-head,
  .tc-round-head,
  .tc-manage-card-head {
    align-items: stretch;
    flex-direction: column;
  }
  .tc-bracket-section-head small {
    text-align: left;
  }
  .tc-round-count,
  .tc-manage-status,
  .tc-manage-lock {
    width: fit-content;
    max-width: 100%;
    text-align: left;
  }
  .tc-match-main {
    grid-template-columns: 1fr;
    gap: .3rem;
  }
  .tc-match-scoreline {
    min-width: 0;
    padding: .12rem 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
  }
  .tc-match-team.away {
    justify-content: flex-start;
    text-align: left;
  }
  .tc-match-detail {
    flex-direction: column;
    align-items: stretch;
  }
  .tc-match-action,
  .tc-manage-actions {
    justify-content: stretch;
  }
  .tc-schedule-generate-controls {
    width: 100%;
  }
  .tc-schedule-repeat-control {
    grid-template-columns: minmax(0, 1fr) 72px;
    flex: 1 1 100%;
    width: 100%;
  }
  .tc-schedule-repeat-control input {
    width: 72px;
  }
  .tc-schedule-generate-btn {
    width: 100%;
  }
  .tc-schedule-sticky-inner {
    align-items: center;
    flex-direction: row;
  }
  .tc-save-all-btn {
    width: auto;
    min-width: 72px;
  }
  .tc-record-btn,
  .tc-manage-actions .outline-btn.small {
    flex: 1 1 0;
  }
}

/* ─── 比分記錄 Modal ─── */
#tournament-match-record-overlay {
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}
.tc-record-modal {
  top: max(8px, env(safe-area-inset-top));
  right: 8px;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: 8px;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  overflow: hidden;
  border-radius: 12px;
  transform: translateY(calc(100% + 16px));
}
.tc-record-modal.open {
  transform: translateY(0);
}
.tc-record-modal .modal-header {
  position: static;
  align-items: flex-start;
  flex: 0 0 auto;
  gap: .72rem;
  padding: .72rem .8rem;
}

.tc-record-modal .modal-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: .62rem;
  min-height: 0;
  overflow-y: auto;
  padding: .72rem .8rem;
}
.tmr-result-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
}
.tmr-result-card {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: .42rem;
  min-height: 54px;
  padding: .56rem .62rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  box-sizing: border-box;
  cursor: pointer;
}
.tmr-result-card:has(input:checked) {
  border-color: rgba(37, 99, 235, .45);
  background: rgba(37, 99, 235, .1);
}
.tmr-result-card input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}
.tmr-result-card-copy {
  min-width: 0;
}
.tmr-result-card-copy strong,
.tmr-section-head strong {
  display: block;
  color: var(--text-primary);
  font-size: .8rem;
  font-weight: 900;
  line-height: 1.3;
}
.tmr-result-card-copy small,
.tmr-section-head small {
  display: block;
  margin-top: .12rem;
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.35;
}
.tmr-complete-toggle {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  min-height: 54px;
  padding: .58rem .66rem;
  border: 1px solid rgba(20, 184, 166, .24);
  border-radius: 8px;
  background: rgba(20, 184, 166, .08);
  cursor: pointer;
}
.tmr-complete-toggle input {
  width: 34px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}
.tmr-complete-toggle strong {
  display: block;
  color: var(--text-primary);
  font-size: .8rem;
  font-weight: 900;
  line-height: 1.3;
}
.tmr-complete-toggle small {
  display: block;
  margin-top: .12rem;
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.35;
}
.tmr-live-card,
.tmr-score-card,
.tmr-walkover-card {
  padding: .62rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt, var(--bg-elevated));
}
.tmr-live-card input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: .78rem;
}
.tmr-section-head {
  margin-bottom: .42rem;
}
.tc-score-grid { display: flex; align-items: flex-end; justify-content: center; gap: .6rem; margin: .5rem 0; }
.tmr-score-grid {
  margin: .34rem 0 .1rem;
}
.tc-score-side { flex: 1; text-align: center; min-width: 0; }
.tc-score-team {
  font-size: .72rem; font-weight: 700; margin-bottom: .3rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tc-score-side input, .tc-pk-grid input {
  width: 100%; max-width: 90px; text-align: center; font-size: 1.15rem; font-weight: 800;
  font-family: var(--font-display); padding: .35rem .2rem;
}
.tc-score-divider { font-size: 1.1rem; font-weight: 800; padding-bottom: .45rem; }
.tc-pk-row { margin: .2rem 0 .5rem; }
.tc-pk-row > label { font-size: .7rem; color: var(--text-muted); display: block; text-align: center; margin-bottom: .15rem; }
.tc-pk-grid { margin: 0; justify-content: center; }
.tc-pk-grid input { max-width: 64px; font-size: .9rem; }
.tc-events-section { border-top: 1px dashed var(--border); margin-top: .62rem; padding-top: .62rem; }
.tc-events-header { font-size: .72rem; font-weight: 700; color: var(--text-secondary); margin-bottom: .35rem; }
.tc-events-empty {
  margin: .15rem 0 .5rem;
  padding: .52rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 700;
  text-align: center;
}
.tc-event-add { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.tmr-event-add-grid {
  display: grid;
  grid-template-columns: minmax(96px, .7fr) minmax(120px, 1fr) minmax(130px, 1.1fr) 64px auto;
  align-items: end;
  gap: .42rem;
}
.tmr-event-control {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  min-width: 0;
}
.tmr-event-control span {
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 800;
  line-height: 1.2;
}
.tc-event-add select, .tc-event-add input, .tc-event-add textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: .72rem;
  padding: .32rem .4rem;
}
.tc-event-add textarea {
  min-height: 54px;
  resize: vertical;
  line-height: 1.35;
}
.tmr-event-sub-search {
  margin-bottom: .28rem;
}
.tmr-sub-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  min-height: 0;
  margin-bottom: .3rem;
}
.tmr-sub-suggestion {
  max-width: 100%;
  padding: .18rem .42rem;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  color: #1d4ed8;
  cursor: pointer;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tmr-sub-suggestion:hover {
  background: rgba(37, 99, 235, .14);
}
.tmr-sub-empty {
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 700;
}
.tc-event-add select#tmr-event-player { flex: 1; min-width: 90px; }
.tc-event-add input#tmr-event-minute { width: 52px; }
.tmr-event-control-minute input#tmr-event-minute { width: 100%; }
.tc-event-add input#tmr-event-player-custom { flex: 1; min-width: 90px; }
.tmr-event-control-player input#tmr-event-player-custom { width: 100%; min-width: 0; }
.tmr-event-control-sub,
.tmr-event-control-note {
  grid-column: span 2;
}
.tmr-event-add-btn {
  min-height: 34px;
  padding-inline: .7rem;
}

.tc-event-remove {
  border: 1px solid rgba(239, 68, 68, .24);
  border-radius: 999px;
  background: rgba(239, 68, 68, .08);
  color: var(--danger);
  cursor: pointer;
  font-size: .72rem;
  line-height: 1;
  padding: .16rem .34rem;
}
.tc-clear-btn { color: var(--danger); border-color: var(--danger); margin-right: auto; }
.tc-record-modal .modal-actions {
  flex: 0 0 auto;
  padding: .62rem .8rem calc(.62rem + env(safe-area-inset-bottom));
  align-items: center;
  gap: .45rem;
}
.tc-record-modal .modal-actions .outline-btn,
.tc-record-modal .modal-actions .primary-btn {
  min-height: 36px;
  padding: .42rem .82rem;
  border-radius: 8px;
  font-size: .76rem;
  font-weight: 800;
}
#tmr-save-btn {
  min-width: 112px;
}
.tmr-briefing-open-btn {
  width: 100%;
  margin: .2rem 0 .45rem;
  min-height: 34px;
  font-size: .74rem;
  font-weight: 800;
}

.tc-briefing-modal {
  width: min(760px, calc(100vw - 24px));
  max-height: min(86vh, 820px);
}
.tmr-briefing-shell {
  display: grid;
  gap: .78rem;
}
.tmr-briefing-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .82rem .9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}
.tmr-briefing-hero > div:first-child {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  min-width: 0;
}
.tmr-briefing-hero span {
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 900;
}
.tmr-briefing-hero strong {
  color: var(--text-primary);
  font-size: .98rem;
  line-height: 1.35;
}
.tmr-briefing-score {
  flex: 0 0 auto;
  min-width: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .12rem;
  padding: .38rem .64rem;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.tmr-briefing-score b {
  font-family: var(--font-display);
  font-size: 1rem;
}
.tmr-briefing-score small {
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 800;
}
.tmr-briefing-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .48rem;
}
.tmr-briefing-stats article {
  padding: .58rem .62rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.tmr-briefing-stats span {
  display: block;
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 900;
}
.tmr-briefing-stats strong {
  display: block;
  margin-top: .16rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.06rem;
}
.tmr-briefing-section {
  display: grid;
  gap: .48rem;
}
.tmr-briefing-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
}
.tmr-briefing-section-title strong {
  font-size: .86rem;
  color: var(--text-primary);
}
.tmr-briefing-section-title span {
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 800;
}
.tmr-briefing-timeline {
  display: grid;
  gap: .46rem;
}
.tmr-briefing-event {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: .48rem;
  align-items: start;
}
.tmr-briefing-event-time {
  padding-top: .44rem;
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 900;
  text-align: right;
}
.tmr-briefing-event-card {
  padding: .58rem .64rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.tmr-briefing-event-title {
  display: flex;
  align-items: center;
  gap: .36rem;
  min-width: 0;
}
.tmr-briefing-event-title strong {
  font-size: .8rem;
  color: var(--text-primary);
}
.tmr-briefing-event-title em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-style: normal;
  font-size: .68rem;
  font-weight: 800;
}
.tmr-briefing-event-title small {
  margin-left: auto;
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 800;
}
.tmr-briefing-event-lines {
  display: grid;
  gap: .22rem;
  margin-top: .42rem;
  color: var(--text-secondary);
  font-size: .74rem;
  line-height: 1.45;
}
.tmr-briefing-teams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .56rem;
}
.tmr-briefing-team-card {
  display: grid;
  gap: .44rem;
  padding: .66rem .7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.tmr-briefing-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.tmr-briefing-team-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .82rem;
}
.tmr-briefing-team-head span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 900;
}
.tmr-briefing-info-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: .45rem;
  align-items: start;
  font-size: .72rem;
}
.tmr-briefing-info-row > span {
  color: var(--text-muted);
  font-weight: 900;
}
.tmr-briefing-info-row > div,
.tmr-briefing-roster {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  min-width: 0;
}
.tmr-briefing-chip {
  max-width: 100%;
  padding: .18rem .42rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  color: #1d4ed8;
  font-size: .68rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tmr-briefing-empty,
.tmr-briefing-empty-panel {
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
}
.tmr-briefing-empty-panel {
  padding: .9rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
}
.tmr-briefing-actions {
  justify-content: flex-end;
}

.tm-event-svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.tc-match-modal-closebar,
.tmr-modal-closebar {
  justify-content: flex-end;
  min-height: 0;
  padding: .52rem .72rem .18rem;
  border-bottom: 0;
}
.tc-match-info-modal .modal-header.tc-match-modal-closebar,
.tc-record-modal .modal-header.tmr-modal-closebar {
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  min-height: 0;
  padding: .52rem .72rem .18rem;
  border-bottom: 0;
}
.tc-match-event-card,
.tc-match-detail-event,
.tfg-match-event-card,
.tmr-event-card,
.tmr-briefing-event-card {
  background: color-mix(in srgb, var(--text-muted) 7%, transparent);
}
.tc-match-event-icon,
.tc-match-detail-event-icon,
.tfg-match-event-icon,
.tmr-event-icon,
.tmr-briefing-event-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-width: 0;
  color: currentColor;
  line-height: 0;
}
.tc-match-event-card .tc-match-event-copy,
.tfg-match-event-copy,
.tmr-event-copy {
  display: grid;
  gap: .04rem;
  min-width: 0;
}
#tmr-events-list {
  display: grid;
  gap: .36rem;
  margin-bottom: .5rem;
}
.tmr-event-card {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: .44rem;
  min-width: 0;
  padding: .46rem .5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
}
.tmr-event-card:hover {
  border-color: color-mix(in srgb, currentColor 28%, var(--border));
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.tmr-event-copy strong,
.tmr-event-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tmr-event-copy strong {
  color: var(--text-primary);
  font-size: .7rem;
  font-weight: 900;
}
.tmr-event-copy small {
  color: var(--text-secondary);
  font-size: .62rem;
  font-weight: 760;
}
.tmr-event-card .tc-event-remove {
  align-self: center;
  justify-self: end;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 999px;
}
.tc-match-event-card .tc-match-event-icon,
.tfg-match-event-icon,
.tc-match-detail-event-icon {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  font-size: inherit;
}
:where(.tc-match-event-goal, .tc-match-detail-event-goal, .tfg-event-goal, .tmr-event-card-goal, .tmr-briefing-event-card-goal) {
  border-color: color-mix(in srgb, rgb(16 185 129) 26%, var(--border));
  background: color-mix(in srgb, rgb(16 185 129) 12%, transparent);
  color: color-mix(in srgb, rgb(5 150 105) 82%, var(--text-primary));
}
:where(.tc-match-event-own_goal, .tc-match-detail-event-own_goal, .tfg-event-own_goal, .tmr-event-card-own_goal, .tmr-briefing-event-card-own_goal) {
  border-color: color-mix(in srgb, rgb(245 158 11) 28%, var(--border));
  background: color-mix(in srgb, rgb(245 158 11) 12%, transparent);
  color: color-mix(in srgb, rgb(180 83 9) 82%, var(--text-primary));
}
:where(.tc-match-event-yellow, .tc-match-detail-event-yellow, .tfg-event-yellow, .tmr-event-card-yellow, .tmr-briefing-event-card-yellow) {
  border-color: color-mix(in srgb, rgb(234 179 8) 30%, var(--border));
  background: color-mix(in srgb, rgb(234 179 8) 13%, transparent);
  color: color-mix(in srgb, rgb(161 98 7) 82%, var(--text-primary));
}
:where(.tc-match-event-red, .tc-match-detail-event-red, .tfg-event-red, .tmr-event-card-red, .tmr-briefing-event-card-red) {
  border-color: color-mix(in srgb, rgb(239 68 68) 28%, var(--border));
  background: color-mix(in srgb, rgb(239 68 68) 11%, transparent);
  color: color-mix(in srgb, rgb(220 38 38) 82%, var(--text-primary));
}
:where(.tc-match-event-stoppage_time, .tc-match-detail-event-stoppage_time, .tfg-event-stoppage_time, .tmr-event-card-stoppage_time, .tmr-briefing-event-card-stoppage_time) {
  border-color: color-mix(in srgb, rgb(59 130 246) 28%, var(--border));
  background: color-mix(in srgb, rgb(59 130 246) 11%, transparent);
  color: color-mix(in srgb, rgb(37 99 235) 82%, var(--text-primary));
}
:where(.tc-match-event-substitution, .tc-match-detail-event-substitution, .tfg-event-substitution, .tmr-event-card-substitution, .tmr-briefing-event-card-substitution) {
  border-color: color-mix(in srgb, rgb(20 184 166) 28%, var(--border));
  background: color-mix(in srgb, rgb(20 184 166) 11%, transparent);
  color: color-mix(in srgb, rgb(15 118 110) 82%, var(--text-primary));
}
@media (max-width: 560px) {
  .tc-match-info-modal {
    top: max(.6rem, env(safe-area-inset-top));
    right: max(.6rem, env(safe-area-inset-right));
    bottom: max(.6rem, env(safe-area-inset-bottom));
    left: max(.6rem, env(safe-area-inset-left));
    width: auto;
    max-width: none;
    max-height: none;
    height: auto;
    border-radius: 12px;
    transform: translateY(calc(100% + .75rem));
  }
  .tc-match-info-modal.open {
    transform: translateY(0);
  }
  .tc-match-info-modal .modal-header {
    flex: 0 0 auto;
    padding: .82rem .95rem;
  }
  .tc-match-info-modal .modal-body {
    flex: 1 1 auto;
    padding: .82rem .9rem;
  }
  .tc-match-detail-score {
    grid-template-columns: 1fr;
    gap: .34rem;
    text-align: center;
  }
  .tc-match-detail-score strong,
  .tc-match-detail-score strong:last-child {
    text-align: center;
    white-space: normal;
  }
  .tc-match-detail-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: .16rem;
  }
  .tc-match-detail-section-title span {
    text-align: left;
  }
  .tc-match-detail-list div {
    align-items: flex-start;
    flex-direction: column;
    gap: .12rem;
  }
  .tc-match-detail-list dd {
    text-align: left;
  }
  .tc-match-kickoff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tc-match-kickoff-grid div {
    align-items: stretch;
  }
  .tc-match-kickoff-grid dd {
    text-align: left;
  }
  .tfg-match-event-card {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .tfg-match-event-copy strong,
  .tfg-match-event-copy small {
    white-space: normal;
  }
  .tmr-result-switch {
    grid-template-columns: 1fr;
  }
  .tmr-event-add-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tmr-event-control-player,
  .tmr-event-control-sub,
  .tmr-event-control-note,
  .tmr-event-add-btn {
    grid-column: 1 / -1;
  }
  .tmr-event-add-btn {
    width: 100%;
  }
  .tc-record-modal .modal-actions {
    flex-wrap: wrap;
  }
  .tc-record-modal .modal-actions .outline-btn:not(.tc-clear-btn),
  .tc-record-modal .modal-actions .primary-btn {
    flex: 1 1 120px;
  }
  .tmr-briefing-hero {
    align-items: stretch;
    flex-direction: column;
  }
  .tmr-briefing-score {
    width: 100%;
  }
  .tmr-briefing-stats,
  .tmr-briefing-teams {
    grid-template-columns: 1fr;
  }
  .tmr-briefing-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: .12rem;
  }
  .tmr-briefing-event {
    grid-template-columns: 1fr;
    gap: .2rem;
  }
  .tmr-briefing-event-time {
    padding-top: 0;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .tc-manage-refs,
  .tmr-event-add-grid {
    grid-template-columns: 1fr;
  }
  .tc-clear-btn {
    width: 100%;
    margin-right: 0;
  }
}

/* ─── 建立 / 編輯表單：賽制設定 ─── */
.tc-config-row { background: var(--surface-alt, var(--bg-elevated)); border-radius: var(--radius-sm); padding: .5rem .6rem; }
.tc-config-item { display: flex; align-items: center; gap: .4rem; font-size: .78rem; margin: .25rem 0; }
#tf-cup-config {
  gap: .55rem;
  padding: .72rem .75rem;
}
#tf-cup-config > label:first-child {
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 800;
}
#tf-cup-config .tc-config-item {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-primary);
  justify-content: space-between;
  cursor: pointer;
  box-sizing: border-box;
}
#tf-cup-config .tc-config-item span {
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}
#tf-cup-config .tc-config-item input[type="checkbox"] {
  order: 2;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}
#tf-cup-config .ce-field-note {
  margin: 0;
  color: var(--text-muted);
  font-size: .72rem;
  line-height: 1.5;
}
.tc-config-points {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-size: .74rem; color: var(--text-secondary); margin: .3rem 0;
}
.tc-config-points input { width: 58px; text-align: center; font-size: .78rem; padding: .25rem .2rem; }
.tc-config-tiebreak { font-size: .74rem; color: var(--text-secondary); margin: .3rem 0; }
.tc-config-tiebreak select { width: 100%; margin-top: .25rem; font-size: .76rem; }
