/*
 * ChouChou Condo · 住户主题活动 Tag 组件
 * 从原 [chouchou_topic_tags] 视觉样式提取，供多个 Makers 页面共用。
 */

/*
 * =========================================
 * 基础隔离
 * =========================================
 */

.cctt-topic-tags,
.cctt-topic-tags *,
.cctt-topic-tags *::before,
.cctt-topic-tags *::after {
    box-sizing: border-box;
}

.cctt-topic-tags {
    --cctt-wine: #6f2947;
    --cctt-wine-deep: #542036;
    --cctt-wine-dark: #42172d;

    --cctt-rose: #ae5d7e;
    --cctt-rose-bright: #c86f94;
    --cctt-rose-soft: #f8dce7;
    --cctt-pink-pale: #fff3f8;

    --cctt-cream: #fffaf5;
    --cctt-gold: #c9a25f;
    --cctt-gold-light: #ead6a5;
    --cctt-gold-pale: #fff1c8;

    --cctt-text: #593746;
    --cctt-muted: #9a7a88;

    position: relative;
    width: 100%;
    max-width: 330px;
    margin: 18px 0;

    color: var(--cctt-text);

    font-family:
        "Microsoft YaHei",
        "PingFang SC",
        "Noto Sans SC",
        Arial,
        sans-serif;

    line-height: 1.5;
    isolation: isolate;
}

.cctt-topic-tags a,
.cctt-topic-tags button {
    -webkit-tap-highlight-color: transparent;
}

/*
 * =========================================
 * 外层华丽面板
 * =========================================
 */

.cctt-topic-tags .cctt-shell {
    position: relative;
    overflow: hidden;

    padding: 11px;

    border: 1px solid rgba(194, 149, 81, 0.74);
    border-radius: 22px;

    background:
        radial-gradient(
            circle at 9% 0%,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0) 31%
        ),
        linear-gradient(
            150deg,
            #fffdf9 0%,
            #fff4f8 49%,
            #f9e3ec 100%
        );

    box-shadow:
        0 18px 42px rgba(91, 34, 61, 0.16),
        inset 0 0 0 4px rgba(255, 255, 255, 0.58);
}

.cctt-topic-tags .cctt-shell::before {
    content: "";

    position: absolute;
    top: -70px;
    right: -55px;

    width: 145px;
    height: 145px;

    border-radius: 50%;
    pointer-events: none;

    background:
        radial-gradient(
            circle,
            rgba(217, 133, 168, 0.27),
            rgba(217, 133, 168, 0)
        );
}

.cctt-topic-tags .cctt-shell::after {
    content: "";

    position: absolute;
    bottom: -98px;
    left: -78px;

    width: 174px;
    height: 174px;

    border-radius: 50%;
    pointer-events: none;

    background:
        radial-gradient(
            circle,
            rgba(232, 203, 143, 0.2),
            rgba(232, 203, 143, 0)
        );
}

.cctt-topic-tags .cctt-inner {
    position: relative;
    z-index: 2;

    padding: 17px 14px 14px;

    border: 1px solid rgba(199, 159, 96, 0.43);
    border-radius: 15px;

    background: rgba(255, 255, 255, 0.61);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

/*
 * =========================================
 * 标题
 * =========================================
 */

.cctt-topic-tags .cctt-heading {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin: 0 0 12px;
    text-align: center;
}

.cctt-topic-tags .cctt-heading-line {
    width: 29px;
    height: 1px;
    flex: 0 1 29px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(197, 154, 88, 0.88)
        );
}

.cctt-topic-tags .cctt-heading-line:last-child {
    background:
        linear-gradient(
            90deg,
            rgba(197, 154, 88, 0.88),
            transparent
        );
}

.cctt-topic-tags .cctt-heading-crown {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    color: var(--cctt-gold);
    font-size: 14px;
    line-height: 1;

    filter:
        drop-shadow(
            0 2px 4px rgba(130, 87, 29, 0.17)
        );
}

.cctt-topic-tags .cctt-heading-crown::after {
    content: "✦";

    position: absolute;
    top: -4px;
    right: -6px;

    color: var(--cctt-rose-bright);
    font-size: 6px;

    animation:
        ccttStarGlow 2.2s ease-in-out infinite;
}

.cctt-topic-tags .cctt-heading-title {
    display: block;

    color: var(--cctt-wine);

    font-family:
        "Noto Serif SC",
        "Songti SC",
        "Times New Roman",
        serif;

    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.13em;
    line-height: 1.2;

    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9);
}



/*
 * =========================================
 * 两个高亮宣传标签
 * 每张卡片单独占一行，并可分别设置名称、链接与主题图
 * =========================================
 */

.cctt-topic-tags .cctt-featured {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin: 0 0 11px;
}

.cctt-topic-tags .cctt-featured-card {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 108px;
    overflow: hidden;
    color: #fff !important;
    border: 1px solid rgba(205, 164, 91, 0.76);
    border-radius: 9px;
    outline: none;
    background-color: var(--cctt-wine-deep);
    background-image:
        linear-gradient(
            180deg,
            rgba(48, 12, 31, 0.02) 18%,
            rgba(54, 13, 35, 0.18) 55%,
            rgba(48, 12, 31, 0.8) 100%
        ),
        var(--cctt-feature-image);
    background-repeat: no-repeat;
    background-position:
        center,
        var(--cctt-feature-position, center);
    background-size: cover;
    box-shadow:
        0 7px 16px rgba(91, 34, 61, 0.16),
        inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    text-decoration: none !important;
    transform: translateZ(0);
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        filter 0.22s ease;
}

.cctt-topic-tags .cctt-featured-card::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: -95%;
    left: -52%;
    width: 27%;
    height: 290%;
    pointer-events: none;
    opacity: 0;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.7),
            transparent
        );
    transform: rotate(19deg);
}

.cctt-topic-tags .cctt-featured-card::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 5px;
    pointer-events: none;
    border: 1px solid rgba(255, 234, 188, 0.45);
    border-radius: 6px;
}

.cctt-topic-tags .cctt-featured-card:hover {
    border-color: rgba(190, 104, 141, 0.82);
    box-shadow:
        0 11px 23px rgba(91, 34, 61, 0.24),
        inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    filter: brightness(1.035) saturate(1.05);
    transform: translateY(-2px);
}

.cctt-topic-tags .cctt-featured-card:hover::before {
    animation: ccttLuxuryShine 0.9s ease;
}

.cctt-topic-tags .cctt-featured-name {
    position: absolute;
    z-index: 4;
    right: 9px;
    bottom: 8px;
    left: 9px;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    color: #fff !important;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.035em;
    line-height: 1.25;
    text-shadow:
        0 2px 2px rgba(43, 10, 28, 0.98),
        0 0 7px rgba(43, 10, 28, 0.94),
        0 0 14px rgba(43, 10, 28, 0.64);
}

.cctt-topic-tags .cctt-featured-name::after {
    content: "›";
    flex: 0 0 auto;
    color: #ffe6ad;
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.2s ease;
}

.cctt-topic-tags .cctt-featured-card:hover
.cctt-featured-name::after {
    transform: translateX(2px);
}

/*
 * =========================================
 * 标签列表
 * =========================================
 */

.cctt-topic-tags .cctt-tag-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;

    width: 100%;
    margin: 0;
    padding: 0;

    list-style: none;
}

.cctt-topic-tags .cctt-tag-item {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.cctt-topic-tags .cctt-tag-link {
    position: relative;

    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 15px;
    align-items: center;
    gap: 8px;

    width: 100%;
    min-height: 43px;

    margin: 0;
    padding: 6px 9px 6px 7px;

    overflow: hidden;

    color: #724057 !important;

    border: 1px solid rgba(197, 151, 86, 0.43);
    border-radius: 10px;
    outline: none;

    background:
        radial-gradient(
            circle at 0% 0%,
            rgba(255, 255, 255, 0.94),
            rgba(255, 255, 255, 0) 35%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.97),
            rgba(255, 241, 247, 0.95)
        );

    box-shadow:
        0 5px 12px rgba(101, 41, 67, 0.075),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);

    font-size: 13px;
    font-weight: 680;
    letter-spacing: 0.025em;
    line-height: 1.3;

    text-decoration: none !important;

    transform: translateZ(0);

    transition:
        color 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease,
        background 0.22s ease;
}

.cctt-topic-tags .cctt-tag-link::before {
    content: "";

    position: absolute;
    top: -100%;
    left: -47%;

    width: 25%;
    height: 300%;

    pointer-events: none;
    opacity: 0;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.82),
            transparent
        );

    transform: rotate(19deg);
}

.cctt-topic-tags .cctt-tag-link:hover {
    color: var(--cctt-wine) !important;

    border-color: rgba(185, 103, 139, 0.58);

    background:
        radial-gradient(
            circle at 0% 0%,
            rgba(255, 255, 255, 1),
            rgba(255, 255, 255, 0) 37%
        ),
        linear-gradient(
            135deg,
            #fffdfd,
            #fbe6ef
        );

    box-shadow:
        0 8px 17px rgba(91, 34, 61, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 1);

    transform: translateY(-1px);
}

.cctt-topic-tags .cctt-tag-link:hover::before {
    animation:
        ccttLuxuryShine 0.88s ease;
}

/*
 * 标签左侧宝石
 */

.cctt-topic-tags .cctt-tag-gem {
    position: relative;

    display: inline-flex;

    width: 26px;
    height: 26px;

    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    color: #fff6dc;

    border: 1px solid rgba(231, 203, 145, 0.73);
    border-radius: 8px;

    background:
        linear-gradient(
            145deg,
            #8a3b5b 0%,
            #b85f84 55%,
            #6f2947 100%
        );

    box-shadow:
        0 4px 9px rgba(86, 28, 54, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);

    font-size: 7px;
    line-height: 1;
}

.cctt-topic-tags .cctt-tag-gem::before {
    content: "◆";
}

.cctt-topic-tags .cctt-tag-gem::after {
    content: "";

    position: absolute;
    inset: 3px;

    border: 1px solid rgba(255, 244, 213, 0.25);
    border-radius: 5px;
}

/*
 * 标签名称
 */

.cctt-topic-tags .cctt-tag-name {
    min-width: 0;
    overflow: hidden;

    color: inherit;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/*
 * 右侧箭头
 */

.cctt-topic-tags .cctt-tag-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--cctt-gold);

    font-family:
        Arial,
        sans-serif;

    font-size: 17px;
    font-weight: 400;
    line-height: 1;

    transition:
        transform 0.2s ease;
}

.cctt-topic-tags .cctt-tag-link:hover
.cctt-tag-arrow {
    transform: translateX(2px);
}

/*
 * =========================================
 * 查看更多区域
 * =========================================
 */

.cctt-topic-tags .cctt-more-wrap {
    position: relative;

    margin-top: 9px;
    overflow: hidden;

    border: 1px solid rgba(197, 151, 86, 0.48);
    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.98),
            rgba(255, 242, 247, 0.96)
        );

    box-shadow:
        0 6px 14px rgba(101, 41, 67, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.cctt-topic-tags .cctt-more-wrap::before {
    content: "";

    position: absolute;
    top: -55px;
    right: -45px;

    width: 110px;
    height: 110px;

    border-radius: 50%;
    pointer-events: none;

    background:
        radial-gradient(
            circle,
            rgba(208, 124, 160, 0.16),
            rgba(208, 124, 160, 0)
        );
}

/*
 * 查看更多按钮
 */

.cctt-topic-tags .cctt-more-button {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 9px;

    width: 100%;
    min-height: 48px;

    margin: 0;
    padding: 7px 9px;

    appearance: none;
    -webkit-appearance: none;

    color: var(--cctt-wine);

    border: 0;
    border-radius: 11px;
    outline: none;

    background: transparent;

    font-family: inherit;
    text-align: left;

    cursor: pointer;

    transition:
        background 0.22s ease;
}

.cctt-topic-tags .cctt-more-button:hover {
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.86),
            rgba(255, 231, 241, 0.76)
        );
}

.cctt-topic-tags .cctt-more-icon {
    display: inline-flex;

    width: 31px;
    height: 31px;

    align-items: center;
    justify-content: center;

    color: #fff5dc;

    border: 1px solid rgba(226, 196, 133, 0.64);
    border-radius: 9px;

    background:
        linear-gradient(
            145deg,
            #8a3b5b,
            #bd6e90
        );

    box-shadow:
        0 5px 11px rgba(104, 42, 69, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.36);

    font-size: 10px;
    line-height: 1;
}

.cctt-topic-tags .cctt-more-copy {
    position: relative;
    min-width: 0;
}

/*
 * 两种按钮文字都直接存在于 HTML 中，
 * 不再由 JavaScript 临时写入，因此 GTranslate 可以识别并翻译。
 */
.cctt-topic-tags .cctt-more-title {
    display: block;

    color: var(--cctt-wine);

    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.04em;
    line-height: 1.3;

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease;
}

.cctt-topic-tags
.cctt-more-title-expanded {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cctt-topic-tags
.cctt-more-button[aria-expanded="true"]
.cctt-more-title-collapsed {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cctt-topic-tags
.cctt-more-button[aria-expanded="true"]
.cctt-more-title-expanded {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cctt-topic-tags .cctt-more-hint {
    display: block;

    margin-top: 2px;

    overflow: hidden;

    color: var(--cctt-muted);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 9.5px;
    letter-spacing: 0.06em;
    line-height: 1.25;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.cctt-topic-tags .cctt-more-arrow {
    display: inline-flex;

    width: 23px;
    height: 23px;

    align-items: center;
    justify-content: center;

    color: var(--cctt-gold);

    border-radius: 50%;

    background:
        rgba(255, 248, 231, 0.94);

    font-family:
        Arial,
        sans-serif;

    font-size: 15px;
    line-height: 1;

    transition:
        transform 0.25s ease;
}

.cctt-topic-tags .cctt-more-button[
    aria-expanded="true"
] .cctt-more-arrow {
    transform: rotate(180deg);
}

/*
 * =========================================
 * 剩余标签展开面板
 * =========================================
 */

.cctt-topic-tags .cctt-more-panel {
    position: relative;
    z-index: 2;

    max-height: 0;

    overflow: hidden;
    opacity: 0;

    border-top: 1px solid transparent;

    transition:
        max-height 0.38s ease,
        opacity 0.26s ease,
        border-color 0.3s ease;
}

.cctt-topic-tags .cctt-more-panel.is-open {
    max-height: 310px;
    opacity: 1;

    border-top-color:
        rgba(199, 157, 93, 0.24);
}

/*
 * 真正带竖向滚动条的区域
 */

.cctt-topic-tags .cctt-more-scroll {
    max-height: 275px;

    overflow-x: hidden;
    overflow-y: auto;

    padding:
        8px
        7px
        8px
        8px;

    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color:
        rgba(174, 93, 126, 0.62)
        rgba(247, 224, 234, 0.72);
}

.cctt-topic-tags
.cctt-more-scroll::-webkit-scrollbar {
    width: 6px;
}

.cctt-topic-tags
.cctt-more-scroll::-webkit-scrollbar-track {
    border-radius: 999px;

    background:
        rgba(247, 224, 234, 0.72);
}

.cctt-topic-tags
.cctt-more-scroll::-webkit-scrollbar-thumb {
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 999px;

    background:
        linear-gradient(
            180deg,
            #c8789a,
            #8b405f
        );
}

.cctt-topic-tags
.cctt-more-scroll::-webkit-scrollbar-thumb:hover {
    background:
        linear-gradient(
            180deg,
            #b9678a,
            #70304c
        );
}

/*
 * 展开后的标签：
 * 每个 Tag 独占一行。长英文／德文等翻译允许自然换行，
 * 不再使用双栏与省略号截断，避免 GTranslate 后文字显示不完整。
 */

.cctt-topic-tags
.cctt-more-scroll .cctt-tag-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
}

.cctt-topic-tags
.cctt-more-scroll .cctt-tag-link {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 7px;

    min-height: 40px;
    padding: 6px 8px;

    border-radius: 9px;
    font-size: 12px;
}

.cctt-topic-tags
.cctt-more-scroll .cctt-tag-gem {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    font-size: 6px;
}

.cctt-topic-tags
.cctt-more-scroll .cctt-tag-name {
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.35;
}

.cctt-topic-tags
.cctt-more-scroll .cctt-tag-arrow {
    display: none;
}

/*
 * =========================================
 * 空标签提示
 * =========================================
 */

.cctt-topic-tags .cctt-empty {
    padding: 19px 12px;

    color: var(--cctt-muted);

    border: 1px dashed rgba(197, 151, 86, 0.42);
    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.58);

    font-size: 12px;
    letter-spacing: 0.04em;
    text-align: center;
}

.cctt-topic-tags .cctt-empty-symbol {
    display: block;

    margin-bottom: 6px;

    color: var(--cctt-gold);
    font-size: 14px;
}

/*
 * =========================================
 * 底部信息和装饰
 * =========================================
 */

.cctt-topic-tags .cctt-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-top: 12px;

    color: var(--cctt-muted);

    font-size: 9.5px;
    letter-spacing: 0.07em;
    line-height: 1.2;
}

.cctt-topic-tags .cctt-footer::before,
.cctt-topic-tags .cctt-footer::after {
    content: "";

    width: 35px;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(197, 154, 88, 0.62)
        );
}

.cctt-topic-tags .cctt-footer::after {
    background:
        linear-gradient(
            90deg,
            rgba(197, 154, 88, 0.62),
            transparent
        );
}

.cctt-topic-tags .cctt-footer-heart {
    color: var(--cctt-gold);
    font-size: 10px;
}

/*
 * =========================================
 * 键盘焦点
 * =========================================
 */

.cctt-topic-tags .cctt-tag-link:focus-visible,
.cctt-topic-tags .cctt-more-button:focus-visible {
    outline:
        3px solid
        rgba(216, 137, 172, 0.3);

    outline-offset: 2px;
}

/*
 * =========================================
 * 动画
 * =========================================
 */

@keyframes ccttLuxuryShine {
    0% {
        left: -48%;
        opacity: 0;
    }

    18% {
        opacity: 0.9;
    }

    100% {
        left: 128%;
        opacity: 0;
    }
}

@keyframes ccttStarGlow {
    0%,
    100% {
        opacity: 0.38;
        transform: scale(0.78);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/*
 * =========================================
 * 响应式
 * =========================================
 */

@media (max-width: 767px) {
    .cctt-topic-tags {
        max-width: 100%;
    }
}

@media (max-width: 380px) {
    .cctt-topic-tags .cctt-inner {
        padding-right: 11px;
        padding-left: 11px;
    }

    .cctt-topic-tags .cctt-heading {
        gap: 6px;
    }

    .cctt-topic-tags .cctt-heading-line {
        width: 22px;
        flex-basis: 22px;
    }

    .cctt-topic-tags .cctt-heading-title {
        font-size: 17px;
    }

    .cctt-topic-tags .cctt-featured-card {
        min-height: 96px;
    }

    .cctt-topic-tags .cctt-featured-name {
        font-size: 13px;
    }

    .cctt-topic-tags .cctt-tag-link {
        grid-template-columns:
            25px
            minmax(0, 1fr)
            13px;

        gap: 6px;

        padding-right: 7px;
        padding-left: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cctt-topic-tags *,
    .cctt-topic-tags *::before,
    .cctt-topic-tags *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}

/* Makers 公共资料载入状态 */
.cctt-topic-tags .cctt-directory-status {
  margin: 10px 0 0;
  color: var(--cctt-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.cctt-topic-tags .cctt-directory-status[hidden] {
  display: none !important;
}

.cctt-topic-tags.is-loading .cctt-shell {
  opacity: 0.72;
}

[data-p1000-tag-message] .player,
.cctt-topic-tags .player {
  color: #8a2f55;
  font-weight: 800;
}
