/* Figma Exact Replica Styles */
:root {
    --cf-white-surface-bg: rgba(255, 255, 255, 0.94);
    --cf-white-surface-border: rgba(226, 232, 240, 0.86);
    --cf-white-surface-shadow: 0 18px 42px -30px rgba(15, 23, 42, 0.46),
                               0 8px 18px -16px rgba(37, 99, 235, 0.18),
                               inset 0 1px 0 rgba(255, 255, 255, 0.92);
    --cf-white-surface-shadow-hover: 0 22px 52px -30px rgba(15, 23, 42, 0.52),
                                     0 12px 24px -16px rgba(37, 99, 235, 0.24),
                                     inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.fig-page {
    min-height: 100vh;
    background: #F7F9FC;
    color: #111827;
    font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}

.fig-home-header {
    height: 80px;
    background: #FFFFFF;
    border-bottom: 1px solid #E0E8F2;
    position: relative;
}

.fig-home-header-inner {
    position: relative;
    width: min(1440px, 100%);
    height: 80px;
    margin: 0 auto;
}

.fig-home-brand {
    position: absolute;
    left: 32px;
    top: 20px;
    width: 220px;
    height: 40px;
    text-decoration: none;
    color: inherit;
}

.fig-home-brand span {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    color: #FFFFFF;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
}

.fig-home-brand strong {
    position: absolute;
    left: 52px;
    top: 3px;
    color: #0F1729;
    font-size: 16px;
    font-weight: 700;
    line-height: 21px;
}

.fig-home-brand em {
    position: absolute;
    left: 52px;
    top: 25px;
    color: #57637A;
    font-size: 10px;
    font-weight: 400;
    line-height: 14px;
    font-style: normal;
}

.fig-home-tabs {
    position: absolute;
    left: 462px;
    top: 0;
    height: 80px;
    display: flex;
    align-items: center;
    gap: 34px;
}

.fig-home-tabs a {
    display: flex;
    align-items: center;
    height: 80px;
    color: #4B5563;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    position: relative;
}

.fig-home-tabs a.active {
    color: #2563EB;
}

.fig-home-tabs a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 34px;
    height: 3px;
    transform: translateX(-50%);
    background: #2563EB;
    border-radius: 2px;
}

.fig-top-search {
    position: absolute;
    right: 32px;
    top: 22px;
    width: 260px;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
}

.fig-top-search span {
    color: #94A3B8;
    font-size: 14px;
}

.fig-top-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #111827;
    font-size: 13px;
}

.fig-top-search input::placeholder {
    color: #94A3B8;
}

.fig-home-main {
    width: 1200px;
    margin: 0 auto;
    padding-top: 36px;
}

.fig-home-hero-card {
    width: 1200px;
    height: 292px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: var(--cf-white-surface-shadow);
    position: relative;
}

.fig-home-hero-left {
    position: absolute;
    left: 40px;
    top: 34px;
    width: 580px;
}

.fig-home-blue-label {
    margin: 0;
    color: #2563EB;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

.fig-home-hero-left h1 {
    margin: 14px 0 0;
    color: #111827;
    font-size: 56px;
    font-weight: 800;
    line-height: 68px;
    letter-spacing: -0.03em;
}

.fig-home-hero-left h2 {
    margin: 10px 0 0;
    color: #111827;
    font-size: 30px;
    font-weight: 700;
    line-height: 38px;
}

.fig-home-hero-left > p:not(.fig-home-blue-label) {
    margin: 12px 0 0;
    color: #6B7280;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

.fig-hero-search {
    margin-top: 20px;
    width: 520px;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 0 18px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 23px;
}

.fig-hero-search span {
    color: #94A3B8;
    font-size: 15px;
}

.fig-hero-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #111827;
    font-size: 13px;
}

.fig-hero-search input::placeholder {
    color: #9CA3AF;
}

.fig-hero-search button {
    width: 74px;
    height: 32px;
    border: none;
    border-radius: 16px;
    background: #2563EB;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.fig-home-recommend-board {
    position: absolute;
    left: 730px;
    top: 32px;
    width: 430px;
    height: 236px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--cf-white-surface-shadow);
}

.fig-board-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.fig-board-title strong {
    display: block;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    line-height: 20px;
}

.fig-board-title em {
    display: block;
    color: #6B7280;
    font-size: 12px;
    line-height: 17px;
    font-style: normal;
    margin-top: 2px;
}

.fig-board-title a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 26px;
    color: #2563EB;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 13px;
}

.fig-board-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fig-board-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 54px;
    align-items: center;
    gap: 12px;
    height: 48px;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
}

.fig-board-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EFF6FF;
    border: 1px solid #DBEAFE;
    border-radius: 10px;
    color: #2563EB;
    font-size: 15px;
    font-weight: 700;
}

.fig-board-copy {
    min-width: 0;
}

.fig-board-copy strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    line-height: 17px;
}

.fig-board-copy em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6B7280;
    font-size: 11px;
    font-style: normal;
    line-height: 14px;
    margin-top: 3px;
}

.fig-board-row b {
    color: #111827;
    font-size: 11px;
    font-weight: 500;
    text-align: right;
}

.fig-home-section-head {
    height: 88px;
    margin: 76px 60px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.fig-home-section-head h2 {
    margin: 12px 0 0;
    color: #111827;
    font-size: 28px;
    font-weight: 800;
    line-height: 36px;
}

.fig-home-section-head span {
    display: block;
    margin-top: 4px;
    color: #6B7280;
    font-size: 13px;
    line-height: 18px;
}

.fig-home-section-head > a {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 36px;
    color: #2563EB;
    text-decoration: none;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 600;
}

.fig-home-card-grid {
    margin: 52px 60px 0;
    display: grid;
    grid-template-columns: repeat(4, 252px);
    gap: 26px 24px;
}

.fig-home-script-card {
    width: 252px;
    height: 174px;
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: var(--cf-white-surface-shadow);
}

.fig-home-app-icon-wrap {
    position: absolute;
    left: 18px;
    top: 18px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #EFF6FF;
    border: 1px solid #DBEAFE;
    border-radius: 10px;
    text-decoration: none;
}

.fig-home-app-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fig-home-app-icon-wrap span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563EB;
    font-size: 16px;
    font-weight: 700;
}

.fig-home-tag {
    position: absolute;
    right: 18px;
    top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    height: 26px;
    padding: 0 12px;
    color: #4B5563;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 500;
}

.fig-home-card-title {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 78px;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #111827;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    line-height: 20px;
}

.fig-home-script-card p {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 106px;
    width: auto;
    height: 34px;
    margin: 0;
    overflow: hidden;
    color: #6B7280;
    font-size: 12px;
    line-height: 17px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fig-home-card-bottom {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 10px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fig-home-card-bottom > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6B7280;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

.fig-home-card-bottom button {
    flex: 0 0 56px;
    width: 56px;
    height: 28px;
    border: none;
    border-radius: 14px;
    background: #2563EB;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.fig-home-card-bottom .fig-muted-btn {
    background: #F8FAFC;
    color: #475569;
    border: 1px solid #E2E8F0;
}

.fig-recent-row-section {
    margin: 40px 60px 0;
    display: grid;
    grid-template-columns: 360px 680px;
    gap: 40px;
    align-items: start;
}

.fig-recent-title h2 {
    margin: 12px 0 0;
    color: #111827;
    font-size: 24px;
    font-weight: 800;
    line-height: 31px;
}

.fig-recent-rail {
    width: 680px;
    min-height: 130px;
    display: grid;
    grid-template-columns: repeat(4, 136px);
    gap: 12px 24px;
    padding: 24px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: var(--cf-white-surface-shadow);
}

.fig-recent-pill {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 12px;
    color: #111827;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 15px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.fig-home-footer {
    width: 1200px;
    height: 80px;
    margin: 348px auto 0;
    border-top: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fig-home-footer strong {
    color: #111827;
    font-size: 14px;
    font-weight: 700;
}

.fig-home-footer span {
    color: #6B7280;
    font-size: 13px;
    font-weight: 500;
}

.fig-empty {
    margin: 34px 60px 0;
    padding: 48px 24px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: var(--cf-white-surface-shadow);
    text-align: center;
    color: #64748B;
    font-size: 14px;
}

@media (max-width: 1280px) {
    .fig-home-main,
    .fig-home-footer {
        width: calc(100vw - 48px);
    }
    .fig-home-hero-card {
        width: 100%;
    }
    .fig-home-recommend-board {
        right: 40px;
        left: auto;
    }
    .fig-home-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
    }
    .fig-recent-row-section {
        grid-template-columns: 1fr;
    }
    .fig-recent-rail {
        width: 100%;
        grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    }
}

@media (max-width: 900px) {
    .fig-home-header {
        height: auto;
        min-height: 80px;
        padding: 16px;
    }
    .fig-home-brand,
    .fig-home-tabs,
    .fig-top-search {
        position: static;
    }
    .fig-home-tabs {
        margin-top: 18px;
        height: 44px;
        gap: 18px;
    }
    .fig-home-tabs a {
        height: 44px;
    }
    .fig-top-search {
        margin-top: 10px;
        width: 100%;
    }
    .fig-home-main {
        width: calc(100vw - 32px);
        padding-top: 24px;
    }
    .fig-home-hero-card {
        height: auto;
        padding: 28px;
    }
    .fig-home-hero-left,
    .fig-home-recommend-board {
        position: static;
        width: 100%;
    }
    .fig-home-recommend-board {
        margin-top: 24px;
        height: auto;
    }
    .fig-hero-search {
        width: 100%;
    }
    .fig-home-section-head,
    .fig-home-card-grid,
    .fig-recent-row-section,
    .fig-empty {
        margin-left: 0;
        margin-right: 0;
    }
}

/* CodeFox Unified Shell Styles (cf-* classes) */
/* 浅色统一风格：背景 #F7F9FC，主色 #2563EB */

/* ----- 1. Layout Shell ----- */
.cf-shell {
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(37, 99, 235, 0.08) 0, transparent 28%),
        radial-gradient(circle at 84% 18%, rgba(16, 185, 129, 0.07) 0, transparent 24%),
        linear-gradient(180deg, #F8FBFF 0%, #F4F7FB 48%, #F8FAFC 100%);
    color: #0F172A;
    font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}

.cf-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #FFFFFF;
    border-right: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
}

.cf-sidebar-inner {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.cf-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    background-position: -1px -1px;
}

.cf-content {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ----- 2. Sidebar Components ----- */
.cf-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding: 4px;
}

.cf-brand-mark {
    width: 36px;
    height: 36px;
    background: #2563EB;
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.cf-brand span strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.cf-brand span em {
    display: block;
    font-size: 11px;
    color: #64748B;
    font-style: normal;
    line-height: 1.2;
}

.cf-account-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.cf-account-card:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.cf-avatar {
    width: 32px;
    height: 32px;
    background: #2563EB;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.cf-account-card span strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.cf-account-card span em {
    display: block;
    font-size: 11px;
    color: #64748B;
    font-style: normal;
    line-height: 1.3;
}

.cf-account-card b {
    margin-left: auto;
    color: #94A3B8;
    font-size: 14px;
}

.cf-account-card b::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    border-radius: 1px;
    transform: rotate(-45deg);
}

.cf-quick-tools {
    display: flex;
    gap: 8px;
}

.cf-quick-tools span {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.cf-quick-tools span:hover {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #2563EB;
}

.cf-sidebar-divider {
    height: 1px;
    background: #E2E8F0;
    margin: 4px 0;
}

.cf-nav-label {
    font-size: 11px;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 4px;
}

.cf-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cf-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}

.cf-nav-item span {
    width: 20px;
    text-align: center;
    font-size: 14px;
    color: #64748B;
}

.cf-nav-item:hover {
    background: #F1F5F9;
    color: #0F172A;
}

.cf-nav-item-active,
.cf-nav-item-active:hover {
    background: #EFF6FF;
    color: #2563EB;
}

.cf-nav-item-active span {
    color: #2563EB;
}

.cf-publish-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: #2563EB;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
    margin-top: 4px;
}

.cf-publish-button:hover {
    background: #1D4ED8;
}

.cf-publish-button span {
    font-size: 15px;
    line-height: 1;
}

.cf-sidebar-tip {
    padding: 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    margin-top: auto;
}

.cf-sidebar-tip strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cf-sidebar-tip span {
    display: block;
    font-size: 12px;
    color: #64748B;
    line-height: 1.5;
}

/* ----- 3. Page Title & Eyebrow ----- */
.cf-page-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cf-page-title h1 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    color: #0F172A;
    letter-spacing: -0.02em;
}

.cf-page-title p {
    font-size: 14px;
    color: #64748B;
    line-height: 1.6;
    max-width: 520px;
}

.cf-eyebrow {
    font-size: 11px;
    font-weight: 600;
    color: #2563EB;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

/* ----- Search Result & Pagination ----- */
.cf-search-result {
    font-size: 14px;
    color: #64748B;
    padding: 4px 2px;
}

.cf-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 10px;
    margin-top: 8px;
    border-top: 1px solid #E2E8F0;
}

.cf-pagination-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    color: #64748B;
}

.cf-pagination-total strong {
    color: #0F172A;
    font-weight: 700;
}

.cf-pagination-size {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.cf-pagination-size label {
    color: #64748B;
    font-size: 13px;
}

.cf-pagination-size select {
    min-width: 64px;
    height: 32px;
    padding: 0 24px 0 10px;
    background: #FFFFFF url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 6px center/14px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 13px;
    color: #0F172A;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.cf-pagination-size select:hover {
    border-color: #BFDBFE;
}

.cf-pagination-size select:focus {
    outline: none;
    border-color: #60A5FA;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.cf-pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cf-pagination-pages a,
.cf-pagination-pages span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}

.cf-pagination-pages a {
    background: transparent;
    color: #475569;
}

.cf-pagination-pages a:hover:not(.cf-page-disabled) {
    background: #F1F5F9;
    color: #2563EB;
}

.cf-pagination-pages .cf-page-current {
    background: #0F172A;
    color: #FFFFFF;
    font-weight: 600;
}

.cf-pagination-pages .cf-page-ellipsis {
    color: #94A3B8;
    cursor: default;
}

.cf-pagination-pages .cf-page-step,
.cf-pagination-pages .cf-page-edge {
    width: 34px;
    padding: 0;
    color: #475569;
}

.cf-pagination-pages .cf-page-step svg,
.cf-pagination-pages .cf-page-edge svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cf-pagination-pages .cf-page-disabled {
    color: #CBD5E1;
    pointer-events: none;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .cf-pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .cf-pagination-meta {
        justify-content: space-between;
    }

    .cf-pagination-pages {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ----- 13. Page Footer ----- */
.cf-page-footer {
    text-align: center;
    font-size: 12px;
    color: #94A3B8;
    padding: 24px 0 8px;
    border-top: 1px solid #E2E8F0;
    margin-top: 8px;
}

/* ----- 14. Responsive ----- */
@media (max-width: 768px) {
    .cf-shell {
        flex-direction: column;
    }
    .cf-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #E2E8F0;
    }
    .cf-sidebar-inner {
        height: auto;
        padding: 16px;
        gap: 12px;
    }
    .cf-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .cf-nav-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    .cf-content {
        padding: 20px 16px;
        gap: 20px;
    }
.cf-section-head h2 {
        font-size: 17px;
    }
}

/* ----- 15. Dark Theme Legacy Support (non-UnifiedShell pages) ----- */

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

pre code {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

#vm-guide-modal {
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
#vm-guide-modal > div {
    animation: slideUp 0.2s ease;
}
@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.install-btn, .uninstall-btn, .toggle-btn, .update-btn {
    transition: all 0.15s ease;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* ====== Detail Page Styles ====== */

/* Detail Header */
.cf-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cf-detail-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    overflow: hidden;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cf-detail-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-detail-icon-fallback {
    font-size: 28px;
    font-weight: 700;
    color: #475569;
}

.cf-detail-info {
    flex: 1;
    min-width: 0;
}

.cf-detail-info h1 {
    font-size: 24px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.2;
    margin-bottom: 8px;
}

.cf-detail-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748B;
    margin-bottom: 8px;
}

.cf-detail-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94A3B8;
}

.cf-dot-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #CBD5E1;
}

.cf-detail-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cf-btn-primary {
    padding: 8px 20px;
    background: #2563EB;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.cf-btn-primary:hover {
    background: #1D4ED8;
}

.cf-btn-outline {
    padding: 8px 20px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    color: #475569;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.cf-btn-outline:hover {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #2563EB;
}

/* Detail Tabs */
.cf-detail-tabs {
    display: flex;
    gap: 0;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    padding: 0 20px;
    overflow: hidden;
}

.cf-tab {
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.cf-tab:hover {
    color: #0F172A;
}

.cf-tab-active {
    color: #2563EB;
    border-bottom-color: #2563EB;
    font-weight: 600;
}

/* Tab Content */
.cf-detail-body {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cf-tab-content {
    display: none;
}

.cf-tab-content.cf-tab-active {
    display: block;
}

.cf-detail-layout {
    display: flex;
    gap: 32px;
}

.cf-detail-main {
    flex: 1;
    min-width: 0;
}

.cf-detail-side {
    width: 260px;
    flex-shrink: 0;
}

.cf-detail-section {
    margin-bottom: 24px;
}

.cf-detail-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 12px;
}

.cf-detail-description {
    font-size: 14px;
    color: #475569;
    line-height: 1.7;
}

/* Browser Tags */
.cf-browser-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cf-browser-tag {
    padding: 4px 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
}

/* Developer Info */
.cf-developer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cf-avatar-small {
    width: 32px;
    height: 32px;
    background: #2563EB;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

/* Code Section */
.cf-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.cf-code-lang {
    font-size: 12px;
    color: #94A3B8;
    font-family: monospace;
}

.cf-code-copy {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}

.cf-code-copy:hover {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #2563EB;
}

.cf-code-body {
    background: #0F172A;
    border: 1px solid #1E293B;
    border-radius: 0 0 10px 10px;
    padding: 16px;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.cf-code-body pre {
    margin: 0;
    color: #E2E8F0;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Closed Source */
.cf-closed-source {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    background: #F8FAFC;
    border: 1px dashed #E2E8F0;
    border-radius: 12px;
    text-align: center;
}

.cf-closed-source h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0F172A;
    margin: 12px 0 4px;
}

.cf-closed-source p {
    font-size: 13px;
    color: #64748B;
}

.cf-closed-icon {
    font-size: 32px;
    opacity: 0.5;
}

/* Open Source Status */
.cf-opensource-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.cf-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.cf-dot-green {
    background: #22C55E;
}

.cf-dot-amber {
    background: #F59E0B;
}

/* Empty State */
.cf-empty-state {
    padding: 48px 24px;
    text-align: center;
    font-size: 14px;
    color: #94A3B8;
    background: #F8FAFC;
    border: 1px dashed #E2E8F0;
    border-radius: 12px;
}

/* Feedback */
.cf-feedback-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-size: 14px;
    color: #0F172A;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-bottom: 12px;
}

.cf-feedback-textarea:focus {
    border-color: #BFDBFE;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.cf-feedback-textarea::placeholder {
    color: #94A3B8;
}

.cf-feedback-submit {
    width: auto;
}

/* Rating */
.cf-rating-overview {
    display: flex;
    gap: 32px;
    align-items: center;
}

.cf-rating-score {
    text-align: center;
    min-width: 120px;
}

.cf-rating-num {
    font-size: 48px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1;
    display: block;
    margin-bottom: 8px;
}

.cf-rating-stars {
    font-size: 20px;
    color: #F59E0B;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.cf-rating-count {
    font-size: 13px;
    color: #94A3B8;
}

.cf-rating-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cf-rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748B;
}

.cf-rating-bar > span:first-child {
    width: 36px;
    flex-shrink: 0;
}

.cf-rating-bar > span:last-child {
    width: 24px;
    text-align: right;
    flex-shrink: 0;
}

.cf-bar-bg {
    flex: 1;
    height: 6px;
    background: #F1F5F9;
    border-radius: 3px;
    overflow: hidden;
}

.cf-bar-fill {
    height: 100%;
    background: #2563EB;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.cf-rating-hint {
    font-size: 13px;
    color: #94A3B8;
    margin-top: 4px;
}

/* Version List */
.cf-version-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cf-version-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #F1F5F9;
}

.cf-version-item:last-child {
    border-bottom: none;
}

.cf-version-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #CBD5E1;
    margin-top: 4px;
    flex-shrink: 0;
}

.cf-version-dot-active {
    background: #2563EB;
}

.cf-version-info {
    flex: 1;
    min-width: 0;
}

.cf-version-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cf-version-header strong {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
}

.cf-version-badge {
    padding: 2px 8px;
    background: #EFF6FF;
    color: #2563EB;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.cf-version-changelog {
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
    margin-bottom: 4px;
}

.cf-version-date {
    font-size: 12px;
    color: #94A3B8;
}

.cf-version-hint {
    font-size: 13px;
    color: #94A3B8;
    line-height: 1.5;
}

/* Detail Responsive */
@media (max-width: 900px) {
    .cf-detail-layout {
        flex-direction: column;
    }
    .cf-detail-side {
        width: 100%;
    }
    .cf-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .cf-detail-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .cf-detail-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .cf-rating-overview {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ====== Figma Chrome Web Store Replica Overrides ====== */
:root {
    --fig-bg: #F7F9FC;
    --fig-surface: #FFFFFF;
    --fig-border: #E6EBF2;
    --fig-border-strong: #E0E8F2;
    --fig-text: #0F172A;
    --fig-muted: #64748B;
    --fig-soft: #94A3B8;
    --fig-primary: #2563EB;
    --fig-primary-strong: #1A6BF2;
    --fig-blue-soft: #EFF6FF;
}

.fig-page,
.cf-shell {
    background: var(--fig-bg);
    color: var(--fig-text);
    font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}

.fig-page *,
.cf-shell * {
    letter-spacing: 0;
    box-sizing: border-box;
}

.fig-home-header {
    height: 80px;
    background: var(--fig-surface);
    border-bottom: 1px solid var(--fig-border-strong);
    position: relative;
}

.fig-home-brand span {
    border-radius: 12px;
    background: #111827;
}

.fig-home-tabs {
    left: 462px;
    width: 516px;
    gap: 16px;
}

.fig-home-tabs a {
    height: 80px;
    min-width: 88px;
    gap: 8px;
    justify-content: center;
    color: #57637A;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
}

.fig-home-tabs a:nth-child(3) {
    min-width: 128px;
}

.fig-home-tabs a:nth-child(4) {
    min-width: 164px;
}

.fig-home-tabs a svg,
.fig-top-publish svg,
.fig-top-actions svg,
.fig-hero-search svg,
.cf-quick-tools svg,
.cf-search-field svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.fig-home-tabs a.active {
    color: var(--fig-primary-strong);
}

.fig-home-tabs a.active::after {
    width: 70px;
    background: var(--fig-primary-strong);
}

.fig-top-publish {
    position: absolute;
    left: 1054px;
    top: 20px;
    width: 126px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: var(--fig-primary-strong);
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(26, 82, 204, 0.18);
}

.fig-top-publish svg {
    width: 18px;
    height: 18px;
}

.fig-top-actions {
    position: absolute;
    left: 1198px;
    top: 20px;
    width: 148px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.fig-action-icon {
    width: 20px;
    height: 20px;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fig-top-avatar {
    width: 34px;
    height: 34px;
    border-radius: 17px;
    background: var(--fig-primary-strong);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.fig-home-main {
    width: 1200px;
    padding-top: 36px;
}

.fig-home-hero-card {
    height: 292px;
    border-color: #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 24px -14px rgba(17, 24, 39, 0.08);
}

.fig-home-hero-left h1 {
    color: #111827;
    font-size: 56px;
    line-height: 68px;
    font-weight: 800;
    letter-spacing: 0;
}

.fig-hero-search {
    width: 520px;
    height: 46px;
    border-radius: 23px;
}

.fig-hero-search svg {
    width: 22px;
    height: 22px;
    color: var(--fig-primary);
}

.fig-hero-search button {
    width: 78px;
    height: 34px;
    border-radius: 17px;
    background: var(--fig-primary);
}

.fig-home-recommend-board {
    left: 730px;
    top: 32px;
    width: 430px;
    height: 236px;
    border-radius: 12px;
    padding: 20px 24px 14px;
}

.fig-board-title {
    margin: 0 0 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
}

.fig-board-title strong {
    font-size: 18px;
    line-height: 24px;
    color: #111827;
}

.fig-board-title em {
    font-size: 12px;
    line-height: 16px;
    color: var(--fig-primary);
    font-weight: 600;
    margin-top: 4px;
}

.fig-board-row {
    height: 50px;
    display: grid;
    grid-template-columns: 24px 32px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 14px;
    padding: 0 16px 0 0;
    border: 1px solid #E5E7EB;
    border-radius: 9px;
    background: #fff;
}

.fig-board-rank {
    color: var(--fig-primary);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.fig-board-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 10px;
}

.fig-code-mark {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fig-primary);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.fig-board-copy strong {
    font-size: 12px;
    line-height: 16px;
}

.fig-board-copy em {
    font-size: 10px;
    line-height: 13px;
}

.fig-board-row b {
    font-size: 11px;
    color: var(--fig-muted);
}

.fig-home-section-head {
    margin: 76px 60px 0;
    height: 78px;
}

.fig-home-section-head h2 {
    font-size: 28px;
    line-height: 36px;
}

.fig-home-card-grid {
    width: min(1080px, calc(100% - 120px));
    margin: 42px auto 0;
    grid-template-columns: repeat(4, minmax(0, 252px));
    justify-content: space-between;
    gap: 26px 24px;
}

.fig-home-script-card {
    width: 100%;
    max-width: 252px;
    height: 174px;
    border-radius: 10px;
    box-shadow: 0 8px 20px -14px rgba(17, 24, 39, 0.14);
}

.fig-home-app-icon-wrap {
    background: var(--fig-blue-soft);
}

.fig-home-recent-row-section,
.fig-recent-row-section {
    margin-top: 40px;
}

.fig-recent-pill {
    gap: 10px;
}

.fig-recent-pill span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fig-primary);
    flex: 0 0 auto;
}

.fig-home-footer {
    margin-top: 252px;
}

.cf-shell {
    position: relative;
    min-height: 100vh;
    width: min(100%, 1440px);
    margin-inline: auto;
    overflow-x: hidden;
}

.cf-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 15% 12%, rgba(37, 99, 235, 0.07) 0%, transparent 40%),
                radial-gradient(ellipse at 85% 18%, rgba(59, 130, 246, 0.05) 0%, transparent 35%),
                radial-gradient(ellipse at 50% 95%, rgba(147, 197, 253, 0.06) 0%, transparent 45%),
                #F7F9FC;
}

.cf-sidebar {
    width: 304px;
    background: #fff;
    border-right: 1px solid #E8EDF5;
}

.cf-sidebar-inner {
    height: 100vh;
    padding: 28px 24px;
    gap: 12px;
}

.cf-brand {
    gap: 14px;
    padding: 0 2px;
    height: 44px;
}

.cf-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #0F172A;
}

.cf-brand span strong {
    color: #111827;
    font-size: 17px;
    line-height: 22px;
}

.cf-brand span em {
    color: #64748B;
    font-size: 12px;
    line-height: 18px;
}

.cf-account-card {
    height: 64px;
    width: 248px;
    align-self: flex-start;
    position: relative;
    display: block;
    padding: 0;
    gap: 0;
    border-color: var(--fig-border);
    border-radius: 14px;
    margin-top: 8px;
}

.cf-avatar {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: var(--fig-primary);
    font-size: 14px;
}

.cf-account-card .cf-avatar {
    position: absolute;
    left: 12px;
    top: 12px;
}

.cf-account-card span strong {
    color: #111827;
    font-size: 13px;
    line-height: 20px;
}

.cf-account-card span em {
    color: #94A3B8;
    font-size: 12px;
    line-height: 18px;
}

.cf-account-card span:not(.cf-avatar) {
    position: absolute;
    left: 60px;
    top: 10px;
    flex: 0 0 110px;
    width: 110px;
}

.cf-account-card b {
    position: absolute;
    left: 214px;
    top: 21px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-size: 0;
    line-height: 18px;
}

.cf-account-card b::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    border-radius: 1px;
    transform: rotate(-45deg);
}


.cf-quick-tools {
    width: 144px;
    height: 44px;
    flex: 0 0 44px;
    align-self: flex-start;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding-top: 0;
}

.cf-quick-tools span {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    margin-top: 2px;
    border-radius: 10px;
    background: #fff;
    color: #334155;
}

.cf-sidebar-divider {
    width: 248px;
    align-self: flex-start;
    margin: 8px 0 8px;
    background: #EEF2F7;
}

.cf-nav-label {
    position: relative;
    top: 1px;
    width: 60px;
    align-self: flex-start;
    margin: 0 4px 0;
    color: #94A3B8;
    font-size: 12px;
    line-height: 18px;
    text-transform: none;
    letter-spacing: 0;
}

.cf-nav {
    width: 248px;
    align-self: flex-start;
    margin-top: -1px;
    gap: 6px;
}

.cf-nav-item {
    width: 248px;
    flex: 0 0 42px;
    height: 42px;
    border-radius: 10px;
    padding: 0 18px;
    color: #334155;
    font-size: 14px;
}

.cf-nav-item span {
    width: 20px;
    color: inherit;
}

.cf-nav-item-active,
.cf-nav-item-active:hover {
    position: relative;
    border: 1px solid #BFDBFE;
    background: #EFF6FF;
    color: var(--fig-primary);
    font-weight: 700;
}

.cf-nav-item-active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 9px;
    width: 3px;
    height: 22px;
    border-radius: 2px;
    background: var(--fig-primary);
}

.cf-publish-button {
    width: 248px;
    align-self: flex-start;
    position: relative;
    height: 44px;
    margin-top: 14px;
    border-radius: 10px;
    background: var(--fig-primary);
    font-size: 14px;
    box-shadow: 0 10px 22px -12px rgba(20, 31, 51, 0.18);
}

.cf-scripts-page .cf-publish-button svg,
.cf-detail-page .cf-publish-button svg {
    position: absolute;
    left: 62px;
    top: 12px;
}

.cf-scripts-page .cf-publish-button span,
.cf-detail-page .cf-publish-button span {
    position: absolute;
    left: 92px;
    top: 11px;
    width: 86px;
    height: 22px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.cf-sidebar-tip {
    position: relative;
    width: 248px;
    align-self: flex-start;
    margin-top: 16px;
    height: 90px;
    border-radius: 14px;
    background: #fff;
    border-color: var(--fig-border);
    padding: 0;
}

.cf-tip-icon {
    position: absolute;
    left: 14px;
    top: 16px;
    width: 20px;
    height: 20px;
    color: #2563EB;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cf-sidebar-tip strong {
    position: absolute;
    left: 46px;
    top: 12px;
    width: 120px;
    color: #0F172A;
    font-size: 13px;
    line-height: 20px;
}

.cf-sidebar-tip span {
    position: absolute;
    left: 14px;
    top: 44px;
    width: 210px;
    color: #64748B;
    font-size: 12px;
    line-height: 20px;
    margin-top: 0;
}

.cf-main {
    min-width: 0;
}

.cf-content {
    width: 1024px;
    max-width: 1024px;
    margin: 0 0 0 48px;
    padding: 64px 0 48px;
    gap: 0;
}

.cf-page-title {
    gap: 0;
    margin-bottom: 24px;
}

.cf-page-title h1 {
    color: #0F172A;
    font-size: 36px;
    line-height: 46px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
}

.cf-page-title p {
    margin: 8px 0 0;
    max-width: 640px;
    color: #64748B;
    font-size: 16px;
    line-height: 26px;
}

.cf-page-footer {
    margin-top: 26px;
    padding-top: 26px;
    color: #94A3B8;
    font-size: 13px;
    line-height: 22px;
}

.cf-shell .cf-pagination {
    display: none;
}

.cf-detail-content {
    padding-top: 54px;
}

.cf-breadcrumb {
    color: #94A3B8;
    font-size: 14px;
    line-height: 24px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.cf-breadcrumb a {
    color: #64748B;
    text-decoration: none;
}

.cf-breadcrumb strong {
    color: #0F172A;
}

.cf-detail-header {
    height: 184px;
    min-height: 184px;
    margin-top: 12px;
    padding: 20px 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    align-items: flex-start;
}

.cf-detail-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: #EFF6FF;
}

.cf-detail-icon-fallback {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fig-primary);
}

.cf-detail-info {
    padding-left: 0;
}

.cf-detail-info h1 {
    max-width: 430px;
    font-size: 34px;
    line-height: 48px;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cf-detail-info > p {
    margin: 2px 0 0;
    max-width: 560px;
    color: #64748B;
    font-size: 16px;
    line-height: 28px;
}

.cf-detail-stats {
    margin-top: 8px;
    color: #64748B;
    font-size: 13px;
    line-height: 24px;
}

.cf-detail-chip-row {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cf-detail-chip-row span,
.cf-detail-chip-row a {
    height: 30px;
    min-width: 58px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E2E8F0;
    border-radius: 15px;
    background: #fff;
    color: #64748B;
    font-size: 12px;
    text-decoration: none;
}

.cf-detail-actions {
    width: 180px;
    margin-top: 8px;
    margin-left: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.cf-detail-actions .install-btn {
    grid-column: 1 / -1;
    min-height: 50px;
}

.cf-detail-actions .uninstall-btn {
    display: none;
}

.cf-btn-primary {
    min-height: 44px;
    border-radius: 14px;
    background: var(--fig-primary);
    font-weight: 700;
}

.cf-btn-outline {
    min-height: 38px;
    border-radius: 14px;
    background: #fff;
    color: var(--fig-primary);
    border-color: #E2E8F0;
    font-weight: 700;
}

.cf-detail-tabs {
    height: 58px;
    margin-top: 24px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #E2E8F0;
    border-radius: 0;
    background: transparent;
}

.cf-tab {
    position: relative;
    width: 78px;
    height: 58px;
    padding: 0;
    color: #64748B;
    font-size: 15px;
    border-bottom: 0;
}

.cf-tab-active {
    color: var(--fig-primary);
    border-bottom-color: transparent;
}

.cf-tab-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 40px;
    height: 3px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: var(--fig-primary);
}

.cf-detail-body {
    margin-top: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.cf-detail-content .cf-page-footer {
    margin-top: 218px;
}

.cf-version-shell {
    width: 1056px;
    min-height: 760px;
    margin-left: -16px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(247, 250, 254, 0.56);
}

.cf-detail-layout {
    gap: 32px;
}

.cf-detail-main {
    flex: 1;
}

.cf-detail-side {
    width: 292px;
}

.cf-detail-panel,
.cf-rating-summary,
.cf-version-timeline,
.cf-release-note {
    background: #fff;
    border: 1px solid var(--fig-border);
    border-radius: 12px;
    box-shadow: 0 12px 22px -18px rgba(15, 23, 42, 0.18);
}

.cf-detail-panel {
    padding: 28px;
    margin-bottom: 20px;
}

.cf-detail-panel h3,
.cf-rating-summary h3,
.cf-version-timeline h3,
.cf-release-note h3 {
    margin: 0 0 14px;
    color: #0F172A;
    font-size: 20px;
    line-height: 32px;
}

.cf-detail-panel p {
    margin: 0;
    color: #64748B;
    font-size: 14px;
    line-height: 24px;
}

.cf-browser-tags,
.cf-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cf-browser-tags span,
.cf-tag-list a {
    height: 30px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 15px;
    background: #EFF6FF;
    color: var(--fig-primary);
    font-size: 12px;
    text-decoration: none;
}

.cf-rating-summary {
    min-height: 286px;
    padding: 30px 32px;
    display: grid;
    grid-template-columns: 220px 1fr 96px;
    gap: 48px;
    align-items: start;
}

.cf-rating-summary strong {
    display: block;
    color: #0F172A;
    font-size: 64px;
    line-height: 78px;
}

.cf-rating-summary > div > span {
    color: #64748B;
    font-size: 14px;
}

.cf-rating-bars {
    gap: 14px;
}

.cf-rating-bar {
    gap: 16px;
}

.cf-rating-bar span {
    width: 50px;
}

.cf-rating-bar b {
    width: 56px;
    color: #64748B;
    font-size: 13px;
    text-align: right;
}

.cf-bar-bg {
    height: 8px;
}

.cf-version-layout {
    display: grid;
    grid-template-columns: 700px 292px;
    gap: 32px;
}

.cf-version-timeline {
    min-height: 720px;
    padding: 30px 32px;
}

.cf-version-timeline > p {
    margin: -6px 0 28px;
    color: #64748B;
    font-size: 14px;
}

.cf-version-item {
    position: relative;
    min-height: 108px;
    padding: 0 0 28px 46px;
    border-bottom: 0;
}

.cf-version-item::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 28px;
    width: 2px;
    height: calc(100% - 24px);
    background: #E2E8F0;
}

.cf-version-item:last-child::before {
    display: none;
}

.cf-version-dot {
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background: #E2E8F0;
    border: 6px solid #F7F9FC;
}

.cf-version-dot-active {
    background: var(--fig-primary);
}

.cf-version-header strong {
    color: #0F172A;
    font-size: 20px;
    line-height: 30px;
}

.cf-version-badge {
    height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 15px;
    background: #EFF6FF;
    color: var(--fig-primary);
}

.cf-version-changelog {
    margin: 6px 0 0;
    color: #64748B;
    font-size: 14px;
    line-height: 24px;
}

.cf-version-date {
    position: absolute;
    right: 72px;
    top: 5px;
    color: #64748B;
    font-size: 13px;
}

.cf-version-install,
.cf-version-installed {
    position: absolute;
    right: 0;
    top: 42px;
    width: 76px;
    height: 32px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    background: #fff;
    color: var(--fig-primary);
    font-weight: 700;
    font-size: 12px;
}

.cf-version-installed {
    border-color: var(--fig-primary);
    color: #fff;
    background: var(--fig-primary);
}

.cf-release-note {
    height: 420px;
    padding: 28px 24px;
}

.cf-release-note strong {
    display: block;
    color: #0F172A;
    font-size: 34px;
    line-height: 46px;
}

.cf-release-note > span,
.cf-release-note p {
    color: #64748B;
    font-size: 14px;
    line-height: 24px;
}

.cf-release-note hr {
    border: 0;
    border-top: 1px solid #E2E8F0;
    margin: 16px 0 22px;
}

.cf-release-note h4 {
    margin: 0 0 8px;
    color: #0F172A;
}

.cf-release-note div {
    margin-top: 64px;
    display: flex;
    gap: 12px;
}

.cf-release-note .cf-btn-primary,
.cf-release-note .cf-btn-outline {
    min-height: 38px;
    padding: 0 14px;
}

@media (max-width: 1280px) {
    .fig-top-publish,
    .fig-top-actions {
        display: none;
    }

    .fig-home-tabs {
        left: 360px;
    }

    .cf-content {
        width: calc(100vw - 352px);
        max-width: 1024px;
    }

    .cf-page-header {
        grid-template-columns: 180px minmax(280px, 1fr) auto;
    }

    .cf-auth-entry {
        grid-column: 3;
        grid-row: 1;
    }

    .cf-top-nav {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media (max-width: 900px) {
    .fig-home-header-inner {
        width: 100%;
        height: auto;
    }

    .fig-home-tabs {
        width: auto;
        gap: 8px;
        flex-wrap: wrap;
    }

    .fig-home-tabs a,
    .fig-home-tabs a:nth-child(3),
    .fig-home-tabs a:nth-child(4) {
        min-width: auto;
        height: 40px;
    }

    .fig-home-tabs a.active::after {
        width: 100%;
    }

    .fig-home-card-grid,
    .cf-version-layout,
    .cf-rating-summary {
        grid-template-columns: 1fr;
    }

    .cf-sidebar {
        width: 100%;
    }

    .cf-content {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 24px 16px;
    }

    .cf-version-shell {
        width: auto;
        min-height: auto;
        margin-left: 0;
        padding: 0;
        background: transparent;
    }

    .cf-search-field {
        width: 100%;
    }

    .cf-detail-actions {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-left: 0;
    }
}

/* Home page 16:9 viewport guard: keep Figma card tracks fixed on desktop. */
.fig-home-page .fig-home-card-grid {
    width: min(1080px, calc(100% - 120px));
    margin: 42px auto 0;
    grid-template-columns: repeat(4, 252px);
    justify-content: space-between;
    align-items: start;
}

.fig-home-page .fig-home-script-card {
    width: 252px;
    max-width: 252px;
    height: 174px;
    box-sizing: border-box;
}

.fig-home-page .fig-home-tag {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fig-home-page .fig-home-script-card p {
    top: 102px;
    height: 30px;
    line-height: 15px;
}

.fig-home-page .fig-home-card-bottom {
    bottom: 10px;
    height: 28px;
}

.fig-home-page .fig-home-card-bottom .hidden,
.fig-home-page .fig-home-card-bottom .toggle-btn,
.fig-home-page .fig-home-card-bottom .update-btn,
.fig-home-page .fig-home-card-bottom .uninstall-btn {
    display: none !important;
}

.fig-home-page .fig-home-card-bottom .install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fig-home-page .fig-home-brand {
    left: 64px;
}

.fig-home-page .fig-home-tabs {
    left: 433px;
    width: 510px;
    gap: 30px;
}

.fig-home-page .fig-home-tabs a {
    min-width: 85px;
}

.fig-home-page .fig-home-tabs a:nth-child(3) {
    min-width: 118px;
}

.fig-home-page .fig-home-tabs a:nth-child(4) {
    min-width: 133px;
}

.fig-home-page .fig-home-tabs a.active::after {
    width: 61px;
}

.fig-home-page .fig-top-publish {
    left: 1092px;
    top: 22px;
    width: 112px;
    height: 36px;
    font-size: 14px;
}

.fig-home-page .fig-top-actions {
    left: 1228px;
}

.fig-home-page .fig-recent-row-section {
    width: min(1080px, calc(100% - 120px));
    margin: 48px auto 0;
    display: block;
}

.fig-home-page .fig-recent-head {
    position: relative;
    height: 82px;
}

.fig-home-page .fig-recent-title {
    position: absolute;
    left: 0;
    top: 0;
}

.fig-home-page .fig-recent-title h2 {
    margin: 14px 0 0;
    color: #111827;
    font-size: 28px;
    font-weight: 800;
    line-height: 36px;
}

.fig-home-page .fig-recent-more {
    position: absolute;
    right: 0;
    top: 28px;
    width: 84px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563EB;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    line-height: 17px;
}

.fig-home-page .fig-recent-table {
    width: 1080px;
    height: 400px;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #DBE4F0;
    border-radius: 6px;
}

.fig-home-page .fig-recent-dense-row {
    position: relative;
    display: block;
    height: 50px;
    color: inherit;
    background: #FFFFFF;
    border-bottom: 1px solid #DBE4F0;
    text-decoration: none;
}

.fig-home-page .fig-recent-dense-row:last-child {
    border-bottom: none;
}

.fig-home-page .fig-recent-icon {
    position: absolute;
    left: 22px;
    top: 9px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #2563EB;
    background: #EFF6FF;
    border: 1px solid #BED5F9;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    line-height: 32px;
    white-space: nowrap;
}

.fig-home-page .fig-recent-name,
.fig-home-page .fig-recent-author,
.fig-home-page .fig-recent-desc,
.fig-home-page .fig-recent-installs,
.fig-home-page .fig-recent-rating,
.fig-home-page .fig-recent-date {
    position: absolute;
    top: 50%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateY(-50%);
}

.fig-home-page .fig-recent-name {
    left: 72px;
    width: 250px;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.fig-home-page .fig-recent-author {
    left: 342px;
    width: 110px;
    color: #7589A5;
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
}

.fig-home-page .fig-recent-desc {
    left: 480px;
    width: 330px;
    color: #64748B;
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
}

.fig-home-page .fig-recent-installs {
    left: 838px;
    width: 62px;
    color: #2563EB;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
}

.fig-home-page .fig-recent-rating {
    left: 922px;
    width: 62px;
    color: #111827;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
}

.fig-home-page .fig-recent-date {
    left: 1000px;
    width: 72px;
    color: #7589A5;
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
    text-align: right;
}

.fig-home-page .fig-home-footer {
    margin-top: 36px;
}

@media (max-width: 1280px) {
    .fig-home-page .fig-home-main,
    .fig-home-page .fig-home-footer {
        width: calc(100vw - 48px);
        max-width: 1200px;
    }

    .fig-home-page .fig-home-hero-card {
        width: 100%;
    }

    .fig-home-page .fig-home-recommend-board {
        left: auto;
        right: 40px;
    }

    .fig-home-page .fig-home-card-grid {
        width: min(1080px, calc(100vw - 96px));
        grid-template-columns: repeat(4, 252px);
    }

    .fig-home-page .fig-top-publish {
        left: auto;
        right: 32px;
        display: flex;
    }

    .fig-home-page .fig-top-actions {
        display: none;
    }
}

@media (max-width: 1180px) {
    .fig-home-page .fig-home-card-grid {
        width: min(804px, calc(100vw - 48px));
        grid-template-columns: repeat(3, 252px);
    }

    .fig-home-page .fig-recent-row-section {
        width: min(804px, calc(100vw - 48px));
        display: block;
    }

    .fig-home-page .fig-recent-table {
        width: 100%;
        height: auto;
    }

    .fig-home-page .fig-recent-dense-row {
        min-height: 68px;
        height: auto;
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr) 64px 64px 78px;
        grid-template-areas:
            "icon name installs rating date"
            "icon desc desc desc author";
        gap: 4px 14px;
        align-items: center;
        padding: 12px 16px;
    }

    .fig-home-page .fig-recent-icon,
    .fig-home-page .fig-recent-name,
    .fig-home-page .fig-recent-author,
    .fig-home-page .fig-recent-desc,
    .fig-home-page .fig-recent-installs,
    .fig-home-page .fig-recent-rating,
    .fig-home-page .fig-recent-date {
        position: static;
        width: auto;
        transform: none;
    }

    .fig-home-page .fig-recent-icon {
        grid-area: icon;
    }

    .fig-home-page .fig-recent-name {
        grid-area: name;
    }

    .fig-home-page .fig-recent-author {
        grid-area: author;
        text-align: right;
    }

    .fig-home-page .fig-recent-desc {
        grid-area: desc;
    }

    .fig-home-page .fig-recent-installs {
        grid-area: installs;
    }

    .fig-home-page .fig-recent-rating {
        grid-area: rating;
    }

    .fig-home-page .fig-recent-date {
        grid-area: date;
    }

    .fig-home-page .fig-top-publish {
        display: none;
    }
}

@media (max-width: 900px) {
    .fig-home-page .fig-home-brand {
        position: relative;
        left: auto;
        top: auto;
        display: block;
        width: 220px;
        height: 40px;
    }

    .fig-home-page .fig-home-hero-card {
        height: auto;
        min-height: 0;
        padding: 28px;
    }

    .fig-home-page .fig-home-hero-left,
    .fig-home-page .fig-home-recommend-board {
        position: static;
        width: 100%;
    }

    .fig-home-page .fig-home-recommend-board {
        height: auto;
        margin-top: 24px;
    }
}

@media (max-width: 860px) {
    .fig-home-page .fig-home-main,
    .fig-home-page .fig-home-footer {
        width: calc(100vw - 32px);
    }

    .fig-home-page .fig-home-card-grid {
        width: min(528px, calc(100vw - 32px));
        grid-template-columns: repeat(2, minmax(0, 252px));
        gap: 20px 24px;
    }

    .fig-home-page .fig-hero-search {
        width: 100%;
        max-width: 100%;
    }

    .fig-home-page .fig-recent-row-section {
        width: min(528px, calc(100vw - 32px));
    }

    .fig-home-page .fig-recent-dense-row {
        grid-template-columns: 32px minmax(0, 1fr) 66px;
        grid-template-areas:
            "icon name installs"
            "icon desc desc"
            "icon author date";
    }
}

@media (max-width: 600px) {
    .fig-home-page .fig-home-card-grid {
        width: calc(100vw - 32px);
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .fig-home-page .fig-home-script-card {
        width: 100%;
        max-width: none;
    }

    .fig-home-page .fig-recent-row-section {
        width: calc(100vw - 32px);
    }

    .fig-home-page .fig-recent-head {
        height: 94px;
    }

    .fig-home-page .fig-recent-more {
        left: 0;
        right: auto;
        top: 62px;
    }

    .fig-home-page .fig-recent-rating {
        display: none;
    }
}

@media (min-width: 901px) {
    .fig-home-page .fig-home-header,
    .fig-home-page .fig-home-header-inner {
        height: 72px;
    }

    .fig-home-page .fig-home-brand {
        top: 16px;
    }

    .fig-home-page .fig-home-tabs,
    .fig-home-page .fig-home-tabs a {
        height: 72px;
    }

    .fig-home-page .fig-top-publish {
        top: 18px;
    }

    .fig-home-page .fig-top-actions {
        top: 16px;
    }

    .fig-home-page .fig-home-main {
        padding-top: 32px;
    }
}

/* Figma replica: script list and detail pages. */
.cf-scripts-page,
.cf-detail-page {
    width: 100%;
    margin-inline: 0;
    background: #FFFFFF;
    color: #0F172A;
}

.cf-scripts-page .cf-sidebar,
.cf-detail-page .cf-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 304px;
    height: 100vh;
    border-right: 1px solid #E8EDF5;
}

.cf-scripts-page .cf-sidebar-inner,
.cf-detail-page .cf-sidebar-inner {
    width: 304px;
    height: 810px;
    padding: 28px 24px 0;
    overflow: hidden;
}

.cf-scripts-page .cf-quick-tools svg,
.cf-scripts-page .cf-nav-item svg,
.cf-scripts-page .cf-publish-button svg,
.cf-detail-page .cf-quick-tools svg,
.cf-detail-page .cf-nav-item svg,
.cf-detail-page .cf-publish-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.cf-scripts-page .cf-nav-item,
.cf-detail-page .cf-nav-item {
    gap: 14px;
}

.cf-scripts-page .cf-nav-item span,
.cf-detail-page .cf-nav-item span {
    width: auto;
}

.cf-scripts-page .cf-publish-button,
.cf-detail-page .cf-publish-button {
    gap: 12px;
}

.cf-scripts-page .cf-content,
.cf-detail-page .cf-content {
    width: 1024px;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
}

.cf-page-header {
    min-height: 76px;
    display: grid;
    grid-template-columns: 250px minmax(320px, 1fr) auto auto;
    align-items: center;
    gap: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E8F0;
}

.cf-page-hero {
    text-align: center;
    padding: 48px 0 24px;
    margin-bottom: 8px;
}

.cf-hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    text-decoration: none;
    color: inherit;
}

.cf-hero-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0F172A;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
}

.cf-hero-brand strong {
    font-size: 18px;
    font-weight: 700;
    color: #0F172A;
}

.cf-header-search {
    width: min(570px, 100%);
    height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px 0 18px;
    justify-self: center;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 24px;
    box-shadow: 0 10px 26px -18px rgba(15, 23, 42, 0.35);
}

.cf-header-search .cf-search-icon {
    width: 18px;
    height: 18px;
    color: #8AA0BD;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.cf-header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0F172A;
    font-size: 14px;
}

.cf-header-search input::placeholder {
    color: #8AA0BD;
}

.cf-header-search button {
    min-width: 68px;
    height: 36px;
    border: 0;
    border-radius: 18px;
    background: #2563EB;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px -10px rgba(37, 99, 235, 0.85);
}

.cf-page-hero h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 800;
    line-height: 44px;
    color: #0F172A;
    letter-spacing: -0.02em;
}

.cf-page-hero p {
    margin: 10px 0 0;
    font-size: 15px;
    color: #64748B;
    line-height: 24px;
}

.cf-command-center {
    position: sticky;
    top: 12px;
    z-index: 40;
    padding: 8px 0 14px;
    margin-top: 0;
    background: transparent;
}

.cf-top-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cf-top-nav-item {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 17px;
    background: transparent;
    border: 1px solid transparent;
    color: #64748B;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}

.cf-top-nav-item:hover {
    color: #2563EB;
    background: #F1F5F9;
}

.cf-top-nav-item-active,
.cf-top-nav-item-active:hover {
    background: #EFF6FF;
    color: #2563EB;
    font-weight: 600;
}

.cf-auth-entry {
    min-width: 84px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.cf-login-button,
.cf-logout-button,
.cf-auth-submit {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.cf-login-button {
    height: 36px;
    padding: 0 18px;
    border-radius: 18px;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
}

.cf-user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cf-user-button {
    max-width: 148px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 4px;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    background: #FFFFFF;
    color: #0F172A;
    cursor: default;
    font: inherit;
}

.cf-user-avatar {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 13px;
    font-weight: 800;
    flex: 0 0 auto;
}

.cf-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-user-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

.cf-logout-button {
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    background: #F1F5F9;
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
}

.cf-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cf-auth-modal.is-open {
    display: flex;
}

.cf-auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
}

.cf-auth-dialog {
    position: relative;
    width: min(420px, 100%);
    padding: 28px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 28px 80px -36px rgba(15, 23, 42, 0.72);
}

.cf-auth-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.cf-auth-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 800;
    flex: 0 0 auto;
}

.cf-auth-dialog h2 {
    margin: 0;
    color: #0F172A;
    font-size: 22px;
    line-height: 30px;
}

.cf-auth-heading p {
    margin: 2px 0 0;
    color: #64748B;
    font-size: 13px;
    line-height: 20px;
}

.cf-auth-close {
    position: absolute;
    right: 18px;
    top: 16px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 16px;
    background: #F8FAFC;
    color: #64748B;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.cf-auth-tabs {
    display: grid;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: #F1F5F9;
}

.cf-auth-tabs {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 16px;
}

.cf-auth-tabs button {
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #64748B;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.cf-auth-tabs button.is-active {
    background: #FFFFFF;
    color: #2563EB;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.cf-auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cf-auth-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.cf-auth-form input {
    height: 42px;
    padding: 0 13px;
    border: 1px solid #DDE7F2;
    border-radius: 10px;
    outline: 0;
    color: #0F172A;
    font-size: 14px;
}

.cf-auth-form input:focus {
    border-color: #93C5FD;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cf-auth-email-hint {
    margin: -6px 0 0;
    color: #64748B;
    font-size: 12px;
    line-height: 18px;
}

.cf-auth-email-hint.is-detected {
    color: #2563EB;
    font-weight: 700;
}

.cf-auth-code-row {
    display: none !important;
}

.cf-auth-form[data-mode="register"] .cf-auth-code-row {
    display: flex !important;
}

.cf-auth-code-field {
    display: grid;
    grid-template-columns: 1fr 88px;
    gap: 8px;
}

.cf-auth-code-field button {
    height: 42px;
    border: 1px solid #BFDBFE;
    border-radius: 10px;
    background: #EFF6FF;
    color: #2563EB;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
}

.cf-auth-code-field button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.cf-auth-message {
    min-height: 18px;
    margin: 0;
    color: #64748B;
    font-size: 12px;
}

.cf-auth-message.is-error {
    color: #DC2626;
}

.cf-auth-submit {
    height: 42px;
    border-radius: 21px;
    background: #2563EB;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 800;
}

.cf-auth-submit:disabled {
    opacity: 0.68;
    cursor: wait;
}

.cf-command-search {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 720px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px 0 18px;
    margin: 0 auto;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 28px;
    box-shadow: 0 10px 24px -12px rgba(37, 99, 235, 0.14),
                0 4px 8px -4px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.cf-command-search:hover {
    border-color: #BFDBFE;
    box-shadow: 0 14px 32px -12px rgba(37, 99, 235, 0.18),
                0 6px 10px -4px rgba(15, 23, 42, 0.08);
}

.cf-command-search:focus-within {
    border-color: #93C5FD;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08),
                0 14px 32px -10px rgba(37, 99, 235, 0.16);
}

.cf-command-search .cf-search-icon {
    width: 20px;
    height: 20px;
    color: #94A3B8;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}

.cf-command-search input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0F172A;
    font-size: 15px;
    line-height: 24px;
}

.cf-command-search input::placeholder {
    color: #94A3B8;
}

.cf-command-search button {
    height: 44px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 22px;
    background: #2563EB;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.45);
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.cf-command-search button:hover {
    background: #1D4ED8;
    box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.55);
}

.cf-command-chips {
    position: relative;
    left: auto;
    top: auto;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.cf-command-chips a {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 17px;
    background: transparent;
    border: 1px solid transparent;
    color: #64748B;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}

.cf-command-chips a:hover {
    background: #F1F5F9;
    color: #2563EB;
}

.cf-scripts-page .cf-scripts-section-head {
    margin-top: 32px;
}

.cf-scripts-page .cf-content,
.cf-detail-page .cf-content {
    position: relative;
    z-index: 1;
}

.cf-featured-dense-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(4, 241px);
    gap: 20px;
}

.cf-featured-dense-card {
    position: relative;
    width: 241px;
    height: 244px;
    padding: 17px;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #CAD7E6;
    border-radius: 12px;
    box-shadow: 0 12px 22px -18px rgba(15, 23, 42, 0.16);
}

.cf-dense-icon {
    position: absolute;
    left: 17px;
    top: 17px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #2563EB;
    background: #F0F6FF;
    border: 1px solid #BED5F9;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.cf-dense-title {
    position: absolute;
    left: 75px;
    top: 28px;
    width: 145px;
    max-height: 46px;
    overflow: hidden;
    color: #0F172A;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    line-height: 23px;
}

.cf-dense-author {
    position: absolute;
    left: 17px;
    top: 79px;
    width: 205px;
    overflow: hidden;
    color: #7589A5;
    font-size: 13px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cf-featured-dense-card p {
    position: absolute;
    left: 17px;
    top: 113px;
    width: 205px;
    height: 48px;
    margin: 0;
    overflow: hidden;
    color: #212E49;
    font-size: 13px;
    line-height: 24px;
}

.cf-dense-meta {
    position: absolute;
    left: 17px;
    right: 18px;
    bottom: 23px;
    display: grid;
    grid-template-columns: 52px 58px 1fr;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    line-height: 20px;
}

.cf-dense-meta span {
    color: #2563EB;
}

.cf-dense-meta b {
    color: #0F172A;
    font-weight: 500;
}

.cf-dense-meta em {
    color: #7589A5;
    font-style: normal;
    text-align: right;
}

.cf-scripts-list-sections {
    margin-top: 24px;
}

.cf-scripts-list-sections .cf-script-row {
    position: relative;
    height: 86px;
    padding: 0 20px;
    gap: 14px;
}

.cf-scripts-list-sections .cf-row-icon {
    flex: 0 0 42px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.cf-scripts-list-sections .cf-row-main strong small {
    color: #63748B;
    font-size: 12px;
    font-weight: 400;
}

.cf-scripts-list-sections .cf-row-main em {
    display: -webkit-box;
    width: 298px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
}

.cf-new-badge {
    position: absolute;
    right: 33px;
    top: 11px;
    width: 50px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #F0F6FF;
    color: #2563EB;
    font-size: 12px;
    font-weight: 700;
}

.cf-row-date {
    position: absolute;
    right: 21px;
    bottom: 14px;
    width: 60px;
    color: #63748B;
    font-size: 12px;
    text-align: right;
}

.cf-detail-page .cf-detail-content {
    padding-top: 54px;
}

.cf-detail-page .cf-breadcrumb {
    height: 24px;
    color: #64748B;
    font-size: 13px;
    line-height: 20px;
}

.cf-detail-page .cf-detail-header {
    position: relative;
    height: 184px;
    margin-top: 12px;
    padding: 0;
    display: flex;
}

.cf-detail-page .cf-detail-icon-wrap {
    position: absolute;
    left: 0;
    top: 28px;
    width: 72px;
    height: 72px;
    border: 1px solid #DBEAFE;
    border-radius: 16px;
    background: #EFF6FF;
}

.cf-detail-page .cf-detail-icon-fallback {
    font-size: 22px;
    font-weight: 700;
}

.cf-detail-page .cf-detail-info {
    position: absolute;
    left: 92px;
    top: 20px;
    width: 560px;
}

.cf-detail-page .cf-detail-info h1 {
    width: 430px;
    max-width: 430px;
    height: 48px;
    font-size: 34px;
    line-height: 44px;
}

.cf-detail-page .cf-detail-info > p {
    height: 28px;
    margin: 2px 0 0;
    overflow: hidden;
    font-size: 15px;
    line-height: 24px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cf-detail-page .cf-detail-stats {
    margin-top: 8px;
    font-size: 13px;
    line-height: 20px;
}

.cf-detail-page .cf-dot-sep {
    width: 3px;
    height: 3px;
    margin: 0 8px;
    border-radius: 2px;
    background: #94A3B8;
}

.cf-detail-page .cf-detail-chip-row {
    margin-top: 12px;
}

.cf-detail-page .cf-detail-chip-row .is-primary {
    color: #2563EB;
    background: #EFF6FF;
    border-color: #BFDBFE;
    font-weight: 700;
}

.cf-detail-page .cf-detail-actions {
    position: absolute;
    right: 0;
    top: 28px;
    width: 180px;
    margin: 0;
    grid-template-columns: 84px 84px;
}

.cf-detail-page .cf-detail-actions button {
    padding: 0;
    white-space: nowrap;
}

.cf-detail-page .cf-detail-actions .install-btn {
    height: 50px;
}

.cf-detail-page .cf-detail-actions .cf-btn-outline {
    height: 38px;
}

.cf-detail-page .cf-detail-actions .hidden {
    display: none !important;
}

.cf-detail-page .cf-detail-tabs {
    height: 58px;
    margin-top: 24px;
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(221, 231, 242, 0.64);
}

.cf-detail-page .cf-tab {
    width: 78px;
    height: 58px;
    border: 0;
    background: transparent;
    color: #334155;
    font-size: 14px;
    line-height: 22px;
    cursor: pointer;
}

.cf-detail-page .cf-tab:focus,
.cf-detail-page .cf-tab:focus-visible {
    outline: 0;
}

.cf-detail-page .cf-detail-body {
    position: relative;
    margin-top: 16px;
    min-height: 0;
}

.cf-detail-page .cf-tab-content {
    display: none;
}

.cf-detail-page .cf-tab-content.cf-tab-active {
    display: block;
}

.cf-overview-shell,
.cf-code-shell,
.cf-feedback-shell,
.cf-rating-shell,
.cf-version-shell {
    width: 1056px;
    margin-left: -16px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(247, 250, 254, 0.56);
}

.cf-overview-shell.cf-tab-active {
    display: grid;
    grid-template-columns: 664px 328px;
    gap: 32px;
    min-height: 746px;
}

.cf-detail-page .cf-overview-shell.cf-tab-active {
    display: grid;
    grid-template-columns: 664px 328px;
    gap: 32px;
    min-height: 746px;
}

.cf-doc-panel,
.cf-stat-panel,
.cf-confirm-panel,
.cf-feedback-tools,
.cf-feedback-list,
.cf-review-panel,
.cf-rating-composer,
.cf-version-timeline,
.cf-release-note {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(222, 231, 242, 0.72);
    border-radius: 12px;
    box-shadow: var(--cf-white-surface-shadow);
}

.cf-doc-panel {
    height: 694px;
    padding: 27px;
}

.cf-doc-panel header h2,
.cf-doc-panel h1,
.cf-doc-panel h3,
.cf-stat-panel h2,
.cf-confirm-panel h2,
.cf-feedback-tools h2,
.cf-feedback-list h2,
.cf-rating-summary h2,
.cf-review-panel h2,
.cf-rating-composer h2,
.cf-version-timeline h2,
.cf-release-note h2 {
    margin: 0;
    color: #0F172A;
    font-weight: 700;
}

.cf-doc-panel header h2 {
    font-size: 24px;
    line-height: 32px;
}

.cf-doc-panel header p {
    margin: 4px 0 0;
    color: #64748B;
    font-size: 14px;
    line-height: 24px;
}

.cf-doc-divider {
    height: 1px;
    margin: 20px 0 26px;
    background: rgba(221, 231, 242, 0.64);
}

.cf-doc-panel h1 {
    font-size: 28px;
    line-height: 38px;
}

.cf-doc-lead {
    margin: 10px 0 26px;
    color: #475569;
    font-size: 15px;
    line-height: 26px;
}

.cf-doc-panel h3 {
    margin-top: 28px;
    font-size: 18px;
    line-height: 28px;
}

.cf-doc-panel ul,
.cf-doc-panel ol {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    color: #334155;
    font-size: 14px;
    line-height: 22px;
}

.cf-doc-panel li {
    position: relative;
    margin-top: 12px;
    padding-left: 22px;
}

.cf-doc-panel ul li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 3px;
    background: #2563EB;
}

.cf-doc-panel ol {
    counter-reset: doc-step;
}

.cf-doc-panel ol li {
    padding-left: 38px;
}

.cf-doc-panel ol li::before {
    counter-increment: doc-step;
    content: counter(doc-step);
    position: absolute;
    left: 4px;
    top: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 12px;
    font-weight: 700;
}

.cf-doc-code {
    margin: 24px 0 0;
    padding: 10px 18px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #F8FAFC;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    white-space: pre-wrap;
}

.cf-overview-side {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.cf-stat-panel {
    position: relative;
    height: 170px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding-top: 80px;
}

.cf-stat-panel h2 {
    position: absolute;
    margin: 28px 0 0 24px;
    font-size: 20px;
    line-height: 28px;
}

.cf-stat-panel div {
    text-align: center;
}

.cf-stat-panel span {
    display: block;
    color: #8B95A5;
    font-size: 13px;
    line-height: 20px;
}

.cf-stat-panel strong {
    display: block;
    margin-top: 8px;
    color: #2563EB;
    font-size: 28px;
    font-weight: 500;
    line-height: 36px;
}

.cf-stat-panel .is-warm {
    color: #F59E0B;
}

.cf-confirm-panel {
    height: 360px;
    padding: 24px;
}

.cf-confirm-panel h2 {
    font-size: 20px;
    line-height: 28px;
}

.cf-confirm-panel dl {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    margin: 18px 0 0;
    font-size: 13px;
    line-height: 20px;
}

.cf-confirm-panel dt {
    color: #94A3B8;
}

.cf-confirm-panel dd {
    margin: 0;
    color: #334155;
    font-weight: 500;
}

.cf-confirm-panel hr {
    margin: 20px 0 22px;
    border: 0;
    border-top: 1px solid rgba(221, 231, 242, 0.64);
}

.cf-confirm-panel h3 {
    margin: 0;
    color: #0F172A;
    font-size: 14px;
    line-height: 22px;
}

.cf-confirm-panel p {
    margin: 10px 0 0;
    color: #64748B;
    font-size: 13px;
    line-height: 22px;
}

.cf-code-shell {
    min-height: 884px;
}

.cf-code-workspace {
    padding: 30px 32px;
}

.cf-code-workspace h2 {
    margin: 0;
    color: #0F172A;
    font-size: 24px;
    line-height: 32px;
}

.cf-code-workspace > p {
    margin: 2px 0 26px;
    color: #64748B;
    font-size: 14px;
    line-height: 22px;
}

.cf-code-editor {
    width: 992px;
    height: 664px;
    min-height: 0;
    overflow: auto;
    border-radius: 14px;
    background: #0F172A;
    color: #E2E8F0;
}

.cf-code-editor pre {
    margin: 0;
    padding: 22px 0 36px;
    overflow: auto;
    background: transparent;
    color: inherit;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 27px;
}

.cf-code-line {
    position: relative;
    display: block;
    min-height: 27px;
    padding-left: 72px;
    padding-right: 24px;
    white-space: pre;
}

.cf-code-line::before {
    content: attr(data-line);
    position: absolute;
    left: 20px;
    width: 34px;
    color: #64748B;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.cf-code-line:nth-child(-n+8) {
    color: #BFDBFE;
}

.cf-feedback-shell {
    min-height: 826px;
}

.cf-feedback-tools {
    height: 104px;
    display: grid;
    grid-template-columns: 1fr 280px 110px 56px;
    gap: 12px;
    align-items: center;
    padding: 24px 24px 24px 32px;
}

.cf-feedback-tools h2,
.cf-feedback-list h2 {
    font-size: 24px;
    line-height: 32px;
}

.cf-feedback-tools p {
    margin: 2px 0 0;
    color: #64748B;
    font-size: 14px;
    line-height: 22px;
}

.cf-feedback-tools input {
    width: 280px;
    height: 44px;
    border: 1px solid rgba(216, 228, 242, 0.75);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    padding: 0 20px;
    color: #0F172A;
    font-size: 13px;
}

.cf-feedback-list {
    height: 628px;
    margin-top: 34px;
    padding: 27px 31px;
}

.cf-feedback-list header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.cf-feedback-list header span {
    color: #64748B;
    font-size: 13px;
}

.cf-feedback-row {
    position: relative;
    min-height: 116px;
    padding: 0 140px 26px 96px;
    border-bottom: 1px solid rgba(221, 231, 242, 0.64);
}

.cf-feedback-row + .cf-feedback-row {
    padding-top: 30px;
}

.cf-feedback-row b {
    position: absolute;
    left: 0;
    top: 0;
    width: 72px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E2E8F0;
    border-radius: 15px;
    color: #64748B;
    font-size: 12px;
    font-weight: 500;
}

.cf-feedback-row + .cf-feedback-row b {
    top: 30px;
}

.cf-feedback-row.is-active b {
    border-color: #BFDBFE;
    background: #EFF6FF;
    color: #2563EB;
    font-weight: 700;
}

.cf-feedback-row strong {
    display: block;
    color: #0F172A;
    font-size: 16px;
    line-height: 24px;
}

.cf-feedback-row p {
    margin: 6px 0 0;
    color: #64748B;
    font-size: 13px;
    line-height: 22px;
}

.cf-feedback-row time {
    position: absolute;
    right: 20px;
    top: 8px;
    color: #94A3B8;
    font-size: 13px;
}

.cf-feedback-row + .cf-feedback-row time {
    top: 38px;
}

.cf-rating-shell.cf-tab-active {
    display: grid;
    grid-template-columns: 664px 328px;
    gap: 32px;
    min-height: 790px;
}

.cf-detail-page .cf-rating-shell.cf-tab-active {
    display: grid;
    grid-template-columns: 664px 328px;
    gap: 32px;
    min-height: 790px;
}

.cf-rating-shell .cf-rating-summary {
    grid-column: 1 / -1;
    position: relative;
    width: 1024px;
    height: 286px;
    padding: 0;
    display: block;
}

.cf-rating-scorebox {
    position: absolute;
    left: 32px;
    top: 30px;
    width: 210px;
}

.cf-rating-scorebox strong {
    display: block;
    margin-top: 20px;
    color: #0F172A;
    font-size: 64px;
    line-height: 74px;
}

.cf-rating-scorebox span {
    color: #64748B;
    font-size: 14px;
}

.cf-rating-shell .cf-rating-bars {
    position: absolute;
    left: 300px;
    top: 49px;
    width: 566px;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cf-rating-shell .cf-rating-bar {
    position: relative;
    display: block;
    width: 566px;
    height: 38px;
}

.cf-rating-shell .cf-rating-bar > span:first-child {
    position: absolute;
    left: 0;
    top: 9px;
    width: 50px;
}

.cf-rating-shell .cf-rating-bar > b {
    position: absolute;
    left: 510px;
    top: 9px;
    width: 56px;
}

.cf-rating-shell .cf-bar-bg {
    position: absolute;
    left: 66px;
    top: 15px;
    width: 420px;
    height: 8px;
    border-radius: 4px;
    background: #EEF2F7;
}

.cf-rating-shell .cf-bar-bg i {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: #2563EB;
}

.cf-rating-shell .cf-rating-summary > button {
    position: absolute;
    left: 884px;
    top: 42px;
    width: 96px;
    height: 42px;
}

.cf-review-panel {
    height: 420px;
    padding: 28px;
}

.cf-review-panel h2,
.cf-rating-composer h2 {
    font-size: 20px;
    line-height: 28px;
}

.cf-review-row {
    position: relative;
    min-height: 104px;
    padding: 28px 0 20px 56px;
    border-bottom: 1px solid rgba(221, 231, 242, 0.64);
}

.cf-review-row span {
    position: absolute;
    left: 0;
    top: 28px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 19px;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 13px;
    font-weight: 700;
}

.cf-review-row strong {
    display: block;
    color: #0F172A;
    font-size: 14px;
    line-height: 22px;
}

.cf-review-row em {
    display: block;
    margin-top: 6px;
    color: #94A3B8;
    font-size: 12px;
    font-style: normal;
}

.cf-rating-composer {
    height: 420px;
    padding: 28px 24px;
}

.cf-star-input {
    margin-top: 20px;
    color: #8B95A5;
    font-size: 30px;
    line-height: 44px;
}

.cf-rating-composer textarea {
    width: 280px;
    height: 148px;
    margin-top: 18px;
    padding: 18px;
    resize: none;
    border: 1px solid rgba(221, 231, 244, 0.9);
    border-radius: 12px;
    background: rgba(248, 251, 255, 0.86);
    color: #0F172A;
    font-size: 13px;
}

.cf-rating-composer button {
    width: 280px;
    margin-top: 18px;
}

.cf-version-shell {
    min-height: 760px;
}

.cf-detail-page .cf-version-layout {
    display: grid;
    grid-template-columns: 700px 292px;
    gap: 32px;
}

.cf-version-timeline {
    width: 700px;
    min-height: 720px;
    padding: 30px 32px;
}

.cf-version-timeline h2 {
    font-size: 24px;
    line-height: 32px;
}

.cf-version-timeline > p {
    margin: 2px 0 34px;
    color: #64748B;
    font-size: 14px;
    line-height: 22px;
}

.cf-release-note {
    width: 292px;
    height: 420px;
    padding: 28px 24px;
}

.cf-release-note h2 {
    font-size: 20px;
    line-height: 28px;
}

.cf-release-note h3 {
    font-size: 15px;
    line-height: 22px;
}

.cf-detail-page .cf-page-footer {
    margin-top: 172px;
    text-align: center;
}

.cf-detail-page .cf-detail-content[data-active-tab="overview"] .cf-page-footer {
    margin-top: 232px;
}

.cf-detail-page .cf-detail-content[data-active-tab="code"] .cf-page-footer {
    margin-top: 94px;
}

.cf-detail-page .cf-detail-content[data-active-tab="feedback"] .cf-page-footer {
    margin-top: 152px;
}

.cf-detail-page .cf-detail-content[data-active-tab="rating"] .cf-page-footer {
    margin-top: 188px;
}

.cf-detail-page .cf-detail-content[data-active-tab="versions"] .cf-page-footer {
    margin-top: 218px;
}

@media (max-width: 1180px) {
    .cf-scripts-page .cf-content,
    .cf-detail-page .cf-content {
        width: calc(100vw - 352px);
        max-width: 1024px;
        margin-left: 32px;
    }

    .cf-command-search,
    .cf-featured-dense-grid,
    .cf-scripts-list-sections,
    .cf-detail-page .cf-detail-tabs {
        width: 100%;
    }

    .cf-command-search {
        max-width: 1024px;
    }

    .cf-featured-dense-grid {
        grid-template-columns: repeat(2, minmax(0, 241px));
    }

    .cf-scripts-list-sections {
        grid-template-columns: 1fr;
    }

    .cf-overview-shell,
    .cf-code-shell,
    .cf-feedback-shell,
    .cf-rating-shell,
    .cf-version-shell {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 900px) {
    .cf-scripts-page,
    .cf-detail-page {
        display: block;
    }

    .cf-scripts-page .cf-sidebar,
    .cf-detail-page .cf-sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .cf-scripts-page .cf-sidebar-inner,
    .cf-detail-page .cf-sidebar-inner {
        width: 100%;
        height: auto;
        padding: 20px 16px;
    }

    .cf-scripts-page .cf-content,
    .cf-detail-page .cf-content {
        width: calc(100vw - 32px);
        margin: 0 auto;
        padding-top: 32px;
    }

    .cf-command-center {
        position: relative;
        top: auto;
        padding: 0;
        background: transparent;
        backdrop-filter: none;
    }

    .cf-command-center,
    .cf-command-search {
        height: auto;
    }

    .cf-top-nav {
        justify-content: flex-start;
        margin-bottom: 12px;
    }

    .cf-top-nav-item {
        height: 36px;
        padding: 0 12px;
        font-size: 13px;
    }

    .cf-command-search {
        position: relative;
        border-radius: 24px;
    }

    .cf-page-header {
        grid-template-columns: 1fr auto;
        gap: 14px;
    }

    .cf-header-search,
    .cf-top-nav {
        grid-column: 1 / -1;
    }

    .cf-header-search {
        justify-self: stretch;
    }

    .cf-auth-entry {
        grid-column: 2;
        grid-row: 1;
    }

    .cf-user-name,
    .cf-logout-button {
        display: none;
    }

    .cf-command-chips {
        position: relative;
        left: auto;
        top: auto;
        margin-top: 16px;
        flex-wrap: wrap;
    }

    .cf-featured-dense-grid,
    .cf-overview-shell.cf-tab-active,
    .cf-rating-shell.cf-tab-active,
    .cf-version-layout {
        grid-template-columns: 1fr;
    }

    .cf-detail-page .cf-detail-header {
        height: auto;
        min-height: 260px;
    }

    .cf-detail-page .cf-detail-actions {
        left: 92px;
        right: auto;
        top: 190px;
    }
}

/* Script detail page top-nav refresh */
.cf-detail-page {
    display: block;
    background:
        radial-gradient(circle at 18% 8%, rgba(37, 99, 235, 0.08) 0, transparent 28%),
        radial-gradient(circle at 84% 18%, rgba(16, 185, 129, 0.07) 0, transparent 24%),
        linear-gradient(180deg, #F8FBFF 0%, #F4F7FB 48%, #F8FAFC 100%);
}

.cf-detail-page .cf-sidebar {
    display: none;
}

.cf-detail-page .cf-main {
    width: 100%;
    min-height: 100vh;
    background-color: transparent;
}

.cf-detail-page .cf-content,
.cf-detail-page .cf-detail-content {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 112px 24px 48px;
    gap: 22px;
}

.cf-detail-page .cf-page-header {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    min-height: 76px;
    padding: 14px 20px;
    box-sizing: border-box;
    border: 1px solid rgba(226, 232, 240, 0.74);
    border-radius: 18px;
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 1000;
    width: min(calc(100% - 64px), 1200px);
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 34px -28px rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(12px);
}

.cf-detail-page .cf-header-search {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 44px;
    justify-self: center;
    padding: 0 5px 0 42px;
    border-radius: 999px;
    box-shadow: 0 8px 20px -10px rgba(37, 99, 235, 0.12),
                0 3px 6px -3px rgba(15, 23, 42, 0.06);
}

.cf-detail-page .cf-hero-brand {
    grid-column: 1;
    grid-row: 1;
}

.cf-detail-page .cf-header-search {
    grid-column: 2;
    grid-row: 1;
}

.cf-detail-page .cf-header-search .cf-search-icon {
    position: absolute;
    left: 16px;
}

.cf-detail-page .cf-header-search button {
    height: 34px;
    padding: 0 18px;
    border-radius: 999px;
}

.cf-detail-page .cf-top-nav {
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
    gap: 4px;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.cf-detail-page .cf-top-nav-item {
    position: relative;
    height: auto;
    padding: 6px 10px;
    border-radius: 6px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    background: transparent;
}

.cf-detail-page .cf-auth-entry {
    grid-column: 4;
    grid-row: 1;
    min-width: 72px;
}

.cf-detail-page .cf-top-nav-item:hover {
    color: #0F172A;
    background: #F1F5F9;
}

.cf-detail-page .cf-top-nav-item-active,
.cf-detail-page .cf-top-nav-item-active:hover {
    color: #2563EB;
    background: transparent;
    box-shadow: none;
}

.cf-detail-page .cf-top-nav-item-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: #2563EB;
}

.cf-detail-page .cf-breadcrumb {
    height: auto;
    margin-top: 8px;
}

.cf-detail-page .cf-detail-header {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    height: auto;
    min-height: 148px;
    margin-top: 0;
    padding: 22px 24px;
    border: 1px solid rgba(222, 231, 242, 0.78);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--cf-white-surface-shadow);
    backdrop-filter: blur(10px);
}

.cf-detail-page .cf-detail-icon-wrap,
.cf-detail-page .cf-detail-info,
.cf-detail-page .cf-detail-actions {
    position: static;
}

.cf-detail-page .cf-detail-icon-wrap {
    width: 72px;
    height: 72px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 72px;
}

.cf-detail-page .cf-detail-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-detail-page .cf-detail-info {
    width: auto;
    min-width: 0;
}

.cf-detail-page .cf-detail-info h1 {
    width: auto;
    max-width: none;
    height: auto;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 32px;
    line-height: 40px;
}

.cf-detail-page .cf-detail-info > p {
    height: auto;
    max-width: 680px;
    margin-top: 6px;
    white-space: normal;
}

.cf-detail-page .cf-detail-actions {
    width: 204px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    justify-self: end;
}

.cf-detail-page .cf-detail-actions .install-btn {
    grid-column: 1 / -1;
    height: 44px;
}

.cf-detail-page .cf-detail-actions .cf-btn-outline {
    height: 36px;
}

.cf-detail-page .cf-detail-tabs {
    position: sticky;
    top: 94px;
    z-index: 80;
    height: auto;
    margin-top: 4px;
    padding: 8px;
    gap: 4px;
    align-items: center;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--cf-white-surface-shadow);
    backdrop-filter: blur(10px);
    overflow-x: auto;
}

.cf-detail-page .cf-tab {
    width: auto;
    min-width: 72px;
    height: 36px;
    padding: 0 16px;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.cf-detail-page .cf-tab-active,
.cf-detail-page .cf-tab-active:hover {
    color: #FFFFFF;
    background: #2563EB;
    box-shadow: 0 8px 18px -12px rgba(37, 99, 235, 0.85);
}

.cf-detail-page .cf-detail-body {
    margin-top: 0;
}

.cf-detail-page .cf-overview-shell,
.cf-detail-page .cf-code-shell,
.cf-detail-page .cf-feedback-shell,
.cf-detail-page .cf-rating-shell,
.cf-detail-page .cf-version-shell {
    width: 100%;
    margin-left: 0;
    padding: 16px;
    background: rgba(37, 99, 235, 0.08);
}

body .cf-detail-page .cf-tab-content.cf-tab-active:hover {
    background: var(--cf-white-surface-bg) !important;
}

.cf-detail-page .cf-overview-shell.cf-tab-active {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    min-height: 0;
}

.cf-detail-page .cf-doc-panel {
    height: auto;
    min-height: 560px;
}

.cf-detail-page .cf-code-shell,
.cf-detail-page .cf-feedback-shell,
.cf-detail-page .cf-version-shell {
    min-height: 0;
}

.cf-detail-page .cf-code-editor {
    width: 100%;
    height: min(66vh, 680px);
    min-height: 420px;
}

.cf-detail-page .cf-feedback-tools {
    height: auto;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 280px) auto auto;
}

.cf-detail-page .cf-feedback-list {
    height: auto;
}

.cf-detail-page .cf-rating-shell.cf-tab-active {
    grid-template-columns: minmax(0, 1fr) 320px;
    min-height: 0;
}

.cf-detail-page .cf-rating-shell .cf-rating-summary {
    width: 100%;
}

.cf-detail-page .cf-detail-content[data-active-tab] .cf-page-footer,
.cf-detail-page .cf-page-footer {
    margin-top: 28px;
}

.cf-detail-page .cf-version-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
}

.cf-detail-page .cf-version-timeline,
.cf-detail-page .cf-release-note {
    width: auto;
}

@media (max-width: 1040px) {
    .cf-detail-page .cf-page-header {
        grid-template-columns: auto 1fr auto;
    }

    .cf-detail-page .cf-header-search {
        display: none;
    }

    .cf-detail-page .cf-detail-header {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .cf-detail-page .cf-detail-actions {
        grid-column: 1 / -1;
        width: 100%;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        justify-self: stretch;
    }

    .cf-detail-page .cf-detail-actions .install-btn {
        grid-column: auto;
    }

    .cf-detail-page .cf-overview-shell.cf-tab-active,
    .cf-detail-page .cf-rating-shell.cf-tab-active,
    .cf-detail-page .cf-version-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .cf-detail-page .cf-content,
    .cf-detail-page .cf-detail-content {
        padding: 146px 16px 36px;
    }

    .cf-detail-page .cf-page-header {
        grid-template-columns: 1fr auto;
        gap: 12px;
        width: calc(100% - 32px);
        padding: 14px 16px;
    }

    .cf-detail-page .cf-top-nav {
        grid-column: 1 / -1;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .cf-detail-page .cf-auth-entry {
        grid-column: 2;
        grid-row: 1;
    }

    .cf-detail-page .cf-detail-header {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 14px;
        padding: 18px;
    }

    .cf-detail-page .cf-detail-icon-wrap {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
        border-radius: 14px;
    }

    .cf-detail-page .cf-detail-info h1 {
        font-size: 24px;
        line-height: 32px;
    }

    .cf-detail-page .cf-detail-stats,
    .cf-detail-page .cf-detail-chip-row {
        flex-wrap: wrap;
    }

    .cf-detail-page .cf-detail-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cf-detail-page .cf-detail-actions .install-btn {
        grid-column: 1 / -1;
    }

    .cf-detail-page .cf-detail-tabs {
        top: 136px;
    }

    .cf-detail-page .cf-feedback-tools {
        grid-template-columns: 1fr;
    }

    .cf-detail-page .cf-feedback-tools input,
    .cf-detail-page .cf-feedback-tools button {
        width: 100%;
    }

    .cf-detail-page .cf-stat-panel {
        height: auto;
        padding: 68px 12px 18px;
    }

    .cf-detail-page .cf-confirm-panel {
        height: auto;
    }
}

/* Unified white surface pass */
.cf-script-card,
.cf-detail-panel,
.cf-info-panel,
.cf-account-card,
.cf-sidebar-tip,
.cf-page-header,
.cf-detail-page .cf-page-header,
.cf-command-search,
.cf-category-panel,
.cf-empty-card,
.cf-doc-panel,
.cf-stat-panel,
.cf-confirm-panel,
.cf-feedback-tools,
.cf-feedback-list,
.cf-rating-summary,
.cf-review-panel,
.cf-rating-composer,
.cf-version-timeline,
.cf-release-note,
.cf-detail-page .cf-detail-header,
.cf-detail-page .cf-detail-tabs,
.cf-detail-page .cf-overview-shell,
.cf-detail-page .cf-code-shell,
.cf-detail-page .cf-feedback-shell,
.cf-detail-page .cf-rating-shell,
.cf-detail-page .cf-version-shell {
    background-color: var(--cf-white-surface-bg);
    border-color: var(--cf-white-surface-border);
    box-shadow: var(--cf-white-surface-shadow);
}

.cf-script-card:hover,
.cf-detail-page .cf-detail-header:hover,
.cf-detail-page .cf-detail-tabs:hover,
.cf-doc-panel:hover,
.cf-stat-panel:hover,
.cf-confirm-panel:hover,
.cf-review-panel:hover,
.cf-rating-composer:hover,
.cf-version-timeline:hover,
.cf-release-note:hover {
    box-shadow: var(--cf-white-surface-shadow-hover);
}

.cf-code-editor,
.cf-carousel-slide,
.cp-cta-inner {
    box-shadow: var(--cf-white-surface-shadow);
}
