/* ==========================================================================
   关键词探索 Trope Finder
   深靛 #232b4e / 米白 #f5f1e6 / 珊瑚 #ff7a5c / 浅靛 #e8eaf4
   断点: base(360) / 375 / 768 / 1100
   ========================================================================== */

:root {
    --tf-bg: #f5f1e6;
    --tf-paper: #fffdf6;
    --tf-line: #e2dac6;
    --tf-indigo: #232b4e;
    --tf-indigo-d: #1a2140;
    --tf-indigo-l: #e8eaf4;
    --tf-text: #2c2c34;
    --tf-mute: #7d7663;
    --tf-coral: #ff7a5c;
    --tf-coral-d: #e85f41;
    --tf-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --tf-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --tf-radius: 8px;
    --tf-maxw: 1100px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--tf-bg);
    color: var(--tf-text);
    font-family: var(--tf-sans);
    font-size: 16px;
    line-height: 1.8;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tf-indigo); text-decoration: none; }
a:hover { color: var(--tf-coral-d); text-decoration: underline; }
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--tf-coral);
    outline-offset: 2px;
    border-radius: 4px;
}
.sr-only {
    position: absolute; width: 1px; height: 1px;
    clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.tf-main { max-width: var(--tf-maxw); margin: 0 auto; padding: 0 16px 56px; }

/* ---------- 按钮 ---------- */
.tf-btn {
    display: inline-block; padding: 12px 28px; border-radius: var(--tf-radius);
    font-size: 15px; font-weight: 700;
    border: 1px solid var(--tf-indigo);
    transition: background .15s, color .15s;
}
.tf-btn--solid { background: var(--tf-indigo); color: #fff; }
.tf-btn--solid:hover { background: var(--tf-indigo-d); border-color: var(--tf-indigo-d); color: #fff; text-decoration: none; }

.tf-block { margin-bottom: 34px; }
.tf-h2 { font-size: 19px; margin: 0 0 14px; color: var(--tf-indigo); }
.tf-h2::before { content: "#"; color: var(--tf-coral); margin-right: 6px; font-family: var(--tf-mono); }
.tf-h2sub { font-size: 12.5px; color: var(--tf-mute); font-weight: 400; margin-left: 8px; }
.tf-textlink { display: inline-block; margin-top: 18px; font-size: 14.5px; font-weight: 700; color: var(--tf-coral-d); }
.tf-textlink:hover { color: var(--tf-indigo); }

/* ---------- 顶栏(深靛) ---------- */
.tf-top { background: var(--tf-indigo); border-bottom: 3px solid var(--tf-coral); }
.tf-top__bar {
    max-width: var(--tf-maxw); margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap;
}
.tf-logo { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: .02em; }
.tf-logo::before { content: "#"; color: var(--tf-coral); margin-right: 4px; font-family: var(--tf-mono); }
.tf-logo:hover { color: var(--tf-coral); text-decoration: none; }
.tf-top__nav { margin-left: auto; }
.tf-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.tf-menu a { font-size: 14.5px; color: #c9cee6; padding: 6px 2px; }
.tf-menu a:hover { color: #fff; }

/* ---------- 搜索 ---------- */
.tf-searchform { display: flex; }
.tf-searchform input {
    background: var(--tf-indigo-d); border: 1px solid #39426e; border-right: 0;
    border-radius: var(--tf-radius) 0 0 var(--tf-radius);
    color: #fff; padding: 8px 12px; font-size: 14px; width: 150px;
}
.tf-searchform input::placeholder { color: #8b93bd; }
.tf-searchform button {
    background: var(--tf-coral); border: 1px solid var(--tf-coral); color: var(--tf-indigo-d);
    border-radius: 0 var(--tf-radius) var(--tf-radius) 0; padding: 8px 15px;
    font-size: 14px; font-weight: 800; cursor: pointer;
}
.tf-searchform button:hover { background: var(--tf-coral-d); color: #fff; }
.tf-searchform--page { margin-top: 14px; }
.tf-searchform--page input { width: min(340px, 62vw); padding: 11px 14px; background: #fff; border-color: var(--tf-line); color: var(--tf-text); }
.tf-searchform--page button { padding: 11px 18px; }

/* ---------- 首页宣言 ---------- */
.tf-mast { padding: 46px 0 28px; border-bottom: 2px solid var(--tf-indigo); }
.tf-mast__kicker { font-size: 12px; letter-spacing: .26em; font-weight: 800; color: var(--tf-coral-d); margin: 0 0 12px; font-family: var(--tf-mono); }
.tf-mast__title { font-size: 33px; margin: 0 0 12px; color: var(--tf-indigo); }
.tf-mast__text { color: var(--tf-mute); max-width: 660px; margin: 0; font-size: 15px; }

/* ---------- 区块 ---------- */
.tf-sect { padding: 30px 0 8px; }
.tf-sect__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.tf-sect__title { font-size: 21px; margin: 0 0 16px; color: var(--tf-indigo); }
.tf-sect__head .tf-sect__title { margin: 0; }
.tf-sect__titlelink { color: var(--tf-indigo); }
.tf-sect__titlelink:hover { color: var(--tf-coral-d); text-decoration: none; }
.tf-sect__more { font-size: 13.5px; font-weight: 700; color: var(--tf-coral-d); }

/* ---------- 母题索引卡 ---------- */
.tf-tropelist { display: grid; grid-template-columns: 1fr; gap: 14px; }
.tf-tropecard {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--tf-indigo); color: #e6e9f6;
    border-radius: var(--tf-radius); padding: 20px 22px;
    border-left: 5px solid var(--tf-coral);
    transition: transform .15s, box-shadow .15s;
}
.tf-tropecard:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(35, 43, 78, .3); text-decoration: none; color: #fff; }
.tf-tropecard__name { font-size: 20px; font-weight: 800; }
.tf-tropecard__name::before { content: "#"; color: var(--tf-coral); margin-right: 6px; font-family: var(--tf-mono); }
.tf-tropecard__define { font-size: 14px; color: #b9c0e0; line-height: 1.7; }
.tf-tropecard__count { font-size: 13px; font-weight: 700; color: var(--tf-coral); margin-top: 2px; }

/* ---------- 作品卡 ---------- */
.tf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tf-card {
    background: var(--tf-paper); border: 1px solid var(--tf-line);
    border-radius: var(--tf-radius); overflow: hidden;
    display: flex; flex-direction: column;
    transition: box-shadow .15s, transform .15s;
}
.tf-card:hover { box-shadow: 0 10px 24px rgba(44, 44, 52, .14); transform: translateY(-2px); }
.tf-card__posterwrap { display: block; }
.tf-card__posterwrap img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.tf-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tf-card__title { font-size: 16px; margin: 0; line-height: 1.45; }
.tf-card__title a { color: var(--tf-text); }
.tf-card__title a:hover { color: var(--tf-coral-d); }
.tf-card__tagline { margin: 0; font-size: 13.5px; color: var(--tf-mute); }
.tf-card__reason {
    margin: 0; font-size: 13.5px; color: var(--tf-text);
    background: var(--tf-indigo-l); border-radius: 6px; padding: 8px 12px;
}
.tf-card__reasonlabel {
    display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em;
    color: #fff; background: var(--tf-indigo); border-radius: 4px;
    padding: 2px 8px; margin-right: 8px;
}
.tf-card__meta { margin: 0; font-size: 12.5px; color: var(--tf-coral-d); margin-top: auto; }

/* ---------- 面包屑 / chips / 分页 ---------- */
.tf-crumbs { font-size: 13px; margin-bottom: 16px; }
.tf-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tf-crumbs li { color: var(--tf-mute); }
.tf-crumbs li + li::before { content: "/ "; color: var(--tf-line); margin-right: 8px; }
.tf-crumbs a { color: var(--tf-indigo); }

.tf-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tf-chip {
    display: inline-block; padding: 7px 16px; font-size: 13.5px;
    background: var(--tf-paper); border: 1px solid var(--tf-line); border-radius: 18px;
    color: var(--tf-text);
}
.tf-chip::before { content: "#"; color: var(--tf-coral); margin-right: 3px; font-family: var(--tf-mono); }
.tf-chip:hover { border-color: var(--tf-coral); color: var(--tf-coral-d); text-decoration: none; }

.tf-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.tf-pagination .page-numbers {
    min-width: 42px; text-align: center; padding: 8px 12px; font-size: 14.5px;
    background: var(--tf-paper); border: 1px solid var(--tf-line); border-radius: var(--tf-radius); color: var(--tf-text);
}
.tf-pagination .page-numbers.current { background: var(--tf-indigo); border-color: var(--tf-indigo); color: #fff; }
.tf-pagination a.page-numbers:hover { border-color: var(--tf-coral); text-decoration: none; }

/* ---------- 归档页头 / 母题定义 ---------- */
.tf-archhead { padding: 26px 0 20px; border-bottom: 2px solid var(--tf-indigo); margin-bottom: 24px; }
.tf-archhead .tf-crumbs { margin-bottom: 10px; }
.tf-archhead__kicker { font-size: 12px; letter-spacing: .22em; font-weight: 800; color: var(--tf-coral-d); margin: 0 0 6px; font-family: var(--tf-mono); }
.tf-archhead__title { font-size: 28px; margin: 0 0 12px; color: var(--tf-indigo); }
.tf-archhead__desc { color: var(--tf-mute); font-size: 14.5px; margin: 0; max-width: 680px; }
.tf-archhead__define {
    background: var(--tf-paper); border: 1px solid var(--tf-line); border-left: 5px solid var(--tf-coral);
    border-radius: 6px; padding: 16px 20px; margin: 0 0 12px; max-width: 760px;
    font-size: 15px;
}
.tf-archhead__define p { margin: 0 0 10px; }
.tf-archhead__define p:last-child { margin-bottom: 0; }
.tf-archhead__note { color: var(--tf-mute); font-size: 13.5px; margin: 0; max-width: 680px; }
.tf-archhead__note a { color: var(--tf-coral-d); font-weight: 600; }

/* ---------- 详情页 ---------- */
.tf-drama { padding-top: 20px; }
.tf-drama__head { margin-bottom: 20px; }
.tf-drama__title { font-size: 29px; margin: 0 0 6px; color: var(--tf-indigo); }
.tf-drama__original { color: var(--tf-mute); font-size: 13.5px; margin: 0 0 6px; }
.tf-drama__tagline { color: var(--tf-coral-d); font-size: 16.5px; font-weight: 700; margin: 0 0 10px; }
.tf-drama__tropes { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tf-drama__tropeslabel { font-size: 12.5px; color: var(--tf-mute); font-weight: 700; }
.tf-tropechip {
    display: inline-block; font-size: 13px; font-weight: 700;
    background: var(--tf-indigo); color: #fff; border-radius: 16px; padding: 4px 14px;
}
.tf-tropechip::before { content: "#"; color: var(--tf-coral); margin-right: 3px; font-family: var(--tf-mono); }
.tf-tropechip:hover { background: var(--tf-coral-d); text-decoration: none; }

.tf-drama__main { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 32px; }
.tf-drama__poster { max-width: 280px; margin: 0 auto; }
.tf-drama__poster img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--tf-radius); border: 1px solid var(--tf-line); }
.tf-drama__side { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }

.tf-facts {
    margin: 0; width: 100%;
    background: var(--tf-paper); border: 1px solid var(--tf-line); border-radius: var(--tf-radius);
    padding: 8px 18px;
}
.tf-facts__row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--tf-line); font-size: 14.5px; }
.tf-facts__row:last-child { border-bottom: 0; }
.tf-facts__row dt { color: var(--tf-mute); flex: 0 0 76px; font-size: 13.5px; }
.tf-facts__row dd { margin: 0; font-weight: 700; }

.tf-synopsis { font-size: 15.5px; background: var(--tf-paper); border: 1px solid var(--tf-line); border-radius: var(--tf-radius); padding: 18px 20px; }
.tf-synopsis p { margin: 0 0 12px; }
.tf-synopsis p:last-child { margin-bottom: 0; }

/* ---------- 选集 ---------- */
.tf-eplist { list-style: none; margin: 0; padding: 0; }
.tf-eplist__item a {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--tf-paper); border: 1px solid var(--tf-line); border-radius: var(--tf-radius);
    padding: 12px 16px; margin-bottom: 8px; color: var(--tf-text); font-size: 15px;
    transition: border-color .15s;
}
.tf-eplist__item a:hover { border-color: var(--tf-coral); text-decoration: none; }
.tf-eplist__num { font-weight: 800; color: var(--tf-coral-d); flex: 0 0 auto; font-family: var(--tf-mono); }
.tf-eplist__name { font-weight: 600; }
.tf-eplist__meta { margin-left: auto; font-size: 12.5px; color: var(--tf-mute); }
.tf-eplist__item.is-current a { border-color: var(--tf-coral); box-shadow: inset 0 0 0 1px var(--tf-coral); }

/* ---------- 单集观看页 ---------- */
.tf-watch { padding-top: 20px; }
.tf-watch__stage { margin: 0 -16px 18px; }
.tf-player { position: relative; background: #000; }
.tf-player video, .tf-player iframe { width: 100%; aspect-ratio: 16/9; display: block; height: auto; }
.tf-player--pending img { width: 100%; opacity: .5; }
.tf-player__notice {
    position: absolute; inset: auto 0 14px; text-align: center; margin: 0;
    font-size: 14px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
}
.tf-watch__head { margin-bottom: 18px; }
.tf-watch__title { font-size: 24px; margin: 0 0 6px; color: var(--tf-indigo); }
.tf-watch__subtitle { color: var(--tf-coral-d); margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.tf-watch__meta { font-size: 13.5px; color: var(--tf-mute); margin: 0 0 14px; }
.tf-watch__summary {
    margin: 0; font-size: 15px; background: var(--tf-paper);
    border: 1px solid var(--tf-line); border-radius: var(--tf-radius); padding: 14px 18px;
}

.tf-epnav { display: flex; gap: 10px; margin-bottom: 28px; }
.tf-epnav__prev, .tf-epnav__next {
    flex: 1; text-align: center; padding: 12px 8px; font-size: 14.5px; font-weight: 600;
    background: var(--tf-paper); border: 1px solid var(--tf-line); border-radius: var(--tf-radius);
    color: var(--tf-text);
}
.tf-epnav__prev:hover, .tf-epnav__next:hover { border-color: var(--tf-coral); text-decoration: none; }
.tf-epnav .is-disabled { color: var(--tf-line); pointer-events: none; }

/* ---------- 搜索页 / 404 / 静态页 ---------- */
.tf-noresult { padding: 30px 0; color: var(--tf-mute); }

.tf-404 { text-align: center; padding: 60px 0 52px; }
.tf-404__kicker { letter-spacing: .3em; color: var(--tf-coral-d); font-size: 12px; margin: 0 0 12px; font-weight: 800; font-family: var(--tf-mono); }
.tf-404__title { font-size: 26px; margin: 0 0 12px; color: var(--tf-indigo); }
.tf-404__text { color: var(--tf-mute); margin: 0 auto 26px; font-size: 15px; max-width: 480px; }
.tf-404 .tf-searchform { justify-content: center; margin-bottom: 26px; }
.tf-404__links { display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; }

.tf-page { max-width: 720px; margin: 0 auto; padding-top: 26px; }
.tf-page__title { font-size: 26px; margin: 0 0 20px; color: var(--tf-indigo); border-bottom: 2px solid var(--tf-indigo); padding-bottom: 14px; }
.tf-page__body { font-size: 15.5px; }
.tf-page__body h2 { font-size: 20px; margin: 28px 0 12px; color: var(--tf-indigo); }
.tf-page__body h3 { font-size: 17px; margin: 24px 0 10px; }
.tf-page__body p { margin: 0 0 16px; }

/* ---------- 空状态 ---------- */
.tf-empty-state { text-align: center; padding: 42px 0; }
.tf-empty-state__text { color: var(--tf-mute); margin-bottom: 16px; }

/* ---------- 页脚(深靛) ---------- */
.tf-foot {
    background: var(--tf-indigo); color: #b9c0e0;
    padding: 40px 16px 26px; margin-top: 52px;
    border-top: 3px solid var(--tf-coral);
}
.tf-foot__grid {
    max-width: var(--tf-maxw); margin: 0 auto;
    display: grid; grid-template-columns: 1fr; gap: 28px;
}
.tf-foot__logo { font-size: 18px; font-weight: 800; color: #fff; margin: 0 0 10px; }
.tf-foot__slogan { color: #8b93bd; font-size: 13.5px; margin: 0; }
.tf-foot__h { font-size: 12px; letter-spacing: .2em; color: var(--tf-coral); margin: 0 0 14px; font-family: var(--tf-mono); }
.tf-foot__links { list-style: none; margin: 0; padding: 0; }
.tf-foot__links li { margin-bottom: 10px; }
.tf-foot__links a { color: #b9c0e0; font-size: 14.5px; }
.tf-foot__links a:hover { color: #fff; }
.tf-foot .tf-chip { background: var(--tf-indigo-d); border-color: #39426e; color: #b9c0e0; }
.tf-foot .tf-chip:hover { border-color: var(--tf-coral); color: #fff; }
.tf-foot__copy {
    max-width: var(--tf-maxw); margin: 28px auto 0; padding-top: 16px;
    border-top: 1px solid #39426e;
    color: #8b93bd; font-size: 12.5px; text-align: center;
}

/* ---------- 375+ ---------- */
@media (min-width: 375px) {
    .tf-mast__title { font-size: 37px; }
    .tf-drama__title { font-size: 31px; }
}

/* ---------- 768+ ---------- */
@media (min-width: 768px) {
    .tf-main { padding: 0 24px 72px; }
    .tf-top__bar { padding: 0 24px; }
    .tf-mast { padding: 60px 0 36px; }
    .tf-mast__title { font-size: 46px; }
    .tf-tropelist { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .tf-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .tf-drama__main { grid-template-columns: 280px 1fr; gap: 32px; }
    .tf-drama__poster { margin: 0; }
    .tf-watch__stage { margin: 0 0 18px; }
    .tf-watch__title { font-size: 27px; }
    .tf-foot__grid { grid-template-columns: 2fr 1fr 1fr; gap: 44px; }
}

/* ---------- 1100+ ---------- */
@media (min-width: 1100px) {
    .tf-mast__title { font-size: 52px; }
    .tf-grid { grid-template-columns: repeat(4, 1fr); }
    .tf-drama__main { grid-template-columns: 300px 1fr; }
}
