@charset "utf-8";

#wrapper {
    overflow-x: clip;
}

/* スクロールバー */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1b2730, #0f1820);
    border-radius: 6px;
    border: 2px solid #000;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2a3944, #151f28);
}

/* 全体・共通レイアウト */
html {
    min-height: 100%;
    background: #0d1f17;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f0f0f0;
    color: #1a1a1a;
}

/* フッター */
footer {
    background: #000;
    color: #fff;
    padding: 20px 40px 20px 300px;
    text-align: center;
    transition: padding-left 0.3s ease;
    background: #1b5e20;
    color: #f1f8e9;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: left;
    margin-left: 0;
}

* {
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

a {
    text-decoration: none;
    color: inherit;
}

.clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clamp.c1 {
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

.clamp.c2 {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.clamp.c3 {
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.clamp.c4 {
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

/* --- SNSリンク --- */
.snsbox {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    justify-content: flex-start;
    gap: 15px;
}

.snsbox li {
    flex: 0 0 100px;
}

.snsbox li a {
    display: flex;
    width: 100%;
    border-radius: 10px;
    height: 44px;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.snsbox li a:hover {
    opacity: 0.8;
}

.snsbox li.x a {
    background: #000;
}

.snsbox li.fb a {
    background: #0865FE;
}

.snsbox li.line a {
    background: #06C755;
}

.snsbox li.line a img {
    height: 36px;
}

.snsbox li.line {
    display: none;
}

.snsbox li a img {
    height: 24px;
    width: auto;
}

/* --- ページタイトル (TTLBOX) --- */
.ttlbox {
    display: flex;
    justify-content: flex-end;
    padding: 10px 40px;
    width: 100%;
}

/* ページ遷移ローディングオーバーレイ */
#page-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 23, 19, 0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#page-loading-overlay::after {
    content: '';
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff0a6;
    border-radius: 50%;
    animation: page-spin 0.7s linear infinite;
}

@keyframes page-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 共通ユーティリティ */
.full-width {
    padding: 0 40px;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
}

.tab-inner-grid {
    padding: 20px 40px;
}

.tab-inner-grid .person-detail-card .person-name {
    color: #fff;
    text-decoration: none;
}

section+section {
    margin-top: 40px;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1001;
    width: 260px;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #1b5c2a, #24773d);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.26);
    transition: transform 0.3s ease !important;
    display: flex;
    flex-direction: column;
}

.sidebar-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 15px;
}

.sidebar-collapse-btn {
    flex-shrink: 0;
    width: 100%;
    height: 46px;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: #0c1f12;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    font-size: 0.82rem;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.3s ease, background 0.2s;
}

.sidebar-collapse-btn:hover {
    background: #172e1d;
}

.sidebar-collapse-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-collapse-icon svg {
    transition: transform 0.3s ease;
}

.sidebar-collapse-label {
    opacity: 1;
    transition: opacity 0.15s ease;
}

body.sidebar-collapsed .sidebar {
    transform: translateX(-260px);
}

body.sidebar-collapsed .sidebar-collapse-btn {
    position: fixed;
    bottom: 40px;
    left: 0;
    z-index: 1002;
    width: 38px;
    padding: 0 8px;
}

body.sidebar-collapsed .sidebar-collapse-label {
    opacity: 0;
    pointer-events: none;
}

body.sidebar-collapsed .sidebar-collapse-icon svg {
    transform: rotate(180deg);
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}

body.sidebar-collapsed .search-header {
    left: 0;
}

body.sidebar-collapsed footer {
    padding-left: 0;
}

.sidebar-logo {
    margin-bottom: 25px;
    text-align: center;
}

.sidebar-tagline {
    margin-bottom: 12px;
    color: #f2d36b;
    font-size: 0.78rem;
    line-height: 1.6;
    text-align: center;
    text-shadow: 0 0 8px rgba(242, 211, 107, 0.45);
    animation: gold-shine 2.8s ease-in-out infinite;
}

.site-logo {
    display: block;
    height: auto;
    margin: 0 auto;
}

.sidebar-logo-heading {
    margin: 0;
    line-height: 0;
}

.sidebar-logo-heading a {
    display: inline-block;
    line-height: 0;
}

.sidebar-logo-heading a:hover {
    opacity: 0.7;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 16px 0;
}

.nav-menu-sub {
    margin-top: 0;
}

.nav-item-about {
    padding: 6px 20px 2px;
    text-align: center;
}

.nav-about-link {
    color: rgba(244, 247, 239, 0.38);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-about-link:hover,
.nav-about-link.active {
    color: rgba(244, 247, 239, 0.7);
    text-decoration: underline;
}

.nav-tagline-big {
    font-weight: 900;
    letter-spacing: 0.04em;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #f7f8ef;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(82, 183, 136, 0.14);
    border-color: rgba(82, 183, 136, 0.42);
    transform: translateX(3px);
}

.nav-item .main-label {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-weight: 700;
    font-size: 1.44rem;
}

.nav-item .small-text {
    color: rgba(244, 247, 239, 0.58);
    font-size: 1.0368rem;
    font-weight: 400;
}

.nav-item:hover .main-label,
.nav-item:hover .small-text,
.nav-item.active .main-label,
.nav-item.active .small-text {
    color: #fff0a6;
}

@keyframes gold-shine {

    0%,
    100% {
        color: #d9b84f;
        text-shadow: 0 0 6px rgba(217, 184, 79, 0.35), 0 0 14px rgba(82, 183, 136, 0.14);
    }

    50% {
        color: #fff0a6;
        text-shadow: 0 0 10px rgba(255, 240, 166, 0.7), 0 0 24px rgba(240, 200, 90, 0.38);
    }
}

.main-content {
    flex: 1;
    min-width: 0;
    /* min-height: 110vh; */
    margin-left: 260px;
    padding-top: 66px;
    padding-bottom: 56px;
    background: #f0f0f0;
    color: #1a1a1a;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, margin-left 0.3s ease;
}

.search-header {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    z-index: 1000;
    padding: 12px 40px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

.search-content {
    display: grid;
    grid-template-columns: minmax(360px, 0.5fr) auto 2fr;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.search-input-wrap {
    position: relative;
    width: 100%;
}

.search-submit-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 42px;
    background: none;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 8px 8px 0;
    transition: background 0.15s, color 0.15s;
    z-index: 1;
}

.search-submit-btn:hover {
    background: rgba(82, 183, 136, 0.15);
    color: #52b788;
}

.search-input {
    width: 100%;
    min-height: 42px;
    padding: 0 46px 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.98rem;
}

.search-input:focus {
    border-color: rgba(82, 183, 136, 0.72);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.14);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    position: relative;
}

.filter-clear-btn {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    background: none;
    border: 1px solid rgba(255, 100, 100, 0.45);
    border-radius: 6px;
    color: rgba(255, 140, 140, 0.9);
    font-size: 0.78rem;
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.filter-clear-btn:hover {
    background: rgba(255, 80, 80, 0.12);
    border-color: rgba(255, 100, 100, 0.7);
}

.filter-item {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.86rem;
    white-space: nowrap;
    cursor: pointer;
}

.filter-item img {
    max-width: 40px;
    height: auto;
    display: block;
}

.filter-item:hover {
    background: rgba(82, 183, 136, 0.16);
    border-color: rgba(82, 183, 136, 0.45);
}

.filter-item.selected {
    background: rgba(82, 183, 136, 0.18);
    border-color: rgba(82, 183, 136, 0.55);
    color: #fff0a6;
}

/* フィルターアイテムが選択されたら、複合検索結果を表示 */
.filter-flag {
    width: 25px;
    height: 17px;
    margin-right: 6px;
    border-radius: 3px;
    object-fit: cover;
}

.search-content {
    justify-content: flex-start;
    /* 左寄せ */
    gap: 15px;
    /* スキマを縮める */
}

#flyout-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 200px;
    background: rgba(13, 37, 33, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(82, 183, 136, 0.2);
    z-index: 1000;
    padding: 20px 40px;
}

#flyout-menu.active {
    display: block;
}

.flyout-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 15px;
    padding: 10px 0;
}

.flyout-item {
    cursor: pointer;
    transition: 0.3s;
    flex: 0 0 140px;
    display: flex;
    flex-direction: column;
}

.flyout-item:hover {
    transform: translateY(-5px);
}

/* flyout-visual を正方形にする */
.flyout-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* シリーズ画像を明るくする */
.flyout-menu .flyout-visual img {
    filter: brightness(1.2);
}

.flyout-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.18);
    z-index: 1;
}

.flyout-visual.flag::before {
    display: none;
}

.flyout-item:hover .flyout-visual::before {
    background: transparent;
}

.no-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    padding: 0 8px;
    z-index: 1;
}

.flyout-text {
    position: absolute;
    top: 50%;
    left: 8px;
    right: 8px;
    transform: translateY(-50%);
    color: #fff;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    text-align: center;
    z-index: 2;
}

.flyout-name {
    font-size: 0.85rem;
    color: #fff;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 10px;
}

.flyout-visual.text-only {
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.flyout-visual.text-only::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.filter-item .filter-label {
    font-weight: bold;
}

.container {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    padding: 0;
}

.top-ranking-title {
    margin: 0;
    padding: 24px 40px 0;
    color: #52b788;
    font-size: 1.25rem;
    font-weight: 800;
}

.top-ranking-scroll {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin: 14px 0 34px;
    padding: 20px 40px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: rgba(82, 183, 136, 0.5) rgba(255, 255, 255, 0.08);
    margin-bottom: 40px;
}

.top-rank-item {
    position: relative;
    flex: 0 0 144px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.top-rank-item.rank-1 {
    flex-basis: 180px;
}

.top-rank-item:hover {
    border-color: rgba(82, 183, 136, 0.48);
    transform: translateY(-4px);
    z-index: 2;
}

.top-rank-item a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.top-rank-item img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.top-rank-item.rank-1 .rank-num {
    background: #f0c85a;
}

.top-rank-item:nth-child(1) .rank-num {
    background: linear-gradient(135deg, #fff4b8, #d6a82f 52%, #8b6517);
    color: #281b05;
}

.top-rank-item:nth-child(2) .rank-num {
    background: linear-gradient(135deg, #ffffff, #bec6ce 52%, #6f7881);
    color: #172029;
}

.top-rank-item:nth-child(3) .rank-num {
    background: linear-gradient(135deg, #ffd7a6, #b87333 54%, #684018);
    color: #241204;
}

.top-rank-item .movie-title {
    min-height: 48px;
    padding: 9px 10px 4px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
}

.top-rank-item.rank-1 .movie-title {
    min-height: 58px;
    padding: 10px 12px 4px;
    font-size: 0.88rem;
}

.filter-page-title {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 67px;
    background: rgba(7, 23, 19, 0.98);
    backdrop-filter: blur(10px);
    z-index: 115;
    padding: 10.5px max(40px, calc((100% - 1920px) / 2 + 40px));
    margin: 0;
    color: #52b788;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.wiki-link { color: #888; flex-shrink: 0; line-height: 1; }
.wiki-link:hover { color: #52b788; }

.breadcrumb {
    background: rgba(0, 0, 0, 0.94);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.breadcrumb::-webkit-scrollbar {
    display: none;
}

.movie-card-content {
    display: flex;
    flex-direction: column;
}

.movie-card-content h3, .cast-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 2.8em;
}

.card-meta {
    margin-top: auto;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 20px;
}

.release-year {
    font-size: 0.8rem;
    color: #999;
}

/* ランキング数字の調整 */
.top-rank-item {
    position: relative;
}

.rank-num {
    position: absolute;
    top: -8px;
    left: -8px;
    z-index: 10;
    background: #52b788;
    color: #000;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: none;
}

.top-rank-item .movie-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-like-count {
    padding: 0 10px 10px;
    color: #f0c85a;
    font-size: 0.78rem;
    font-weight: 800;
}

.top-rank-item.rank-1 .rank-like-count {
    padding: 0 12px 12px;
    font-size: 0.9rem;
}

.breadcrumb {
    padding: 10px 40px;
    font-size: 0.85rem;
    color: #fff;
}

.filter-page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #52b788;
    line-height: 1.2;
}

.filter-page-title::after {
    display: none;
}

/* 作品カードデザイン */
.movie-card {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    outline: 2px solid transparent;
    outline-offset: 0;
    box-sizing: border-box;
    overflow: hidden;
    background: #f7f7f7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    outline-color: transparent;
    opacity: 0;
    transition: opacity 0.45s ease, transform 0.2s ease;
}
.movie-card.card-visible {
    opacity: 1;
}

.movie-card:hover {
    background: rgba(255, 255, 255, 0.1);
    outline-color: #f0c85a;
    transform: translateY(-5px);
}

.oscar-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 5;
    background: linear-gradient(135deg, #ffe066 0%, #d4a017 100%);
    color: #1a0a00;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    pointer-events: none;
}

.oscar-award-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.japan-award-notice {
    background: none;
    box-shadow: none;
    color: #fff;
    font-weight: 400;
}

.movie-card .admin-adult-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
    width: 50px;
    height: 50px;
    background: rgba(200, 0, 0, 0.82);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.movie-card .admin-adult-btn.done {
    background: rgba(20, 150, 20, 0.9);
    pointer-events: none;
}

.movie-card .img-container {
    position: relative;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0;
    margin-bottom: 0;
}

.movie-card .img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-card-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.movie-card h3 {
    font-size: 0.98rem;
    margin: 0 0 10px 0;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card .cast-name {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.8em;
}

.movie-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.8em;
}

.movie-card .country-info {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.movie-card .country-info img,
.movie-card .flag-icon,
.award-movie-info .country-info img {
    width: 25px !important;
    height: 17px !important;
    flex: 0 0 25px;
    border-radius: 3px;
    object-fit: cover;
    opacity: 0.72;
}

.movie-card .country-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-card .release-year {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* リアクションボタン（共通） */
.reactions {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    margin-top: 0;
    padding-top: 10px;
}

.movie-card>.reactions,
.movie-card .reactions {
    position: relative;
    z-index: 1;
}

.movie-main-reactions {
    flex-direction: row;
    align-items: stretch;
    flex-wrap: nowrap;
    max-width: none;
}

.btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    padding: 5px 3px;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.2;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #eee;
    cursor: pointer;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn.voted {
    background: rgba(82, 183, 136, 0.24);
    border-color: rgba(82, 183, 136, 0.68);
    color: #fff;
}

.btn-suffix {
    display: inline-block;
    margin-left: 0.5em;
}

.movie-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.result-tabs {
    display: flex;
    gap: 10px;
    padding: 0 40px 22px;
}

.result-tab-btn {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
}

.result-tab-btn.active,
.result-tab-btn:hover {
    border-color: rgba(82, 183, 136, 0.55);
    background: rgba(82, 183, 136, 0.18);
    color: #fff0a6;
}

.result-section.tab-content {
    display: none;
}

.result-section.tab-content.active {
    display: block;
}

.search-person-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 40px 40px;
}

.search-person-grid .person-detail-card-link {
    outline: 2px solid transparent;
    outline-offset: 0;
}

.search-person-grid .person-detail-card-link:hover {
    background: rgba(255, 255, 255, 0.1);
    outline-color: #f0c85a;
}

.search-person-grid .person-thumb-fixed {
    width: 108px;
    height: auto;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
}

.btn span:first-child {
    font-size: 1.134rem;
    margin-bottom: 2px;
}

.btn .count {
    font-weight: bold;
    margin-left: 0;
}

.movie-detail-main .breadcrumb,
.person-detail-main .breadcrumb {
    background: rgba(0, 0, 0, 0.94);
    color: #fff;
}

.hero-background {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1920px;
    background-position: center;
    background-size: cover;
    z-index: 1;
}

.movie-detail-main .detail-wrapper {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: flex-start;
    gap: 0 60px;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 40px;
}

.movie-detail-main .detail-right {
    grid-column: 2;
    align-self: start;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 960px;
}

.movie-detail-main .detail-col {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.movie-detail-main .movie-overview {
    margin-top: 30px;
    margin-bottom: 0;
}

.movie-detail-main .poster-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 280px;
    min-height: 508.93px;
    align-self: start;
}

.movie-detail-main .detail-poster-placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.movie-detail-main .detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
}

.detail-tagline {
    margin: 0 0 2px;
    font-size: 0.95rem;
    color: #aaa;
}

.detail-title {
    margin: 0 0 32px;
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1.2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.poster-grid-all {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
}

.poster-grid-all .scroll-item {
    flex: 0 0 160px;
    max-width: 160px;
}

.related-section .scroll-item {
    display: block;
}

.related-section .scroll-item img {
    display: block;
    width: 100%;
    aspect-ratio: 2/3;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.movie-detail-main .detail-tagline {
    margin: 0 0 5px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.55;
    text-shadow: 0 2px 8px rgba(10, 40, 25, 0.7);
}

.person-detail-main .detail-info + .detail-info {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    margin-top: 18px;
}

.movie-detail-main .genre-badge,
.person-detail-main .genre-badge {
    display: inline-flex;
    margin: 0 8px 8px 0;
    padding: 6px 20px;
    border: 1px solid rgba(82, 183, 136, 0.34);
    border-radius: 17px;
    background: rgba(82, 183, 136, 0.25);
    color: #fff0a6;
    font-size: 0.86rem;
}

.movie-detail-main .genre-badge:hover,
.person-detail-main .genre-badge:hover {
    border-color: rgba(240, 200, 90, 0.86);
    background: rgba(82, 183, 136, 0.5);
}

.info-grid {
    display: grid;
    grid-template-columns: 6em minmax(0, 1fr);
    gap: 18px;
    /* 余白を縮める */
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.info-grid .info-label {
    color: rgba(255, 255, 255, 0.58);
    font-weight: 400;
}

.info-grid .genre-badge {
    text-shadow: none;
}

.movie-detail-main .person-link {
    color: #fff;
    font-weight: 400;
}

.movie-detail-main .person-link:hover {
    color: #fff0a6;
}

.movie-detail-main .detail-title {
    font-size: 2.7rem;
    margin-bottom: 25px;
}

.movie-detail-main .detail-tagline + .detail-title {
    margin-top: 2px;
}

.movie-detail-main .tab-content {
    padding-top: 20px;
}

.movie-detail-main .detail-info + .detail-info {
    margin-top: 18px;
}
.movie-detail-main .info-grid {
    padding-top: 0;
    border-top: none;
}

.movie-detail-main .movie-main-reactions {
    width: 100%;
    max-width: none;
}

.info-grid>div:not(.info-label) {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 4px;
}

.series-counts-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.series-counts-list a,
.person-genre-list a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
}
.series-counts-list a:hover,
.person-genre-list a:hover {
    color: #f0c85a;
    opacity: 0.9;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.series-count-num {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85em;
    margin-left: 2px;
}

@keyframes person-card-in {
    from { opacity: 0; transform: scale(0.88) translateY(14px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.person-detail-card {
    outline: 2px solid transparent;
    outline-offset: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 113px 1fr;
    grid-template-rows: 1fr auto;
    gap: 3px 10px;
    height: 100%;
    position: relative;
    padding: 15px;
    animation: person-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-play-state: paused;
}
.person-detail-card.card-visible {
    animation-play-state: running;
}

.person-detail-card:hover {
    background: rgba(255, 255, 255, 0.1);
    outline-color: #f0c85a;
}

.person-photo-col {
    overflow: hidden;
    border-radius: 10px;
    grid-row: 1 / 3;
    aspect-ratio: 2 / 3;
    flex-shrink: 0;
}

.person-thumb {
    height: auto;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.7s ease-out, opacity 0.8s ease-in-out;
    will-change: transform;
}

.person-detail-card:hover .person-thumb {
    transform: scale(1.12);
}

.movie-detail-main .person-thumb.no-image {
    display: grid;
    place-items: center;
    background: #4a4a4a;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.75rem;
}

.person-meta {
    min-height: 45px;
    align-self: start;
    grid-row: 1 / 2;
    margin-top: 0.3em;
}

.staff-job {
    display: block;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.8rem;
    line-height: 1.3;
}

.person-works-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    position: absolute;
    right: 15px;
    bottom: 15px;
    left: 143px;
    pointer-events: none;
}

.person-works-grid a {
    display: block;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    pointer-events: auto;
}

.person-works-grid a::after {
    content: '';
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, .5);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.person-works-grid a:hover::after {
    background: transparent;
}

.movie-detail-main .work-card {
    display: block;
    opacity: 0.42;
}

.movie-detail-main .work-card:hover {
    opacity: 1;
}

.movie-detail-main .work-card img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 5px;
    object-fit: cover;
}

main>.container {
    display: block;
    padding: 40px;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
}

.movie-detail-main .slider-container {
    position: relative;
}

.movie-detail-main .slider-container.hide-right-shadow::after {
    opacity: 0;
}

.movie-detail-main .slider-container.has-left-shadow::before {
    opacity: 1;
}

.movie-detail-main .horizontal-scroll {
    display: flex;
    gap: 12px;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px 40px;
}

.movie-detail-main .scroll-item {
    flex: 0 0 160px;
    max-width: 160px;
}

.movie-detail-main .scroll-item img,
.movie-detail-main .scroll-item .no-image-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 2/3;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.movie-detail-main .scroll-item-title {
    margin-top: 0.75em;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.45;
    font-size: 0.85em;
}

/* 人物詳細レイアウト調整 */
.person-detail-main .poster-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    grid-row: 1 / 4;
}

.person-detail-main .movie-main-reactions .btn {
    flex: none;
    width: 88px;
}

.person-detail-main .detail-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0 40px;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 40px;
}

.person-detail-main .detail-info {
    max-width: 960px;
}

.person-detail-main .movie-overview {
    margin-bottom: 18px;
    margin-top: 0;
}

@media (min-width: 481px) {
    .person-detail-main .info-label-genre {
        padding-top: 0;
    }
}

/* 人物詳細・プロフィール */
.detail-poster {
    border-radius: 12px;
    object-fit: cover;
}

.person-detail-card>a {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    padding: 0;
    display: block;
}

.person-detail-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cast-link-wrapper {
    display: flex;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.detail-hero {
    position: relative;
    min-height: 520px;
    padding: 40px 0 85px;
    overflow: hidden;
    background: #07170d;
}

.detail-hero>.snsbox {
    position: absolute;
    bottom: 20px;
    right: max(40px, calc((100% - 1920px) / 2 + 40px));
    gap: 10px;
    width: auto;
    z-index: 3;
    margin: 0;
}

/* ショップリンクセクション */
.shop-links-section {
    padding: 20px 0 24px;
    background: #0d0d1a;
    border-top: 1px solid #1e1e3a;
}
.shop-links-inner-wrap {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}
.shop-links-title {
    font-size: 1.2rem;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.04em;
    margin: 0 0 12px;
}
.shop-links-inner {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: opacity 0.2s;
}
.shop-btn:hover { opacity: 0.85; }
.shop-btn--amazon  { background: #ff9900; color: #111; }
.shop-btn--rakuten { background: #bf0000; color: #fff; }
.shop-btn--unext   { background: #1a1a2e; color: #fff; border: 1px solid #3a3a5e; }
.shop-btn-icon { font-size: 16px; line-height: 1; }

/* 管理者Amazon URL入力エリア */
.admin-amazon-section {
    padding: 0 max(20px, calc((100% - 1200px) / 2 + 20px));
    background: #0a0a15;
    border-top: 1px solid #2a0000;
}

/* フェードインのスタイル定義 */
.hero-background, .detail-poster, .fade-in-image {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    will-change: opacity;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    /* アスペクト比を固定 */
    background-color: #000;
    /* 読み込み前の下地を黒に */
    object-fit: cover;
}

.hero-background.loaded, .detail-poster.loaded, .fade-in-image.loaded {
    opacity: 1;
}

.hero-background::before,
.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1;
    pointer-events: none;
}

.person-detail-poster {
    width: 400px;
}

.person-detail-main .detail-poster-placeholder {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.movie-overview {
    margin-top: 20px;
    padding: 1.2rem 1.5rem;
    background: rgba(82, 183, 136, 0.14);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #eee;
}

.person-reactions {
    display: flex;
    gap: 5px 10px;
    justify-content: flex-start;
    z-index: 2;
    position: relative;
    grid-row: 2 / 3;
    flex-wrap: wrap;
}

/* タブ装飾 */
.tabs {
    position: sticky;
    top: 66.8px;
    z-index: 130;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(7, 23, 19, 0.8);
    padding: 0;
    backdrop-filter: blur(20px);
}

.tabs-nav-inner {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 40px;
}

.tab-btn {
    background: none;
    border: none;
    color: #888;
    padding: 15px 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: #fff0a6;
    position: relative;
}

.tab-btn.active {
    color: #52b788;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #52b788;
}

/* セクションタイトル */
.section-title-accent {
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 8px;
    position: relative;
}
.section-title-accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #e53935 200px, #555 200px);
}

.related-section {
    margin-top: 0;
    padding: 2rem 40px;
    margin-left: -40px;
    margin-right: -40px;
    clear: both;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.related-section.in-view {
    opacity: 1;
    transform: translateY(0);
}

.related-section:nth-child(odd) {
    background: #f0f0f0;
}

.related-section:nth-child(even) {
    background: rgba(82, 183, 136, 0.08);
}

.related-section h3 {
    font-size: 1.2rem;
    padding-left: 5px;
}

.related-section h3 .title-note {
    display: inline-block;
}

.person-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

/* 国旗・国名情報 */
.country-info-flex {
    display: flex;
    align-items: center;
    gap: 4px;
}

.flag-icon-small {
    width: 25px !important;
    height: 17px !important;
    border-radius: 3px;
    object-fit: cover;
    vertical-align: middle;
    margin-top: 4px;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 40px;
}

.btn-more {
    color: #52b788;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
}

.hero-background::before {
    left: 0;
    background: linear-gradient(90deg, rgba(7, 23, 19, 0.98), rgba(7, 23, 19, 0.72) 42%, rgba(7, 23, 19, 0.18) 70%, transparent);
}

.hero-background::after {
    right: 0;
    width: 30%;
    background: linear-gradient(to left, rgba(7, 23, 19, 0.92), transparent);
}

.tab-content {
    display: none;
    padding: 40px;
    max-width: 1920px;
    margin: 0 auto;
}

.tab-content.active {
    display: block;
}

.theme-votes-section {
    padding: 20px 0 24px;
    background: linear-gradient(135deg, #1a0510 0%, #0a0f2a 100%);
}

.theme-votes-section-inner {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.theme-votes-title {
    font-size: 1.2rem;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.04em;
    margin: 0 0 14px;
}

.theme-reactions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: none;
    align-items: start;
}

.theme-reactions .btn,
.tagline-reactions .btn {
    flex: 1 1 0;
    padding: 8px 16px 6px;
    font-size: 0.85rem;
    gap: 6px;
    justify-content: center;
    color: #eee;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.theme-reactions .btn.voted,
.tagline-reactions .btn.voted {
    color: #fff;
}

/* フェードインのスタイル定義 */
.tabs-sticky-wrapper {
    position: relative;
    scroll-margin-top: 66.8px;
}

.hero-background, .detail-poster, .fade-in-image {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    /* 0.5sより少しゆったりさせ、滑らかさを強調 */
    will-change: opacity;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    /* アスペクト比を固定 */
    background-color: #000;
    /* 読み込み前の下地を黒に */
    object-fit: cover;
}

.hero-background.loaded, .detail-poster.loaded, .fade-in-image.loaded {
    opacity: 1;
}

/* person-thumb: fade-in-image の transition 上書きを防ぐため高 specificity で定義 */
.person-detail-card .person-thumb {
    transition: transform 0.35s ease-out, opacity 0.8s ease-in-out;
    will-change: transform;
}

/* 人物カード一覧 (directors.php / actors.php) */
.person-secton {
    margin-bottom: 40px;
}

.person-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.person-detail-card-link {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    gap: 20px;
    text-decoration: none;
    color: inherit;
}

.person-thumb-fixed {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
}

.cast-works-mini {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.cast-works-mini img {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 4px;
    object-fit: cover;
}

.btn-person {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px;
    padding: 10px !important;
    aspect-ratio: auto !important;
    height: auto !important;
    flex: inherit;
}

.btn-person span:first-child {
    font-size: 1rem;
}

.btn-person-label {
    font-size: 0.78rem;
}

.btn-person .count {
    font-weight: bold;
}

.person-thumb.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4a4a4a;
    color: #aaa;
    font-size: 0.7rem;
}

/* セクション共通 */
.section-title {
    border-bottom: 2px solid #52b788;
    padding-bottom: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.person-secton {
    margin-bottom: 60px;
}

.person-grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    /* 縦に並べる */
    gap: 25px;
    margin-bottom: 0;
    /* person-sectionで余白を確保するため */
    margin-top: 20px;
}

/* 人物カード詳細 */
.cast-works-mini {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.mini-work-thumb {
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 4px;
    max-width: 76.47px;
    position: relative;
    z-index: 1;
}

.cast-link-wrapper {
    flex-grow: 1;
    /* リンク部分がカード全体に広がるように */
}

.actor-breadcrumb {
    padding: 5px 20px 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

.genre-badge-dark {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-container-wide {
    margin: 0 -40px;
}

/* 404ページ */
.error-container {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(135deg, #1c1c1c 0%, #2e2e2e 100%);
    color: #f4f7ef;
    min-height: calc(100vh - 66px);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.error-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.error-code {
    font-size: 120px;
    font-weight: 900;
    color: #f4f7ef;
    margin: 0;
    position: relative;
    z-index: 1;
    letter-spacing: -5px;
}

.error-text {
    font-size: 18px;
    color: #aaa;
    margin: 20px 0 40px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    text-align: center;
}

.btn-back-home {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, #ffe066 0%, #f0a500 100%);
    color: #1a0a00;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 400;
    font-size: 16px;
    border: none;
    box-shadow: 0 4px 18px rgba(240, 165, 0, 0.35);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-back-home:hover {
    background: linear-gradient(135deg, #ffd700 0%, #e09400 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(240, 165, 0, 0.5);
    color: #1a0a00;
}

/* 検索ヘッダー・フライアウト */

/* フライアウト要素の統一 */
#flyout-menu.flyout-menu-container {
    position: absolute;
    /* 親要素に対する相対位置 */
    background-color: #222;
    /* 暗めの背景色 */
    padding: 10px;
    z-index: 1000;
    /* 他のコンテンツの上に表示 */
    display: none;
    /* デフォルトでは非表示、JSで表示を切り替える */

    /* 最大高さを設定し、超える場合はスクロール */
    overflow-y: auto;
    width: auto;
    left: 0;
    right: 0;
    /* 中央寄せ */
    top: 100%;
    /* フィルターボタンの下に配置 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    flex-wrap: wrap;
    top: 100%;
    /* フィルターボタンの下に配置 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    flex-wrap: wrap;
    /* アイテムを折り返す */
    gap: 10px;
    /* アイテム間の余白 */
    justify-content: center;
    /* アイテムを水平方向に中央寄せ */
}

#flyout-menu.flyout-menu-container.active {
    display: flex;
    /* activeクラスが付与されたら表示 */
}

#flyout-menu.flyout-menu-container:has(.series-tabs) {
    padding-top: 0;
}

#flyout-menu .flyout-item {
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    flex: 0 0 140px;
    /* 各アイテムの幅を固定 */
    overflow: hidden;
    /* ジャンル、年代の背景画像はJavaScriptで動的に設定されることを想定 */
    /* 例: style="background-image: url('...');" */
}

/* タイトル・出演者の2行制限 */
.movie-card h3, .movie-title, .cast-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-rank-item .movie-title {
    /* TOPページのランキング作品タイトルにも適用 */
    height: 2.8em;
    /* 2行分の高さ */
    font-size: 0.9rem;
}

#flyout-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 60vh;
    background: #1a1a1a;
    background: rgba(13, 37, 33, 0.98);
    /* 検索ヘッダーと同じ背景 */
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

#flyout-menu.active {
    display: block;
}

/* フライアウト内部のグリッド */
#flyout-menu .flyout-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 18px;
    width: 100%;
}

#flyout-menu .flyout-inner:has(.series-tabs) {
    padding-top: 0;
}

#flyout-menu .flyout-inner:has(.series-tabs) .flyout-item {
    padding-top: 0;
}

.flyout-item {
    min-width: 0;

    /* 高さを固定 */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
}

.flyout-item:hover {
    background: rgba(82, 183, 136, 0.14);
    border-color: rgba(82, 183, 136, 0.4);
}

.flyout-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
}

/* 国フィルター専用：縦並びレイアウト（国旗上・名前下） */
.flyout-item.type-country {
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 0;
    min-height: unset;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.flyout-item.type-country .flyout-visual {
    width: 100%;
    height: 27px;
    flex: 0 0 27px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.flyout-item.type-country .flyout-visual img {
    width: 40px;
    height: 27px;
    object-fit: cover;
    display: block;
}

.flyout-item.type-country .flyout-visual .no-img {
    font-size: 0.82rem;
}

.flyout-item.type-company .flyout-visual img {
    object-fit: contain;
    padding: 8px;
    background: #fff;
}

.flyout-group-header {
    grid-column: 1 / -1;
    width: 100%;
    padding: 6px 10px 4px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
}

.flyout-group-header:first-child {
    border-top: none;
    margin-top: 0;
}

/* シリーズ国別タブ — .tab-btn と同じフラットスタイル */
.series-tabs {
    grid-column: 1 / -1;
    display: flex;
    gap: 0;
    position: sticky;
    top: 0;
    background: rgba(7, 23, 19, 0.98);
    backdrop-filter: blur(20px);
    z-index: 120;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 -28px;
    padding: 0 28px;
}

.series-tabs::-webkit-scrollbar {
    display: none;
}

.series-tab {
    background: none;
    border: none;
    border-radius: 0;
    color: #888;
    font-size: 1.1rem;
    padding: 15px 30px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.series-tab:hover {
    color: #fff0a6;
}

.series-tab.active {
    color: #52b788;
}

.series-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #52b788;
}

/* シリーズ追加ロード中スピナー */
.series-loader {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 10px;
}

.flyout-item.type-country .flyout-name {
    width: 100%;
    text-align: center;
    padding: 6px 4px;
    margin: 0;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flyout-item.type-country .flyout-name {
    font-size: 0.92rem;
    margin: 0;
    text-align: left;
}

.flyout-item.type-country .flyout-visual .no-img {
    font-size: 0;
    /* 25px枠内に入り切らないテキスト（「すべて」等）を非表示に */
}

.flyout-item.type-country .flyout-name {
    margin: 0;
    text-align: left;
}

.flyout-visual.flag::before {
    display: none;
}

.flyout-visual.text-only {
    position: relative;
    height: 100px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: #52b788;
    font-weight: 700;
}

.flyout-visual.text-only.has-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    background: rgba(10, 24, 21, 0.78);
}

.flyout-visual .flyout-text {
    position: absolute;
    top: 50%;
    left: 8px;
    right: 8px;
    transform: translateY(-50%);
    z-index: 1;
    color: #fff;
    text-align: center;
}

#loading-sentinel {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(82, 183, 136, 0.25);
    border-top-color: #52b788;
    border-radius: 50%;
    animation: spinner-rotate 0.75s linear infinite;
}

@keyframes spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #52b788;
    font-size: 0.88rem;
    margin-top: 8px;
}

.movie-main-reactions {
    display: flex;
    gap: 8px;
    padding-top: 0;
}

.movie-main-reactions .btn {
    padding: 10px 15px 5px;
    font-size: 0.9rem;
    justify-content: flex-start;
    overflow: hidden;
}

.genre-badge {
    background: rgba(13, 37, 33, 0.8);
    border: 1px solid rgba(82, 183, 136, 0.4);
    color: #52b788;
}

.genre-badge-dark {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.genre-badge:hover {
    background: #52b788;
}

.hero-year-bg {
    position: absolute;
    bottom: -0.12em;
    right: -0.05em;
    font-size: clamp(6.5rem, 25vw, 20rem);
    font-weight: 900;
    color: rgba(82, 183, 136, 0.08);
    /* サイトのアクセントカラーを極薄く表示 */
    line-height: 0.8;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.05em;
}

@media (max-width: 768px) {
    .hero-year-bg {
        bottom: inherit;
        top: 240px;
    }
}

.horizontal-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: move;
    user-select: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

.horizontal-scroll li {
    display: contents;
}

.horizontal-scroll.is-dragging {
    cursor: move;
    scroll-behavior: auto;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.slider-container {
    position: relative;
    /* 矢印の基準 */
}

.slider-arrow {
    display: none;
    /* 初期状態は非表示 */
    position: absolute;
    top: 0;
    font-size: 1.5rem;
    color: #fff;
    z-index: 20;
    cursor: pointer;
    background: rgba(13, 37, 33, 0.9);
    border: none;
    transition: 0.3s;
    width: 40px;
    bottom: 0;
    color: rgba(255, 240, 166, 0.9);
}

/* スクロール可能な場合に矢印を表示 */
.slider-arrow.active {
    display: block;
    opacity: 0.8;
}

.slider-container:hover .slider-arrow {
    opacity: 1;
    background: rgba(7, 23, 19, 0.8);
}

.slider-arrow.left {
    left: 0;
}

.slider-arrow.right {
    right: 0;
}

.scroll-item {
    position: relative;
    transition: transform 0.3s ease;
}

.scroll-item:hover {
    transform: translateY(-10px);
}

.slider-container:hover .slider-arrow {
    opacity: 1;
}

/* 作品一覧・ランキングページ（films.php / list-rankings.php） */
.films-ranking-section, .rankings-list-main {
    padding: 40px;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
}

.films-ranking-section h2 {
    color: #3db86a;
}

.no-votes {
    color: rgba(0, 0, 0, 0.7);
}

.no-votes-placeholder {
    color: rgba(255,255,255,0.4);
}

.ranking-sub-header {
    color: #3db86a;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    padding: 0 40px;
}

.vote-search-section {
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.vote-search-title {
    color: #3db86a;
}

.vs-text-input,
.vs-select {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    color: #e8f5e9;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.92rem;
}

.vs-text-input::placeholder {
    color: rgba(255,255,255,0.35);
}

.vs-no-results {
    color: rgba(255,255,255,0.4);
}

.vote-search-section .container {
    display: block;
    padding: 40px;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
}

.vote-search-header {
    position: sticky;
    top: 67px;
    z-index: 120;
    background: rgba(7, 23, 19, 0.98);
    backdrop-filter: blur(10px);
    margin: -40px -40px 24px;
    padding: 20px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: rgba(240, 240, 240, 0.98);
}

.vote-search-title {
    margin: 0 0 12px;
}

.vote-search-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.vs-text-input {
    width: 100%;
    box-sizing: border-box;
}

.vs-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vs-select {
    flex: 1 1 160px;
    min-width: 120px;
    cursor: pointer;
}

.vs-results {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}


/* person card in vote-search */
.vote-search-section .person-detail-card {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.vote-search-section .person-reactions {
    padding: 8px;
}

.no-votes-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    font-size: 1rem;
}

.ranking-21-30 {
    padding: 20px 0;
}

.ranking-21-30 .ranking-list {
    margin: 0;
}

.ranking-21-30 .ranking-list .horizontal-scroll {
    flex-wrap: wrap;
    flex-direction: column;
    overflow-x: hidden;
    align-items: stretch;
    padding: 0;
}

.ranking-21-30 .ranking-list .slider-arrow {
    display: none !important;
}

.ranking-21-30 .ranking-item {
    width: auto;
    max-width: 100%;
    min-width: 0;
    flex-shrink: 0;
}

.award-filter-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 32px auto 40px;
    padding: 0 40px;
    max-width: 1920px;
    box-sizing: border-box;
}

.award-filter-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.12s, box-shadow 0.12s;
}

.award-filter-link .award-icon {
    font-size: 1.6em;
    line-height: 1;
}

.award-filter-link.us {
    background: linear-gradient(160deg, #f8e06a 0%, #c9920d 100%);
    color: #2c1a00;
    border: 1px solid #a87200;
}

.award-filter-link.jp {
    background: linear-gradient(160deg, #ff8c8c 0%, #b52a2a 100%);
    color: #fff;
    border: 1px solid #8c1c1c;
}

.award-filter-link.active {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 3px 0 rgba(0, 0, 0, 0.35);
}

.award-filter-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.award-filter-link:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* アワード年別縦リスト */
.award-year-list {
    display: flex;
    flex-direction: column;
}

.award-year-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.award-year-group:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.award-year-group:nth-child(odd) {
    background: #f0f0f0;
}

.award-year-group:nth-child(even) {
    background: #f8fef9;
}

.award-year-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    flex-shrink: 0;
    width: 72px;
    text-align: center;
}

.award-ceremony {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.02em;
}

.award-year-num {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.award-movie-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    position: relative;
    min-width: 0;
    transition: background 0.18s;
    padding: 20px;
}

.award-movie-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.award-movie-content {
    display: flex;
    flex: 1;
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 0 18px;
}

.award-movie-item:hover {
    background: rgba(82, 183, 136, 0.1);
}

.award-movie-item:hover .award-movie-poster img {
    transform: scale(1.04);
    transition: transform 0.22s ease;
}

.award-movie-poster img {
    transition: transform 0.22s ease;
}

.award-movie-poster {
    flex-shrink: 0;
    width: 126px;
    height: 189px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.award-movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.award-movie-info {
    flex: 1;
    min-width: 0;
}

.award-movie-info h3 {
    font-size: 1.12rem;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.4;
    color: #fff;
}

.award-movie-item:hover .award-movie-info h3 {
    color: #52b788;
}

.award-movie-info .cast-name {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 12px;
}

.award-movie-info .country-info {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 0.8em;
    color: #888;
}

.award-director-name {
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
}

.award-movie-info .country-info span,
.award-movie-info .release-year {
    font-size: 1em;
    color: #888;
}

.award-movie-item .reactions {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 6px;
    flex-shrink: 0;
    width: auto;
    padding: 0;
}

.award-movie-item .reactions .btn {
    flex: none;
    width: 100%;
    font-size: 0.85rem;
}

.films-list-section {
    padding: 0 40px 60px;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
}

/* タグラインページ */
.tagline-page-title {
    color: rgba(255, 255, 255, 0.7);
}

.tagline-tabs {
    padding: 0 40px;
}

.tagline-tab {
    background: none;
    border: none;
    color: #888;
    padding: 15px 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.tagline-tab:hover {
    color: #fff0a6;
}

.tagline-tab.active {
    color: #52b788;
}

.tagline-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #52b788;
}

.tagline-main {
    background: #07170d;
    color: #eee;
}

.company-logo-wrap {
    padding: 20px 40px 0;
    display: flex;
    align-items: center;
}

.company-logo-img {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    padding: 6px 12px;
}

#movie-grid-container {
    padding-top: 40px;
}

/* ── このサイトについてページ ── */
.about-content {
    max-width: 720px;
    padding: 8px 40px 60px;
}

.about-section {
    margin-bottom: 2.4rem;
}

.about-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a5c38;
    border-left: 3px solid #52b788;
    padding-left: 10px;
    margin-bottom: 0.8rem;
}

.about-section p {
    color: #1a1a1a;
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 0.6rem;
}

.about-tmdb-link {
    color: #1a7a4a;
    text-decoration: underline;
}

.about-tmdb-notice {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.about-tmdb-logo {
    height: 20px;
    width: auto;
    flex-shrink: 0;
}

.about-tmdb-notice p {
    margin: 0;
    font-size: 0.82rem;
    color: #555;
}

/* ── シリーズ一覧ページ ── */
@keyframes series-card-fadein {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.series-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 20px 40px 40px;
    max-width: 1920px;
    margin: 0 auto;
}

.series-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, background 0.2s ease;
    background: rgba(0, 0, 0, 0.03);
    font-size: .9rem;
    animation: series-card-fadein 0.4s ease both;
}

.series-card:hover {
    transform: translateY(-4px);
    background: rgba(82, 183, 136, 0.12);
    border-color: rgba(82, 183, 136, 0.4);
}

.series-card-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.series-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.series-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
}

.series-card-name {
    margin: 8px 8px 12px;
    line-height: 1.3;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.series-tabs {
    padding: 0 40px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .series-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        padding: 12px 4% 40px;
    }
    .series-tabs {
        padding: 0 4%;
        flex-wrap: nowrap;
    }
    .series-tabs::-webkit-scrollbar { display: none; }
    /* 人物ページの国別タブ: 幅いっぱいに均等配置 */
    .tabs.series-tabs {
        overflow-x: hidden;
        padding: 0;
        margin: 0;
    }
    .tabs.series-tabs .series-tab {
        flex: 1;
        min-width: 0;
        text-align: center;
        justify-content: center;
        padding: 15px 4px;
    }
}

.tagline-list-section {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 0 60px;
    background: #07170d;
}

@keyframes taglineFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tagline-movie-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 40px;
    position: relative;
    transition: background 0.25s ease;
    animation: taglineFadeIn 0.4s ease both 1s;
}

.tagline-movie-item:nth-child(odd) {
    background: #f0f0f0;
}

.tagline-movie-item:nth-child(even) {
    background: #f8fef9;
}

.tagline-movie-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tagline-movie-poster {
    flex-shrink: 0;
    width: 100px;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.tagline-movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.tagline-movie-item:hover {
    background: #edf7f1;
}

.tagline-movie-item:hover .tagline-movie-poster img {
    transform: scale(1.07);
    opacity: 0.9;
}

.tagline-movie-info {
    flex: 1;
    min-width: 0;
}

.tagline-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: #c85a00;
    line-height: 1.4;
    margin: 0 0 8px;
}

.tagline-movie-title {
    font-size: 0.95rem;
    font-weight: 400;
    color: #555;
    margin: 0 0 6px;
}

.tagline-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.tagline-country-row {
    margin-top: 8px;
}

.tagline-country-row img {
    border-radius: 3px;
    object-fit: cover;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tagline-reactions {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 280px;
    padding-top: 0;
    margin-top: 0;
    position: relative;
    z-index: 2;
    align-self: flex-end;
}

.tagline-common-btns {
    display: contents;
}

.tagline-reactions .btn {
    color: #2d6a4f;
    border-color: rgba(82, 183, 136, 0.45);
    background: rgba(82, 183, 136, 0.08);
}

.tagline-reactions .btn.voted {
    background: rgba(82, 183, 136, 0.3);
    border-color: #52b788;
    color: #52b788;
}

.tagline-common-btns .btn.voted {
    background: rgba(82, 183, 136, 0.08);
    border-color: rgba(82, 183, 136, 0.45);
    color: #2d6a4f;
}

.tagline-reactions .btn:hover {
    background: rgba(82, 183, 136, 0.25);
    border-color: rgba(82, 183, 136, 0.6);
}

.tagline-reactions .btn:active {
    background: rgba(82, 183, 136, 0.3);
    border-color: #52b788;
}

.tagline-reactions > .btn:last-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.films-list-section .award-filter-links {
    padding-left: 0;
    padding-right: 0;
}

.person-works-sentinel {
    height: 1px;
}

.person-works-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.view-more-container {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.btn-view-more {
    display: inline-block;
    background: linear-gradient(135deg, #1b3a36 0%, #0f2824 100%);
    color: #f4f7ef;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-more:hover {
    background: linear-gradient(135deg, #1f4440 0%, #132d2a 100%);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(27, 58, 54, 0.3);
}

/* ランキングページ：セクションごとの背景切り替え */
.ranking-grid {
    grid-column: 1 / -1;
    margin: -40px;
    /* コンテナのパディングを打ち消して背景を広げる */
}

.ranking-column {
    padding: 30px 40px;
}

.ranking-column:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
    /* 偶数番目のセクションに薄い背景色を適用 */
}

.ranking-column+.ranking-column {
    margin-top: 0;
}

.ranking-column h2 {
    margin-top: 0;
    color: #3db86a;
    margin-bottom: 0.5em;
}

/* ホームページ ランキングセクション */
.home-rankings {
    max-width: 1920px;
    margin: 0 auto;
}

.home-ranking-column {
    padding: 30px 40px;
}

.home-ranking-column:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.ranking-overview {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    margin-top: 4px;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ランキングレイアウト（横スクロール型） */
.ranking-list {
    margin: 0 -40px;
}

.ranking-list .slider-container {
    position: relative;
}

.ranking-list .horizontal-scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: flex-end;
    gap: 0;
    padding: 0 30px;
    min-width: 0;
}

.ranking-list .horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.ranking-list .horizontal-scroll li {
    display: flex;
    flex-direction: column;
}

.ranking-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    color: inherit;
    position: relative;
    flex-shrink: 0;
    padding: 20px 5px 0;
}

.ranking-item a {
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    position: relative;
    display: block;
}

.ranking-img-wrapper {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    width: 100%;
}

.ranking-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ranking-item a .ranking-img-wrapper img {
    transition: transform 0.35s ease;
}

.btn-ranking-vote {
    width: 100%;
    margin-top: 6px;
    padding: 6px 4px;
    font-size: 0.8rem;
    background: rgba(82, 183, 136, 0.12);
    border: 1px solid rgba(82, 183, 136, 0.35);
    border-radius: 6px;
    color: #52b788;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-ranking-vote .rv-icon {
    font-size: 0.9em;
    line-height: 1;
    flex-shrink: 0;
}

.btn-ranking-vote .rv-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.btn-ranking-vote:hover {
    background: rgba(82, 183, 136, 0.25);
    border-color: rgba(82, 183, 136, 0.6);
}

.btn-ranking-vote.voted {
    background: rgba(82, 183, 136, 0.3);
    border-color: #52b788;
    color: #52b788;
    font-weight: bold;
}

.btn-ranking-vote:disabled {
    cursor: default;
    opacity: 0.85;
}

.ranking-item a:hover .ranking-img-wrapper img {
    transform: scale(1.1);
}

.ranking-item:hover {
    transform: translateY(-4px);
}

.ranking-meta {
    padding: 10px 5px;
}

.ranking-item .ranking-stats {
    text-align: right;
    padding-right: 5px;
}

/* 1位は大きく表示（同票タイも全員1位サイズ） */
.ranking-item.rank-pos-1 {
    flex: 0 0 180px;
    min-width: 180px;
}

.ranking-item.rank-pos-1 .ranking-img-wrapper {
    border-radius: 12px 12px 0 0;
}

.ranking-item.rank-pos-1 .rank-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    border-radius: 50%;
    z-index: 2;
}

.ranking-item.rank-pos-1 .ranking-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    max-width: 160px;
    min-height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-item.rank-pos-1 .ranking-stats {
    font-size: 1rem;
}

/* 1位以外のサイズ */
.ranking-item:not(.rank-pos-1) {
    flex: 0 0 160px;
    min-width: 160px;
}

.ranking-item:not(.rank-pos-1) .ranking-img-wrapper {
    border-radius: 8px 8px 0 0;
}

.ranking-item:not(.rank-pos-1) .rank-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 36px;
    height: 36px;
    background: rgba(27, 58, 54, 0.9);
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.3);
    z-index: 2;
}

.ranking-item:not(.rank-pos-1) .ranking-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.ranking-item:not(.rank-pos-1) .ranking-stats {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.7);
}

/* バッジ色：順位クラスベース（同票タイも正しい色に） */
.rank-badge.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #333;
    border: none;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #ffb878);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4a4a4a;
    color: rgba(244, 247, 239, 0.6);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ランキングテーマヘッダー（タイトル＋投票ボタン横並び） */
.ranking-theme-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ranking-theme-header > a:first-child {
    flex: 1;
    min-width: 0;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 6px;
    padding: 10px;
    transition: color 0.2s, background-color 0.2s;
}
.ranking-theme-header > a:first-child:hover {
    color: #16a34a;
    background-color: #f0fdf4;
}

/* ランキングテーマの投票ボタン */
.btn-vote-ranking {
    display: inline-block;
    margin-top: 0;
    padding: 9px 20px;
    background: rgba(82, 183, 136, 0.12);
    border: 1px solid rgba(82, 183, 136, 0.4);
    border-radius: 8px;
    color: #52b788;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-vote-ranking:hover {
    background: rgba(82, 183, 136, 0.26);
    border-color: rgba(82, 183, 136, 0.7);
    transform: translateY(-2px);
}

/* ヒーローセクション（各ランキング1位） */
.hero-top-winners {
    padding-top: 30px;
    padding-bottom: 20px;
}

.hero-top-winners h2 {
    color: #3db86a;
}

.winners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.winner-item {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    outline: 2px solid rgba(82, 183, 136, 0.2);
    outline-offset: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease, outline-color 0.25s ease;
    text-decoration: none;
    position: relative;
}

.winners-grid .winner-item:nth-child(1) { background: rgba(82, 183, 136, 0.1);  outline-color: rgba(82, 183, 136, 0.4); }
.winners-grid .winner-item:nth-child(2) { background: rgba(96, 165, 250, 0.1);  outline-color: rgba(96, 165, 250, 0.4); }
.winners-grid .winner-item:nth-child(3) { background: rgba(196, 118, 255, 0.1); outline-color: rgba(196, 118, 255, 0.4); }
.winners-grid .winner-item:nth-child(4) { background: rgba(251, 191, 36, 0.1);  outline-color: rgba(251, 191, 36, 0.4); }

.winner-item:hover {
    outline-color: #52b788;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.winner-item:hover .winner-thumb {
    transform: scale(1.08);
}

.winner-label {
    display: block;
    padding: 8px 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.winners-grid .winner-item:nth-child(1) .winner-label { background: linear-gradient(135deg, #1a6b3a, #52b788); }
.winners-grid .winner-item:nth-child(2) .winner-label { background: linear-gradient(135deg, #1a3a6b, #5288fa); }
.winners-grid .winner-item:nth-child(3) .winner-label { background: linear-gradient(135deg, #5a1a6b, #c476ff); }
.winners-grid .winner-item:nth-child(4) .winner-label { background: linear-gradient(135deg, #5a4a1a, #fbbf24); }

.winner-body {
    display: grid;
    grid-template-columns: 120px 1fr;
    grid-template-rows: auto 1fr;
    gap: 4px 12px;
    padding: 14px;
    flex: 1;
}

.winner-photo-col {
    grid-row: 1 / 3;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a2e;
}

.winner-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.35s ease-out;
}

.winner-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.7rem;
}

.winner-meta-info {
    grid-row: 1;
    align-self: start;
    min-width: 0;
}

.winner-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.winner-intro {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.winner-sub-info {
    grid-row: 2;
}

.winner-works {
    font-size: 0.73rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.winner-meta {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.4;
}

/* モバイルメニューボタンのスタイル */
.mobile-header,
.mobile-filter-toggle,
.mobile-menu-toggle {
    display: none;
    /* デスクトップでは非表示 */
}

/* 検索トグルボタン（常にDOMに存在、420px以下のみ表示） */
.mobile-search-toggle {
    display: none;
}

/* ===== FRESH GREEN LIGHT THEME ===== */

/* Search header - dark */
.search-header {
    background: rgba(0, 0, 0, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.search-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.search-input:focus {
    border-color: rgba(82, 183, 136, 0.72);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.14);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.filter-item {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
}

.filter-item:hover {
    background: rgba(82, 183, 136, 0.16);
    border-color: rgba(82, 183, 136, 0.45);
    color: #fff;
}

.filter-item.selected {
    background: rgba(82, 183, 136, 0.18);
    border-color: rgba(82, 183, 136, 0.55);
    color: #fff0a6;
}

/* Flyout */
#flyout-menu {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    height: auto;
    max-height: 60vh;
    overflow-y: auto;
}

.flyout-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
    color: #1a1a1a;
}

.flyout-item:hover {
    background: rgba(82, 183, 136, 0.1);
    border-color: rgba(82, 183, 136, 0.35);
}

.flyout-name {
    color: #fff;
}

.no-img {
    color: #999;
}

/* Filter page title */
.filter-page-title {
    background: rgba(7, 23, 19, 0.97);
    color: #52b788;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.no-results {
    color: #333;
    padding: 30px 40px;
}

.not-registered-msg {
    padding: 24px 40px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
}

.from-movies-label {
    color: #2e7d32;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 12px 40px 4px;
    margin: 0;
    letter-spacing: 0.02em;
}

/* Breadcrumb */
.breadcrumb {
    color: rgba(255, 255, 255, 0.75);
    background: #141414;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a:hover {
    color: #a8e6c0;
}

.movie-detail-main .breadcrumb,
.person-detail-main .breadcrumb {
    color: rgba(255, 255, 255, 0.82);
}

.movie-detail-main .breadcrumb a,
.person-detail-main .breadcrumb a {
    color: rgba(255, 255, 255, 0.65);
}

.movie-detail-main .breadcrumb a:hover,
.person-detail-main .breadcrumb a:hover {
    color: #a8e6c0;
}

/* Movie cards */
.movie-card:hover {
    background: rgba(82, 183, 136, 0.07);
    outline-color: #52b788;
}

.movie-card h3 {
    color: #1a1a1a;
}

.movie-card .cast-name {
    color: rgba(0, 0, 0, 0.48);
}

.movie-card .card-meta,
.movie-card .release-year {
    color: rgba(0, 0, 0, 0.48);
}

/* Reaction buttons */
.btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

.btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.18);
}

.btn.voted {
    background: rgba(82, 183, 136, 0.18);
    border-color: rgba(82, 183, 136, 0.65);
    color: #1b5e20;
}

/* Poster-area reactions inside dark detail-hero stay bright */
.movie-detail-main .detail-hero .btn,
.person-detail-main .detail-hero .btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.88);
}

.movie-detail-main .detail-hero .btn:hover,
.person-detail-main .detail-hero .btn:hover,
.theme-reactions .btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.38);
}

.movie-detail-main .detail-hero .btn.voted,
.person-detail-main .detail-hero .btn.voted {
    background: rgba(82, 183, 136, 0.28);
    border-color: rgba(82, 183, 136, 0.72);
    color: #fff;
}

/* Tabs */
.tabs {
    background: rgba(7, 23, 19, 0.97);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.tab-btn {
    color: rgba(255, 255, 255, 0.5);
}

.tab-btn:hover {
    color: #52b788;
}

.tab-btn.active {
    color: #52b788;
}

.tab-btn.active::after {
    background: #52b788;
}

.result-tab-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

.result-tab-btn.active,
.result-tab-btn:hover {
    background: rgba(82, 183, 136, 0.14);
    border-color: rgba(82, 183, 136, 0.5);
    color: #1b5e20;
}

.person-works-label {
    opacity: 0.65;
    margin-right: 0.1em;
}

/* Person works list (directors / authors page) */
.person-works {
    font-size: 0.75rem;
    color: #666;
    margin: 3px 0 4px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Person bio */
.person-bio {
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(0, 0, 0, 0.75);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 4px 0 0;
}

/* Person cards */
.person-detail-card {
    background: #f7f7f7;
    color: #1a1a1a;
}

.person-detail-card:hover {
    background: rgba(82, 183, 136, 0.16);
    outline-color: #52b788;
}

.person-detail-card .cast-link-wrapper {
    background: transparent;
    border-radius: inherit;
}

.person-detail-card .cast-link-wrapper:hover {
    background: transparent;
}

.person-detail-card-link {
    background: rgba(82, 183, 136, 0.07);
    color: #1a1a1a;
}

.person-detail-card-link:hover,
.search-person-grid .person-detail-card-link:hover {
    background: rgba(82, 183, 136, 0.14);
    outline-color: #52b788;
}

.person-name {
    display: block;
    margin-bottom: 0.25em;
    font-size: 1.1em;
    font-weight: 800;
    text-align: left;
    align-items: center;
    color: #1a1a1a;
}

.staff-job {
    color: rgba(0, 0, 0, 0.55);
}

/* Genre badges (default = light bg) */
.genre-badge {
    background: rgba(82, 183, 136, 0.1);
    border-color: rgba(82, 183, 136, 0.38);
    color: #1b5e20;
}

.genre-badge:hover {
    background: rgba(82, 183, 136, 0.28);
    color: #1b5e20;
}

.genre-badge-dark {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.14);
    color: #333;
}

/* Movie detail hero - badge stays readable on dark bg */
.movie-detail-main .detail-hero .genre-badge {
    background: rgba(82, 183, 136, 0.22);
    border-color: rgba(82, 183, 136, 0.5);
    color: #d0f4e4;
}
.movie-detail-main .detail-hero .genre-badge:hover {
    border-color: rgba(240, 200, 90, 0.86);
    background: rgba(82, 183, 136, 0.5);
}

/* Section titles */
.section-title-accent {
    color: #1a1a1a;
}
.section-title-accent::after {
    background: linear-gradient(to right, #e53935 200px, #ccc 200px);
}

.section-title {
    border-bottom-color: rgba(82, 183, 136, 0.5);
}

.films-list-section .section-title {
    color: #2e7d32;
}

.award-filter-link.active {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
}

.movie-detail-main .info-grid {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.award-year-group {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.award-year-group:first-child {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.award-ceremony {
    color: rgba(0, 0, 0, 0.45);
}

.award-year-num {
    color: #1a1a1a;
}

.award-movie-info h3 {
    color: #1a1a1a;
}

.award-movie-item:hover .award-movie-info h3 {
    color: #2e7d32;
}

/* Ranking */
.ranking-item a {
    background: rgba(0, 0, 0, 0.03);
    color: #1a1a1a;
}

.ranking-column:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.ranking-title {
    color: #1a1a1a;
}

.ranking-stats {
    color: rgba(0, 0, 0, 0.5);
}

.ranking-item:first-child .ranking-stats {
    color: #c08000;
}

.ranking-column h2 a {
    color: #1a1a1a;
}

.ranking-column h2 a.btn-vote-ranking {
    color: #52b788;
}

/* Top ranking */
.top-rank-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.07);
}

.top-rank-item:hover {
    border-color: rgba(82, 183, 136, 0.5);
}

.top-rank-item .movie-title {
    color: #1a1a1a;
}

.rank-like-count {
    color: #2e7d32;
}

/* Winner items (light mode) */
.winner-intro {
    color: rgba(0,0,0,0.7);
}

.winner-works,
.winner-meta {
    color: rgba(0,0,0,0.5);
}

.winner-no-img {
    color: rgba(0,0,0,0.25);
}

/* home-ranking alternating (light) */
.home-ranking-column:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

/* no-votes-placeholder */
.no-votes-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    color: rgba(0,0,0,0.4);
    font-size: 1rem;
}

/* ranking 21-30 section */
.ranking-21-30 {
    margin-top: 0;
    padding: 20px 0;
}

.ranking-sub-header {
    font-size: 1.1rem;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    padding: 0 40px;
}

/* vote search section */
.vote-search-section {
    background: rgba(0,0,0,0.02);
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-top: 0;
    padding: 0;
}

.vote-search-title {
    font-size: 1.1rem;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.vs-text-input,
.vs-select {
    border-color: rgba(0,0,0,0.15);
    background: #fff;
    color: #1a1a1a;
}

.vs-text-input::placeholder {
    color: rgba(0,0,0,0.38);
}

.vs-no-results {
    color: rgba(0,0,0,0.45);
}

/* AI overview */
.movie-overview {
    background: rgba(82, 183, 136, 0.16);
    color: rgba(255, 255, 255, 0.88);
}

/* Search input wrapper */
.search-input-wrap {
    position: relative;
    width: 100%;
}

/* Companies clamp */
.companies-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.companies-clamp.expanded {
    display: block;
    overflow: visible;
}

.companies-more-btn {
    background: none;
    border: none;
    color: #52b788;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 2px 0;
    display: inline;
}

.companies-more-btn:hover {
    text-decoration: underline;
}

/* Movie detail hero - keep white text on dark backdrop */
.movie-detail-main .detail-hero,
.person-detail-main .detail-hero {
    color: rgba(255, 255, 255, 0.92);
}

.movie-detail-main .detail-hero a,
.person-detail-main .detail-hero a {
    color: rgba(255, 255, 255, 0.92);
}

.person-detail-main .series-counts-list a:hover,
.person-detail-main .person-genre-list a:hover {
    color: #f0c85a;
    opacity: 0.9;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.movie-detail-main .info-grid {
    color: rgba(255, 255, 255, 0.88);
}

.movie-detail-main .info-grid .info-label {
    color: rgba(255, 255, 255, 0.55);
}

.movie-detail-main .detail-title {
    color: #fff;
    text-shadow: 0 2px 10px rgba(10, 40, 25, 0.6);
}

.movie-detail-main .detail-tagline {
    color: rgba(255, 255, 255, 0.82);
}

.movie-detail-main .person-link {
    color: rgba(255, 255, 255, 0.9);
}

.movie-detail-main .person-link:hover {
    color: #a8e6c0;
}

/* Scroll items (related movies) */
.scroll-item-title {
    color: rgba(0, 0, 0, 0.78);
}

/* No image placeholder */
.no-image-placeholder {
    background: #4a4a4a;
    color: rgba(255, 255, 255, 0.6);
}

/* Scrollbar */
::-webkit-scrollbar-track {
    background: #e8f5e9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #52b788, #3aaa5c);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3aaa5c, #2d8a4e);
}

/* Sidebar tagline */
.sidebar-tagline {
    color: #a8e6c0;
}

@keyframes gold-shine {
    0%, 100% {
        color: #a8e6c0;
        text-shadow: 0 0 6px rgba(168, 230, 192, 0.35);
    }

    50% {
        color: #d0f4e4;
        text-shadow: 0 0 10px rgba(200, 255, 220, 0.6);
    }
}

/* Nav items */
.nav-item:hover .main-label,
.nav-item:hover .small-text,
.nav-item.active .main-label,
.nav-item.active .small-text {
    color: #d0f4e4;
}

@media (max-width: 1580px) {
    /* コンテナ内 */
    .container {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .vs-results {
        grid-template-columns: repeat(5, 1fr);
    }

    .person-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1380px) {
    /* コンテナ内 */
    .container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .vs-results {
        grid-template-columns: repeat(4, 1fr);
    }

    .theme-reactions {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .award-movie-content {
        padding: 18px 0;
    }

    /* コンテナ内 */
    .container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vs-results {
        grid-template-columns: repeat(3, 1fr);
    }

    .theme-reactions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .award-movie-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .award-year-label {
        flex-direction: row;
        align-items: baseline;
        width: auto;
        padding: 0 0 8px;
        text-align: left;
        gap: 8px;
    }

    .award-movie-item .reactions {
        flex-shrink: unset;
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
        padding: 4px 0 0;
    }

    .tagline-movie-item {
        display: grid;
        grid-template-columns: 1fr 100px;
        grid-template-rows: auto auto;
        gap: 12px 16px;
        align-items: start;
    }

    .tagline-movie-poster {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: start;
    }

    .tagline-movie-info {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
    }

    .tagline-reactions {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        grid-template-columns: 1fr;
        justify-self: end;
        align-self: start;
    }

    .tagline-common-btns {
        display: none;
    }

    .tagline-reactions .btn {
        padding: 5px 3px;
        font-size: 0.75rem;
        gap: 0;
    }
}

@media (max-width: 980px) {

    #acting-grid {
        padding-left: 0;
        padding-right: 0;
    }

    .series-tabs {
        padding: 0;
    }

    .series-tabs button {
        flex-grow: 1;
        padding: 15px 10px;
    }

    .related-section {
        margin-left: -4vw;
        margin-right: -4vw;
        padding-left: 4%;
        padding-right: 4%;
    }

    /* ── サイト内共通 ── */

    h1:not(.detail-title),
    .ranking-column,
    .home-ranking-column,
    .filter-page-title,
    main > .container,
    .films-ranking-section,
    .rankings-list-main,
    .films-list-section,
    .movie-detail-main .horizontal-scroll,
    .vote-search-section .container,
    .vote-search-header,
    .award-movie-item {
        padding-left: 4%;
        padding-right: 4%;
    }

    .movie-detail-main .detail-wrapper,
    .ranking-list .horizontal-scroll {
        padding-left: calc(4vw - 10px);
        padding-right: calc(4vw - 10px);
    }

    .ranking-list,
    .award-year-list {
        margin: 0 -4vw;
    }

    .ranking-grid {
        margin: -40px -4vw;
    }

    .vote-search-header {
        margin: -40px -4vw 24px;
        top: 129px;
    }

    /* コンテンツを固定ヘッダー分押し下げ */
    .app-container {
        padding-top: 54px;
    }

    /* ── レイアウト調整 ── */
    .main-content {
        margin-left: 0;
    }

    /* ── サイドバー ── */

    /* ── モバイルヘッダー ── */
    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 54px;
        align-items: center;
        justify-content: flex-start;
        padding: 0 0 0 14px;
        background: #1a1a1a;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 10001;
        box-sizing: border-box;
    }

    .mobile-logo {
        padding: 0;
        text-align: left;
    }

    .mobile-logo img {
        height: 36px;
        display: block;
    }

    .mobile-menu-toggle {
        display: flex !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        width: 54px !important;
        height: 54px !important;
        background: #222;
        border: none;
        border-radius: 0;
        z-index: 10001;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #fff;
        cursor: pointer;
        padding: 0;
        gap: 10px;
        -webkit-tap-highlight-color: transparent;
        transition: box-shadow 0.2s, transform 0.15s;
        margin-left: auto;
        padding-top: 2px;
    }

    .mobile-menu-toggle:active {
        transform: scale(0.94);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    }

    .mobile-menu-toggle .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
    }

    .mobile-menu-toggle .hamburger span {
        display: block;
        width: 20px;
        height: 2px;
        background-color: #fff;
        border-radius: 0;
    }

    .mobile-menu-toggle .toggle-text {
        display: block;
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0.05em;
    }

    /* ── サイドバー：ドロワー ── */
    .sidebar {
        position: fixed !important;
        top: 54px !important;
        right: -100% !important;
        left: auto !important;
        width: 75% !important;
        max-width: 300px;
        height: calc(100% - 54px) !important;
        z-index: 10000;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        padding-top: 12px;
        display: block !important;
        overflow-y: auto;
        transform: none !important;
    }

    .sidebar.z-top {
        z-index: 10001;
    }

    .sidebar.active {
        right: 0 !important;
    }

    .sidebar-collapse-btn {
        display: none !important;
    }

    .sidebar-logo {
        display: block;
        margin-bottom: 16px;
        text-align: center;
    }

    .site-logo {
        width: 150px;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(2px);
        z-index: 9999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .search-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
        z-index: 999;
    }

    .search-overlay.active {
        display: block;
    }

    body.menu-open {
        overflow: hidden;
    }

    .mobile-menu-toggle.btn-active,
    .mobile-header .mobile-search-toggle.btn-active {
        background: rgba(82, 183, 136, 0.35);
        position: relative;
        z-index: 10002;
    }

    .nav-menu {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .nav-item {
        justify-content: center;
        min-height: 48px;
        text-align: center;
    }

    .nav-item .main-label {
        display: block;
    }

    /* ── search-header ── */

    /* 検索ヘッダーを固定ヘッダー直下に sticky */
    .search-header {
        top: 54px !important;
        left: 0 !important;
        right: 0 !important;
        padding: 14px 4%;
    }

    #search-input {
        min-height: 46px;
    }

    .search-content {
        display: flex;
        flex-direction: row;
        gap: 6px;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .search-input-wrap {
        flex: 1;
        min-width: 0;
    }

    .mobile-filter-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 46px !important;
        flex-shrink: 0;
        align-self: stretch;
        padding: 0 !important;
        margin: 0 !important;
        background: rgba(82, 183, 136, 0.1);
        border: 1px solid rgba(82, 183, 136, 0.3);
        border-radius: 8px;
        color: #52b788;
        font-size: 0.9rem;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .filter-group {
        display: none !important;
        width: 100%;
        margin-top: 10px;
        justify-content: flex-start;
        gap: 8px;
    }

    .filter-group.active {
        display: flex !important;
    }

    #flyout-menu.flyout-menu-container {
        position: fixed;
        left: 0;
        right: 0;
        height: 60vh;
    }

    /* ── コンテナ内 ── */

    #movie-grid,
    .person-grid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .container,
    .top-ranking-scroll,
    .section-header-flex,
    .tab-content,
    .tabs-nav-inner {
        padding-left: 4%;
        padding-right: 4%;
    }

    .tabs-nav-inner {
        display: flex;
        padding-left: 0;
        padding-right: 0;
    }

    .filter-page-title {
        position: static;
    }

    .tabs {
        top: 54px;
    }

    .tabs-sticky-wrapper {
        scroll-margin-top: 54px;
    }

    .tab-btn {
        flex-grow: 1;
        padding: 15px 10px;
    }

    .container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .breadcrumb {
        padding-left: 4%;
        padding-right: 4%;
    }

    .movie-detail-main .detail-wrapper,
    .movie-detail-main .tab-content,
    .movie-detail-main>.container,
    .person-detail-main .detail-wrapper {
        padding-left: 4%;
        padding-right: 4%;
    }

    .movie-detail-main .detail-wrapper {
        grid-template-columns: 32% 1fr;
        justify-items: start;
    }

    .movie-detail-main .poster-area {
        grid-row: auto;
        max-width: 100%;
    }

    .movie-detail-main .detail-col {
        grid-column: auto;
        grid-row: auto;
    }

    .movie-detail-main .info-grid {
        padding-top: 0;
        border-top: none;
    }

    .movie-detail-main .tab-content .person-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .winners-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .winner-name {
        font-size: 0.98rem;
    }

    .movie-detail-main .movie-main-reactions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .movie-detail-main .movie-main-reactions .btn {
        flex-direction: column;
        padding: 8px 4px;
        font-size: 0.78rem;
        gap: 2px;
    }

    .slider-container-wide {
        margin: 0 -4vw;
    }
}

@media (max-width: 768px) {

    /* ── サイト内共通 ── */
    .ranking-grid {
        margin: -20px -4vw;
    }

    .ranking-column {
        padding: 20px 4% 30px;
    }

    .movie-detail-main .detail-wrapper {
        margin-bottom: 30px;
    }

    .ranking-theme-header a + a {
        margin-left: auto;
    }

    .theme-reactions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-logo {
        display: none;
    }

    .nav-menu {
        grid-template-columns: 1fr;
    }

    .nav-item {
        justify-content: flex-start;
        text-align: left;
    }

    .detail-tagline,
    .movie-detail-main .detail-tagline {
        font-size: 0.85rem;
    }

    .theme-votes-section-inner,
    .shop-links-inner-wrap {
        padding: 0 4%;
    }

    .about-content {
        padding-left: 4%;
        padding-right: 4%;
    }

    .films-ranking-section,
    .rankings-list-main {
        padding-left: 4%;
        padding-right: 4%;
    }

    .award-filter-links {
        padding-left: 4%;
        padding-right: 4%;
    }

    .tagline-movie-item {
        padding-left: 4%;
        padding-right: 4%;
    }

    .tagline-meta:not(.tagline-country-row) {
        display: none;
    }

    .tagline-tabs {
        padding: 0;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .tagline-tabs::-webkit-scrollbar {
        display: none;
    }

    .tagline-tab {
        flex: 1;
        padding: 12px 0;
        white-space: nowrap;
        font-size: 0.85rem;
    }

    .tagline-text {
        font-size: 1.125rem;
    }

    .tagline-movie-title {
        font-size: 0.88rem;
    }

    .award-movie-poster {
        width: 33.5%;
        height: auto;
        aspect-ratio: 2 / 3;
    }

    .theme-reactions .btn {
        white-space: normal;
        min-width: 0;
    }

    footer {
        padding: 10px 4%;
    }

    .full-width, .tab-inner-grid {
        padding-left: 4%;
        padding-right: 4%;
    }

    /* ── サイドバー ── */

    /* スマホメニュー: 縦1列 */
    .nav-menu {
        grid-template-columns: 1fr;
    }

    .nav-item {
        justify-content: flex-start;
    }

    /* ── search-header ── */

    /* スマホ flyout: filter-group 直下から画面下端まで */
    #flyout-menu {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: auto;
        max-height: none;
        border-radius: 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
    }

    /* flyout アイテム: スマホは2列 */
    #flyout-menu .flyout-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 検索エリア: flex行レイアウト（input + フィルタートグル） */
    .search-content {
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .search-input-wrap {
        flex: 1;
        min-width: 0;
    }

    .mobile-filter-toggle {
        width: 46px !important;
        height: 46px !important;
        flex-shrink: 0;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 8px !important;
        font-size: 1rem;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .filter-group {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 500;
        background: rgba(5, 15, 10, 0.97);
        backdrop-filter: blur(12px);
        padding: 12px 4%;
        margin: 0;
        border-top: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-wrap: wrap;
    }

    /* ── コンテナ内 ── */
    .snsbox {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
        gap: 0;
    }

    .snsbox li {
        flex: 1;
    }

    .snsbox li.line {
        display: flex;
    }

    .detail-hero {
        min-height: auto;
        padding-top: 20px;
        transform: translateZ(0);
        padding-bottom: 100px;
        padding-bottom: 30px;
    }

    /* hero-background: ポスター高さ + 80px に固定
       ポスター列幅 = (100vw - 36px padding - 12px gap) / 3
       ポスター高さ = 幅 × 3/2 = (100vw - 48px) / 2          */
    .movie-detail-main .hero-background {
        position: fixed;
        top: 0;
        bottom: auto;
        height: calc((100vw - 48px) / 2 + 80px);
    }

    .person-grid {
        grid-template-columns: 1fr;
        gap: 10px 20px;
    }

    .award-filter-links {
        flex-direction: column;
    }

    .award-filter-link {
        width: 100%;
        justify-content: center;
    }

    .tabs {
        top: 54px;
    }

    .person-grid,
    .movie-detail-main .tab-content .person-grid,
    .search-person-grid {
        grid-template-columns: 1fr !important;
    }

    /* パーソンカード画像幅 */
    .person-detail-card {
        grid-template-columns: 90px 1fr;
        gap: 5px 10px;
    }

    .person-meta {
        margin-top: 0;
    }

    /* 人物詳細: 画像32% / 情報残り */
    .person-detail-main .detail-wrapper {
        grid-template-columns: 32% 1fr;
        gap: 18px 4%;
        padding: 0 4%;
        margin-bottom: 30px;
    }

    .person-detail-main .poster-area {
        grid-row: 1 / 2;
    }

    .person-detail-main .detail-info + .detail-info {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        margin-top: 0;
    }

    .person-detail-main .movie-overview {
        grid-column: 1 / -1;
        margin-top: 8px;
        margin-bottom: 18px;
    }

    .detail-hero>.snsbox {
        left: 0;
        right: 0;
        width: 100%;
        padding: 0 4%;
        box-sizing: border-box;
        position: static;
    }

    .person-detail-main .movie-main-reactions {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .person-detail-main .movie-main-reactions .btn {
        flex-direction: row;
        width: 100%;
        padding: 8px 8px 8px 3px;
        font-size: 0.85rem;
        gap: 8px;
    }

    .person-detail-main .movie-main-reactions .btn .count {
        margin-left: auto;
    }

    /* 映画詳細: スマホは ポスター32% + 情報残り の2列レイアウト */
    .movie-detail-main .detail-wrapper {
        grid-template-columns: 32% 1fr;
        gap: 18px 4%;
        justify-items: stretch;
        margin-bottom: 30px;
    }

    .movie-detail-main .detail-right {
        display: contents;
    }

    .movie-detail-main .poster-area {
        grid-column: 1;
        grid-row: 1;
        order: unset;
        max-width: 100%;
        min-height: auto;
        align-items: flex-start;
        grid-row: 1;
    }

    .movie-detail-main .detail-col {
        grid-column: 2 / 3;
        grid-row: 1;
    }

    .movie-detail-main .detail-info {
        grid-row: 2 / 3;
        margin-top: 0;
        grid-column: 1 / -1;
    }

    .movie-detail-main .detail-info + .detail-info {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
        margin-top: 0;
    }

    .movie-detail-main .movie-main-reactions {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .movie-detail-main .movie-main-reactions .btn {
        flex-direction: row;
        width: 100%;
        padding: 8px 12px;
        font-size: 0.85rem;
        gap: 8px;
    }

    .movie-detail-main .movie-main-reactions .btn .count {
        margin-left: auto;
    }

    .movie-detail-main .info-grid {
        grid-column: 1 / -1;
        grid-row: 2;
        order: unset;
        padding-top: 0;
        border-top: none;
    }

    .movie-detail-main .detail-info:nth-of-type(1) .info-grid {
        grid-template-columns: 3.5em minmax(0, 1fr);
    }

    .movie-detail-main .detail-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .person-detail-main .detail-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .movie-detail-main .movie-overview {
        grid-column: 1 / -1;
        grid-row: 4;
        order: unset;
        margin: 0;
        padding: 1.2rem;
        font-size: 1rem;
    }

    /* main > .container */
    main>.container {
        padding: 20px 4%;
    }
}

@media (max-width: 680px) {
    /* コンテナ内 */
    .container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {

    .series-card-name {
        font-size: 0.78rem;
    }

    /* ── search-header ── */
    .filter-page-title {
        padding-left: 4%;
        padding-right: 4%;
        font-size: 1.55rem;
    }

    /* ── コンテナ内 ── */
    .container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding-bottom: 28px;
        padding: 0;
    }

    .vs-results {
        grid-template-columns: repeat(2, 1fr);
    }

    .movie-card .img-container {
        height: 132px;
    }

    .top-ranking-scroll {
        grid-auto-columns: 136px;
        padding-bottom: 10px;
    }

    /* スマホ時のランキング表示の調整 */
    .top-rank-item .movie-title {
        min-height: auto;
        /* 高さを自動調整 */
        -webkit-line-clamp: unset;
        line-clamp: unset;
        /* 行数制限を解除 */
        height: auto;
        padding-bottom: 0;
    }

    .top-rank-item .rank-like-count {
        padding-top: 5px;
        padding-bottom: 5px;
        font-size: 0.7rem;
        display: block;
        text-align: center;
    }

    .top-rank-item.rank-1 .rank-like-count {
        font-size: 0.8rem;
    }

    .top-rank-item {
        flex: 0 0 120px;
        /* スマホでのアイテム幅を調整 */
        flex-basis: 120px !important;
        /* rank-1も上書き */
    }
}

@media (max-width: 480px) {

    .award-movie-content {
        align-items: flex-start;
        padding: 8px 0;
    }

    /* ── サイト内共通 ── */
    .movie-card-content {
        padding: 10px;
    }

    .slider-arrow.right {
        border-radius: 5px 0 0 5px;
    }

    .slider-arrow.left {
        border-radius: 0 5px 5px 0;
    }

    .btn span:first-child {
        margin-bottom: 0;
    }

    .tab-btn {
        font-size: 0.9rem;
    }

    .ranking-theme-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ranking-theme-header > a:first-child {
        font-size: 1.4rem;
    }

    .ranking-theme-header a + a {
        display: flex;
        flex-direction: column;
        padding: 9px 15px;
        position: relative;
        z-index: 2;
    }

    .ranking-theme-header a + a i {
        display: none;
    }

    .ranking-theme-header + .ranking-list {
        margin-top: -55px;
    }

    .movie-detail-main .horizontal-scroll {
        gap: 8px;
        padding-top: 0;
    }

    .ranking-list .horizontal-scroll {
        padding-left: calc(4vw - 7px);
        padding-right: calc(4vw - 7px);
    }

    .ranking-item {
        padding: 20px 7px 0;
    }

    .ranking-item:first-child {
        flex: 0 0 150px;
        min-width: 150px;
    }

    .ranking-item:not(:first-child) {
        flex: 0 0 120px;
        min-width: 120px;
    }

    .ranking-item.rank-pos-1 .rank-badge {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .theme-reactions {
        grid-template-columns: 1fr;
    }

    .theme-reactions .btn {
        flex-direction: row;
        justify-content: flex-start;
        gap: 8px;
        padding: 10px 12px;
        font-size: 1rem;
    }

    .theme-reactions .btn .emoji {
        font-size: 1.3rem;
    }

    .theme-reactions .btn .count {
        margin-left: auto;
    }

    .theme-reactions .btn .btn-text {
        flex: 1;
        display: flex;
        align-items: center;
        min-width: 0;
        gap: 4px;
    }

    .theme-reactions .btn .btn-suffix {
        margin-left: auto;
    }

    .movie-detail-main .scroll-item {
        max-width: 30%;
    }

    .slider-arrow {
        top: inherit;
        width: 50px;
        height: 50px;
        bottom: -10px;
    }

    .related-section h3 .title-note {
        color: #888;
        font-size: 0.85em;
    }

    .nav-menu {
        grid-template-columns: 1fr;
    }

    .nav-item {
        justify-content: flex-start;
        text-align: left;
    }

    .main-content {
        padding-top: 0;
    }

    /* ── サイドバー ── */
    .mobile-menu-toggle {
        margin-left: 0;
    }

    .mobile-header .mobile-search-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 54px;
        height: 54px;
        flex-shrink: 0;
        background: rgba(82, 183, 136, 0.22);
        border: none;
        color: #fff;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        margin-left: auto;
    }
    .mobile-search-label {
        font-size: 10px;
        line-height: 1;
    }

    .series-tab {
        font-size: 0.9rem;
    }

    /* ── search-header ── */
    .search-header {
        display: none;
    }

    .search-header.search-visible {
        display: block;
        z-index: 10000;
    }

    .search-header.z-top {
        z-index: 10001;
    }

    .mobile-filter-toggle {
        display: none !important;
    }

    .filter-group {
        display: flex !important;
        position: static !important;
        background: none !important;
        backdrop-filter: none !important;
        padding: 8px 0 0 !important;
        border: none !important;
        width: 100% !important;
    }

    /* ── コンテナ内 ── */
    .winners-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .winner-body {
        grid-template-columns: 70px 1fr;
        gap: 4px 10px;
        padding: 10px;
    }

    .movie-card {
        border-radius: 10px;
    }

    .movie-card .reactions {
        margin: 0 -5px -5px;
        gap: 2px;
    }

    .tabs {
        top: 54px;
    }

    .poster-grid-all {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .poster-grid-all .scroll-item {
        flex: unset;
        max-width: unset;
        width: 100%;
    }

    /* 出演ジャンル / シリーズ出演: ブラウザ幅の全幅に突き出す */
    /* detail-wrapper 左端からの offset = 4vw padding + 29.44vw 写真列 + 3.68vw gap = 37.12vw */
    .person-detail-main .movie-overview {
        padding: .5rem 1rem;
    }
    .person-detail-main .info-grid {
        grid-template-columns: 3.5em minmax(0, 1fr);
    }

    .person-detail-main .info-grid {
        margin-top: 0;
    }

    .person-detail-main .info-label-genre,
    .person-detail-main .person-genre-list,
    .person-detail-main .info-label-series,
    .person-detail-main .series-counts-list {
        grid-column: 1 / -1;
        width: 100%;
    }

    .person-detail-main .info-label-series,
    .person-detail-main .info-label-genre {
        margin-bottom: -10px;
    }

    .oscar-award-notice {
        display: block;
        font-size: 0.9rem;
    }

    .award-notice-sub {
        display: block;
        padding-left: 1.5em;
    }

    .vote-search-controls {
        gap: 5px;
    }

    .vs-filters {
        gap: 5px 10px;
    }

    .vote-search-header {
        top: 54px;
        padding-top: 10px;
        padding-bottom: 15px;
    }

    .shop-links-inner-wrap {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: center;
    }
    .shop-links-title {
        margin: 0;
        font-size: .9rem;
        text-align: center;
    }
    .shop-links-inner {
        display: contents;
    }
    .shop-btn {
        display: flex;
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
        font-size: 12px;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .shop-links-inner-wrap {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .shop-links-title {
        grid-column: 1 / -1;
        grid-row: 1;
        display: flex;
        align-items: center;
        margin: 0;
        text-align: center;
    }
    .shop-links-inner-wrap.has-amazon .shop-links-title {
        grid-column: 1;
        justify-content: center;
    }
    .shop-links-inner {
        display: contents;
    }
    .shop-btn {
        display: flex;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        width: 100%;
        font-size: 12px;
        padding: 8px 6px;
    }
    .shop-btn--amazon  { grid-column: 2; grid-row: 1; }
    .shop-btn--rakuten { grid-column: 1; grid-row: 2; }
    .shop-btn--unext   { grid-column: 2; grid-row: 2; }
}
