/* ==========================================================
   游匣 CMS · 前台样式
   主色：深海绿 #0f5f57 / 米纸 #f6f4ee / 琥珀 #e9b44c
   ========================================================== */

:root {
    --teal: #0f5f57;
    --teal-deep: #0b4a44;
    --teal-ink: #083a35;
    --teal-soft: #e7efec;
    --amber: #e9b44c;
    --amber-deep: #b78320;
    --paper: #f6f4ee;
    --paper-deep: #efece3;
    --surface: #fffdf8;
    --white: #ffffff;
    --ink: #192521;
    --ink-soft: #34433f;
    --muted: #66756f;
    --muted-2: #8b9791;
    --line: #e3ddd0;
    --line-strong: #d2cbba;
    --line-dark: rgba(255, 255, 255, .14);
    --danger: #a33a2d;
    --ok: #16704f;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 18px 50px -30px rgba(15, 40, 35, .4);
    --max: 1240px;
    --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(900px 500px at 8% -8%, rgba(15, 95, 87, .07), transparent 65%),
        radial-gradient(700px 420px at 100% 0%, rgba(233, 180, 76, .09), transparent 65%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol { margin-top: 0; }
::selection { background: var(--teal); color: #fff; }

.wrap { width: min(var(--max), calc(100% - 56px)); margin: 0 auto; }

.site-main { min-height: 60vh; padding-bottom: 72px; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 40; }

.utility-bar {
    background: var(--teal-ink);
    color: rgba(255, 255, 255, .78);
    font-size: 12.5px;
    letter-spacing: .02em;
}
.utility-inner { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.utility-left, .utility-right { display: flex; align-items: center; gap: 16px; }
.utility-left b { color: var(--amber); font-weight: 700; }
.util-sep { opacity: .35; }
.utility-right a { position: relative; padding-left: 0; transition: color .2s; }
.utility-right a:hover { color: #fff; }
.util-admin { color: var(--amber); }
.dot-live {
    width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
    box-shadow: 0 0 0 4px rgba(233, 180, 76, .14);
    animation: pulse 2.4s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(233, 180, 76, .18); }
    50% { box-shadow: 0 0 0 7px rgba(233, 180, 76, .02); }
}

.main-bar {
    background: rgba(255, 253, 248, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 35;
}
.main-inner { display: flex; align-items: center; gap: 26px; height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { width: 44px; height: 44px; flex-shrink: 0; filter: drop-shadow(0 6px 12px rgba(15, 95, 87, .18)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
    font-family: var(--serif);
    font-size: 25px;
    letter-spacing: .08em;
    color: var(--teal);
    font-weight: 800;
}
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .12em; margin-top: 3px; }
.brand-light .brand-text strong { color: #fff; }
.brand-light .brand-text em { color: rgba(255, 255, 255, .55); }

.primary-nav { display: flex; align-items: center; gap: 2px; flex-grow: 1; min-width: 0; }
.nav-group { position: relative; }
.nav-link {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 10px 10px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink-soft);
    border-radius: 8px;
    white-space: nowrap;
    transition: background .18s, color .18s;
}
.nav-link:hover, .nav-link.active { color: var(--teal); background: var(--teal-soft); }
.nav-arrow { font-size: 9px; color: var(--muted-2); }
.nav-special { color: var(--amber-deep); }
.nav-pop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 176px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 24px 50px -24px rgba(15, 40, 35, .35);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: .18s;
}
.nav-group:hover .nav-pop { opacity: 1; visibility: visible; transform: none; }
.nav-pop a {
    padding: 7px 10px; border-radius: 7px; font-size: 13.5px; color: var(--ink-soft);
}
.nav-pop a:hover { background: var(--teal-soft); color: var(--teal); }

.search-form {
    display: flex; align-items: center;
    width: 250px;
    height: 40px;
    background: var(--white);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 0 5px 0 13px;
    transition: border-color .2s, box-shadow .2s;
    flex-shrink: 0;
}
.search-form:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15, 95, 87, .08); }
.search-form svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.search-form input { flex-grow: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 8px; font-size: 13.5px; }
.search-form input::placeholder { color: var(--muted-2); }
.search-form button {
    border: 0; background: var(--teal); color: #fff; height: 30px; padding: 0 13px;
    border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .2s;
}
.search-form button:hover { background: var(--teal-deep); }

.mobile-toggle { display: none; width: 42px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 10px; cursor: pointer; }
.mobile-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

.hot-keywords { background: var(--surface); border-bottom: 1px solid var(--line); }
.hot-inner { display: flex; align-items: center; gap: 18px; height: 38px; font-size: 12.5px; overflow: hidden; }
.hot-inner > span { color: var(--muted-2); flex-shrink: 0; letter-spacing: .06em; }
.hot-inner a { color: var(--ink-soft); white-space: nowrap; }
.hot-inner a:hover { color: var(--teal); }
.hot-more { margin-left: auto; color: var(--teal) !important; font-weight: 600; }

/* ---------- Shared pieces ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--amber);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.eyebrow.dark { color: var(--teal); }

.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    background: var(--teal-soft); color: var(--teal-deep);
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.chip.amber { background: #fdf1d6; color: #8a5f0c; }
.chip.ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 22px; border-radius: 10px;
    border: 1px solid transparent; cursor: pointer;
    font-size: 14px; font-weight: 700; letter-spacing: .01em;
    transition: transform .18s, background .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 10px 24px -14px rgba(15, 95, 87, .65); }
.btn-primary:hover { background: var(--teal-deep); }
.btn-amber { background: var(--amber); color: #3b2a05; box-shadow: 0 10px 24px -14px rgba(233, 180, 76, .8); }
.btn-amber:hover { background: #f0c264; }
.btn-ghost { border-color: var(--line-strong); background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-light { background: #fff; color: var(--teal); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 8px; }

.sec { padding: 42px 0 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.sec-title { margin: 0; font-family: var(--serif); font-size: 27px; letter-spacing: .01em; line-height: 1.2; }
.sec-title em { font-style: normal; color: var(--teal); }
.sec-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.sec-link { font-size: 13px; color: var(--teal); font-weight: 600; white-space: nowrap; }
.sec-link:hover { text-decoration: underline; }

.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.pill.ok { background: #e2f3e9; color: #14612f; }
.pill.wa { background: #fbecc4; color: #7a5300; }
.pill.dr { background: #e8eae7; color: #4d5b56; }
.pill.er { background: #f6ded9; color: #8a1c1c; }

/* ---------- Home hero ---------- */
.home-hero { padding: 28px 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) 360px; gap: 22px; align-items: stretch; }

.hero-feature {
    position: relative;
    min-height: 452px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--teal-ink);
    isolation: isolate;
    box-shadow: var(--shadow);
}
.hero-feature img.hero-bg {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    z-index: -2;
    transform: scale(1.03);
    animation: hero-in 1.6s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-feature::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(6, 35, 32, .9) 0%, rgba(6, 35, 32, .62) 46%, rgba(6, 35, 32, .12) 100%),
        linear-gradient(0deg, rgba(6, 35, 32, .92) 0%, transparent 55%);
}
@keyframes hero-in { from { transform: scale(1.1); opacity: .4; } to { transform: scale(1.03); opacity: 1; } }

.hero-slide { position: absolute; inset: 0; display: none; }
.hero-slide.is-active { display: block; }
.hero-slide .hero-content { position: absolute; inset: 0; height: auto; min-height: 0; }
.hero-dots { position: absolute; right: 26px; bottom: 24px; z-index: 3; display: flex; gap: 7px; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: transparent; cursor: pointer; padding: 0; }
.hero-dots button.on { background: var(--amber); border-color: var(--amber); }

.lightbox {
    position: fixed; inset: 0; z-index: 200; background: rgba(5, 20, 18, .92);
    display: none; align-items: center; justify-content: center; padding: 40px;
    backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 10px; box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.lightbox-close {
    position: absolute; top: 18px; right: 22px; width: 42px; height: 42px;
    border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: transparent;
    color: #fff; font-size: 24px; cursor: pointer; line-height: 1;
}
.toast.hide { opacity: 0; transform: translate(-50%, 8px); transition: .3s; }

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 452px;
    padding: 34px 38px 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    max-width: 620px;
}
.hero-topline { display: flex; align-items: center; gap: 10px; margin-bottom: auto; }
.hero-topline .rank-tag {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(6px);
    color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
}
.hero-topline .rank-tag b { color: var(--amber); }

.hero-title {
    font-family: var(--serif);
    font-size: clamp(34px, 4vw, 50px);
    line-height: 1.12;
    letter-spacing: .02em;
    margin: 0 0 10px;
    text-wrap: balance;
}
.hero-intro { margin: 0 0 18px; color: rgba(255, 255, 255, .78); font-size: 14.5px; line-height: 1.8; max-width: 520px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 22px; color: rgba(255, 255, 255, .68); font-size: 12.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta i { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-actions .btn-ghost { color: rgba(255, 255, 255, .86); border-color: rgba(255, 255, 255, .28); }
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }
.hero-switch { display: flex; align-items: center; gap: 6px; margin-left: 6px; }
.hero-switch button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: transparent; cursor: pointer; color: #fff; font-size: 10px; padding: 0; }
.hero-switch button.on { background: var(--amber); border-color: var(--amber); color: #3b2a05; }

.rank-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px 22px 14px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}
.rank-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.rank-head h2 { margin: 0; font-family: var(--serif); font-size: 21px; letter-spacing: .02em; }
.rank-head span { font-size: 11px; color: var(--muted-2); text-align: right; line-height: 1.5; }
.rank-list { display: flex; flex-direction: column; margin-top: 6px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); transition: transform .18s; }
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { transform: translateX(3px); }
.rank-num {
    width: 22px; flex-shrink: 0; font-family: var(--serif); font-size: 17px; font-weight: 700;
    color: var(--muted-2); font-variant-numeric: tabular-nums;
}
.rank-row:nth-child(1) .rank-num { color: var(--amber-deep); font-size: 20px; }
.rank-row:nth-child(2) .rank-num { color: var(--teal); }
.rank-row:nth-child(3) .rank-num { color: var(--teal); opacity: .7; }
.rank-thumb { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; background: var(--teal-soft); flex-shrink: 0; }
.rank-info { min-width: 0; flex-grow: 1; }
.rank-info strong { display: block; font-size: 13px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-info span { display: block; font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.rank-badge { font-size: 10.5px; color: var(--amber-deep); font-weight: 700; flex-shrink: 0; }
.rank-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.rank-foot a { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--teal); font-weight: 600; }

/* ---------- Mobile hits rail ---------- */
.hits-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.hit-card {
    position: relative; border-radius: var(--radius); overflow: hidden; background: var(--teal-ink);
    aspect-ratio: 4 / 5.1; min-height: 230px; color: #fff; isolation: isolate;
    transition: transform .25s, box-shadow .25s;
}
.hit-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -28px rgba(15, 40, 35, .6); }
.hit-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s; }
.hit-card:hover img { transform: scale(1.05); }
.hit-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 28, 25, .94), rgba(5, 28, 25, .1) 62%); }
.hit-body { position: absolute; inset: auto 0 0 0; padding: 16px 15px; }
.hit-body .chip { background: rgba(255,255,255,.14); color: rgba(255,255,255,.86); backdrop-filter: blur(8px); margin-bottom: 8px; }
.hit-body h3 { margin: 0 0 3px; font-size: 15px; font-weight: 700; }
.hit-body p { margin: 0; font-size: 11.5px; color: rgba(255, 255, 255, .62); display: flex; justify-content: space-between; }
.hit-play {
    position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px);
    font-size: 11px; opacity: 0; transform: scale(.85); transition: .2s;
}
.hit-card:hover .hit-play { opacity: 1; transform: none; }

/* ---------- Latest list ---------- */
.latest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 44px; border-top: 1px solid var(--line); }
.latest-row {
    display: flex; align-items: center; gap: 13px;
    min-width: 0;
    padding: 13px 0; border-bottom: 1px dashed var(--line);
    transition: transform .18s;
}
.latest-row:hover { transform: translateX(4px); }
.latest-date {
    width: 46px; flex-shrink: 0; text-align: center; line-height: 1.2;
    font-family: var(--serif); color: var(--muted);
}
.latest-date b { display: block; font-size: 18px; color: var(--teal); font-weight: 700; }
.latest-date span { font-size: 10px; letter-spacing: .04em; }
.latest-icon { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--teal-soft); }
.latest-info { min-width: 0; flex-grow: 1; }
.latest-info strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest-info strong span { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-left: 5px; }
.latest-info p { margin: 1px 0 0; font-size: 11.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest-type { flex-shrink: 0; font-size: 11px; color: var(--muted); }
.latest-dl { flex-shrink: 0; font-size: 11.5px; color: var(--teal); font-weight: 600; white-space: nowrap; }

/* ---------- Topics ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.topic-card {
    position: relative; overflow: hidden; border-radius: var(--radius);
    aspect-ratio: 16 / 7.4; color: #fff; isolation: isolate;
    background: var(--teal-ink);
    transition: transform .25s;
}
.topic-card:hover { transform: translateY(-3px); }
.topic-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s; }
.topic-card:hover img { transform: scale(1.04); }
.topic-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 30, 27, .86), rgba(6, 30, 27, .18)); }
.topic-body { position: absolute; inset: 0; padding: 20px 22px; display: flex; flex-direction: column; justify-content: center; }
.topic-body span { font-size: 11px; letter-spacing: .16em; color: var(--amber); font-weight: 700; }
.topic-body h3 { margin: 5px 0 2px; font-family: var(--serif); font-size: 21px; letter-spacing: .02em; }
.topic-body p { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .7); }
.topic-count {
    position: absolute; right: 16px; bottom: 14px; font-size: 11px;
    color: rgba(255, 255, 255, .55); border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px; padding: 2px 9px; backdrop-filter: blur(6px);
}

/* ---------- App grid + sidebar ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.app-card {
    display: flex; gap: 13px; align-items: center;
    padding: 14px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); transition: border-color .2s, transform .2s, box-shadow .2s;
}
.app-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 16px 30px -26px rgba(15, 40, 35, .55); }
.app-card img { width: 62px; height: 62px; border-radius: 13px; object-fit: cover; flex-shrink: 0; background: var(--teal-soft); }
.app-card-body { min-width: 0; flex-grow: 1; }
.app-card-body strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-card-body em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.app-card-body .card-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 10.5px; color: var(--muted); }
.app-card-scan { flex-shrink: 0; font-size: 10px; color: var(--ok); border: 1px solid #cfe6d9; background: #f1faf5; border-radius: 6px; padding: 2px 6px; }

.side-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; margin-bottom: 18px;
}
.side-card h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 18px; }
.side-list .rank-row { padding: 8px 0; }
.side-list .rank-thumb { width: 34px; height: 34px; }
.side-more { display: block; margin-top: 10px; font-size: 12px; color: var(--teal); font-weight: 600; }
.side-topic { position: relative; border-radius: 9px; overflow: hidden; aspect-ratio: 16/8; margin-bottom: 10px; color: #fff; }
.side-topic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.side-topic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,30,27,.9), transparent 70%); }
.side-topic span { position: absolute; left: 12px; bottom: 9px; z-index: 1; font-size: 12.5px; font-weight: 700; }

/* ---------- Triple columns ---------- */
.triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.triple-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.triple-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.triple-head h3 { margin: 0; font-family: var(--serif); font-size: 19px; }
.triple-head a { font-size: 11.5px; color: var(--muted); }
.triple-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.triple-row:last-child { border-bottom: 0; }
.triple-row img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--teal-soft); }
.triple-row .tr-info { min-width: 0; flex-grow: 1; }
.triple-row strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.triple-row span { display: block; font-size: 10.5px; color: var(--muted-2); }
.triple-row .dl { font-size: 10.5px; color: var(--teal); flex-shrink: 0; }

/* ---------- News strip ---------- */
.news-strip { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 26px; align-items: stretch; }
.news-feature {
    position: relative; border-radius: var(--radius); overflow: hidden; min-height: 300px;
    color: #fff; isolation: isolate; background: var(--teal-ink);
}
.news-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s; }
.news-feature:hover img { transform: scale(1.04); }
.news-feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5,28,25,.92), rgba(5,28,25,.05) 65%); }
.news-feature-body { position: absolute; inset: auto 0 0; padding: 26px 28px; }
.news-feature-body h3 { margin: 8px 0 6px; font-family: var(--serif); font-size: 26px; line-height: 1.35; }
.news-feature-body p { margin: 0; font-size: 13px; color: rgba(255,255,255,.7); }
.news-list { display: flex; flex-direction: column; justify-content: center; }
.news-row { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.news-row:first-child { padding-top: 0; }
.news-row:last-child { border-bottom: 0; }
.news-row span { font-size: 10.5px; color: var(--muted-2); letter-spacing: .08em; }
.news-row h4 { margin: 3px 0 3px; font-size: 15px; line-height: 1.45; }
.news-row:hover h4 { color: var(--teal); }
.news-row p { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Search & filters ---------- */
.inner-head { padding: 30px 0 6px; }
.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.crumb a:hover { color: var(--teal); }
.crumb .sep { color: var(--muted-2); font-size: 10px; }
.crumb strong { color: var(--ink); font-weight: 600; }

.page-banner {
    border-radius: var(--radius); background: var(--teal); color: #fff;
    padding: 30px 34px; margin-bottom: 24px; position: relative; overflow: hidden;
}
.page-banner::after {
    content: ""; position: absolute; right: -40px; top: -60px; width: 260px; height: 260px;
    border-radius: 50%; background: radial-gradient(circle, rgba(233,180,76,.24), transparent 68%);
}
.page-banner h1 { margin: 0 0 4px; font-family: var(--serif); font-size: 34px; letter-spacing: .02em; }
.page-banner p { margin: 0; color: rgba(255,255,255,.7); font-size: 13px; }
.page-banner .banner-meta { display: flex; gap: 20px; margin-top: 16px; font-size: 12px; color: rgba(255,255,255,.62); }

.filter-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 5px 0; }
.filter-row > label { width: 48px; flex-shrink: 0; font-size: 12px; color: var(--muted); }
.filter-chip {
    display: inline-flex; align-items: center; height: 30px; padding: 0 13px; border-radius: 8px;
    font-size: 12.5px; color: var(--ink-soft); border: 1px solid transparent; transition: .16s;
}
.filter-chip:hover { background: var(--teal-soft); color: var(--teal); }
.filter-chip.on { background: var(--teal); color: #fff; font-weight: 600; }

.sort-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sort-bar .count { margin-right: auto; font-size: 12px; color: var(--muted); }
.sort-bar .count b { color: var(--teal); font-size: 15px; }
.sort-chip { padding: 6px 13px; border-radius: 7px; font-size: 12.5px; color: var(--muted); }
.sort-chip.on { background: var(--surface); color: var(--teal); font-weight: 700; box-shadow: 0 2px 8px rgba(20,50,45,.06); }

.result-list { display: flex; flex-direction: column; gap: 10px; }
.result-row {
    display: flex; align-items: center; gap: 18px; padding: 17px 18px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    transition: border-color .2s, transform .2s;
}
.result-row:hover { border-color: var(--teal); transform: translateY(-2px); }
.result-row > img { width: 74px; height: 74px; border-radius: 13px; object-fit: cover; flex-shrink: 0; background: var(--teal-soft); }
.result-main { flex-grow: 1; min-width: 0; }
.result-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 3px; }
.result-title h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.result-title .ver { font-size: 11px; color: var(--muted); font-weight: 400; }
.result-desc { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--muted-2); }
.result-action { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; width: 92px; }
.result-action .dl-btn { height: 34px; border-radius: 8px; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; }
.result-action .mini { text-align: center; font-size: 10.5px; color: var(--muted-2); }

.pager { display: flex; justify-content: center; align-items: center; gap: 5px; margin: 30px 0 10px; font-size: 13px; }
.pager .pg { min-width: 34px; height: 34px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); }
.pager .pg:hover { border-color: var(--teal); color: var(--teal); }
.pager .pg.on { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 700; }
.pager .gap { color: var(--muted-2); padding: 0 2px; }

/* ---------- Item detail ---------- */
.detail-wrap { padding-top: 24px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }

.detail-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin-bottom: 18px; }
.detail-top { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 24px; align-items: start; }
.detail-icon { width: 148px; height: 148px; border-radius: 20px; object-fit: cover; border: 1px solid var(--line); background: var(--teal-soft); box-shadow: 0 16px 30px -24px rgba(15,40,35,.5); }
.detail-head h1 { margin: 0 0 4px; font-family: var(--serif); font-size: clamp(27px, 3vw, 34px); line-height: 1.25; letter-spacing: .01em; }
.detail-head h1 span { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.detail-intro { margin: 0 0 14px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.8; }
.detail-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px 18px; padding: 12px 16px; background: var(--paper); border-radius: 10px; margin-bottom: 16px; font-size: 12px; color: var(--muted); }
.detail-meta b { color: var(--ink); font-weight: 600; margin-left: 4px; }
.detail-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.scan-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ok); background: #eef8f2; border: 1px solid #cfe6d9; padding: 5px 10px; border-radius: 7px; }
.scan-badge b { font-weight: 700; }

.shots-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shots-strip img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); background: var(--teal-soft); transition: opacity .2s; cursor: zoom-in; }
.shots-strip img:hover { opacity: .88; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab-btn {
    border: 0; background: transparent; padding: 9px 15px; font-size: 13px; font-weight: 600; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.tab-btn.on { color: var(--teal); border-bottom-color: var(--teal); }
.tab-panel { display: none; font-size: 13.5px; line-height: 1.9; color: var(--ink-soft); }
.tab-panel.on { display: block; animation: fade-in .3s ease both; }
.tab-panel h3 { font-family: var(--serif); color: var(--teal-deep); font-size: 19px; margin: 22px 0 8px; }
.tab-panel h3:first-child { margin-top: 0; }
.tab-panel ul, .tab-panel ol { padding-left: 21px; }
.tab-panel li { margin-bottom: 5px; }
.tab-panel p { margin-bottom: 10px; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.feedback-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 20px; background: var(--teal-soft); border-radius: var(--radius); margin-bottom: 18px; }
.feedback-box b { color: var(--teal); font-size: 13.5px; }
.feedback-box a, .feedback-box button.fb { font-size: 12px; color: var(--ink-soft); background: #fff; border: 1px solid rgba(15,95,87,.18); padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.feedback-box a:hover, .feedback-box button.fb:hover { border-color: var(--teal); color: var(--teal); }
.feedback-panel { margin-top: 14px; display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.feedback-panel.on { display: block; }
.feedback-panel textarea { width: 100%; min-height: 90px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; font-size: 13px; resize: vertical; background: #fff; }
.feedback-panel input { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 12px; font-size: 13px; margin-top: 8px; background: #fff; }

.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.related-card { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); transition: border-color .2s; }
.related-card:hover { border-color: var(--teal); }
.related-card img { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.related-card strong { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-card span { font-size: 10.5px; color: var(--muted-2); }

.side-download { background: var(--teal); color: #fff; border-radius: var(--radius); padding: 22px; margin-bottom: 18px; position: relative; overflow: hidden; }
.side-download::after { content: ""; position: absolute; right: -50px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(233,180,76,.25), transparent 70%); }
.side-download h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 19px; }
.side-download p { margin: 0 0 14px; font-size: 11.5px; color: rgba(255,255,255,.65); }
.side-download .btn { width: 100%; height: 42px; }
.side-download .safe-line { display: flex; align-items: center; gap: 6px; margin-top: 11px; font-size: 11px; color: rgba(255,255,255,.66); }
.side-download .safe-line b { color: var(--amber); }

/* ---------- Download page ---------- */
.dl-wrap { max-width: 900px; margin: 0 auto; padding-top: 34px; }
.dl-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px 34px; box-shadow: var(--shadow); }
.dl-hero { display: flex; gap: 20px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.dl-hero img { width: 92px; height: 92px; border-radius: 16px; object-fit: cover; background: var(--teal-soft); }
.dl-hero h1 { margin: 0 0 3px; font-family: var(--serif); font-size: 26px; }
.dl-hero p { margin: 0; font-size: 12px; color: var(--muted); }
.dl-scan { margin-left: auto; text-align: center; padding: 10px 16px; border-radius: 12px; background: #eef8f2; border: 1px solid #cfe6d9; color: var(--ok); }
.dl-scan b { display: block; font-size: 18px; }
.dl-scan span { font-size: 10.5px; }
.dl-lines { margin: 22px 0; }
.dl-line { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 9px; transition: border-color .2s; }
.dl-line:hover { border-color: var(--teal); }
.dl-line .num { width: 26px; height: 26px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.dl-line strong { font-size: 14px; }
.dl-line span { display: block; font-size: 11px; color: var(--muted-2); }
.dl-line .btn { margin-left: auto; }
.dl-note { padding: 14px 16px; background: var(--paper); border-radius: 10px; font-size: 12px; color: var(--muted); line-height: 1.8; }

/* ---------- Ranking page ---------- */
.rank-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.rank-tab { padding: 9px 18px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.rank-tab.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.rank-board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rank-item { display: grid; grid-template-columns: 54px 56px minmax(0, 1fr) 120px 110px; gap: 14px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.rank-item:last-child { border-bottom: 0; }
.rank-item:hover { background: #fbfaf4; }
.rank-item .pos { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--muted-2); text-align: center; }
.rank-item:nth-child(-n+3) .pos { color: var(--amber-deep); }
.rank-item img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.rank-item .info strong { display: block; font-size: 15px; }
.rank-item .info span { font-size: 11px; color: var(--muted-2); }
.rank-bar { height: 5px; background: var(--paper-deep); border-radius: 3px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #2c8a7e); border-radius: 3px; }
.rank-num-dl { text-align: right; font-size: 11px; color: var(--muted); }
.rank-num-dl b { display: block; font-size: 13px; color: var(--teal); }

/* ---------- Topics page ---------- */
.topic-large-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.topic-large {
    position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16/9; color: #fff;
    isolation: isolate; background: var(--teal-ink);
}
.topic-large img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s; }
.topic-large:hover img { transform: scale(1.04); }
.topic-large::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5,28,25,.9), rgba(5,28,25,.08) 65%); }
.topic-large-body { position: absolute; inset: auto 0 0; padding: 24px 26px; }
.topic-large-body h2 { margin: 4px 0 4px; font-family: var(--serif); font-size: 27px; }
.topic-large-body p { margin: 0; color: rgba(255,255,255,.66); font-size: 12px; }
.topic-stat { position: absolute; right: 20px; top: 18px; font-size: 11px; color: rgba(255,255,255,.7); background: rgba(5,28,25,.4); backdrop-filter: blur(6px); padding: 3px 10px; border-radius: 999px; }

.topic-detail-banner { position: relative; border-radius: 20px; overflow: hidden; min-height: 300px; color: #fff; isolation: isolate; margin-bottom: 26px; }
.topic-detail-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.topic-detail-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5,28,25,.9), rgba(5,28,25,.15)); }
.topic-detail-body { position: relative; padding: 42px 40px; max-width: 620px; }
.topic-detail-body h1 { margin: 6px 0 8px; font-family: var(--serif); font-size: 38px; }
.topic-detail-body p { margin: 0; color: rgba(255,255,255,.72); font-size: 13px; }
.topic-detail-body .stats { display: flex; gap: 18px; margin-top: 16px; font-size: 11.5px; color: rgba(255,255,255,.6); }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -28px rgba(15,40,35,.55); }
.news-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--teal-soft); }
.news-card-body { padding: 16px 18px 18px; }
.news-card-body .kicker { font-size: 10.5px; color: var(--amber-deep); letter-spacing: .12em; font-weight: 700; }
.news-card-body h3 { margin: 5px 0 6px; font-family: var(--serif); font-size: 19px; line-height: 1.45; }
.news-card-body p { margin: 0; font-size: 12px; color: var(--muted); }
.news-card-body .meta { display: flex; gap: 12px; margin-top: 12px; font-size: 10.5px; color: var(--muted-2); }

.article-wrap { max-width: 780px; margin: 0 auto; padding-top: 30px; }
.article-head { text-align: center; padding: 20px 0 24px; }
.article-head h1 { margin: 10px 0; font-family: var(--serif); font-size: clamp(28px, 4vw, 40px); line-height: 1.3; }
.article-head .meta { color: var(--muted-2); font-size: 12px; }
.article-cover { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: var(--radius); margin-bottom: 28px; }
.article-body { font-size: 15px; line-height: 2; color: var(--ink-soft); }
.article-body h3 { font-family: var(--serif); color: var(--teal-deep); font-size: 23px; margin: 30px 0 10px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 16px; }
.article-body img { border-radius: 10px; margin: 18px 0; }
.article-body, .tab-panel { overflow-wrap: anywhere; }
.article-body img, .tab-panel img { max-width: 100%; height: auto; }
.article-body table, .tab-panel table, .article-body pre, .tab-panel pre {
    display: block; max-width: 100%; overflow-x: auto;
}
.article-more { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.article-more h3 { font-family: var(--serif); font-size: 20px; }
.article-more a { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.article-more a span { color: var(--muted-2); font-size: 11px; }

/* ---------- Search page ---------- */
.search-hero { text-align: center; padding: 50px 0 26px; }
.search-hero h1 { font-family: var(--serif); font-size: 34px; margin: 0 0 6px; }
.search-hero p { color: var(--muted); font-size: 13px; }
.big-search { display: flex; max-width: 640px; margin: 22px auto 0; height: 54px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 5px; box-shadow: 0 16px 40px -32px rgba(15,40,35,.5); }
.big-search input { flex-grow: 1; border: 0; outline: 0; background: transparent; padding: 0 16px; font-size: 15px; }
.big-search button { width: 110px; border: 0; border-radius: 9px; background: var(--teal); color: #fff; font-weight: 700; cursor: pointer; }
.search-section { margin-top: 34px; }
.search-section h2 { font-family: var(--serif); font-size: 21px; margin: 0 0 14px; }

/* ---------- Static page ---------- */
.prose-wrap { max-width: 820px; margin: 0 auto; padding-top: 34px; }
.prose-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.prose-head h1 { font-family: var(--serif); font-size: 36px; margin: 0 0 6px; }
.prose-head p { color: var(--muted); font-size: 13px; margin: 0; }
.prose-body { font-size: 14.5px; line-height: 1.95; }
.sitemap-group { margin-bottom: 26px; }
.sitemap-group h3 { font-family: var(--serif); font-size: 20px; color: var(--teal); }
.sitemap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; font-size: 13px; }
.sitemap-grid a { color: var(--ink-soft); padding: 4px 0; }
.sitemap-grid a:hover { color: var(--teal); }

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 90px 20px; }
.error-page .code { font-family: var(--serif); font-size: 100px; line-height: 1; color: var(--teal); }
.error-page h1 { font-family: var(--serif); font-size: 28px; margin: 12px 0 8px; }
.error-page p { color: var(--muted); margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-ink); color: rgba(255,255,255,.65); margin-top: 20px; }
.footer-main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 2fr); gap: 60px; padding: 54px 0 42px; }
.footer-brand p { max-width: 320px; font-size: 12.5px; line-height: 1.9; color: rgba(255,255,255,.55); margin: 16px 0; }
.footer-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.footer-badges span { font-size: 10.5px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 3px 9px; color: rgba(255,255,255,.6); }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.footer-cols h4 { margin: 0 0 12px; font-family: var(--serif); font-size: 15px; color: #fff; letter-spacing: .04em; }
.footer-cols a { display: block; font-size: 12px; color: rgba(255,255,255,.55); margin-bottom: 8px; }
.footer-cols a:hover { color: var(--amber); }
.footer-bottom { border-top: 1px solid var(--line-dark); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; font-size: 11px; color: rgba(255,255,255,.4); flex-wrap: wrap; }
.footer-legal { display: flex; gap: 14px; }
.footer-legal a:hover { color: rgba(255,255,255,.7); }

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
    padding: 12px 22px; border-radius: 10px; z-index: 120;
    font-size: 13px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.5);
    animation: toast-in .35s ease both;
}
.toast-success { background: var(--teal); color: #fff; }
.toast-error { background: #7d2b21; color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .primary-nav { gap: 0; }
    .nav-link { padding: 10px 7px; font-size: 13.5px; }
    .search-form { width: 210px; }
    .hero-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 1080px) {
    .main-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 280px) 44px;
        height: auto;
        min-height: 66px;
        gap: 10px 12px;
        padding-block: 10px;
    }
    .main-inner .brand { grid-column: 1; grid-row: 1; min-width: 0; }
    .main-inner .brand-text { min-width: 0; overflow-wrap: anywhere; }
    .main-inner .search-form {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        height: 46px;
        min-width: 0;
    }
    .main-inner .search-form button { min-height: 36px; white-space: nowrap; }
    .main-inner .mobile-toggle { grid-column: 3; grid-row: 1; width: 44px; height: 44px; }
    .main-inner.nav-ready .mobile-toggle { display: block; }
    .primary-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
        gap: 4px;
        padding-top: 8px;
        border-top: 1px solid var(--line);
    }
    .main-inner.nav-ready .primary-nav:not(.open) { display: none; }
    .primary-nav .nav-link {
        display: flex;
        min-height: 44px;
        padding: 9px 10px;
        white-space: normal;
    }
    .primary-nav .nav-pop, .primary-nav .nav-arrow { display: none; }
}

@media (max-width: 1024px) {
    .wrap { width: calc(100% - 40px); }
    .hero-grid { grid-template-columns: 1fr; }
    .rank-panel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
    .rank-head, .rank-foot { grid-column: 1 / -1; }
    .hits-rail { grid-template-columns: repeat(3, 1fr); }
    .topic-grid { grid-template-columns: repeat(2, 1fr); }
    .split, .detail-grid { grid-template-columns: 1fr; }
    .side-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
    .triple { grid-template-columns: 1fr; }
    .news-strip { grid-template-columns: minmax(0, 1fr); }
    .footer-main { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 820px) {
    .hot-keywords { display: none; }
    .utility-right a:nth-child(3) { display: none; }
    .app-grid { grid-template-columns: repeat(2, 1fr); }
    .latest-grid { grid-template-columns: minmax(0, 1fr); }
    .topic-grid { grid-template-columns: 1fr; }
    .hits-rail { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: 1fr; }
    .topic-large-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
    .detail-top { grid-template-columns: 1fr; }
    .detail-icon { width: 100px; height: 100px; }
    .shots-strip, .related-grid { grid-template-columns: 1fr 1fr; }
    .rank-item { grid-template-columns: 42px 46px minmax(0,1fr) 90px; }
    .rank-item .rank-bar { display: none; }
    .dl-panel { padding: 24px 20px; }
    .dl-hero { flex-wrap: wrap; }
    .dl-scan { margin-left: 0; }
}

@media (max-width: 560px) {
    .wrap { width: calc(100% - 28px); }
    .main-inner { grid-template-columns: minmax(0, 1fr) 44px; }
    .main-inner .mobile-toggle { grid-column: 2; }
    .main-inner .search-form { grid-column: 1 / -1; grid-row: 2; }
    .main-inner .search-form input { font-size: 16px; }
    .primary-nav { grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .brand-text em { display: none; }
    .brand-text strong { font-size: 21px; }
    .brand-mark { width: 38px; height: 38px; }
    .utility-inner { height: auto; min-height: 34px; gap: 4px 12px; flex-wrap: wrap; }
    .utility-left span:nth-child(4), .utility-left span:nth-child(5) { display: none; }
    .utility-right a:nth-child(1) { display: none; }
    .sec-head { flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; }
    .hero-content { padding: 24px 22px; min-height: 400px; }
    .hero-title { font-size: 31px; }
    .hero-meta { display: none; }
    .rank-panel { grid-template-columns: 1fr; }
    .hits-rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0 14px 8px; }
    .hit-card { flex: 0 0 76%; scroll-snap-align: start; }
    .latest-row {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        grid-template-areas: "icon info info" "date type size";
        gap: 6px 10px;
        padding: 12px 0;
    }
    .latest-icon { grid-area: icon; width: 40px; height: 40px; }
    .latest-info { grid-area: info; }
    .latest-info strong { white-space: normal; overflow-wrap: anywhere; }
    .latest-date { grid-area: date; width: auto; }
    .latest-date b { font-size: 14px; }
    .latest-type { grid-area: type; overflow-wrap: anywhere; }
    .latest-dl { grid-area: size; max-width: 110px; white-space: normal; overflow-wrap: anywhere; text-align: right; }
    .app-grid { grid-template-columns: 1fr; }
    .app-card img { width: 54px; height: 54px; }
    .topic-card { aspect-ratio: 16/8.6; }
    .side-col { grid-template-columns: 1fr; }
    .detail-card { padding: 18px; }
    .detail-meta { grid-template-columns: 1fr 1fr; }
    .detail-actions .btn { flex-grow: 1; }
    .detail-actions .btn, .result-action .dl-btn { min-height: 44px; }
    .shots-strip { display: flex; overflow-x: auto; gap: 8px; }
    .shots-strip img { flex: 0 0 82%; }
    .related-grid { grid-template-columns: 1fr; }
    .result-row { flex-wrap: wrap; gap: 12px; }
    .result-row > img { width: 58px; height: 58px; }
    .result-action { flex-direction: row; width: 100%; }
    .result-action .dl-btn { flex-grow: 1; }
    .dl-line { flex-wrap: wrap; padding: 12px; }
    .dl-line .num { flex: 0 0 26px; }
    .dl-line > div { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
    .dl-line .btn { width: 100%; min-height: 44px; margin-left: 0; justify-content: center; }
    .rank-item { grid-template-columns: 34px 44px minmax(0,1fr); padding: 12px 14px; }
    .rank-item .rank-num-dl { display: none; }
    .footer-cols { grid-template-columns: 1fr 1fr; gap: 18px; }
    .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
    .sitemap-grid { grid-template-columns: 1fr 1fr; }
    .page-banner { padding: 24px 22px; }
    .page-banner h1 { font-size: 27px; }
    .article-body { font-size: 14px; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
