/* 竞赛中心 — 深色赛事头图 + 浅色正文 */

:root {
    --ct-bg: #f3f5f8;
    --ct-ink: #0f172a;
    --ct-text: #1e293b;
    --ct-text-2: #64748b;
    --ct-text-3: #94a3b8;
    --ct-line: #e8ecf1;
    --ct-surface: #ffffff;
    --ct-surface-soft: #f8fafc;
    --ct-primary: #2563eb;
    --ct-primary-deep: #1d4ed8;
    --ct-primary-soft: #eff6ff;
    --ct-night: #0b1220;
    --ct-night-2: #111827;
    --ct-radius: 16px;
    --ct-radius-sm: 10px;
    --ct-shadow: 0 10px 36px -24px rgba(15, 23, 42, 0.45);
    --ct-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body:has(.ct-wrap) {
    background: var(--ct-bg);
}

.ct-wrap {
    min-height: calc(100vh - 120px);
    padding-bottom: 64px;
    background: var(--ct-bg);
}

/* ---- dark masthead (list) ---- */
.ct-masthead {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--ct-night);
    margin-bottom: -28px;
    padding-bottom: 56px;
}

.ct-masthead-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 340px at 18% 10%, rgba(37, 99, 235, 0.28), transparent 60%),
        radial-gradient(700px 280px at 88% 0%, rgba(14, 165, 233, 0.14), transparent 55%),
        linear-gradient(165deg, #0b1220 0%, #111827 48%, #0f172a 100%);
    pointer-events: none;
}

.ct-masthead-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
    opacity: 0.45;
}

.ct-masthead-inner {
    position: relative;
    z-index: 1;
    max-width: 1250px;
    margin: 0 auto;
    padding: 44px 15px 8px;
    animation: ct-rise 0.65s var(--ct-ease) both;
}

.ct-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 450;
    letter-spacing: 0.16em;
    color: rgba(147, 197, 253, 0.95);
}

.ct-kicker-on-dark {
    color: rgba(186, 230, 253, 0.9);
}

.ct-hero-title {
    margin: 0 0 14px;
    max-width: 12em;
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 450;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: #fff;
}

.ct-hero-desc {
    margin: 0;
    max-width: 36em;
    font-size: 15.5px;
    line-height: 1.75;
    color: rgba(226, 232, 240, 0.82);
}

.ct-hero-foot {
    margin: 22px 0 0;
    font-size: 13px;
    color: rgba(148, 163, 184, 0.95);
}

.ct-hero-foot strong {
    color: #fff;
    font-weight: 450;
}

/* ---- light page body ---- */
.ct-page,
.ct-detail-page {
    position: relative;
    z-index: 2;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 15px 0;
    color: var(--ct-text);
}

.ct-shell,
.ct-detail-shell {
    background: var(--ct-surface);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--ct-radius);
    box-shadow: var(--ct-shadow);
    overflow: hidden;
    animation: ct-rise 0.7s var(--ct-ease) 0.05s both;
}

.ct-tabs,
.ct-detail-tabs {
    display: flex;
    gap: 0;
    padding: 0 10px;
    border-bottom: 1px solid var(--ct-line);
    background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
}

.ct-tab,
.ct-detail-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 16px;
    color: var(--ct-text-3) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.ct-tab::after,
.ct-detail-tab::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 2px;
    background: transparent;
}

.ct-tab:hover,
.ct-detail-tab:hover {
    color: var(--ct-text) !important;
}

.ct-tab.active,
.ct-detail-tab.active {
    color: var(--ct-ink) !important;
}

.ct-tab.active::after,
.ct-detail-tab.active::after {
    background: var(--ct-primary);
}

/* ---- list cards ---- */
.ct-list {
    display: flex;
    flex-direction: column;
}

.ct-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 20px 22px;
    border-bottom: 1px solid var(--ct-line);
    text-decoration: none !important;
    color: inherit !important;
    transition: background 0.2s ease;
}

.ct-card:last-child {
    border-bottom: none;
}

.ct-card:hover {
    background: #f8fafc;
}

.ct-cover-wrap {
    display: block;
    width: 132px;
    aspect-ratio: 1 / 1;
    border-radius: var(--ct-radius-sm);
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.ct-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f1f5f9;
    transition: transform 0.5s var(--ct-ease);
}

.ct-card:hover .ct-cover {
    transform: scale(1.03);
}

.ct-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ct-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ct-title {
    font-size: 17px;
    font-weight: 450;
    letter-spacing: -0.02em;
    line-height: 1.35;
    color: var(--ct-ink);
}

.ct-card:hover .ct-title {
    color: var(--ct-primary-deep);
}

.ct-tag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--ct-primary-soft);
    color: var(--ct-primary-deep);
    font-size: 11px;
    font-weight: 450;
    line-height: 22px;
}

.ct-tag.is-rank {
    background: #fff7ed;
    color: #c2410c;
}

.ct-tag.on-dark {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.ct-tag.is-rank.on-dark {
    background: rgba(251, 146, 60, 0.18);
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.28);
}

.ct-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    color: var(--ct-text-3);
    font-size: 13px;
    line-height: 1.5;
}

.ct-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #cbd5e1;
}

.ct-side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    width: 112px;
    min-width: 112px;
}

.ct-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    font-size: 12px;
    font-weight: 450;
    color: var(--ct-text-3);
}

.ct-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.ct-status.is-running { color: #059669; }
.ct-status.is-running .ct-status-dot {
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.14);
    animation: ct-pulse 1.8s ease infinite;
}
.ct-status.is-upcoming { color: var(--ct-primary); }
.ct-status.is-ended { color: #94a3b8; }

.ct-status.on-dark {
    color: rgba(226, 232, 240, 0.78);
}
.ct-status.on-dark.is-running { color: #34d399; }
.ct-status.on-dark.is-upcoming { color: #93c5fd; }
.ct-status.on-dark.is-ended { color: rgba(148, 163, 184, 0.9); }

.ct-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 14px;
    border-radius: 9px;
    background: var(--ct-ink);
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ct-card:hover .ct-btn:not(.is-outline):not(.is-ghost) {
    background: var(--ct-primary);
}

.ct-btn.is-outline {
    background: transparent;
    color: var(--ct-ink);
    border: 1px solid #cbd5e1;
}

.ct-card:hover .ct-btn.is-outline {
    border-color: #94a3b8;
    color: var(--ct-ink);
    background: #fff;
}

/* 已结束：次要动作，不抢主按钮 */
.ct-btn.is-ghost {
    height: 32px;
    background: transparent;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    font-weight: 400;
    box-shadow: none;
}

.ct-card:hover .ct-btn.is-ghost {
    background: #f8fafc;
    color: #64748b;
    border-color: #cbd5e1;
}

.ct-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 64px 16px;
    text-align: center;
    color: var(--ct-text-3);
}

.ct-empty strong {
    color: var(--ct-text-2);
    font-size: 15px;
}

.ct-pager {
    padding: 14px 16px 18px;
    border-top: 1px solid var(--ct-line);
    background: var(--ct-surface-soft);
}

.ct-pager .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    float: none;
}

.ct-pager .pagination > li > a,
.ct-pager .pagination > li > span {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
    color: var(--ct-text-2);
    font-size: 13px;
    font-weight: 400;
    line-height: 34px;
    text-align: center;
}

.ct-pager .pagination > .active > a,
.ct-pager .pagination > .active > span {
    background: var(--ct-ink);
    border-color: var(--ct-ink);
    color: #fff;
}

.ct-pager .pagination > li > a:hover {
    border-color: #93c5fd;
    color: var(--ct-primary);
}

/* ---- detail dark mast ---- */
.ct-detail-mast {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--ct-night);
    margin-bottom: -28px;
    padding-bottom: 44px;
    min-height: 0;
}

.ct-detail-mast-bg {
    position: absolute;
    inset: 0;
    background: #0b1220 center/cover no-repeat;
    transform: scale(1.02);
    filter: saturate(0.92) brightness(0.72);
}

.ct-detail-mast-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(11, 18, 32, 0.92) 0%, rgba(11, 18, 32, 0.72) 42%, rgba(11, 18, 32, 0.45) 100%),
        linear-gradient(180deg, rgba(11, 18, 32, 0.35) 0%, rgba(11, 18, 32, 0.82) 100%);
    pointer-events: none;
}

.ct-detail-mast-inner {
    position: relative;
    z-index: 1;
    max-width: 1250px;
    margin: 0 auto;
    padding: 18px 15px 6px;
    animation: ct-rise 0.65s var(--ct-ease) both;
}

.ct-detail-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.ct-detail-head-main {
    min-width: 0;
    flex: 1;
}

.ct-detail-head-action {
    flex: 0 0 auto;
    padding-bottom: 6px;
}

.ct-apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 148px;
    height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #5b8cff 0%, #3b6ef5 100%);
    color: #fff !important;
    font-size: 16px;
    font-weight: 450;
    letter-spacing: 0.06em;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.ct-apply-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.42);
    color: #fff !important;
}

.ct-apply-btn.is-ghost {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: none;
}

.ct-apply-btn.is-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    filter: none;
}

.ct-apply-btn.is-done,
.ct-apply-btn.is-disabled,
.ct-apply-btn:disabled {
    background: rgba(148, 163, 184, 0.28);
    border: 1px solid rgba(226, 232, 240, 0.18);
    box-shadow: none;
    cursor: default;
    transform: none;
    filter: none;
    color: rgba(255, 255, 255, 0.78) !important;
}

.ct-detail-meta strong {
    color: #fff;
    font-weight: 450;
}

.ct-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.ct-crumb-on-dark {
    color: rgba(148, 163, 184, 0.95);
}

.ct-crumb-on-dark a {
    color: rgba(226, 232, 240, 0.88);
    text-decoration: none !important;
    font-weight: 400;
}

.ct-crumb-on-dark a:hover {
    color: #fff;
}

.ct-crumb-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.7);
}

.ct-crumb-current {
    max-width: 68%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(148, 163, 184, 0.95);
}

.ct-detail-title {
    margin: 0 0 10px;
    max-width: 18em;
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 450;
    letter-spacing: -0.035em;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.25);
}

.ct-detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ct-detail-meta {
    list-style: none;
    margin: 0;
    padding: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ct-detail-meta li {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 0 1 auto;
}

.ct-detail-meta em {
    font-style: normal;
    font-size: 11px;
    font-weight: 450;
    letter-spacing: 0.1em;
    color: rgba(148, 163, 184, 0.95);
}

.ct-detail-meta span {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(248, 250, 252, 0.96);
    word-break: break-word;
}

.ct-detail-page {
    padding-top: 0;
}

.ct-detail-section {
    padding: 20px 22px 24px;
}

.ct-md {
    color: #334155;
    font-size: 15px;
    line-height: 1.75;
}

.ct-md h2,
.ct-md h3,
.ct-md h4 {
    margin: 1.15em 0 0.5em;
    color: var(--ct-ink);
    font-weight: 450;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.ct-md h2 { font-size: 19px; }
.ct-md h3 { font-size: 16px; }
.ct-md p { margin: 0 0 0.75em; }
.ct-md img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}
.ct-md code {
    padding: 2px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #be185d;
    font-size: 0.92em;
}

.ct-md a {
    color: var(--ct-primary-deep);
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.28);
}

.ct-md a:hover {
    border-bottom-color: var(--ct-primary);
}

.ct-md blockquote {
    margin: 1em 0;
    padding: 10px 14px;
    border-left: 3px solid #cbd5e1;
    background: #f8fafc;
    color: var(--ct-text-2);
}

.ct-md-table-wrap {
    margin: 1.15em 0 1.35em;
    overflow-x: auto;
    border: 1px solid var(--ct-line);
    border-radius: 12px;
    background: #fff;
}

.ct-md-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

.ct-md-table th,
.ct-md-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ct-line);
    text-align: left;
    vertical-align: top;
    font-size: 13.5px;
    line-height: 1.55;
    color: #334155;
}

.ct-md-table th {
    background: #f8fafc;
    color: var(--ct-text-3);
    font-size: 12px;
    font-weight: 450;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ct-md-table tr:last-child td {
    border-bottom: none;
}

.ct-md-table tbody tr:hover td {
    background: #fafbfc;
}

.ct-muted {
    margin: 0;
    color: var(--ct-text-3);
}

.ct-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ct-table th,
.ct-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--ct-line);
    font-size: 14px;
    color: #334155;
    text-align: left;
}

.ct-table thead th {
    background: var(--ct-surface-soft);
    color: var(--ct-text-3);
    font-weight: 450;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.ct-table tbody tr:hover {
    background: #f8fafc;
}

.ct-problem-table .col-no {
    width: 88px;
    color: var(--ct-text-3);
    font-weight: 450;
    font-variant-numeric: tabular-nums;
}
.ct-problem-table .col-status {
    width: 100px;
    text-align: right;
    color: var(--ct-text-3);
}
.ct-problem-table .col-title a {
    color: var(--ct-primary-deep);
    text-decoration: none !important;
    font-weight: 400;
}
.ct-problem-table .col-title a:hover {
    text-decoration: underline !important;
}

.ct-empty-cell {
    text-align: center !important;
    color: var(--ct-text-3) !important;
    padding: 44px 16px !important;
}

.ct-rank-scroll {
    overflow-x: auto;
}

.ct-rank-table .col-rank { width: 72px; font-variant-numeric: tabular-nums; }
.ct-rank-table .col-user { min-width: 120px; }
.ct-rank-table .col-score { width: 72px; text-align: center; font-weight: 450; }
.ct-rank-table .col-cell { min-width: 68px; text-align: center; }

.rank-cell-head {
    color: var(--ct-ink);
    font-weight: 450;
}

.rank-cell-sub {
    color: var(--ct-text-3);
    font-size: 12px;
    font-weight: 400;
}

.rank-cell.ac {
    color: #059669;
    font-weight: 450;
}

.ct-detail-back {
    margin-top: 20px;
}

.ct-detail-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ct-text-2);
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease, gap 0.2s ease;
}

.ct-detail-back a:hover {
    color: var(--ct-primary);
    gap: 12px;
}

@keyframes ct-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ct-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12); }
    50% { box-shadow: 0 0 0 7px rgba(5, 150, 105, 0.04); }
}

/* practice / prep — 样式已迁移至 practice.css，此处仅作兼容兜底 */
.practice-page {
    /* moved */
}

.practice-banner,
.practice-banner-mask,
.practice-header,
.practice-section,
.practice-md,
.practice-table,
.practice-sets,
.practice-set-card,
.practice-set-cover,
.practice-set-meta {
    /* moved to /assets/css/practice.css */
}

.nav-prep {
    position: relative;
}

.site-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1031;
    background: #ff7a00;
    color: #fff;
    font-size: 13px;
    line-height: 1.2;
}

.site-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.site-cd {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex-wrap: wrap;
}

.site-cd-item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.site-cd-item:hover,
.site-cd-item:focus {
    color: #fff;
    text-decoration: none;
    opacity: 0.92;
}

.site-cd-name {
    opacity: 0.95;
}

.site-cd-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.site-promo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    white-space: nowrap;
}

.site-promo-star {
    font-size: 14px;
    line-height: 1;
}

.site-promo-text {
    color: #fff;
}

.site-promo-btn {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    background: #fff;
    color: #ff7a00;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    line-height: 18px;
}

.site-promo-btn:hover,
.site-promo-btn:focus {
    color: #e86e00;
    text-decoration: none;
    background: #fff7f0;
}

.site-promo-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
    opacity: 0.9;
}

.site-promo-close:hover {
    opacity: 1;
}

@media (max-width: 991px) {
    .site-topbar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .site-promo {
        margin-left: 0;
        width: 100%;
        flex-wrap: wrap;
        white-space: normal;
    }
}

.nav-prep > a {
    cursor: pointer;
}

#header-navbar .site-nav-main > li > a {
    position: relative;
    overflow: visible;
}

#header-navbar .nav-tag {
    display: inline-block;
    padding: 0 4px;
    height: 14px;
    line-height: 14px;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
    color: #fff;
    border-radius: 3px;
    letter-spacing: 0;
    white-space: nowrap;
    vertical-align: 1px;
}

/* 顶栏角标贴在菜单文字右上角，不挤进正文 */
#header-navbar .site-nav-main > li > a > .nav-tag {
    position: absolute;
    top: 6px;
    right: 2px;
    left: auto;
    z-index: 4;
    margin: 0;
    transform: none;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.nav-tag-red { background: #f5222d; color: #fff; }
.nav-tag-blue { background: #1677ff; color: #fff; }
.nav-tag-orange { background: #fa541c; color: #fff; }
.nav-tag-green { background: #52c41a; color: #fff; }
.nav-tag-cyan { background: #13c2c2; color: #fff; }

.prep-mega {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-42%);
    z-index: 1000;
    width: max-content;
    max-width: min(720px, calc(100vw - 24px));
    padding: 16px 8px 14px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .14);
}

.nav-prep:hover .prep-mega,
.nav-prep.open .prep-mega {
    display: flex;
    gap: 0;
}

.prep-mega-col {
    flex: 0 0 auto;
    width: 196px;
    padding: 4px 14px 2px;
}

.prep-mega-col + .prep-mega-col {
    border-left: 1px solid #eef0f3;
}

.prep-mega-title {
    margin: 0 0 8px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 450;
    letter-spacing: 0.04em;
    color: #8f959e;
}

.prep-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.prep-mega-list li {
    margin: 0;
}

.prep-mega-list a {
    display: block !important;
    height: auto !important;
    line-height: 1.35 !important;
    padding: 9px 8px !important;
    border-radius: 8px;
    color: #1f2329 !important;
    font-size: 14px;
    text-decoration: none !important;
    background: transparent !important;
}

.prep-mega-list a strong {
    display: block;
    font-size: 14px;
    font-weight: 650;
    color: inherit;
}

.prep-mega-list a span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #8f959e;
    font-weight: 400;
}

.prep-mega-list a:hover,
.prep-mega-list a:focus {
    background: #f5f8ff !important;
    color: #1677ff !important;
}

.prep-mega-list a:hover span,
.prep-mega-list a:focus span {
    color: #6b9fff;
}

@media (max-width: 768px) {
    .prep-mega {
        left: 0;
        right: 0;
        transform: none;
        width: auto;
        max-width: none;
        flex-direction: column;
        padding: 10px 8px;
    }

    .prep-mega-col {
        width: auto;
        padding: 6px 8px;
    }

    .prep-mega-col + .prep-mega-col {
        border-left: 0;
        border-top: 1px solid #eef0f3;
        margin-top: 4px;
        padding-top: 10px;
    }
}

@media (max-width: 960px) {
    .ct-detail-meta {
        gap: 8px 16px;
    }
}

@media (max-width: 768px) {
    .ct-masthead {
        margin-bottom: -20px;
        padding-bottom: 44px;
    }

    .ct-detail-head {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .ct-detail-head-action {
        padding-bottom: 0;
    }

    .ct-apply-btn {
        width: 100%;
    }

    .ct-masthead-inner {
        padding-top: 28px;
    }

    .ct-hero-title {
        font-size: 30px;
    }

    .ct-detail-mast {
        margin-bottom: -28px;
        padding-bottom: 52px;
        min-height: 0;
    }

    .ct-tabs,
    .ct-detail-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ct-tabs::-webkit-scrollbar,
    .ct-detail-tabs::-webkit-scrollbar {
        display: none;
    }

    .ct-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
    }

    .ct-cover-wrap {
        width: 100%;
        max-width: 200px;
    }

    .ct-cover {
        height: 100%;
    }

    .ct-side {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-width: 0;
        width: 100%;
    }

    .ct-status {
        width: auto;
        justify-content: flex-start;
    }

    .ct-btn {
        width: auto;
        min-width: 96px;
    }

    .ct-detail-meta {
        gap: 10px 14px;
    }

    .ct-detail-section {
        padding: 16px 14px 18px;
    }

    .ct-pager .pagination {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ct-pager .pagination::-webkit-scrollbar {
        display: none;
    }

    .prep-mega {
        position: static;
        box-shadow: none;
        border-radius: 0;
        min-width: 0;
        padding: 12px 16px;
    }

    .nav-prep:hover .prep-mega {
        display: none;
    }

    .nav-prep.open .prep-mega {
        display: flex;
        flex-direction: column;
    }

    .prep-mega-col + .prep-mega-col {
        border-left: none;
        border-top: 1px solid #e5e7eb;
        margin: 12px 0 0;
        padding: 12px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ct-masthead-inner,
    .ct-detail-mast-inner,
    .ct-shell,
    .ct-cover,
    .ct-status.is-running .ct-status-dot {
        animation: none !important;
        transition: none !important;
    }

    .ct-card:hover .ct-cover {
        transform: none;
    }
}
