/* ===== Design Tokens ===== */
:root {
    --cobalt: #2C7BE5;
    --cobalt-dark: #1E60C0;
    --cobalt-light: #EBF3FD;
    --navy: #1B3A4B;
    --navy-mid: #2D5068;
    --mint-bg: #F0F7F4;
    --white: #FFFFFF;
    --surface: #F8FAFB;
    --border: #DDE3E9;
    --text-body: #2D3A45;
    --text-muted: #6B7C8D;
    --text-nav: #3D5166;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.07);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.09);
    --max-w: 1200px;
    --gap: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--white);
    color: var(--text-body);
    font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--cobalt); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ===== Layout ===== */
.page-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px;
}

.row-gap { margin: 6px 0; }

/* ===== Site Header ===== */
.site-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.site-nav .page-container {
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 18px;
    flex-wrap: nowrap;
}

.nav-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo-link:hover { text-decoration: none; }

.site-wordmark {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.4px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    line-height: 1;
}

.domain-capsule {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--mint-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 14px;
    white-space: nowrap;
}

.domain-label {
    font-size: 0.71rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.domain-value {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--cobalt);
}

/* ===== Banner ===== */
.media-banner {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    background: var(--mint-bg);
}

.media-banner img { width: 100%; display: block; }

/* ===== Category Navigation ===== */
.nav-matrix {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.nav-row-item {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}

.nav-row-item:last-child { border-bottom: none; }

.row-zone-label {
    background: var(--navy);
    color: rgba(255,255,255,0.90);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5px;
    min-width: 15%;
    flex-shrink: 0;
    word-break: break-all;
    line-height: 1.3;
}

.row-zone-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 5px 8px;
    flex: 1;
    gap: 0;
    background: var(--surface);
}

.row-zone-links a {
    font-size: 12px;
    color: var(--text-nav);
    text-decoration: none;
    padding: 5px 6px;
    border-radius: var(--radius);
    transition: background 0.14s, color 0.14s;
    white-space: nowrap;
    flex: 0 0 25%;
    text-align: center;
}

.row-zone-links a:hover {
    background: var(--cobalt-light);
    color: var(--cobalt);
    text-decoration: none;
}

.row-zone-links a.active {
    background: var(--cobalt);
    color: var(--white);
    font-weight: 700;
}

/* ===== Search ===== */
.search-panel {
    background: var(--mint-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
}

#site-search-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

#site-search-form input[type="text"] {
    flex: 1;
    min-width: 150px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    background: var(--white);
    color: var(--text-body);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#site-search-form input[type="text"]::placeholder { color: var(--text-muted); }

#site-search-form input[type="text"]:focus {
    border-color: var(--cobalt);
    box-shadow: 0 0 0 3px rgba(44,123,229,0.12);
}

#site-search-form button {
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    background: var(--cobalt);
    color: var(--white);
}

#site-search-form button:hover { background: var(--cobalt-dark); }

/* ===== Hot Keywords ===== */
.trending-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    box-shadow: var(--shadow-xs);
}

.trending-panel h4 {
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.trend-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.trend-tags a {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--text-body);
    text-decoration: none;
    transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.trend-tags a:hover {
    background: var(--cobalt);
    border-color: var(--cobalt);
    color: var(--white);
    text-decoration: none;
}

/* ===== Content Block ===== */
.content-tile {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-xs);
}

.tile-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--cobalt);
}

.tile-header h3,
.tile-header h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.2px;
}

.tile-header h3 a,
.tile-header h4 a {
    color: var(--navy);
    text-decoration: none;
}

.tile-header h3 a:hover,
.tile-header h4 a:hover {
    color: var(--cobalt);
    text-decoration: none;
}

.qty-label {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* ===== Film Grid ===== */
.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    list-style: none;
    padding: 0;
    margin: 0;
}

.media-grid li {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}

.media-grid li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--cobalt);
}

.thumb-link {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--mint-bg);
}

.thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.media-grid li:hover .thumb-link img {
    transform: scale(1.04);
}

.item-caption {
    padding: 7px 9px 9px;
    background: var(--white);
}

.item-caption h5 {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-body);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-caption h5 a {
    color: var(--text-body);
    text-decoration: none;
}

.item-caption h5 a:hover {
    color: var(--cobalt);
    text-decoration: none;
}

/* ===== Detail Title ===== */
.detail-title {
    background: var(--mint-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--cobalt);
    padding: 16px 20px;
    line-height: 1.8;
    text-align: center;
    font-size: 17px;
    word-break: break-all;
}

.detail-title .cat-link {
    color: var(--cobalt);
    font-weight: 700;
    margin-right: 8px;
    text-decoration: none;
}

.detail-title b { color: var(--navy); }

/* ===== Detail Meta Info ===== */
.detail-specs {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    font-size: 15px;
    line-height: 2;
    color: var(--text-body);
}

/* ===== Capture preview ===== */
.capture-wrap { margin-top: 14px; }

.capture-wrap picture img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ===== Download Actions ===== */
.dl-action-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 0;
}

.dl-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--cobalt);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.dl-action-btn:hover {
    background: var(--cobalt-dark);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44,123,229,0.30);
}

/* ===== Client hint ===== */
.client-link-hint {
    text-align: center;
    padding: 8px 0;
}

.client-link-hint a {
    color: var(--cobalt);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.client-link-hint a:hover { text-decoration: underline; }

/* ===== Share strip ===== */
.url-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
}

.share-ttl {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.share-url-display {
    flex: 1;
    font-size: 13px;
    color: var(--text-body);
    word-break: break-all;
}

.copy-url-btn {
    background: var(--cobalt);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.14s;
}

.copy-url-btn:hover { background: var(--cobalt-dark); }

/* ===== Pagination ===== */
.page-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 14px 0;
}

.pn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-body);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.pn-link:hover {
    background: var(--cobalt);
    border-color: var(--cobalt);
    color: var(--white);
    text-decoration: none;
}

.pn-current {
    background: var(--cobalt);
    border-color: var(--cobalt);
    color: var(--white);
    font-weight: 800;
}

/* ===== Friend Links ===== */
.partner-links {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    box-shadow: var(--shadow-xs);
}

.partner-links h4 {
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--cobalt);
    display: inline-block;
    letter-spacing: 0.02em;
}

.plinks-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.plinks-list dl { display: contents; }
.plinks-list dd { display: inline; margin: 0; }

.plinks-list a {
    display: inline-block;
    font-size: 13px;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.plinks-list a:hover {
    color: var(--cobalt);
    border-color: var(--cobalt);
    background: var(--cobalt-light);
    text-decoration: none;
}

/* ===== Footer ===== */
.global-footer {
    background: var(--navy);
    padding: 16px 0;
    margin-top: 8px;
}

.footer-inner {
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.40);
}

/* ===== Utility ===== */
.clearfix::after { content: ''; display: table; clear: both; }

/* ===== Responsive ===== */
@media (max-width: 768px) {

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .row-zone-label {
        font-size: 10px;
        min-width: 15%;
        padding: 0 3px;
    }

    .row-zone-links { padding: 3px 4px; }

    .row-zone-links a {
        font-size: 12px;
        padding: 4px 3px;
        flex: 0 0 25%;
    }

    .detail-title { font-size: 15px; padding: 12px 14px; }

    #site-search-form input[type="text"] { min-width: 120px; }
    #site-search-form button { padding: 8px 11px; font-size: 12px; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .row-zone-links a { font-size: 14px; }
    .row-zone-label { font-size: 10px; }
}

@media (min-width: 769px) {
    .row-zone-label {
        font-size: 13px;
        min-width: auto;
        padding: 0 18px;
    }
    .row-zone-links { padding: 6px 12px; }
    .row-zone-links a {
        font-size: 14px;
        flex: 1;
        padding: 6px 4px;
    }
}

@media (max-width: 768px) { .pc-show { display: none !important; } }
@media (min-width: 769px) { .mb-show { display: none !important; } }
