:root {
    --paper: #f4f4f0;
    --ink: #050505;
    --hot: #ff3e00;
    --blue: #0044ff;
    --soft: #fff8e8;
    --muted: #5f5f5f;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    min-height: 100%;
    margin: 0;
    padding: 40px 20px;
    background: var(--paper);
    background-image: radial-gradient(#000 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--ink);
    font-family: Arial, "Microsoft Yahei", sans-serif;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { width: min(1400px, 100%); margin: 0 auto; }
.topbar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 420px);
    gap: 28px;
    align-items: start;
    margin-bottom: 54px;
}
.brand {
    display: inline-block;
    justify-self: start;
    padding: 10px 28px;
    border: 5px solid var(--ink);
    background: var(--hot);
    color: #fff;
    box-shadow: 10px 10px 0 var(--ink);
    transform: rotate(-3deg) translateX(-12px);
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 900;
    line-height: 1;
}
.search-panel {
    display: flex;
    width: 100%;
    padding: 6px;
    border: 4px solid var(--ink);
    background: #fff;
    box-shadow: 8px 8px 0 var(--blue);
    transform: rotate(2deg);
}
.search-panel input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0 12px;
    font-size: 16px;
    font-weight: 800;
    background: #fff;
}
.search-panel button {
    border: 0;
    padding: 10px 20px;
    background: var(--ink);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
.nav-rack {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 8px;
}
.nav-rack a,
.tag-rack a,
.playlist a,
.pager a,
.pager span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 18px;
    border: 3px solid var(--ink);
    background: #fff;
    box-shadow: 4px 4px 0 var(--ink);
    font-weight: 900;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.nav-rack a:nth-child(odd),
.tag-rack a:nth-child(odd) { transform: rotate(-2deg) translateY(4px); }
.nav-rack a:nth-child(even),
.tag-rack a:nth-child(even) { transform: rotate(2deg) translateY(-3px); }
.nav-rack a:hover,
.tag-rack a:hover,
.playlist a:hover,
.pager a:hover,
.nav-rack a.active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 var(--ink);
    background: var(--blue);
    color: #fff;
}
.section-title {
    margin: 54px 0 28px;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
    line-height: 1.1;
}
.section-title span {
    display: inline-block;
    padding: 7px 22px;
    border: 4px solid var(--ink);
    background: var(--ink);
    color: #fff;
    box-shadow: 6px 6px 0 var(--hot);
    transform: skewX(-10deg);
}
.tag-rack {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 44px;
    padding-left: 14px;
}
.link-rack a {
    background: var(--soft);
}
.link-rack a:nth-child(4n+1) {
    box-shadow: 4px 4px 0 var(--hot);
}
.wild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 30px;
    margin: 0 0 58px;
}
.w-card {
    position: relative;
    min-width: 0;
    border: 5px solid var(--ink);
    background: #fff;
    box-shadow: 10px 10px 0 var(--blue);
    transition: transform .12s ease, box-shadow .12s ease;
}
.w-card:nth-child(3n+1) { transform: translateY(18px); box-shadow: 10px 10px 0 var(--hot); }
.w-card:nth-child(3n+2) { transform: translateY(-10px); }
.w-card:hover { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); z-index: 3; }
.pic {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-bottom: 5px solid var(--ink);
    background: var(--ink);
}
.pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.18) saturate(1.12);
}
.note {
    position: absolute;
    right: 0;
    bottom: 0;
    max-width: 80%;
    padding: 8px 10px;
    background: var(--hot);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}
.info {
    min-height: 92px;
    padding: 14px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
}
.meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.detail-panel,
.player-panel {
    border: 5px solid var(--ink);
    background: #fff;
    box-shadow: 12px 12px 0 var(--blue);
    padding: 22px;
    margin-bottom: 38px;
}
.detail-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.detail-cover {
    border: 5px solid var(--ink);
    background: var(--ink);
    box-shadow: 8px 8px 0 var(--hot);
}
.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}
.detail-title {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.05;
    font-weight: 900;
}
.detail-panel p {
    margin: 10px 0;
    color: #222;
    line-height: 1.7;
}
.playlist {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.playlist a.current { background: var(--hot); color: #fff; transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.player-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}
.MacPlayer,
.MacPlayer table,
.MacPlayer iframe,
.MacPlayer video {
    width: 100% !important;
    height: 100% !important;
}
.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 44px 0;
}
.pager span { background: var(--hot); color: #fff; }
.empty {
    border: 5px solid var(--ink);
    background: #fff;
    box-shadow: 10px 10px 0 var(--hot);
    padding: 44px 22px;
    text-align: center;
    font-weight: 900;
}
.foot {
    margin-top: 80px;
    padding: 44px 0 12px;
    border-top: 8px solid var(--ink);
    text-align: center;
    font-weight: 900;
}
@media (max-width: 760px) {
    body { padding: 24px 14px; }
    .topbar { grid-template-columns: 1fr; gap: 18px; margin-bottom: 36px; }
    .brand, .search-panel { transform: none; }
    .brand { justify-self: stretch; text-align: center; }
    .wild-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .w-card:nth-child(n) { transform: none; box-shadow: 6px 6px 0 var(--blue); }
    .info { min-height: 78px; padding: 10px; font-size: 13px; }
    .detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .wild-grid { grid-template-columns: 1fr; }
    .search-panel button { padding-inline: 14px; }
}

/* sg001: paper index */
:root {
    --paper: #fbfbf4;
    --ink: #101010;
    --hot: #ef4444;
    --blue: #0f766e;
    --soft: #eef6ff;
    --muted: #53616a;
}
body {
    padding-top: 28px;
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(15, 118, 110, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 118, 110, .09) 1px, transparent 1px);
    background-size: 28px 28px;
}
.brand {
    border-width: 4px;
    background: #fff;
    color: var(--ink);
    box-shadow: 10px 10px 0 var(--blue);
}
.search-panel,
.w-card,
.detail-panel,
.player-panel {
    border-width: 3px;
    box-shadow: 8px 8px 0 rgba(16, 16, 16, .92);
}
.section-title span {
    background: #fff;
    color: var(--ink);
    box-shadow: 7px 7px 0 var(--hot);
}
.wild-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 24px;
}
.w-card:nth-child(n) {
    transform: none;
}
.w-card:nth-child(4n+1) {
    transform: rotate(-1.2deg);
}
.w-card:nth-child(4n+3) {
    transform: rotate(1.2deg);
}
.pic {
    aspect-ratio: 5 / 4;
}
.tag-rack a,
.nav-rack a {
    border-width: 2px;
    box-shadow: 3px 3px 0 var(--blue);
    background: #fffef8;
}
.foot {
    border-top-style: dashed;
}

/* v17 cleanup: one category rail, no decorative horizontal lines, uniform video cards */
.topbar,
.nav-rack,
.section-title,
.section-title span,
.pic,
.foot {
    border-top: 0 !important;
    border-bottom: 0 !important;
}
.section-title span,
.nav-rack a,
.tag-rack a,
.playlist a,
.pager a,
.pager span {
    box-shadow: none !important;
    transform: none !important;
}
.wild-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
    gap: 22px !important;
    align-items: stretch !important;
}
.w-card,
.w-card:nth-child(n) {
    grid-column: auto !important;
    transform: none !important;
    min-width: 0 !important;
    height: 100% !important;
}
.w-card a {
    display: flex;
    height: 100%;
    flex-direction: column;
}
.pic,
.w-card:nth-child(n) .pic {
    aspect-ratio: 16 / 9 !important;
    flex: 0 0 auto !important;
    background: #f7f7f2 !important;
}
.pic .vod-img,
.detail-cover .vod-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}
.info {
    height: 92px !important;
    min-height: 92px !important;
    overflow: hidden;
    flex: 1 0 auto !important;
}

/* v18 final card cleanup: no borders and two-line card text */
.wrap *,
.wrap *::before,
.wrap *::after {
    border: 0 !important;
    box-shadow: none !important;
}
.w-card,
.w-card *,
.pic,
.detail-panel,
.player-panel,
.detail-cover,
.empty,
.nav-rack a,
.tag-rack a,
.playlist a,
.pager a,
.pager span,
.brand,
.search-panel {
    border: 0 !important;
    box-shadow: none !important;
}
.info {
    display: block !important;
    height: 92px !important;
    min-height: 0 !important;
    max-height: none !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    overflow: hidden !important;
    line-height: 1.4 !important;
}
.info .card-title-text {
    display: -webkit-box !important;
    max-height: 4.2em;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}
.info .meta {
    display: none !important;
}
.note {
    max-width: 76% !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    border: 0 !important;
    box-shadow: none !important;
}
