/* Template 2 keeps its two-column mobile layout on every screen. */
html.template-two {
    /* list9.css uses 13.3vw for rem: cap it at the catalog's 480px width. */
    font-size: min(13.333333vw, 64px) !important;
}

body.template-two {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: clamp(14px, 3.6vw, 16px);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background-color: #eee;
}

/* Undo only the old universal vw font rule; component font sizes still win. */
:where(body.template-two) * {
    font-size: inherit;
}

body.template-two #app {
    width: 100%;
    max-width: 480px;
    height: 100%;
    height: 100dvh;
    margin-inline: auto;
    background-color: #fff;
}

body.template-two .index,
body.template-two .view {
    min-width: 0;
    min-height: 0;
}

body.template-two .index {
    overflow: hidden;
}

body.template-two .video-type {
    padding: 8px 6px;
}

body.template-two .type-search {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
}

body.template-two .type-search > div {
    min-width: 0;
}

body.template-two .type-have {
    min-width: 0;
    height: auto;
    min-height: 44px;
    padding: 8px;
    font-size: clamp(14px, 3.6vw, 16px) !important;
    line-height: 1.4;
}

body.template-two .input-text {
    width: 100%;
    min-width: 0;
    height: 44px;
    margin: 0;
    padding: 8px;
    font-size: 16px !important;
    line-height: 1.5;
}

body.template-two .input-text::placeholder {
    font-size: 14px;
}

body.template-two .btn-search {
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 6px;
    border-radius: 6px;
    background: #7258ed;
    color: #fff;
    font-size: 15px !important;
    line-height: 1.5;
    white-space: nowrap;
}

body.template-two .list2-hot-search {position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:40;max-height:300px;overflow:auto;padding:12px;border:1px solid #c8b9ed;border-radius:10px;background:#fff;color:#35294e;box-shadow:0 8px 24px #35205226;}
body.template-two .list2-hot-label {display:block;margin-bottom:8px;font-size:14px!important;font-weight:650;color:#645578;}
body.template-two .list2-hot-words {display:flex;flex-wrap:wrap;gap:8px;}
body.template-two .list2-hot-search button {min-width:44px;min-height:44px;max-width:100%;padding:8px 12px;border:1px solid #d9ccf2;border-radius:7px;background:#f5f0ff;color:#4c3080;font:inherit;font-size:15px!important;line-height:1.5;overflow-wrap:anywhere;cursor:pointer;touch-action:manipulation;}
body.template-two .list2-hot-search button:hover {border-color:#7258ed;background:#eae1fc;}
body.template-two .list2-hot-search button:focus-visible {outline:3px solid #7258ed;outline-offset:2px;}
body.template-two .list2-hot-search p {margin:6px 0 0;color:#645578;font-size:14px!important;line-height:1.6;}

body.template-two .type-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

body.template-two .type-item,
body.template-two .type-row .active {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    min-height: 44px;
    height: auto;
    margin: 0;
    padding: 2px;
    font-size: clamp(16px, 4.2vw, 18px);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

/* Main and child categories share one always-visible menu. */
body.template-two .category-flat-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
}

body.template-two .category-flat-row .type-item {
    min-height: 32px;
    padding: 1px 0;
    border: 2px solid #70726d;
    background: #fff;
    color: #333;
    font-family: inherit;
    font-size: clamp(16px, 4.5vw, 20px);
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    cursor: pointer;
    touch-action: manipulation;
}

body.template-two .category-flat-row .type-item.active {
    background: linear-gradient(#fffaaa, #fff000);
    border-color: #8a7725;
}

body.template-two .category-flat-row .type-item:focus-visible {
    outline: 3px solid #4f2b9b;
    outline-offset: 2px;
}

body.template-two .template-two-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
    padding: 8px 6px;
}

body.template-two .list-item {
    display: block;
    width: auto;
    min-width: 0;
    margin: 0;
    vertical-align: top;
}

body.template-two .img-wrap {
    height: auto;
    aspect-ratio: 3 / 2;
}

body.template-two .thumb {
    object-fit: cover;
}

body.template-two .video-title {
    display: -webkit-box;
    height: auto;
    min-height: 3em;
    margin: 6px 0;
    padding: 0 3px;
    font-size: clamp(14px, 3.7vw, 16px);
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
    overflow: hidden;
}

body.template-two .list-item .img-tips {
    padding: 4px 3px;
    font-size: clamp(12px, 3.1vw, 14px);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

body.template-two .list-item .img-tips font {
    font-size: inherit !important;
}

body.template-two .member-grid {
    grid-template-columns: minmax(0, 1fr);
}

body.template-two #refreshFab {
    right: max(10px, calc((100vw - 480px) / 2 + 10px)) !important;
}

body.template-two #loader {
    position: fixed;
    width: min(100%, 480px);
    left: 50%;
    transform: translateX(-50%);
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.template-two #loader .uni-loading {
    margin: 0;
}

body.template-two #msg,
body.template-two #popbox_wxh5 {
    width: min(100%, 480px);
    left: 50%;
    transform: translateX(-50%);
}

body.template-two .topimg-son {
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

@media (min-width: 481px) {
    body.template-two #app {
        box-shadow: 0 0 24px #00000012;
    }
}
