:root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --secondary: #0F172A;
    --text: #334155;
    --text-dark: #1E293B;
    --text-light: #64748B;
    --bg: #F1F5F9;
    --card-bg: #FFFFFF;
    --border: #CBD5E1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 6px 12px -2px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}
html {
    scroll-padding-top: 80px;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family: 'Helvetica Neue', 'Hiragino Kaku Gothic ProN', Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--primary-hover);
}
.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--card-bg);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-brand {
    display: flex;
    flex-direction: column;
}
.site-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}
.site-logo:hover {
    color: var(--primary);
}
.site-subtitle {
    margin: 0.1rem 0 0 0;
    font-size: 0.8rem;
    color: var(--text-light);
}
.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
}
.site-nav a {
    color: var(--secondary);
    font-size: 0.95rem;
    font-weight: 600;
}
.site-nav a:hover {
    color: var(--primary);
}

/* Base Typo & Sections */
h1, h2, h3, h4, h5 {
    color: var(--text-dark);
    margin-top: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
    word-break: auto-phrase;
}
.page-header {
    margin: 1.5rem 0 1rem;
}
.page-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}
.section-title {
    font-size: 1.4rem;
    font-weight: bold;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.season-section { margin-bottom: 3rem; }
.season-section h2 {
    font-size: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    margin-bottom: 1.5rem;
}
.past-season-section { margin-bottom: 3rem; }

/* Intro Block */
.main-intro {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1rem;
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    line-height: 1.8;
}

/* TOC Styles */
.toc {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}
.toc ul {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.toc a { font-weight: bold; }

/* Tags for TOC */
.work-tags-container {
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}
.toc-title-small { margin: 0 0 0.5rem 0; font-weight: bold; font-size: 0.9rem; color: var(--text-light); }
.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.work-tag-link {
    background: var(--bg);
    color: var(--text-dark);
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
    transition: background 0.2s, color 0.2s;
}
.work-tag-link:hover {
    background: var(--border);
}
.more-link {
    background: transparent;
    border-color: transparent;
    color: var(--primary);
    font-weight: bold;
}
.more-link:hover {
    background: #E0E7FF;
    border-color: #E0E7FF;
    color: var(--primary-hover);
}

/* Work Rows (Grid list style) */
.row-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.work-row {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.work-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.work-thumb {
    flex-shrink: 0;
    width: 130px;
}
.work-thumb img {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #E2E8F0;
}
.no-image {
    width: 100%;
    aspect-ratio: 3/4;
    background: #F8FAFC;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid #E2E8F0;
}
.work-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.work-body h3 {
    font-size: 1.25rem;
    margin: 0 0 0.4rem 0;
}
.work-badges { margin-bottom: 0.5rem; }
.badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}
.badge-anime { background: #DBEAFE; color: #1E40AF; }
.badge-drama { background: #FCE7F3; color: #9D174D; }

.work-body .desc {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Metas inside row */
.meta-bottom {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}
.meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
}
.meta-list li {
    background: var(--bg);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #E2E8F0;
    color: var(--text-dark);
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    font-size: 0.9rem;
    transition: background 0.2s, opacity 0.2s;
    border: none;
    cursor: pointer;
}
.btn:hover {
    background: var(--primary-hover);
    color: #fff;
}
.btn-large {
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    border-radius: 8px;
}

/* Season / Breadcrumb Navigation */
.breadcrumb {
    margin: 1rem 0;
    font-size: 0.85rem;
}
.breadcrumb ul { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.breadcrumb li { color: var(--text-light); }
.breadcrumb li::after { content: ">"; margin-left: 0.5rem; color: var(--border); }
.breadcrumb li:last-child::after { content: ""; }

.season-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.season-page-header h1 { margin-bottom: 0.2rem; }
.season-lead { margin: 0; font-size: 0.95rem; color: var(--text-light); }

.season-nav, .season-nav-bottom {
    display: flex;
    gap: 0.5rem;
}
.nav-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dark);
}
.nav-btn:hover { background: var(--bg); }
.season-nav-bottom { margin-top: 3rem; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 1rem; }

/* Compact Work Row */
.work-row-compact { padding: 1rem; gap: 1rem; }
.work-thumb-compact { width: 80px; }
.compact-title { font-size: 1.1rem; margin: 0 0 0.3rem 0; }
.compact-desc { 
    font-size: 0.85rem; 
    margin: 0; 
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.past-links-box { background: var(--card-bg); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); }
.past-links-list { display: flex; gap: 1.5rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.past-links-list a { font-weight: bold; }

.mt-1 { margin-top: 1rem; }

/* Show Page */
.content-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    margin-bottom: 2rem;
}
.content-section h2 { border-bottom: 2px solid var(--bg); padding-bottom: 0.5rem; margin-bottom: 1rem; }
.work-header-flex { display: flex; gap: 2rem; }
.work-header-thumb { width: 220px; flex-shrink: 0; }
.work-header-thumb img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; display: block; }
.no-image-large {
    width: 100%; aspect-ratio: 3/4; background: var(--bg); color: #94A3B8;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; font-size: 1rem; border: 1px solid var(--border);
}
.work-header-info { flex-grow: 1; }
.work-header-info h1 { font-size: 1.8rem; margin-bottom: 0.2rem; }
.kana { font-size: 0.9rem; color: var(--text-light); margin: 0 0 1rem 0; }
.lead-short { font-size: 1rem; margin-bottom: 1.5rem; }
.meta-row { margin-bottom: 1rem; }
.genre-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.genre-tag { background: #E2E8F0; padding: 0.2rem 0.8rem; border-radius: 20px; font-size: 0.8rem; color: var(--text-dark); }
.streaming-tag { background: #DBEAFE; color: #1E40AF; }

.adapt-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.adapt-card { background: var(--bg); padding: 1.5rem; border-radius: 6px; }
.adapt-card h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.adapt-detail-box { margin-top: 1rem; background: #fff; padding: 1rem; border-radius: 4px; border: 1px solid var(--border); }
.adapt-detail-box h4 { margin: 0 0 0.5rem 0; font-size: 0.9rem; color: var(--text-light); }
.adapt-detail-box ul { margin: 0; padding-left: 1.2rem; font-size: 0.9rem; }
.flex-wrap { display: flex; flex-wrap: wrap; }

.cta-area-top { margin-top: 1.5rem; }
.cta-area-bottom { text-align: center; margin: 3rem 0; }

.site-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    background: var(--secondary);
    color: #94A3B8;
}
.footer-links { margin-bottom: 1rem; display: flex; justify-content: center; gap: 2rem; }
.footer-links a { color: #CBD5E1; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }

@media (max-width: 680px) {
    .header-inner { flex-direction: column; gap: 0.5rem; }
    .site-nav ul { gap: 1rem; }
    
    .work-row { flex-direction: column; padding: 1rem; }
    .work-thumb { width: 100px; margin: 0; }
    .meta-bottom { flex-direction: column; align-items: stretch; gap: 1rem; }
    .btn { width: 100%; text-align: center; box-sizing: border-box; }
    
    .work-header-flex { flex-direction: column; }
    .work-header-thumb { width: 140px; margin: 0 auto; }
}
