/* ==========================================================================
   tpl013 relayout - 主题「靛蓝札记」
   单色相靛蓝 + 浅雾底 + 杂志式不等格网格 + 标签云导航
   所有新结构均使用 t13- 前缀，与旧主题类名隔离
   ========================================================================== */

:root {
    --t13-bg: #f1f2fa;
    --t13-surface: #ffffff;
    --t13-surface-2: #f7f8fd;
    --t13-ink: #1a1b33;
    --t13-ink-2: #4b4d70;
    --t13-muted: #8688a8;
    --t13-line: #e3e4f2;
    --t13-brand: #4338ca;
    --t13-brand-2: #6366f1;
    --t13-brand-soft: #e9e9fb;
    --t13-radius: 12px;
    --t13-radius-s: 8px;
    --t13-shadow: 0 2px 10px rgba(36, 38, 92, .06);
    --t13-shadow-2: 0 8px 26px rgba(36, 38, 92, .12);
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    background: var(--t13-bg);
    color: var(--t13-ink);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .2s, background-color .2s, border-color .2s, box-shadow .2s;
}

img {
    border: 0;
    max-width: 100%;
}

/* ---------- 布局容器 ---------- */

.t13-wrap {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.t13-block {
    margin: 22px 0;
}

/* ---------- 广告位 ---------- */

.t13-ad-banner {
    margin: 14px 0 0;
    line-height: 0;
    border-radius: var(--t13-radius-s);
    overflow: hidden;
}

.t13-ad-banner a,
.t13-ad-banner img {
    display: block;
    width: 100%;
}

/* 图标位：固定正方形，尺寸由本表控制（骨架里不写 _class，避免被注入内联高度） */
.t13-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 12px;
}

.t13-icons:empty {
    display: none;
}

.t13-icon {
    display: block;
    text-align: center;
    color: var(--t13-ink-2);
}

.t13-icon img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--t13-line);
    background: var(--t13-surface);
}

.t13-icon span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.t13-icon:hover {
    color: var(--t13-brand);
}

/* ---------- 顶部：品牌 + 搜索 ---------- */

.t13-head {
    background: var(--t13-surface);
    border-bottom: 1px solid var(--t13-line);
    margin-bottom: 22px;
}

.t13-head-in {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.t13-brand {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    line-height: 1.2;
}

.t13-brand-mark {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .5px;
    color: var(--t13-brand);
}

.t13-brand-sub {
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--t13-muted);
}

.t13-search {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    max-width: 640px;
    margin-left: auto;
    background: var(--t13-surface-2);
    border: 1px solid var(--t13-line);
    border-radius: 999px;
    overflow: hidden;
}

.t13-search-input {
    flex: 1 1 auto;
    min-width: 1px;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 18px;
    height: 44px;
    font-size: 15px;
    color: var(--t13-ink);
    font-family: inherit;
}

.t13-search-input::placeholder {
    color: var(--t13-muted);
}

.t13-search-btn {
    flex: 0 0 auto;
    border: 0;
    cursor: pointer;
    padding: 0 26px;
    height: 44px;
    font-size: 15px;
    font-family: inherit;
    color: #fff;
    background: var(--t13-brand);
}

.t13-search-btn:hover {
    background: var(--t13-brand-2);
}

/* ---------- 导航 ---------- */

.t13-nav {
    border-top: 1px solid var(--t13-line);
    background: var(--t13-surface);
}

.t13-nav-in {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.t13-nav-in a {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--t13-ink-2);
    background: var(--t13-surface-2);
    border: 1px solid transparent;
}

.t13-nav-in a:hover {
    color: var(--t13-brand);
    background: var(--t13-brand-soft);
    border-color: #d5d5f6;
}

.t13-nav-home {
    color: #fff !important;
    background: var(--t13-brand) !important;
}

.t13-nav-home:hover {
    background: var(--t13-brand-2) !important;
}

.t13-nav-sep {
    width: 1px;
    height: 18px;
    background: var(--t13-line);
    margin: 0 6px;
}

/* ---------- 面板 / 区块标题 ---------- */

.t13-panel {
    background: var(--t13-surface);
    border: 1px solid var(--t13-line);
    border-radius: var(--t13-radius);
    box-shadow: var(--t13-shadow);
    padding: 16px 18px 18px;
    margin: 18px 0;
}

.t13-panel-hd {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.t13-panel-hd h2,
.t13-panel-hd h1 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--t13-ink);
}

.t13-panel-hd .t13-en {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--t13-muted);
}

.t13-more {
    margin-left: auto;
    font-size: 13px;
    color: var(--t13-brand);
}

/* ---------- 标签云 ---------- */

.t13-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: baseline;
}

.t13-cloud a {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 999px;
    background: var(--t13-surface-2);
    border: 1px solid var(--t13-line);
    color: var(--t13-ink-2);
    font-size: 14px;
}

.t13-cloud a:nth-child(5n+1) {
    font-size: 17px;
    color: var(--t13-brand);
    background: var(--t13-brand-soft);
    border-color: #d5d5f6;
}

.t13-cloud a:nth-child(5n+3) {
    font-size: 12px;
    color: var(--t13-muted);
}

.t13-cloud a:nth-child(7n+4) {
    font-size: 16px;
    color: var(--t13-ink);
}

.t13-cloud a:hover {
    color: #fff;
    background: var(--t13-brand);
    border-color: var(--t13-brand);
}

/* 推荐好站：靛蓝深浅两级交替 */
.t13-sites {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.t13-sites a {
    display: block;
    text-align: center;
    padding: 10px 8px;
    border-radius: var(--t13-radius-s);
    font-size: 14px;
    color: var(--t13-brand);
    background: var(--t13-brand-soft);
    border: 1px solid #dcdcf7;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.t13-sites a:nth-child(even) {
    color: var(--t13-ink-2);
    background: var(--t13-surface-2);
    border-color: var(--t13-line);
}

.t13-sites a:hover {
    color: #fff;
    background: var(--t13-brand);
    border-color: var(--t13-brand);
}

/* ---------- 卡片网格：杂志式不等格 ---------- */

.t13-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: row dense;
    gap: 18px;
}

.t13-card {
    display: flex;
    flex-direction: column;
    background: var(--t13-surface);
    border: 1px solid var(--t13-line);
    border-radius: var(--t13-radius);
    overflow: hidden;
    box-shadow: var(--t13-shadow);
}

.t13-card:hover {
    box-shadow: var(--t13-shadow-2);
    border-color: #cfd0ee;
    transform: translateY(-2px);
}

.t13-card {
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.t13-fig {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--t13-surface-2);
    overflow: hidden;
}

.t13-fig img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.t13-body {
    display: block;
    padding: 10px 12px 12px;
    font-size: 14px;
    color: var(--t13-ink);
}

.t13-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
    min-height: 2.9em;
}

.t13-card:hover .t13-title {
    color: var(--t13-brand);
}

/* 首屏第一张放大成 2x2 头条 */
.t13-grid-mag > .t13-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.t13-grid-mag > .t13-card:first-child .t13-fig {
    aspect-ratio: 16 / 9;
    height: auto;
}

.t13-grid-mag > .t13-card:first-child .t13-body {
    padding: 14px 16px 18px;
    font-size: 17px;
    font-weight: 600;
}

/* 列表页：规整网格 */
.t13-grid-list {
    grid-template-columns: repeat(5, 1fr);
}

/* ---------- 分页 ---------- */

.t13-page {
    list-style: none;
    margin: 24px 0 8px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.t13-page li {
    display: block;
}

.t13-page li a {
    display: block;
    min-width: 42px;
    text-align: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--t13-ink-2);
    background: var(--t13-surface);
    border: 1px solid var(--t13-line);
}

.t13-page li a:hover {
    color: var(--t13-brand);
    border-color: var(--t13-brand);
}

.t13-page li.t13-page-cur a {
    color: #fff;
    background: var(--t13-brand);
    border-color: var(--t13-brand);
}

/* ---------- 详情页 ---------- */

.t13-stage {
    background: #10101f;
    border: 1px solid #22223c;
    border-radius: var(--t13-radius);
    overflow: hidden;
    padding: 0;
}

.t13-stage-hd {
    padding: 14px 18px;
    border-bottom: 1px solid #22223c;
}

.t13-stage-hd h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #f2f2ff;
    line-height: 1.5;
}

.t13-player {
    width: 100%;
    background: #000;
    min-height: 200px;
}

.t13-player video,
.t13-player #video-container {
    display: block;
    width: 100%;
}

/* 磁力信息 */
.t13-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0 0 16px;
    list-style: none;
}

.t13-meta li {
    background: var(--t13-surface-2);
    border: 1px solid var(--t13-line);
    border-radius: var(--t13-radius-s);
    padding: 10px 12px;
    font-size: 14px;
    color: var(--t13-ink);
}

.t13-meta b {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--t13-muted);
    margin-bottom: 2px;
}

.t13-shots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.t13-shots .img_item {
    line-height: 0;
    border-radius: var(--t13-radius-s);
    overflow: hidden;
    border: 1px solid var(--t13-line);
    background: var(--t13-surface-2);
}

.t13-shots .img_item img {
    display: block;
    width: 100% !important;
    margin: 0 !important;
}

.t13-shots p {
    color: var(--t13-muted);
    margin: 0;
}

.t13-dl {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 4px 0 6px;
}

.t13-dl a {
    display: inline-block;
    cursor: pointer;
    padding: 11px 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--t13-brand);
    border: 1px solid var(--t13-brand);
}

.t13-dl a:hover {
    background: var(--t13-brand-2);
    border-color: var(--t13-brand-2);
}

.t13-dl .t13-dl-ghost a {
    color: var(--t13-brand);
    background: var(--t13-brand-soft);
}

.t13-dl .t13-dl-ghost a:hover {
    color: #fff;
    background: var(--t13-brand);
}

.t13-tip {
    font-size: 13px;
    color: var(--t13-muted);
    margin: 10px 0 0;
}

.t13-tip a {
    color: var(--t13-brand);
}

/* ---------- 页脚 ---------- */

.t13-foot {
    margin-top: 30px;
    padding: 26px 0 34px;
    background: var(--t13-surface);
    border-top: 1px solid var(--t13-line);
}

.t13-foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.t13-foot-links a {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--t13-ink-2);
    background: var(--t13-surface-2);
    border: 1px solid var(--t13-line);
}

.t13-foot-links a:hover {
    color: #fff;
    background: var(--t13-brand);
    border-color: var(--t13-brand);
}

.t13-foot-info {
    font-size: 13px;
    color: var(--t13-muted);
    line-height: 2;
}

.t13-foot-info strong {
    color: var(--t13-ink-2);
    font-weight: 600;
}

/* ---------- 响应式：平板 ---------- */

@media (max-width: 1100px) {
    .t13-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .t13-grid-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .t13-wrap {
        padding: 0 14px;
    }

    .t13-head-in {
        flex-wrap: wrap;
        gap: 12px;
    }

    .t13-search {
        max-width: none;
        margin-left: 0;
        width: 100%;
    }

    .t13-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .t13-grid-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .t13-grid-mag > .t13-card:first-child {
        grid-column: span 3;
        grid-row: span 1;
    }
}

/* ---------- 响应式：手机 ---------- */

@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .t13-brand-mark {
        font-size: 20px;
    }

    .t13-panel {
        padding: 14px;
        margin: 14px 0;
    }

    .t13-grid,
    .t13-grid-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .t13-grid-mag > .t13-card:first-child {
        grid-column: span 2;
    }

    .t13-grid-mag > .t13-card:first-child .t13-body {
        font-size: 15px;
        padding: 10px 12px 12px;
    }

    .t13-icons {
        grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
        gap: 8px;
    }

    .t13-sites {
        grid-template-columns: repeat(3, 1fr);
    }

    .t13-shots {
        grid-template-columns: repeat(2, 1fr);
    }

    .t13-dl {
        gap: 8px;
    }

    .t13-dl a {
        padding: 10px 18px;
        font-size: 14px;
    }

    .t13-page li a {
        min-width: 36px;
        padding: 7px 11px;
    }
}

/* ---------- 全站缺失的显隐类（模板大量使用但原本无定义） ---------- */
}
}
