.tournament-name {
	font-size: 1.5em;
    font-weight: bold;
    padding: 1em;
    color: #333;
	text-align: center;
}



.tournament-card {
	background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 1em;
    transition: box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    position: relative;
    box-sizing: border-box;
}

.tournament-card:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}

.tournament-card img {
	object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5em;
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
}

.tournament-card h2 {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0.5em 0 0.3em;
    color: #222;
}

.tournament-card .meta {
    font-size: 0.95em;
    color: #555;
    line-height: 1.5;
}

.tournament-card .desc {
    font-size: 0.95em;
    color: #444;
    margin-bottom: 0.5em;
}

/* === 分頁按鈕 === */

.tab-buttons { margin-right: 1em; }
.tab-buttons a {
	margin-right: 5px;
	padding: 5px 10px;
	background: #eee;
	border-radius: 5px;
	text-decoration: none;
	color: #333;
	}
.tab-buttons a.active {
	background: #555;
	color: white;
	font-weight: bold;
	}
.tab-buttons-1 { margin: 1em; }
.tab-buttons-1 a {
    margin-right: 5px;
    padding: 5px 10px;
    background: #555;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
	}	
#tournament-container {
padding: 1px;
    display: flex
;
    flex-wrap: wrap;
    gap: 0.5em;
    margin: 0 0 0 1em;
	}

/* === 子分頁按鈕 === */
.subtab-btn {
	background: #999;
    cursor: pointer;
    margin-right: 0.1em;
    min-width: 60px;
    /*max-width: 120px;*/
	transform: skewX(-15deg);
    margin: 2px 0px 2px 7px;
}
.subtab-btn.active {
    background: #333;
	transform: skewX(-15deg);
    margin: 2px 0px 2px 7px;
}

/* === 子分頁容器 === */
#subtab-container {
overflow: visible;
    height: auto;
    width: 100%;
}

/* === 飄浮按鈕區 === */
#floating-buttons {
	position: fixed;
    bottom: 0.5em;
    right: 0.5em;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2em;
}

.backtoTop {
	line-height: 1em;
}

.floating-btn {
    background-color: #555;
    padding: 0.3em;
    border-radius: 8px;
    line-height: 1em;
height: 40px;
}

/* === Intro/Info 上方導覽列 === */
.tournament-banner {
    width: 100%;
    background: url(../../images/tournament_default.jpg);
	object-fit: cover;
}
	@media (max-width: 768px) {
		.tournament-banner {
				background-size: cover;
				    height: 220px;

			}
	}
.tournament-banner-cover {
	width: 100%;
    background: url(../../images/tournament_default.jpg);
    object-fit: cover;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    overflow: hidden;
}
	@media (max-width: 768px) {
		.tournament-banner-cover {
				height:220px;
				background-size: cover;
				aspect-ratio: 1 / 1;
				background-position: left;
			}
	}

.tournament-nav {
    display: inline-flex;
    background: #ccc;
    height: 3em;
    align-items: center;
    table-layout: fixed;
    width: 100%;
    gap: 4px;
}
.tournament-nav a {
    padding: 0.6em 0.6em;
    background: #eee;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    width: 100%;
    text-align: center;
}
.tournament-nav a.active {
	border-bottom: 3px solid #e10;
}

/* === 階段卡的小徽章 === */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 8px;
}

.status-badge.future {
    background-color: #fff;
    color: #e10;
}
.status-badge.ongoing {
    background-color: #e10;
    color: #fff;
}
.status-badge.ended {
    background-color: #555;
    color: #999;
}
/* === 資訊列 (info-list) === */
.info-list {
	list-style: none;
    margin: 1em 0;
}
.info-list li {
    margin-bottom: 1em;
    font-size: 1em;
    line-height: 1.4;
}
.info-list li img {
	margin:1em 0;
	display: block;
	width:95%;
	height:auto;
	}
.info-list li strong {
    display: inline-block;
    width: 10em;
    color: #555;
}

/* === 成員頭像 (報名名單用) === */
.member-avatar {
    width: 75% !important;
    height: auto !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    border: 1px solid #ccc;
}

/* === 報名列表表格 === */
table.tournament-signup {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

table.tournament-signup th,
table.tournament-signup td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #ccc;
}
table.tournament-signup th {
    background: #f0f0f0;
}

/* === 月曆樣式 (calendar_tournament_list.php 用) === */
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    font-size: 15px;
}

.calendar-table th,
.calendar-table td {
    border: 1px solid #ddd;
    width: 14.28%;
    height: 50px;
    text-align: left;
    vertical-align: top;
    padding: 5px;
    position: relative;
}

.calendar-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    text-align: center;
}

.calendar-day {
    cursor: pointer;
    transition: background 0.3s ease;
}

.calendar-day:hover {
    background-color: #fef4f4;
}

.calendar-day.selected {
    background-color: #e10;
    color: #fff;
    font-weight: bold;
}

.event-indicator {
    font-size: 12px;
    color: #fff;
    margin-top: 4px;
    display: block;
}

/* === 月曆導航列 (calendarNav) === */
#calendarNav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

#calendarNav button {
    background: #e10;
    color: #fff;
    border: none;
    padding: 5px 10px;
    font-weight: bold;
    cursor: pointer;
}
#calendarNav button:hover {
    background: #c10;
}

#currentMonth {
    font-size: 16px;
    font-weight: bold;
	margin: 0 1em;
}

/* === 月曆下方的賽事列表 === */
.event-list {
    margin-top: 1em;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 10px;
}

.event-list h5 {
    margin: 0 0 5px;
    font-size: 16px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}
#my-match-card{
	border: 2px solid #e10;
    border-radius: 8px;
	

	}
	
/*===階段卡推進|裁判鈕===*/	
.button.control-tools {
	font-size: 0.75em;
    margin-left: 0.5em;
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    line-height: 0em;
    height: 1.5em;
}

.button.control-tools:hover {
  background: #ddd;
}
	
/*===賽事選地區===*/	
		#country{
			width: 50%;
			}
		#city{
			width: 50%;
			}
		#region-modal{
			background: #ccc;
			margin: 1em;
			}
		
		.modal-content{
			text-align: center;
			width: 100%;
			margin: 1em;
			}
	
/*===認証===*/
		.player-badge {
            background: #f5f5f5;
            border: 2px solid #aaa;
            padding: 1em;
            border-radius: 12px;
            max-width: 300px;
            margin: 0 auto 2em;
            text-align: center;
        }
        .player-badge h3 {
            margin-bottom: 0.3em;
        }
        .badge-rank {
            font-size: 2em;
            font-weight: bold;
            color: #fff;
            display: inline-block;
            padding: 0.2em 0.8em;
            border-radius: 8px;
        }
        .badge-r1 { background: #ff9800; }
        .badge-r2 { background: #607d8b; }
        .badge-r3 { background: #795548; }
		
		.badge {
			font-size: 0.75em;
			padding: 2px 6px;
			border-radius: 6px;
			display: inline-block;
		}
		.badge-blue {
			background: #e10;
			color: white;
		}
		.badge-gray {
			background: #ccc;
			color: black;
		}

	.tab-content{
    margin-left: 1em;
    margin-top: 1em;
    max-width: 93%;
    display: inline;
    overflow: auto;
		}
	.push-round{
background: #fc0;
    border-radius: 6px;
    padding: 0.8em 1.2em;
    color: #000;
    margin-right: -16px;
		}		
			

.checkin-box{
	font-weight: bold;
    font-size: 0.9em;
    background: #fc0;
    cursor: pointer;
    border-radius: 6px;
    opacity: 1;
    margin: 0 1px;
	line-height: 3em;
	}
.result{
	margin: 0 1em;
    overflow-x: auto;
	}
			@media (max-width: 768px) {
			.result{
					margin: 0 1em;
					overflow-x: auto;
					width: 385px;
					display: inline-grid;
						}}
	
.result .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.result table {
    min-width: 720px; /* 或可視情況調整 */
}


/*===战队卡===*/
        .filters { flex-wrap: wrap; gap: 1em; margin-bottom: 1em; }
        .filters select, .filters input { padding: 0.4em;margin: 1em; width: 50%; }
        .tournament-grid { display: flex; flex-wrap: wrap; gap: 5px; }
        .tournament-card { width: calc(25% - 1em); border: 1px solid #ccc; border-radius: 8px; padding: 2px; background: #fff;}
        @media (max-width: 768px) {
			.tournament-card { max-width: 49%; min-width: 48%;}
        }
        .tournament-card-index { width: calc(25% - 1em); border: 1px solid #ccc; border-radius: 8px; padding: 2px; background: #fff;}
		@media (max-width: 768px) {
			.tournament-card-index { width: calc(49% - 1em);}
        }
        .tournament-info h3 { margin: 0.5em 0; font-size: 1.1em; }
        .suggest-box {
            position: absolute;
            background: #fff;
            border: 1px solid #ccc;
            max-height: 200px;
            overflow-y: auto;
            z-index: 99;
            width: 200px;
            display: none;
        }
        .suggest-box div {
            padding: 8px;
            cursor: pointer;
        }
        .suggest-box div:hover {
            background-color: #f0f0f0;
        }

/*===轮次===*/
.sub-tabs{
	}

.sub-tab-buttons {
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x; /* 禁止上下滑动 */
  -ms-overflow-style: none;  /* 隐藏 IE 滚动条 */
  scrollbar-width: none;     /* 隐藏 Firefox 滚动条 */
}

.sub-tab-buttons a {
	display: inline-block;
    padding: 0 1em;
    background-color: #ffcc00;
    text-decoration: none;
    color: #000;
    position: sticky;
}

.sub-tab-buttons a.active {
  background-color: #333;
  color: #fff;
}
.sub-tab-buttons::-webkit-scrollbar {
  display: none;  /* 隐藏 Chrome 滚动条 */
}
.tournament-logo{
	object-fit: cover;
    border-radius: 6px;
	width:36px;
	aspect-ratio: 1 / 1;
	}	
.alarm{color: #e10;
    margin: 0 1em;
    padding: 1em;
    background: #ffcc00;
    border-radius: 5px;
    font-size: 1em;
	font-weight: bold;
	}
.tournament-checkin-flash--success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}
.tournament-checkin-flash--error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.member-card { text-align: center;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 1em;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 185px;
    box-sizing: border-box;
    width: 19%; 
}
        .member-grid { display: flex; flex-wrap: wrap; gap: 1em; }
        .member-card img { width:80px;height:80px;border-radius:50%;object-fit:cover }
        .member-disabled { opacity:.5;pointer-events:none }	
		
.check_button{
	width: 100%;
    margin: 0;
    height: 100%;
    line-height: 3em;
    display: inline-grid;
}
.check_button_disable { 
width: 100%; border-radius: 6px;background: #333; padding: 0;}	

.bracket-container {display: flex;    overflow-x: auto; gap: 3px; margin: 1em;}
        		@media (max-width: 768px) {
					.bracket-container {
										display: inline-flex;
										overflow-x: auto;
										width: 385px;
										gap: 3px;
										margin: 1em;}        
								}
				.round-column      {
							background: #333;
							border: 1px solid #555;
							padding: 1em;
							min-width: 220px;
							flex-shrink: 0;
							color: #fff;
							border-radius: 4px;}
        .round-title       {font-weight:bold;text-align:center;margin-bottom:1em}
        .match-box         {
							padding: .5em;
							margin-bottom: 1em;
							background: #fff;
							border-radius: 4px;}
        .winner            {background: #e10;
							color: #fff;
							font-weight: bold;}
        .winner a        { color:#000;
							}					
							
							
        .bye               {font-style:italic;color:#888}
        .match-id          {font-size:12px;color:#999;text-align:right}
        #scroll-to-top     {position:fixed;bottom:40px;right:30px;z-index:999;background:#ee1100;color:#fff;padding:10px 14px;border:none;border-radius:8px;font-weight:bold;cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.2);display:none}
        #scroll-to-top:hover{background:#c10d00}
		
        .table-wrapper{overflow-x:auto;}
        table.alt{width:100%;}
			@media (max-width: 768px) {
				table.alt {
					margin:1em;
					width: 88%;
				}        
			}
        .avatar{width:40px;height:40px;object-fit:cover;border-radius:50%;vertical-align:middle;margin-right:6px;}
        .rank-badge{font-weight:bold;font-size:1.2em;text-align: center;}
        .nav-switch a{margin-right:12px;text-decoration:none;}
        .nav-switch a.active{font-weight:700;text-decoration:underline;}
        .load-hint{color:#6b7280;font-size:13px;margin-top:8px;}
        .sentinel{height:1px;}
		
.my_match{
	color: #fff; border: 1px solid #999; border-radius: 8px; padding: 1em; background: #555; font-size: 1.5em; text-align: center;margin-top: 1em;
	}
.my_position{
	color: #fff !important; background: #e10; border-radius: 25%; padding: 0.3em 0.5em; margin-left: 1em; border: 1px solid #000;
	}
	
.all_checked_in{
	color: #000;
    margin-top: 0.5em;
    text-align: center;
    font-size: 0.9em;
    background: #ffcc00;
    padding: 5px 0;
    border-radius: 6px;
    font-weight: bolder;
	}
.not_all_checked_in{
	margin-top: 0.5em;
    text-align: center;
    font-size: 0.9em;
    background: #eee;
    padding: 5px 0;
    border-radius: 6px;
    font-weight: bolder;
	}		
.member-cell { text-align: center; width: 30%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin: auto;}	
.signup-grid { display: flex; flex-wrap: wrap; gap: 1em; margin-top: 1em; }
		
		
.result-wrap{padding:0 1em}
.result-wrap table{width:100%;border-collapse:collapse}
.result-wrap th,.result-wrap td{padding:10px;border:1px solid #ccc;text-align:left;vertical-align:middle}
.result-wrap th{background:#f8f8f8}
.proof-thumb{height:40px;border-radius:4px}
.badge{display:inline-block;padding:2px 8px;border-radius:6px;background:#333;color:#fff;font-size:1em;margin-left:6px}
.badge-fail{background:#fee;color:#c00}
.hint{font-size:0.8em;color:#e10;margin:6px 0}		

.match-name{ overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; text-overflow: ellipsis;}

    .tabs { display:flex; margin:14px 0; border-bottom:1px solid #333; }
    .tabs a { padding:8px 12px; text-decoration:none; color:#333; border:1px solid #e5e5e5; border-bottom:none; border-radius:6px 6px 0 0; background:#f9f9f9; }
    .tabs a + a { margin-left:8px; }
    .tabs a.active { background:#333; color:#fff; font-weight:bold; }
    .toolbar { display:flex; gap:8px; align-items:center; margin:10px 0; }
    .toolbar input[type="text"] { width:280px; padding:6px 8px; border:1px solid #ccc; border-radius:4px; }
    .list { border:1px solid #e5e5e5; border-radius:8px; background:#fff; }
    .row { display:grid; grid-template-columns:120px 1fr 220px 220px; gap:10px; padding:10px; border-bottom:1px solid #eee; align-items:center; }
    .row:last-child { border-bottom:none; }
    .thumb { width:120px; height:68px; background:#f2f2f2; border:1px solid #ddd; object-fit:cover; }
    .badge { display:inline-block; padding:2px 6px; border-radius:3px; font-size:12px; }
    .b-pending { background:#333; }
    .b-approved { border: 1px solid #ccc; background: #eee; color: #333;}
    .b-rejected { background:#e10; }
    .b-ineli  { background:#e10; }
    .actions button { color:#000; margin-right:6px; padding:0 6px; background:#fc0; border-radius:6px; cursor:pointer; }
    .actions button.primary { background:#fc0; }
    .pager { margin:12px 0; text-align:center; }
    .pager a { margin:0 4px; text-decoration:none; color:#1f6feb; }
    .muted { color:#888; }
    .warn  { color:#a00; }



.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid #eee; }
.table-compact th, .table-compact td { padding: 6px 8px; }
.table-striped tbody tr:nth-child(odd) { background: #fafafa; }

/* 赛事前台没有可显示对阵或成绩时的共用空状态。 */
.tournament-empty-state {
    max-width: 720px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    border: 1px solid #d7d7d7;
    border-radius: 10px;
    background: #f7f7f7;
    color: #555;
    text-align: center;
}
.tournament-empty-state[hidden] { display: none; }
.tournament-empty-state h3 {
    margin: 0 0 .65rem;
    color: #222;
    font-size: 1.25rem;
    line-height: 1.4;
}
.tournament-empty-state p {
    margin: 0;
    line-height: 1.75;
}
@media (max-width: 414px) {
    .tournament-empty-state {
        margin: 1.25rem .75rem;
        padding: 1.5rem 1rem;
    }
}


.badge.b-rejected { background: #f8d7da; color: #721c24; }
.badge.b-ineli    { background: #e2e3e5; color: #383d41; }

.pagination .page { padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; text-decoration: none; }
.pagination .page.current { background: #f0f0f0; font-weight: bold; }
/* === 跨服报名来源标签 === */
.fed-source-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #f3f4f6;
    color: #333;
}

.tournament-draft-card {
    box-sizing: border-box;
    width: calc(100% - 2em);
    max-width: 920px;
    margin: 1em;
    padding: 1.25em;
    border: 1px solid #d9dde2;
    border-top: 5px solid #d71920;
    border-radius: 10px;
    background: #fff;
    color: #2f3338;
    box-shadow: 0 5px 18px rgba(28, 32, 36, .09);
}
.tournament-draft-card__eyebrow {
    display: inline-block;
    margin-bottom: .55em;
    color: #a80f18;
    font-size: .82em;
    font-weight: 900;
    letter-spacing: .04em;
}
.tournament-draft-card h2 { margin: 0 0 .55em; color: #202328; }
.tournament-draft-card p { margin: .45em 0; line-height: 1.7; }
.tournament-draft-card__created { font-weight: 800; }
.tournament-draft-card .tournament-draft-card__cta {
    display: inline-flex;
    min-height: 46px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    margin-top: .8em;
    padding: .7em 1.35em;
    background: #d71920;
    color: #fff;
    font-weight: 900;
    text-decoration: none;
}
@media (max-width: 414px) {
    .tournament-draft-card { width: calc(100% - 1em); margin: .5em; padding: 1em; }
    .tournament-draft-card .tournament-draft-card__cta { width: 100%; }
}

/* 赛事大厅 V1：按钮筛选与卡片身份，只在 tournament_list.php 生效。 */
.tournament-list-page .tl-filter-panel {
    margin: 1em;
    padding: 1em;
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 12px;
}

.tournament-list-page .tl-filter-group + .tl-filter-group {
    margin-top: 0.65em;
}

.tournament-list-page .tl-filter-label {
    margin-bottom: 0.45em;
    color: #3b4048;
    font-size: 0.88em;
    font-weight: 700;
}

.tournament-list-page .tl-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}

.tournament-list-page .tl-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35em;
    padding: 0.45em 1em;
    color: #343940;
    background: #fff;
    border: 1px solid #cfd4da;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
}

.tournament-list-page .tl-filter-button:hover {
    border-color: #a50f1b;
    color: #8f0c16;
    background: #f7f2f3;
}

.tournament-list-page .tl-cross-server-entry {
    color: #9f1420;
    border-color: #c9aeb1;
    background: #fff;
}

.tournament-list-page .tl-cross-server-entry:hover {
    color: #86101a;
    border-color: #ae7379;
    background: #faf6f6;
}

.tournament-list-page .tl-filter-button.is-active {
    color: #fff;
    background: #a50f1b;
    border-color: #a50f1b;
    box-shadow: 0 2px 7px rgba(165, 15, 27, 0.22);
}

.tournament-list-page .tournament-region-more {
    margin-top: 0.45em;
    padding-top: 0.55em;
    border-top: 1px dashed #d9dde3;
}

.tournament-list-page .tournament-region-more[hidden] {
    display: none;
}

.tournament-list-page .tl-region-city-row {
    margin-top: 0.75em;
    padding-top: 0.75em;
    border-top: 1px solid #eceff2;
}

.tournament-list-page .tl-region-hint {
    margin-top: 0.65em;
}

.tournament-list-page .tournament-region-server-notice {
    max-width: 100%;
    color: #666d75;
    font-size: 0.85em;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.tournament-list-page .tl-region-peer {
    display: inline-block;
    margin-left: 0.5em;
    color: #8f0c16;
    font-weight: 700;
}

.tournament-list-page .tl-more-filters {
    display: flex;
    align-items: center;
    gap: 0.65em;
    margin: 0.75em 1em 0;
    color: #626871;
    font-size: 0.9em;
}

.tournament-list-page .tl-more-filters select {
    min-width: 12em;
}

.tournament-list-page .tl-region-box {
    background: #f7f8f9;
    box-shadow: none;
}

.tournament-list-page .tournament-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e5e7eb;
}

.tournament-list-page .tournament-card {
    height: 100%;
    padding: 0;
    gap: 0;
    overflow: hidden;
    border: 1px solid #d7dbe0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(24, 28, 33, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tournament-list-page .tournament-card:hover {
    transform: translateY(-2px);
    border-color: #b8bec5;
    box-shadow: 0 7px 18px rgba(24, 28, 33, 0.1);
}

.tournament-list-page .tournament-card > a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.tournament-list-page .tournament-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    aspect-ratio: auto;
}

.tournament-list-page .tournament-card-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    max-width: calc(100% - 96px);
}

.tournament-list-page .tournament-identity,
.tournament-list-page .tournament-certified,
.tournament-list-page .tournament-starting-soon {
    z-index: 1;
    padding: 0.28em 0.62em;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.tournament-list-page .tournament-identity {
    color: #f8f9fa;
    background: #444a51;
    border: 1px solid rgba(255, 255, 255, 0.18);
    white-space: nowrap;
}

.tournament-list-page .tournament-identity--city {
    background: #a50f1b;
    border-color: #a50f1b;
}

.tournament-list-page .tournament-identity--country {
    color: #fff;
    background: #292d32;
    border-left: 3px solid #c21b29;
}

.tournament-list-page .tournament-identity--championship {
    color: #fff;
    background: #3d4248;
    border-color: #3d4248;
}

.tournament-list-page .tournament-identity--ranked {
    color: #25292e;
    background: rgba(235, 237, 239, 0.96);
    border-color: #b8bdc3;
}

.tournament-list-page .tournament-identity--general {
    color: #30353a;
    background: rgba(244, 245, 246, 0.96);
    border-color: #cdd1d5;
}

.tournament-list-page .tournament-certified {
    position: static;
    color: #4f565e;
    background: rgba(250, 250, 250, 0.94);
    border: 1px solid rgba(183, 188, 194, 0.95);
    font-size: 10px;
    font-weight: 600;
}

.tournament-list-page .tournament-starting-soon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #96111c;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(165, 15, 27, 0.72);
}

.tournament-list-page .tournament-card-title {
    min-height: calc(2.7em + 1.6rem);
    margin: 0;
    padding: 0.8rem 0.9rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    color: #24282d;
    font-size: 1.04em;
    font-weight: 700;
    line-height: 1.35;
}

.tournament-list-page .tournament-card-meta {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.7rem;
    min-height: 5.1rem;
    margin-top: auto;
    padding: 0 0.9rem 0.9rem;
    color: #656b72;
    font-size: 12px;
}

.tournament-list-page .tournament-card-context {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 1.5em;
    white-space: nowrap;
}

.tournament-list-page .tournament-card-game,
.tournament-list-page .tournament-card-region {
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-list-page .tournament-card-game {
    flex: 0 1 auto;
    color: #4e555c;
    font-weight: 600;
}

.tournament-list-page .tournament-card-region {
    flex: 1 1 auto;
}

.tournament-list-page .tournament-card-separator {
    flex: 0 0 auto;
    margin: 0 0.45em;
    color: #a4a9af;
}

.tournament-list-page .tournament-card-time {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid #eceef0;
}

.tournament-list-page .tournament-card-date {
    color: #747a81;
    font-size: 12px;
    letter-spacing: 0.03em;
}

.tournament-list-page .tournament-card-clock {
    color: #2e3338;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tournament-list-page .tournament-card-unscheduled {
    color: #747a81;
}

@media (max-width: 768px) {
    .tournament-list-page .tl-filter-panel {
        margin: 0.75em;
        padding: 0.8em;
    }

    .tournament-list-page .tl-filter-button {
        flex: 1 1 auto;
        padding-right: 0.7em;
        padding-left: 0.7em;
    }

    .tournament-list-page .tl-more-filters {
        margin-right: 0.75em;
        margin-left: 0.75em;
    }

    .tournament-list-page .tl-more-filters select {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .tournament-list-page #tournament-container > .tournament-card,
    .tournament-list-page #tournament-container > .tl-badge-wrap {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .tournament-list-page .tournament-card-title {
        font-size: 1.08em;
    }

    .tournament-list-page .tournament-card-meta {
        font-size: 13px;
    }
}

.fed-source-cn {
    background: #fff4f4;
    border-color: #f0b8b8;
    color: #b42318;
}

.fed-source-world {
    background: #eef4ff;
    border-color: #b8c9f0;
    color: #1d4ed8;
}

.fed-source-other {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #555;
}

.fed-team-name {
    font-weight: 700;
}

/* 新个人赛 V2：报名列表以 Entrant 一人一卡，Team 仅为重复显示的代表关系。 */
.entrant-v2-signup-grid { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; }
.entrant-v2-signup-grid .entrant-v2-card { box-sizing: border-box; display: flex; flex: 1 1 calc(25% - 1em); flex-direction: column; width: calc(25% - 1em); max-width: calc(25% - 0.75em); min-width: 220px; overflow: hidden; }
.entrant-v2-card .entrant-v2-affiliation-row { order: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; padding: 8px; border-top: 1px solid #eee; }
.entrant-v2-card .entrant-v2-team-link { display: flex; flex: 1 1 170px; align-items: center; gap: 8px; max-width: 100%; min-width: 0; }
.entrant-v2-card .entrant-v2-team-name { display: block; flex: 1 1 auto; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entrant-v2-card .entrant-v2-team-logo-wrap { display: block; flex: 0 0 52px; width: 52px; max-width: 52px; height: 52px; overflow: hidden; border-radius: 7px; aspect-ratio: 1 / 1; }
.entrant-v2-card .entrant-v2-team-logo { display: block; width: 100%; max-width: 100%; height: 100%; margin: 0; border-radius: inherit; object-fit: cover; aspect-ratio: 1 / 1; }
.entrant-v2-card .entrant-v2-cancel { flex: 0 0 auto; width: auto; max-width: 100%; min-width: 0; margin: 0 0 0 auto; padding: 0.4em 0.7em; text-align: center; }
.entrant-v2-card .entrant-v2-player-link { order: 1; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 100%; min-width: 0; padding: 0 0 12px; text-align: center; }
.entrant-v2-card .entrant-v2-player-avatar { display: block; flex: 0 0 auto; width: 100%; max-width: 100%; height: auto; margin: 0; border-radius: 8px; object-fit: cover; aspect-ratio: 16 / 9; }
.entrant-v2-card .entrant-v2-player-copy { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 100%; min-width: 0; padding: 0 12px; }
.entrant-v2-card .entrant-v2-player-copy strong { display: block; width: 100%; max-width: 100%; overflow: hidden; color: #222; font-size: 1.18em; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.entrant-v2-card .entrant-v2-r0-checkin { order: 1; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 100%; min-width: 0; padding: 0 12px 12px; }
.entrant-v2-card .entrant-v2-r0-checkin form { max-width: 100%; margin: 0; }
.entrant-v2-card .entrant-v2-r0-checkin-button { box-sizing: border-box; width: auto; max-width: 100%; min-height: 38px; margin: 0; padding: 0.5em 1em; white-space: normal; }
.entrant-v2-card .entrant-v2-r0-checkin-button--disabled,
.entrant-v2-card .entrant-v2-r0-checkin-button--disabled:disabled { border-color: #c8c8c8; background: #e5e5e5; color: #777; cursor: not-allowed; opacity: .72; box-shadow: none; pointer-events: none; }
.entrant-v2-card .entrant-v2-r0-status--checked { margin-left: 0; padding: 5px 12px; line-height: 1.35; white-space: nowrap; }
.tournament-v2-registration-success { margin-bottom: 1em; }
@media (max-width: 768px) {
    .entrant-v2-signup-grid .entrant-v2-card { flex-basis: calc(50% - 0.5em); width: calc(50% - 0.5em); max-width: calc(50% - 0.5em); min-width: 0; }
}
@media (max-width: 480px) {
    .entrant-v2-signup-grid .entrant-v2-card { flex: 1 1 100%; width: 100%; max-width: 100%; min-width: 0; }
    .entrant-v2-card .entrant-v2-affiliation-row { align-items: center; }
    .entrant-v2-card .entrant-v2-team-link { flex-basis: 150px; }
    .entrant-v2-card .entrant-v2-r0-checkin form,
    .entrant-v2-card .entrant-v2-r0-checkin-button { width: 100%; }
}

/* Championship Result：Team / Individual V2 共用名次摘要外壳。 */
.cr-awards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 100%;
    min-width: 0;
    gap: .8em;
    margin: 1em 0;
}

.cr-award-card {
    min-width: 0;
    min-height: 150px;
    padding: 1em;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
}

.cr-award-title {
    display: block;
    margin: 0 0 .75em;
    color: #111827;
    font-size: 1.08em;
    font-weight: 700;
}

.cr-award-team + .cr-award-team {
    margin-top: .75em;
    padding-top: .75em;
    border-top: 1px dashed #e5e7eb;
}

.cr-award-empty { color: #4b5563; }

.trm-v2-podium-player {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.trm-v2-podium-media {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #eee;
    aspect-ratio: 16 / 9;
}

.trm-v2-podium-media .trm-v2-podium-avatar {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    border-radius: inherit;
    object-fit: cover;
    object-position: center;
}

.trm-v2-podium-player-name {
    display: block;
    margin-top: .55em;
    overflow: hidden;
    color: #222;
    font-size: 1.03em;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trm-v2-podium-team {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .45em;
    margin-top: .55em;
    color: #666;
    font-size: .86em;
    text-decoration: none;
}

.trm-v2-podium-team img {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    object-fit: cover;
}

.trm-v2-podium-team span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .cr-awards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 769px) {
    .result--individual-v2 .trm-v2-podium {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 736px) {
    .cr-award-card { padding: .85em; }
}

@media (max-width: 768px) {
    body.result-individual-v2-page #wrapper {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    body.result-individual-v2-page #main {
        box-sizing: border-box;
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .result.result--individual-v2 {
        display: block;
        box-sizing: border-box;
        width: calc(100% - 2em);
        max-width: calc(100% - 2em);
        min-width: 0;
    }

    .result.result--individual-v2 > section {
        display: block;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .cr-awards { grid-template-columns: 1fr; }
    .result--individual-v2 .trm-v2-podium {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .result--individual-v2 .trm-v2-podium .cr-award-card--individual,
    .result--individual-v2 .trm-v2-podium .individual-podium-body,
    .result--individual-v2 .trm-v2-podium .trm-v2-podium-player {
        box-sizing: border-box;
        grid-column: 1;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .result--individual-v2 .trm-v2-podium .individual-podium-body,
    .result--individual-v2 .trm-v2-podium .trm-v2-podium-player {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
        align-items: start;
    }
    .result--individual-v2 .trm-v2-podium .trm-v2-podium-media {
        grid-column: 1;
        justify-self: center;
        width: 100%;
        max-width: 320px;
        margin-right: auto;
        margin-left: auto;
    }
    .result--individual-v2 .trm-v2-podium .trm-v2-podium-player-name,
    .result--individual-v2 .trm-v2-podium .trm-v2-podium-team {
        grid-column: 1;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

/* Legacy Team Manual：仅统一 Match Card 视觉，Team/Proof/Winner 业务仍走旧 renderer。 */
#my-match-card.team-manual-my-match {
    border: 0;
    border-radius: 0;
}

/* MD160：单轮时间设定页，仅整理 View 层。 */
.round-time-editor-page #main {
    min-width: 0;
}

.round-time-editor {
    box-sizing: border-box;
    width: calc(100% - 2em);
    max-width: 860px;
    min-width: 0;
    margin: 1.25em auto 3em;
    padding: clamp(16px, 3vw, 30px);
}

.round-time-editor__header {
    margin-bottom: 1.4em;
    padding-bottom: 1.15em;
    border-bottom: 2px solid #34373a;
}

.round-time-editor__eyebrow {
    margin: 0 0 .35em;
    color: #8d1111;
    font-size: .78em;
    font-weight: 800;
    letter-spacing: .09em;
}

.round-time-editor__header h1 {
    margin: 0;
    color: #202326;
    font-size: clamp(1.55em, 3vw, 2.15em);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.round-time-editor__header h1 span {
    color: #8d1111;
}

.round-time-editor__round-name,
.round-time-editor__header h2 {
    margin: .35em 0 0;
    color: #4e5358;
    font-size: clamp(1em, 2vw, 1.18em);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.round-time-editor__round-name {
    font-weight: 700;
}

.round-time-editor__timezone {
    margin: .7em 0 0;
    color: #6d7277;
    font-size: .9em;
}

.round-time-editor__timezone strong {
    color: #2d3135;
}

.round-time-editor__form,
.round-time-editor__flow {
    min-width: 0;
}

.round-time-editor__field {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 1em;
    border: 1px solid #c7cacf;
    border-left: 4px solid #8d1111;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 9px rgba(31, 35, 39, .06);
}

.round-time-editor__field label {
    display: block;
    margin: 0 0 .55em;
    color: #24272a;
    font-size: 1em;
    font-weight: 800;
}

.round-time-editor__field input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
}

.round-time-editor__connector {
    position: relative;
    width: 2px;
    height: 24px;
    margin: 0 auto;
    background: #a9adb1;
}

.round-time-editor__connector::after {
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid #777c81;
    border-bottom: 2px solid #777c81;
    content: "";
    transform: translateX(-50%) rotate(45deg);
}

.round-time-editor__summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .35em 1em;
    margin: .7em 0 0;
    color: #666b70;
    font-size: .88em;
}

.round-time-editor__summary strong {
    color: #262a2e;
}

.round-time-editor__hint {
    margin: .65em 0 0;
    color: #6b7075;
    font-size: .84em;
    line-height: 1.55;
}

.round-time-editor__error {
    margin: .65em 0 0;
    padding: .55em .7em;
    border-left: 3px solid #a20f18;
    background: #fff0ee;
    color: #7e0d14;
    font-size: .86em;
    line-height: 1.45;
}

.round-time-editor__preview {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-top: 1.4em;
    padding: 1em;
    border: 1px solid #bfc3c7;
    border-radius: 8px;
    background: #f4f5f6;
}

.round-time-editor__preview h3 {
    margin: 0 0 .8em;
    color: #24272a;
    font-size: 1.05em;
}

.round-time-editor__preview-list {
    display: grid;
    gap: .5em;
    min-width: 0;
}

.round-time-editor__preview-row {
    display: grid;
    grid-template-columns: minmax(64px, .35fr) minmax(0, 1fr);
    align-items: center;
    gap: .75em;
    min-width: 0;
    padding: .7em .8em;
    border: 1px solid #d3d6d9;
    border-radius: 6px;
    background: #fff;
}

.round-time-editor__preview-row span {
    color: #3d4246;
    font-weight: 800;
}

.round-time-editor__preview-row strong {
    min-width: 0;
    color: #303438;
    font-size: .9em;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.round-time-editor__preview-row.is-past {
    border-color: #d8dadd;
    background: #eceeef;
    color: #70757a;
}

.round-time-editor__preview-row.is-active {
    border-color: #a20f18;
    border-left-width: 4px;
    background: #fff0ee;
    box-shadow: 0 2px 8px rgba(162, 15, 24, .09);
}

.round-time-editor__preview-row.is-future {
    border-color: #d4d7da;
    background: #fafafa;
}

.round-time-editor__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65em;
    margin-top: 1.25em;
}

.round-time-editor__button {
    display: inline-flex;
    box-sizing: border-box;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: .65em 1.25em;
    border: 1px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.round-time-editor__button--primary {
    border-color: #8d1111;
    background: #a20f18;
    color: #fff;
}

.round-time-editor__button--secondary {
    border-color: #858a8f;
    background: #fff;
    color: #34383c;
}

.round-time-editor__save-note {
    margin: .7em 0 0;
    color: #6c7176;
    font-size: .84em;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .round-time-editor {
        width: 100%;
        margin: .75em 0 2em;
        padding: 14px;
    }

    .round-time-editor__field,
    .round-time-editor__preview {
        padding: .8em;
    }

    .round-time-editor__preview-row {
        grid-template-columns: 1fr;
        gap: .25em;
    }

    .round-time-editor__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .round-time-editor__button {
        width: 100%;
    }
}

.team-manual-match-group-header {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: .5em;
    color: #666;
    font-size: 1.1em;
    font-weight: 700;
}

.team-manual-match-group-header > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.team-manual-match-status {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    color: #555;
    font-size: .86rem;
    font-weight: 700;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-group-actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
}

.team-manual-match-card-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0 !important;
    padding: 12px;
    overflow: hidden;
    border: 1px solid #c9c9c9;
    border-radius: 8px;
    background: #ededed;
    box-shadow: 0 3px 10px rgba(28, 32, 36, .12);
}

.team-manual-match-card {
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    align-items: stretch !important;
    width: 100%;
    max-width: 100%;
    gap: 10px;
    padding: 0;
    overflow: hidden;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none;
}

.team-manual-match-side {
    display: flex;
    min-width: 0;
    align-items: stretch;
}

.team-manual-match-team {
    box-sizing: border-box;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch !important;
    width: 100% !important;
    max-width: none;
    min-width: 0;
    min-height: 100%;
    gap: .65rem !important;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 7px;
    background: #f1f1f1;
    color: #292d31;
    box-shadow: inset 3px 0 0 #999;
}

.team-manual-match-team.is-current-user-team {
    border-color: #e10;
    background: #fff0ee;
    box-shadow: inset 4px 0 0 #e10, 0 0 0 2px rgba(238, 17, 0, .18);
}

.team-manual-match-team.is-winner {
    border-color: #bf8b00;
    background: #fff7cf;
    color: #292d31;
    box-shadow: inset 4px 0 0 #d5a000, 0 0 0 2px rgba(213, 160, 0, .2);
}

.team-manual-match-team.is-current-user-team.is-winner {
    box-shadow: inset 4px 0 0 #d5a000, 0 0 0 2px rgba(238, 17, 0, .55);
}

.team-manual-team-logo-link {
    display: block !important;
    align-self: stretch;
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    border: 2px solid #d2d5d8;
    border-radius: 8px !important;
    background: #fff;
    aspect-ratio: 16 / 9 !important;
}

.team-manual-team-logo {
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
}

.team-manual-team-name {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    color: #292d31 !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    line-height: 1.35;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-manual-match-team.is-winner .team-manual-team-name {
    color: #292d31 !important;
}

.team-manual-roster {
    box-sizing: border-box;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    width: 100%;
    min-width: 0;
    gap: 6px !important;
}

.team-manual-roster-member {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 25px;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 4px;
    padding: 6px;
    border: 1px solid #d7dade;
    border-radius: 6px;
    background: #fff;
    color: #3d4247;
}

.team-manual-member-identity {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.team-manual-member-identity + br,
.team-manual-member-identity br {
    display: none;
}

.team-manual-member-avatar {
    flex: 0 0 30px;
    width: 30px !important;
    height: 30px !important;
    margin: 0;
    border: 1px solid #d2d5d8;
}

.team-manual-member-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #444;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-manual-status-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    margin: 0 !important;
}

.team-manual-checkin-status { grid-column: 2; grid-row: 1; }
.team-manual-proof-status { grid-column: 3; grid-row: 1; }
.team-manual-checkin-action,
.team-manual-upload-panel {
    grid-column: 1 / -1;
}

.team-manual-status-action img {
    display: block;
    width: 19px !important;
    height: 19px;
    object-fit: contain;
}

.team-manual-proof-primary,
.team-manual-match-card .r1-upload-button {
    display: inline-flex;
    min-width: 30px;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 4px !important;
    border: 1px solid #b8bcc0 !important;
    border-radius: 6px !important;
    background: #f1f1f1 !important;
    color: #333 !important;
    cursor: pointer;
}

.team-manual-upload-panel {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-top: 6px !important;
    padding: 7px !important;
    overflow: hidden;
    border: 1px dashed #c5c8cc;
    border-radius: 6px;
    background: #f7f7f7;
}

.team-manual-upload-panel form,
.team-manual-upload-panel form > div {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.team-manual-upload-panel input[type="file"] {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px !important;
    font-size: 11px;
}

.team-manual-upload-panel form[action="proof_upload_action.php"] button {
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #a80f16;
    border-radius: 6px;
    background: #b31219;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.team-manual-upload-panel form[action="proof_upload_delete.php"] button {
    width: auto;
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid #aeb2b6;
    border-radius: 6px;
    background: transparent;
    color: #6b2529;
    font-size: 11px;
    font-weight: 700;
}

.team-manual-proof-preview {
    display: block;
    width: 100%;
    margin-top: 7px;
}

.team-manual-proof-area {
    box-sizing: border-box;
    width: 100%;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #d4d7da;
}

.team-manual-proof-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.team-manual-proof-gallery-link,
.team-manual-proof-upload {
    box-sizing: border-box;
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.team-manual-proof-gallery-link {
    position: relative;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid #8f9499;
    border-radius: 8px;
    background: #fff;
    color: #3f4449;
}

.team-manual-proof-gallery-icon {
    position: relative;
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.team-manual-proof-gallery-icon::after {
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 6px;
    height: 2px;
    background: currentColor;
    content: "";
    transform: rotate(45deg);
    transform-origin: left center;
}

.team-manual-proof-upload {
    border: 1px solid #8f0c12;
    background: #a90f17;
    color: #fff;
    cursor: pointer;
}

.team-manual-proof-thumbs {
    display: flex;
    width: 100%;
    gap: 5px;
    margin-top: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.team-manual-proof-thumbs a {
    display: block;
    flex: 0 0 44px;
    width: 44px;
    height: 36px;
    overflow: hidden;
    border: 1px solid #b9bdc1;
    border-radius: 5px;
    background: #ddd;
}

.team-manual-proof-thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-manual-match-team.is-winner .team-manual-proof-area {
    border-top-color: rgba(255, 255, 255, .32);
}

.team-manual-proof-thumbnail {
    display: block;
    width: 100% !important;
    max-width: 220px;
    height: 112px;
    margin: 0 auto;
    border: 1px solid #b9bdc1 !important;
    border-radius: 6px !important;
    object-fit: cover;
}

.team-manual-match-vs {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 !important;
    color: #5c6064 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .05em;
}

.team-manual-match-vs::before,
.team-manual-match-vs::after {
    width: 1px;
    height: 34%;
    background: #b9bdc1;
    content: "";
}

.team-manual-match-vs span {
    padding: 4px;
    border: 1px solid #777c81;
    border-radius: 999px;
    background: #34373a;
    color: #fff;
}

.team-manual-bye {
    justify-content: center;
    color: #777;
}

.team-manual-bye-visual {
    width: 78px !important;
    height: 78px;
    border: 1px solid #c9cdd1 !important;
    aspect-ratio: 1 / 1 !important;
}

@media (max-width: 480px) {
    .team-manual-match-card-wrap {
        padding: 6px;
    }

    .team-manual-match-group-header {
        flex-wrap: wrap;
    }

    .team-manual-match-status {
        flex: 1 1 100%;
        width: 100%;
        margin-left: 0;
        text-align: left;
    }

    .team-manual-match-card {
        grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
        gap: 4px;
        padding: 0;
    }

    .team-manual-match-team {
        gap: 6px !important;
        padding: 6px;
    }

    .team-manual-bye-visual {
        flex-basis: 52px;
        width: 52px !important;
        max-width: 52px;
        height: 52px;
    }

    .team-manual-team-name {
        font-size: 13px !important;
    }

    .team-manual-roster-member {
        grid-template-columns: minmax(0, 1fr) 22px;
        padding: 4px;
    }

    .team-manual-member-avatar {
        flex-basis: 25px;
        width: 25px !important;
        height: 25px !important;
    }

    .team-manual-member-name { font-size: 10px; }
    .team-manual-checkin-status { grid-column: 2; grid-row: 1; }
    .team-manual-proof-status { grid-column: 2; grid-row: 2; }
    .team-manual-member-identity { grid-row: 1 / 3; }
    .team-manual-status-action img { width: 17px !important; height: 17px; }
    .team-manual-match-vs { font-size: 9px !important; }
    .team-manual-match-vs::before,
    .team-manual-match-vs::after { display: none; }
    .team-manual-upload-panel { padding: 5px !important; }
    .team-manual-proof-thumbnail { height: 78px; }
    .team-manual-proof-toolbar { align-items: center; }
    .team-manual-proof-gallery-link { flex-basis: 36px; width: 36px; }
    .team-manual-proof-upload { flex: 1 1 100%; width: 100%; }
    .team-manual-proof-thumbs a { flex-basis: 38px; width: 38px; height: 32px; }
}
