/* 赛事中心 · 详情页（服务端聚合渲染 + 真题区 Vue 行列表）
   科技简约风；颜色 / 圆角 / 阴影统一引用 design-tokens.css 令牌。
   布局：外层全宽渐变 Hero + 内层 base-content-box 限宽容器。 */

.contest-detail {
    /* 页面级局部变量（不新增全局 token） */
    --ctd-max: 1200px;
    --ctd-pad: 24px;
    --ctd-hero-grad: linear-gradient(135deg, var(--tech-accent-strong) 0%, var(--tech-accent-2) 100%);
    --ctd-lv1: var(--tech-vip-grad);
    --ctd-lv2: var(--tech-grad);
    --ctd-lv3: linear-gradient(135deg, #10b981 0%, #047857 100%);
    --ctd-lv4: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);

    min-height: 70vh;
    padding: 0 0 56px;
    box-sizing: border-box;
    color: var(--tech-text);
    /* 科技背景与 Element Plus 主色由 .ds-app 提供 */
}

.contest-detail *,
.contest-detail *::before,
.contest-detail *::after {
    box-sizing: border-box;
}

.ctd-study-app[v-cloak] {
    display: none;
}

/* 限宽内层容器（对齐卡片最大宽度） */
.ctd-inner {
    width: 100%;
    /* max-width: var(--ctd-max); */
    margin: 0 auto;
    padding-left: var(--ctd-pad);
    padding-right: var(--ctd-pad);
}

/* ===================== 全宽渐变 Hero ===================== */
.ctd-hero {
    position: relative;
    width: 100%;
    padding: 40px 0 44px;
    overflow: hidden;
    background: var(--ctd-hero-grad);
    color: #fff;
}

.ctd-hero-cover {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .26;
}

.ctd-hero-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(680px 320px at 88% -10%, rgba(255, 255, 255, .22), transparent 62%),
        radial-gradient(560px 300px at 6% 120%, rgba(255, 255, 255, .14), transparent 60%);
    pointer-events: none;
}

.ctd-hero>.base-content-box {
    position: relative;
    z-index: 2;
}

/* 面包屑 */
.ctd-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: var(--font-sm);
    margin-bottom: 22px;
}

.ctd-crumb-link {
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}

.ctd-crumb-link:hover {
    color: #fff;
    text-decoration: underline;
}

.ctd-crumb-sep {
    color: rgba(255, 255, 255, .6);
}

.ctd-crumb-current {
    color: rgba(255, 255, 255, .78);
    max-width: 46ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hero 双栏 */
.ctd-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}

.ctd-hero-main {
    min-width: 0;
}

.ctd-hero-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    letter-spacing: .3px;
}

.ctd-hero-title-text {
    word-break: break-word;
}

/* 赛事 logo 方块（纯 CSS，首字 + 按 level 渐变） */
.ctd-logo {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    border-radius: var(--radius-lg);
    background: var(--ctd-lv2);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .25), inset 0 0 0 1px rgba(255, 255, 255, .28);
}

.ctd-logo.lv-1 {
    background: var(--ctd-lv1);
}

.ctd-logo.lv-2 {
    background: var(--ctd-lv2);
}

.ctd-logo.lv-3 {
    background: var(--ctd-lv3);
}

.ctd-logo.lv-4 {
    background: var(--ctd-lv4);
}

.ctd-hero-tags {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ctd-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .16);
    color: #fff;
    white-space: nowrap;
}

.ctd-hero-org {
    margin-top: 14px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: var(--font-md);
}

.ctd-org-label {
    color: rgba(255, 255, 255, .72);
}

.ctd-org-value {
    color: #fff;
    font-weight: 600;
}

.ctd-hero-intro {
    margin: 16px 0 0;
    /* max-width: 62ch; */
    font-size: var(--font-lg);
    line-height: 1.75;
    color: rgba(255, 255, 255, .86);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 3;
    overflow: hidden;
    word-break: break-word;
    white-space: pre-line;
}

/* 右侧半透明玻璃卡 */
.ctd-hero-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
}

.ctd-side-facts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ctd-fact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: var(--font-md);
}

.ctd-fact-label {
    color: rgba(255, 255, 255, .72);
    flex-shrink: 0;
}

.ctd-fact-value {
    color: #fff;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.ctd-fact-value b {
    font-size: var(--font-xl);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.ctd-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 20px;
    font-size: var(--font-lg);
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-md);
    background: var(--tech-vip-grad);
    box-shadow: 0 10px 24px rgba(245, 158, 11, .35);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.ctd-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(245, 158, 11, .42);
}

.ctd-hero-link {
    align-self: center;
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, .88);
    text-decoration: none;
}

.ctd-hero-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Hero · 状态备注 / 推荐 / 白名单 / 完整度 / 赛季 / 学段 */
.ctd-status-note {
    margin-top: 10px;
    max-width: 62ch;
    font-size: var(--font-sm);
    line-height: 1.6;
    color: rgba(255, 255, 255, .78);
}

.ctd-tag-recommend {
    color: #7c2d12;
    background: var(--tech-warning-soft);
    border-color: rgba(245, 158, 11, .55);
    font-weight: 700;
}

.ctd-tag-season {
    color: rgba(255, 255, 255, .92);
    background: rgba(255, 255, 255, .10);
}

.ctd-tag-completeness.lv-high {
    color: #fff;
    background: rgba(16, 185, 129, .30);
    border-color: rgba(16, 185, 129, .55);
}

.ctd-tag-completeness.lv-medium {
    color: #fff;
    background: rgba(255, 255, 255, .18);
}

.ctd-tag-completeness.lv-low {
    color: #fff;
    background: rgba(245, 158, 11, .26);
    border-color: rgba(245, 158, 11, .50);
}

.ctd-tag-whitelist {
    color: #ecfdf5;
    background: rgba(16, 185, 129, .26);
    border-color: rgba(16, 185, 129, .50);
}

.ctd-tag-whitelist.is-expired {
    color: #fff7ed;
    background: rgba(245, 158, 11, .26);
    border-color: rgba(245, 158, 11, .50);
}

/* Hero · 活动性质 */
.ctd-tag-activity {
    color: #eef2ff;
    background: rgba(99, 102, 241, .30);
    border-color: rgba(165, 180, 252, .55);
}

.ctd-hero-whitelists {
    margin-top: 8px;
}

.ctd-org-link {
    align-self: center;
    font-size: var(--font-xs);
    color: rgba(255, 255, 255, .88);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ctd-org-link:hover {
    color: #fff;
}

.ctd-hero-stages {
    flex-wrap: wrap;
}

.ctd-hero-stage-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ctd-hero-stage {
    padding: 2px 9px;
    font-size: var(--font-xs);
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .30);
    border-radius: var(--radius-pill);
}

/* Hero 次级按钮（立即报名为主按钮时，备赛专区降为次级） */
.ctd-hero-btn-ghost {
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .40);
    box-shadow: none;
}

.ctd-hero-btn-ghost:hover {
    background: rgba(255, 255, 255, .24);
    box-shadow: none;
}

/* ===================== 赛区切换条 ===================== */
.ctd-regions {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 14px 18px;
    background: var(--tech-panel);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.ctd-regions-label {
    flex-shrink: 0;
    padding-top: 6px;
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--tech-text-2);
}

.ctd-region-chips {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ctd-region-chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 14px;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--tech-text-2);
    text-decoration: none;
    background: var(--tech-panel-2);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-pill);
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
        border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.ctd-region-chip:hover {
    color: var(--tech-accent-strong);
    border-color: rgba(14, 165, 233, .40);
}

.ctd-region-chip.is-active {
    color: #fff;
    background: var(--tech-grad);
    border-color: transparent;
    box-shadow: var(--shadow-brand);
}

.ctd-region-window {
    font-size: var(--font-xs);
    font-weight: 500;
    opacity: .82;
    font-variant-numeric: tabular-nums;
}

/* ===================== 官方信息 ===================== */
.ctd-official-card {
    padding: 18px 20px;
    background: var(--tech-panel);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.ctd-official-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--tech-line);
    font-size: var(--font-sm);
    color: var(--tech-text-2);
}

.ctd-official-flag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--tech-accent-strong);
    background: var(--tech-accent-soft);
    border: 1px solid var(--tech-accent-line);
    border-radius: var(--radius-pill);
}

.ctd-official-src {
    color: var(--tech-text-2);
}

.ctd-official-link,
.ctd-official-inline-link {
    color: var(--tech-accent-strong);
    font-weight: 600;
    text-decoration: none;
}

.ctd-official-link:hover,
.ctd-official-inline-link:hover {
    text-decoration: underline;
}

.ctd-official-verified {
    margin-left: auto;
    font-size: var(--font-xs);
    color: var(--tech-text-3);
    font-variant-numeric: tabular-nums;
}

.ctd-stale-warn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    font-size: var(--font-sm);
    font-weight: 600;
    color: #b45309;
    background: var(--tech-warning-soft);
    border: 1px solid rgba(245, 158, 11, .40);
    border-left: 3px solid var(--tech-warning);
    border-radius: var(--radius-md);
}

.ctd-official-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    margin-top: 14px;
}

.ctd-official-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    font-size: var(--font-sm);
}

.ctd-official-k {
    flex-shrink: 0;
    color: var(--tech-text-3);
}

.ctd-official-v {
    color: var(--tech-text);
    font-weight: 600;
    word-break: break-word;
}

.ctd-disclaimer {
    margin: 14px 0 0;
    padding-top: 12px;
    font-size: var(--font-xs);
    line-height: 1.7;
    color: var(--tech-text-3);
    border-top: 1px dashed var(--tech-line);
}

/* ===================== 主体 ===================== */
.ctd-body {
    padding-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.ctd-section {
    display: flex;
    flex-direction: column;
}

.ctd-section-head {
    margin-bottom: 16px;
}

.ctd-section-title {
    margin: 0;
    font-size: var(--font-2xl);
    font-weight: 700;
    color: var(--tech-text);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ctd-section-title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 22px;
    border-radius: calc(var(--radius-xs) / 2);
    background: var(--tech-grad-bar);
}

.ctd-section-sub {
    margin: 8px 0 0 17px;
    font-size: var(--font-md);
    color: var(--tech-text-2);
}

/* ===================== 赛事概览：四宫格 ===================== */
.ctd-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.ctd-ov-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: var(--tech-panel);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.ctd-ov-card:hover {
    transform: translateY(var(--lift));
    box-shadow: var(--shadow-hover);
    border-color: rgba(14, 165, 233, .35);
}

.ctd-ov-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-lg);
    font-weight: 800;
    color: #fff;
    border-radius: var(--radius-md);
    background: var(--tech-grad);
    box-shadow: var(--shadow-brand);
}

.ctd-ov-title {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--tech-text);
}

.ctd-ov-body {
    font-size: var(--font-sm);
    color: var(--tech-text-2);
    min-height: 40px;
}

.ctd-ov-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ctd-ov-chip {
    padding: 3px 10px;
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--tech-accent-strong);
    background: var(--tech-accent-soft);
    border: 1px solid var(--tech-accent-line);
    border-radius: var(--radius-pill);
}

.ctd-ov-flow {
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--tech-text);
    line-height: 1.7;
    word-break: break-word;
}

.ctd-ov-awards {
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--tech-text);
    line-height: 1.7;
    word-break: break-word;
}

.ctd-ov-time {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ctd-ov-time+.ctd-ov-time {
    margin-top: 6px;
}

.ctd-ov-time-label {
    flex-shrink: 0;
    font-size: var(--font-xs);
    color: var(--tech-text-2);
    background: var(--tech-panel-2);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-pill);
    padding: 2px 8px;
}

.ctd-ov-time-value {
    color: var(--tech-text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.ctd-ov-empty {
    color: var(--tech-text-3);
}

/* ===================== 赛程时间轴 ===================== */
.ctd-timeline {
    position: relative;
    padding: 4px 0;
}

.ctd-tl-item {
    position: relative;
    display: flex;
    gap: 16px;
    padding-bottom: 18px;
}

.ctd-tl-item:last-child {
    padding-bottom: 0;
}

.ctd-tl-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 30px;
    bottom: 0;
    width: 2px;
    background: var(--tech-line);
}

/* 平行批次：无时间轴序号与连接线，卡片平铺 */
.ctd-tl-item.is-parallel {
    gap: 0;
    padding-bottom: 12px;
}

.ctd-tl-item.is-parallel .ctd-tl-rail,
.ctd-tl-item.is-parallel::after {
    display: none;
}

.ctd-tl-rail {
    position: relative;
    flex: 0 0 22px;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.ctd-tl-dot {
    width: 14px;
    height: 14px;
    margin-top: 18px;
    border-radius: var(--radius-circle);
    background: var(--tech-panel-2);
    border: 3px solid var(--tech-panel);
    box-shadow: 0 0 0 2px var(--tech-line);
}

.ctd-tl-item.s-1 .ctd-tl-dot {
    background: var(--tech-accent);
    box-shadow: 0 0 0 2px var(--tech-accent-line), 0 0 0 6px var(--tech-accent-soft);
}

.ctd-tl-item.s-2 .ctd-tl-dot {
    background: var(--tech-success);
    box-shadow: 0 0 0 2px var(--tech-success-soft);
}

.ctd-tl-item.s-3 .ctd-tl-dot {
    background: var(--tech-warning);
    box-shadow: 0 0 0 2px var(--tech-warning-soft);
}

.ctd-tl-card {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    background: var(--tech-panel);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.ctd-tl-item.s-1 .ctd-tl-card {
    border-color: var(--tech-accent-line);
    box-shadow: var(--shadow-sm);
}

.ctd-tl-card:hover {
    box-shadow: var(--shadow-md);
}

.ctd-tl-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ctd-tl-name {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--tech-text);
    word-break: break-word;
}

.ctd-tl-badge {
    flex-shrink: 0;
    padding: 3px 10px;
    font-size: var(--font-xs);
    font-weight: 600;
    border-radius: var(--radius-pill);
}

.ctd-tl-badge.s-0 {
    color: var(--tech-text-2);
    background: var(--tech-info-soft);
}

.ctd-tl-badge.s-1 {
    color: var(--tech-accent-strong);
    background: var(--tech-accent-soft);
}

.ctd-tl-badge.s-2 {
    color: #047857;
    background: var(--tech-success-soft);
}

.ctd-tl-badge.s-3 {
    color: #b45309;
    background: var(--tech-warning-soft);
}

.ctd-tl-time {
    margin-top: 6px;
    font-size: var(--font-sm);
    color: var(--tech-text-2);
    font-variant-numeric: tabular-nums;
}

.ctd-time-sep {
    margin: 0 6px;
}

/* 阶段徽标与元信息 */
.ctd-tl-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
}

.ctd-tl-tags {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ctd-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    font-size: var(--font-xs);
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-pill);
    border: 1px solid var(--tech-line);
    background: var(--tech-panel-2);
    color: var(--tech-text-2);
    white-space: nowrap;
}

.ctd-badge-type {
    color: var(--tech-accent-strong);
    background: var(--tech-accent-soft);
    border-color: var(--tech-accent-line);
}

.ctd-badge-region {
    color: #6d28d9;
    background: rgba(99, 102, 241, .10);
    border-color: rgba(99, 102, 241, .28);
}

.ctd-badge-batch {
    color: var(--tech-accent-strong);
    background: var(--tech-info-soft);
    border-color: var(--tech-accent-line);
}

.ctd-tl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: 6px;
    font-size: var(--font-sm);
    line-height: 1.6;
    color: var(--tech-text-2);
}

.ctd-tl-meta-k {
    flex-shrink: 0;
    color: var(--tech-text-3);
}

.ctd-tl-meta-v {
    color: var(--tech-text);
    word-break: break-word;
    font-variant-numeric: tabular-nums;
}

/* ===================== 参赛组别 ===================== */
.ctd-dim+.ctd-dim {
    margin-top: 20px;
}

.ctd-dim-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--tech-accent-strong);
}

.ctd-dim-title::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--radius-circle);
    background: var(--tech-grad);
}

.ctd-group-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ctd-group-card {
    position: relative;
    padding: 16px 18px;
    background: var(--tech-panel);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.ctd-group-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--tech-grad-line);
}

.ctd-group-card:hover {
    transform: translateY(var(--lift));
    box-shadow: var(--shadow-hover);
    border-color: rgba(14, 165, 233, .35);
}

.ctd-group-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--tech-text);
    margin-bottom: 8px;
}

.ctd-group-range {
    display: inline-block;
    padding: 3px 10px;
    font-size: var(--font-xs);
    color: var(--tech-accent-strong);
    background: var(--tech-accent-soft);
    border: 1px solid var(--tech-accent-line);
    border-radius: var(--radius-pill);
}

.ctd-group-desc {
    margin-top: 10px;
    font-size: var(--font-sm);
    color: var(--tech-text-2);
    line-height: 1.6;
    word-break: break-word;
}

/* ===================== 奖项设置 ===================== */
.ctd-award-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ctd-award-card {
    padding: 16px 18px;
    background: var(--tech-panel);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.ctd-award-card:hover {
    transform: translateY(var(--lift));
    box-shadow: var(--shadow-hover);
    border-color: rgba(245, 158, 11, .40);
}

.ctd-award-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.ctd-award-medal {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-md);
    color: #fff;
    border-radius: var(--radius-circle);
    background: var(--tech-vip-grad);
    box-shadow: 0 4px 10px rgba(245, 158, 11, .35);
}

.ctd-award-name {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--tech-text);
    word-break: break-word;
}

.ctd-award-group {
    font-size: var(--font-xs);
    color: var(--tech-text-2);
    background: var(--tech-panel-2);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-pill);
    padding: 2px 9px;
    display: inline-block;
    margin-bottom: 10px;
}

.ctd-award-region {
    color: #6d28d9;
    background: rgba(99, 102, 241, .10);
    border-color: rgba(99, 102, 241, .28);
}

.ctd-award-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ctd-award-row {
    display: flex;
    gap: 8px;
    font-size: var(--font-sm);
    line-height: 1.6;
}

.ctd-award-row .k {
    flex-shrink: 0;
    color: var(--tech-text-3);
}

.ctd-award-row .v {
    color: var(--tech-text-2);
    word-break: break-word;
}

/* ===================== 真题试卷（行列表 + 筛选，供备赛专区真题 Tab 复用） ===================== */
.ctd-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    background: var(--tech-panel);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.ctd-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ctd-filter-label {
    flex-shrink: 0;
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--tech-text-2);
    line-height: 30px;
}

.ctd-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ctd-chip {
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--tech-text-2);
    background: var(--tech-panel-2);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.ctd-chip:hover {
    color: var(--tech-accent-strong);
    border-color: rgba(14, 165, 233, .40);
}

.ctd-chip.active {
    color: #fff;
    background: var(--tech-grad);
    border-color: transparent;
    box-shadow: var(--shadow-brand);
}

.ctd-paper-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ctd-paper-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto auto;
    gap: 20px;
    align-items: center;
    padding: 16px 20px;
    background: var(--tech-panel);
    border: 1px solid var(--tech-line);
    border-left: 3px solid rgba(14, 165, 233, .55);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.ctd-paper-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(14, 165, 233, .40);
    border-left-color: var(--tech-accent);
}

.ctd-paper-year {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(14, 165, 233, .10) 0%, rgba(99, 102, 241, .10) 100%);
    border: 1px solid var(--tech-accent-line);
}

.ctd-year-num {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--tech-accent-strong);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ctd-year-unit {
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--tech-text-2);
}

.ctd-paper-main {
    min-width: 0;
}

.ctd-paper-title {
    margin: 0 0 8px;
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--tech-text);
    line-height: 1.5;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.ctd-paper-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: var(--font-sm);
    color: var(--tech-text-2);
    font-variant-numeric: tabular-nums;
}

.ctd-paper-meta span+span::before {
    content: '|';
    margin-right: 8px;
    color: var(--tech-line);
}

.ctd-paper-tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ctd-ptag {
    padding: 2px 9px;
    font-size: var(--font-xs);
    color: var(--tech-text-2);
    background: var(--tech-panel-2);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-pill);
}

.ctd-paper-state {
    flex-shrink: 0;
}

.ctd-attempt {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 4px 11px;
    font-size: var(--font-xs);
    font-weight: 600;
    border-radius: var(--radius-pill);
}

.ctd-attempt.is-none {
    color: var(--tech-text-2);
    background: var(--tech-info-soft);
}

.ctd-attempt.is-doing {
    color: #b45309;
    background: var(--tech-warning-soft);
}

.ctd-attempt.is-done {
    color: #047857;
    background: var(--tech-success-soft);
}

.ctd-paper-action {
    flex-shrink: 0;
    min-width: 140px;
    display: flex;
    justify-content: flex-end;
}

.ctd-go-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: var(--font-md);
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-md);
    background: var(--tech-grad);
    box-shadow: var(--shadow-brand);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.ctd-go-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(14, 165, 233, .34);
}

.ctd-go-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--tech-text-3);
    background: var(--tech-panel-2);
    border: 1px dashed var(--tech-line);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: not-allowed;
}

/* 占位空态 */
.ctd-empty {
    padding: 28px 0;
    text-align: center;
    font-size: var(--font-md);
    color: var(--tech-text-2);
    background: var(--tech-panel-2);
    border: 1px dashed var(--tech-line);
    border-radius: var(--radius-lg);
}

/* ===================== 响应式 ===================== */
@media (max-width: 1024px) {
    .ctd-hero-grid {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 24px;
    }

    .ctd-hero-title {
        font-size: 28px;
    }

    .ctd-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ctd-group-grid,
    .ctd-award-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ctd-paper-row {
        grid-template-columns: 84px minmax(0, 1fr) auto;
        gap: 16px;
    }

    .ctd-paper-action {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .contest-detail {
        --ctd-pad: 16px;
        padding: 0 0 40px;
    }

    .ctd-hero {
        padding: 28px 0 32px;
    }

    .ctd-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .ctd-hero-side {
        width: 100%;
    }

    .ctd-hero-title {
        font-size: 24px;
        gap: 12px;
    }

    .ctd-logo {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .ctd-body {
        padding-top: 24px;
        gap: 26px;
    }

    .ctd-overview,
    .ctd-group-grid,
    .ctd-award-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ctd-filter-row {
        flex-direction: column;
        gap: 8px;
    }

    .ctd-filter-label {
        line-height: 1.4;
    }

    .ctd-paper-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .ctd-paper-year {
        justify-content: flex-start;
        width: fit-content;
    }

    .ctd-paper-action {
        justify-content: stretch;
    }

    .ctd-go-btn,
    .ctd-go-disabled {
        width: 100%;
    }
}

/* ===================== 备赛专区（三 Tab：题库练习 / 试卷包 / 真题试卷） ===================== */
.ctd-study-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -6px 0 16px;
    padding: 9px 14px;
    font-size: var(--font-sm);
    color: var(--tech-text-2);
    background: var(--tech-panel-2);
    border: 1px dashed var(--tech-line);
    border-left: 3px solid var(--tech-accent-line);
    border-radius: var(--radius-md);
}

.ctd-study-app {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* 资源性质徽标 */
.ctd-res-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.ctd-kind {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    font-size: var(--font-xs);
    font-weight: 600;
    line-height: 1.5;
    color: var(--tech-text-2);
    background: var(--tech-panel-2);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.ctd-kind.kind-0 {
    color: var(--tech-text-3);
    background: var(--tech-panel-2);
    border-color: var(--tech-line);
}

.ctd-kind.kind-1 {
    color: #047857;
    background: var(--tech-success-soft);
    border-color: rgba(16, 185, 129, .32);
}

.ctd-kind.kind-2 {
    color: #b45309;
    background: var(--tech-warning-soft);
    border-color: rgba(245, 158, 11, .32);
}

.ctd-kind.kind-3 {
    color: var(--tech-accent-strong);
    background: var(--tech-accent-soft);
    border-color: var(--tech-accent-line);
}

.ctd-kind.kind-4 {
    color: #6d28d9;
    background: rgba(99, 102, 241, .10);
    border-color: rgba(99, 102, 241, .28);
}

.ctd-kind.is-region {
    color: #6d28d9;
    background: rgba(99, 102, 241, .10);
    border-color: rgba(99, 102, 241, .28);
}

/* Tab 头 */
.ctd-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--tech-line);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ctd-tabs::-webkit-scrollbar {
    display: none;
}

.ctd-tab {
    position: relative;
    flex: 0 0 auto;
    appearance: none;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--tech-text-2);
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: color var(--dur-fast) var(--ease);
}

.ctd-tab::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 3px;
    border-radius: var(--radius-pill);
    background: transparent;
    transition: background var(--dur-fast) var(--ease);
}

.ctd-tab:hover {
    color: var(--tech-accent-strong);
}

.ctd-tab.active {
    color: var(--tech-accent-strong);
}

.ctd-tab.active::after {
    background: var(--tech-grad);
}

.ctd-tab-count {
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--tech-text-2);
    background: var(--tech-panel-2);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-pill);
    font-variant-numeric: tabular-nums;
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.ctd-tab.active .ctd-tab-count {
    color: #fff;
    background: var(--tech-grad);
    border-color: transparent;
}

.ctd-study-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 维度标签 */
.ctd-dims {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ctd-ptag.is-more {
    color: var(--tech-accent-strong);
    background: var(--tech-accent-soft);
    border-color: var(--tech-accent-line);
}

/* 题库练习：行式列表 */
.ctd-cat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ctd-cat-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    background: var(--tech-panel);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.ctd-cat-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(14, 165, 233, .40);
}

.ctd-cat-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-xl);
    font-weight: 800;
    color: #fff;
    border-radius: var(--radius-md);
    background: var(--tech-grad);
    box-shadow: var(--shadow-brand);
}

.ctd-cat-main {
    min-width: 0;
}

.ctd-cat-name {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--tech-text);
    line-height: 1.5;
    word-break: break-word;
}

.ctd-cat-desc {
    margin-top: 4px;
    font-size: var(--font-sm);
    color: var(--tech-text-2);
    line-height: 1.6;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.ctd-cat-count {
    flex-shrink: 0;
    font-size: var(--font-sm);
    color: var(--tech-text-2);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.ctd-cat-count b {
    font-size: var(--font-xl);
    font-weight: 800;
    color: var(--tech-accent-strong);
    margin-right: 2px;
}

.ctd-cat-action {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
}

/* 试卷包：卡片网格 */
.ctd-pack-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ctd-pack-card {
    display: flex;
    flex-direction: column;
    padding: 18px 20px;
    background: var(--tech-panel);
    border: 1px solid var(--tech-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.ctd-pack-card:hover {
    transform: translateY(var(--lift));
    box-shadow: var(--shadow-hover);
    border-color: rgba(14, 165, 233, .35);
}

.ctd-pack-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.ctd-pack-name {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--tech-text);
    line-height: 1.45;
    word-break: break-word;
}

.ctd-pack-owned {
    flex-shrink: 0;
    padding: 2px 9px;
    font-size: var(--font-xs);
    font-weight: 600;
    color: #047857;
    background: rgba(16, 185, 129, .12);
    border: 1px solid rgba(16, 185, 129, .38);
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.ctd-pack-badges {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.ctd-pack-sku {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: var(--font-xs);
    color: var(--tech-text-3);
    word-break: break-all;
}

.ctd-pack-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: var(--font-sm);
    color: var(--tech-text-2);
    font-variant-numeric: tabular-nums;
}

.ctd-pack-meta span+span::before {
    content: '|';
    margin-right: 8px;
    color: var(--tech-line);
}

.ctd-pack-price {
    margin-top: 12px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.ctd-price-now {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--tech-accent-strong);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.ctd-price-now .cur {
    font-size: var(--font-md);
    font-weight: 700;
    margin-right: 2px;
}

.ctd-price-old {
    font-size: var(--font-sm);
    color: var(--tech-text-3);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

.ctd-pack-action {
    margin-top: auto;
    padding-top: 14px;
}

.ctd-pack-action .ctd-go-btn {
    width: 100%;
}

/* 真题试卷：已含试卷包标记 */
.ctd-inpack {
    display: inline-flex;
    align-items: center;
    margin: 0 0 8px;
    padding: 2px 9px;
    font-size: var(--font-xs);
    font-weight: 600;
    color: #b45309;
    background: rgba(245, 158, 11, .12);
    border: 1px solid rgba(245, 158, 11, .35);
    border-radius: var(--radius-pill);
    word-break: break-word;
}

.ctd-res-tags .ctd-inpack {
    margin: 0;
}

.ctd-paper-product {
    color: #b45309;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .ctd-pack-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ctd-cat-row {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 14px;
    }

    .ctd-cat-icon {
        width: 44px;
        height: 44px;
        font-size: var(--font-lg);
    }

    .ctd-cat-action {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .ctd-cat-action .ctd-go-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .ctd-tab {
        padding: 11px 10px;
        font-size: var(--font-md);
    }

    .ctd-pack-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ctd-cat-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 14px 16px;
    }

    .ctd-cat-count {
        order: 1;
    }

    .ctd-cat-action {
        order: 2;
    }

    /* 赛区切换 / 官方信息 / 备赛徽标：窄屏换行 */
    .ctd-regions {
        padding: 12px 14px;
    }

    .ctd-regions-label {
        width: 100%;
        padding-top: 0;
    }

    .ctd-region-chip {
        padding: 6px 12px;
    }

    .ctd-official-card {
        padding: 14px 16px;
    }

    .ctd-official-bar {
        align-items: flex-start;
    }

    .ctd-official-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .ctd-official-verified {
        margin-left: 0;
    }

    .ctd-pack-badges {
        justify-content: flex-start;
    }

    .ctd-tl-top {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .ctd-study-note {
        margin-top: -2px;
    }
}
