@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Karla:wght@700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Noto+Sans+JP:wght@300;400;700&display=swap');

:root {
    --bg-color: #f0f0f0;
    --text-color: #1a1a1a;
    --accent-color: #000000;
    --secondary-text: #666666;
    --line-color: #d8d8d8;
    --card-bg: #ffffff;
    --font-sans: 'Inter', 'Noto Sans JP', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-title: 'Karla', 'Inter', 'Noto Sans JP', sans-serif;
    --title-letter-spacing: 0.12em;
    --global-nav-font-size: 13pt;
}

*,
*::before,
*::after {
    margin: 0; padding: 0; box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-width: 0;
}

header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 4.25rem 2rem 0.75rem;
    z-index: 100;
    text-align: center;
    background: var(--bg-color);
}

.timeline-header {
    padding: 7.35rem 2rem 0.75rem;
    text-align: center;
}

.site-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    letter-spacing: var(--title-letter-spacing);
    font-weight: 700;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.site-title-link {
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

.timeline-header .site-title-link {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 210;
    display: block;
    width: 100%;
    padding: 1rem 1rem 0.85rem;
    background: var(--bg-color);
}

.header-nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem 1.55rem;
    width: 100%;
    margin-top: 0;
    padding: 1.2rem 2rem;
    background: #222222;
    color: rgba(255,255,255,0.82);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.5;
}

.timeline-header .header-nav {
    top: 3.55rem;
}

.header-nav a {
    color: inherit;
    text-decoration: none;
    opacity: 0.58;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.header-nav a:hover,
.header-nav a.is-active {
    color: #ffffff;
    opacity: 1;
}

.site-footer {
    width: min(100%, 1200px);
    margin: 0 auto;
    padding: 2.5rem clamp(1.25rem, 5vw, 4rem) 3rem;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.6;
    text-align: center;
    opacity: 1;
}

.footer-title {
    display: inline-block;
    margin-bottom: 1.1rem;
    color: var(--text-color);
    font-family: var(--font-title);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.45;
    text-decoration: none;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem 1.4rem;
    margin-bottom: 1.2rem;
}

.footer-nav a {
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.footer-title:hover,
.footer-nav a:hover {
    color: var(--text-color);
}

.site-footer p {
    margin: 0;
}

.timeline-footer {
    max-width: 1400px;
    padding-bottom: 4rem;
}

.timeline-container {
    width: min(100%, 1400px);
    max-width: 1400px;
    margin: 0 auto;
    padding: 300px clamp(1.5rem, 3vw, 3rem) 100px; /* Adjusted for Header + Labels + Nav */
    position: relative;
}

.timeline-container.single-mode .timeline-row,
.timeline-container.single-mode .director-labels {
    grid-template-columns: 1fr 180px 1fr; /* Keep 3 columns */
}

.timeline-container::before {
    content: "";
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 1px;
    background-color: var(--line-color);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(120px, 13vw, 180px) minmax(0, 1fr);
    min-height: 120px; /* 画像がないため、高さを適度に調整 */
    margin-bottom: 20px;
    opacity: 1;
    position: relative;
    z-index: 2;
    width: 100%;
}

.side {
    min-width: 0;
    padding: 0 clamp(1.5rem, 4vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nolan-side { text-align: right; }
.villeneuve-side { text-align: left; }

.center-axis {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.year-label {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
    background: var(--bg-color);
    padding: 6px 15px;
    z-index: 5;
}

.episode-label {
    font-size: 0.8rem;
    color: var(--secondary-text);
    width: 160px;
    text-align: center;
    line-height: 1.6;
    margin-top: 15px;
    font-weight: 400;
    background: var(--bg-color);
    z-index: 5;
}

/* Film Card (Text Only) */
.film-card {
    background: transparent;
}

.film-card + .film-card {
    margin-top: 1.05rem;
}

.card-content {
    max-width: 450px; /* 画像がなくなった分、テキスト幅を広げて安定させる */
}

.nolan-side .card-content { margin-left: auto; }

.work-medium {
    display: inline-block;
    margin-bottom: 0.45rem;
    padding: 0.25rem 0.48rem 0.22rem;
    border: 1px solid rgba(0,0,0,0.18);
    border-radius: 999px;
    color: var(--secondary-text);
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
    opacity: 0.82;
}

.work-medium.film,
.other-film-medium.film {
    border-color: rgba(0,0,0,0.22);
    color: #555555;
    background: rgba(255,255,255,0.34);
}

.work-medium.series,
.other-film-medium.series {
    border-color: rgba(45, 84, 122, 0.34);
    color: #2d547a;
    background: rgba(45, 84, 122, 0.08);
}

.film-title {
    font-family: var(--font-sans);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.film-title a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.film-title a:hover {
    opacity: 0.6;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.film-context {
    display: none;
    font-size: 0.85rem;
    color: var(--secondary-text);
    line-height: 1.7;
    opacity: 0.8;
}

/* Director Header Labels */
.director-labels {
    position: fixed;
    top: 124px; /* Below the logo + global nav */
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(120px, 13vw, 180px) minmax(0, 1fr);
    padding: 0.75rem clamp(1.5rem, 4vw, 4rem) 0.85rem;
    pointer-events: none;
    z-index: 90;
    background: var(--bg-color);
    box-shadow: 0 -140px 0 140px var(--bg-color);
}

/* Back Navigation */
.back-nav {
    position: absolute;
    left: 4rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-decoration: none;
    color: var(--secondary-text);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.back-nav:hover {
    opacity: 1;
}

.info-nav {
    position: absolute;
    right: 4rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-decoration: none;
    color: var(--secondary-text);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.info-nav:hover {
    opacity: 1;
}

/* Decade Jump Nav */
.jump-nav {
    position: sticky;
    top: 192px; /* Below Director Labels */
    background: var(--bg-color);
    padding: 0.8rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    z-index: 85;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.jump-nav button {
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--secondary-text);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.jump-nav button:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Timeline Highlight */
.timeline-row.is-current {
    background: rgba(188, 147, 98, 0.03); /* Accent color tint */
    border-top: 2px solid var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    margin: 1rem 0;
}

.timeline-row.is-current .year-label {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: scale(1.2);
}

.label {
    font-family: var(--font-serif);
    color: var(--accent-color);
    min-width: 0;
}

.label-surname {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
}

.label-en {
    font-size: 1.6rem; /* フルネームに合わせてサイズを調整 */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

.label-ja {
    font-family: var(--font-serif);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    font-weight: 400;
    opacity: 0.5;
    text-transform: uppercase;
}

.contemporary-label-en,
.contemporary-label-ja {
    font-family: var(--font-sans);
}

.label-l,
.label-r {
    text-align: center;
}

.label-l {
    padding-right: 0;
}
/* Other Films (Single Mode Context) */
.other-films-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem 0;
}

.other-film-item {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--secondary-text);
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.other-film-item:hover {
    opacity: 1;
    transform: translateX(5px);
    color: var(--accent-color);
}

.other-film-medium {
    display: inline-block;
    margin-right: 0.55rem;
    padding: 0.18rem 0.4rem 0.16rem;
    border: 1px solid rgba(0,0,0,0.16);
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.82;
}

.other-film-director {
    font-weight: 400;
    letter-spacing: 0.05em;
}

.other-film-title {
    font-weight: 700;
}

.other-film-separator {
    margin: 0 0.35rem;
    opacity: 0.6;
}

/* Responsive */
/* --- Home Page Specific Styles --- */

.home-container {
    width: min(100%, 1200px);
    padding: calc(5rem + clamp(1.5rem, 4vh, 2.25rem)) clamp(1.25rem, 5vw, 4rem) calc(8rem + env(safe-area-inset-bottom));
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.home-container.directors-page-container {
    padding-top: 130px;
}

.home-hero {
    position: static;
    width: auto;
    padding: 0;
    background: transparent;
    margin-bottom: 8vh;
}

.home-hero h1 {
    font-family: var(--font-title);
    font-size: clamp(2.4rem, 6vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.home-logo {
    width: min(100%, 610px);
    margin-inline: auto;
}

.home-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.home-beta-label {
    margin: 1.15rem 0 0;
    color: var(--secondary-text);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.5;
}

.home-hero .header-nav {
    margin: 0;
}

.home-hero p {
    font-size: 0.875rem;
    color: var(--secondary-text);
    letter-spacing: 0.1em;
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.9;
}

.home-about-link {
    display: inline-block;
    margin-top: 1.35rem;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.5;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
    opacity: 1;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.home-about-link:hover {
    color: var(--text-color);
    opacity: 1;
}

.comparison-themes {
    margin: clamp(3.5rem, 8vh, 6rem) auto 5.5vh;
    text-align: left;
}

.section-heading {
    margin-bottom: 1.25rem;
    text-align: center;
}

.section-heading h2 {
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

.section-heading p {
    max-width: 520px;
    margin: 0.55rem auto 0;
    color: var(--secondary-text);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 1.75;
}

.page-hero {
    border-top: 2px solid #555555;
    padding: 1.6rem 0 2.2rem;
    text-align: left;
}

.page-hero h1 {
    font-family: var(--font-sans);
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.page-hero > p:last-child {
    max-width: 720px;
    margin: 0;
    color: var(--secondary-text);
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    line-height: 1.75;
}

.director-page-intro {
    border-top: none;
    margin-bottom: 2rem;
}

.year-hero {
    border-top: none;
}

.explore-paths {
    margin: 0 auto 5.5vh;
}

.explore-path-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    max-width: 760px;
    margin: 0 auto;
}

.explore-path-card {
    display: grid;
    gap: 0.45rem;
    min-height: 6.5rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line-color);
    border-radius: 8px;
    background: rgba(255,255,255,0.28);
    color: inherit;
    font-family: var(--font-sans);
    text-decoration: none;
    text-align: left;
    transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.explore-path-card:hover {
    border-color: #555555;
    background: rgba(255,255,255,0.48);
    transform: translateY(-2px);
}

.explore-path-card span {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

.explore-path-card small {
    color: var(--secondary-text);
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.7;
}

.theme-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.theme-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    min-height: 150px;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--line-color);
    border-radius: 8px;
    background: rgba(255,255,255,0.28);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.theme-item:hover {
    border-color: #555555;
    background: rgba(255,255,255,0.48);
    transform: translateY(-2px);
}

.theme-item h3 {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.5;
    margin-bottom: 0.45rem;
}

.theme-item p {
    color: var(--secondary-text);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    line-height: 1.7;
}

.theme-pair {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    align-self: end;
    color: #555555;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

.theme-pair span {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.24rem 0.58rem;
    border: 1px solid rgba(0,0,0,0.14);
    border-radius: 999px;
    background: rgba(255,255,255,0.38);
}

.director-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 10vh;
}

.director-search {
    width: min(100%, 560px);
    margin: 0 0 4vh;
    text-align: left;
}

.director-search input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line-color);
    border-radius: 0;
    background: transparent;
    padding: 0.85rem 0;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    outline: none;
    transition: border-color 0.25s ease;
}

.director-search input::placeholder {
    color: var(--secondary-text);
    opacity: 0.55;
}

.director-search input:focus {
    border-bottom-color: var(--accent-color);
}

/* --- Explore by Year Page --- */

.year-container {
    width: min(100%, 1100px);
    max-width: 1100px;
    margin: 0 auto;
    padding: 130px clamp(1.25rem, 5vw, 4rem) 68px;
}

.year-hero {
    margin-bottom: 0;
}

.year-picker-section {
    margin-bottom: 2.2rem;
}

.year-picker {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.45rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.year-picker button {
    flex: 0 0 auto;
    min-height: 2.25rem;
    min-width: 4.4rem;
    border: 1px solid var(--line-color);
    border-radius: 999px;
    background: transparent;
    color: var(--secondary-text);
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.year-picker button:hover,
.year-picker button.active {
    border-color: #555555;
    color: var(--text-color);
    background: rgba(255,255,255,0.42);
}

.year-results {
    border-top: 1px solid #555555;
    padding-top: 1.6rem;
}

.year-results-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.45rem;
}

.year-results-title {
    min-width: 0;
}

.year-results-header h2 {
    font-family: var(--font-serif);
    font-size: 2.45rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
}

.year-summary {
    width: 100%;
    max-width: none;
    margin-top: 0.7rem;
    color: var(--secondary-text);
    font-size: 0.86rem;
    letter-spacing: 0.05em;
    line-height: 1.85;
}

.year-results-header a {
    color: var(--secondary-text);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.year-result-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
    gap: clamp(1.6rem, 4vw, 3rem);
}

.year-events-panel h3,
.year-films-panel h3 {
    margin-bottom: 1rem;
    color: #555555;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.year-event-item,
.year-film-item {
    border-top: 1px solid var(--line-color);
    padding: 0.85rem 0;
}

.year-event-item:last-child,
.year-film-item:last-child {
    border-bottom: 1px solid var(--line-color);
}

.year-event-item span {
    display: inline-block;
    margin-bottom: 0.4rem;
    color: var(--secondary-text);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.year-event-item p {
    color: var(--secondary-text);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    line-height: 1.7;
}

.year-film-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.year-film-item:hover {
    opacity: 0.66;
}

.year-film-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

.year-film-item p {
    color: var(--secondary-text);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.6;
}

.year-film-item > span {
    flex: 0 0 auto;
    color: var(--secondary-text);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.year-empty {
    border-top: 1px solid var(--line-color);
    padding: 1rem 0;
    color: var(--secondary-text);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
}

/* --- Information Page --- */

.info-container {
    width: min(100%, 980px);
    max-width: 980px;
    margin: 0 auto;
    padding: 150px clamp(1.25rem, 5vw, 4rem) 110px;
}

.info-section {
    border-top: 2px solid #555555;
    padding: 2rem 0 4.5rem;
}

.info-section + .info-section {
    margin-top: 1rem;
}

.info-kicker {
    color: #555555;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 1.75rem;
}

.info-intro h1,
.info-section h2 {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

.info-intro h1 {
    font-size: clamp(1.75rem, 4.2vw, 2.8rem);
    max-width: 820px;
    margin-bottom: 2.2rem;
    word-break: keep-all;
    overflow-wrap: normal;
    text-wrap: balance;
}

.info-section h2 {
    font-size: 1.65rem;
    margin-bottom: 2rem;
}

.info-copy {
    max-width: 760px;
}

.info-copy p {
    color: var(--text-color);
    font-size: 0.98rem;
    line-height: 2.1;
    margin-bottom: 1.25rem;
}

.info-contact-link {
    margin-top: 1.8rem;
}

.info-contact-link a {
    color: var(--text-color);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.inline-tag {
    display: inline-block;
    margin: 0 0.12rem;
    padding: 0.18rem 0.42rem 0.15rem;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    vertical-align: 0.08em;
}

.inline-tag.series {
    border: 1px solid rgba(45, 84, 122, 0.34);
    color: #2d547a;
    background: rgba(45, 84, 122, 0.08);
}

.notice-list {
    border-top: 1px solid var(--line-color);
}

.notice-item {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2.25rem);
    align-items: start;
    padding: 1.45rem 0;
    border-bottom: 1px solid var(--line-color);
    text-align: left;
}

.notice-item time {
    color: var(--secondary-text);
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.6;
}

.notice-item h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.6;
    margin-bottom: 0.35rem;
}

.notice-item p {
    color: var(--secondary-text);
    font-size: 0.88rem;
    line-height: 1.75;
}

.director-card {
    background: var(--card-bg);
    border: 1px solid var(--line-color);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.director-card:hover {
    border-color: var(--text-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.director-card.selected {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.card-name {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}



/* Compare Button */
.compare-action {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 1.2rem 3rem;
    max-width: calc(100vw - 2rem);
    border: none;
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
    z-index: 200;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    line-height: 1.4;
    white-space: normal;
}

.compare-action.visible {
    transform: translateX(-50%) translateY(0);
}

.compare-action:hover {
    opacity: 0.86;
}

.compare-action-main,
.compare-action-note {
    display: block;
}

.compare-action-note {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    opacity: 0.72;
}

@media (max-width: 599px) {
    .home-hero h1 { font-size: 2.5rem; }
    .director-grid { grid-template-columns: 1fr; }
}

/* --- Updated Surname-centric Styles --- */

.card-name-ja {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 1rem 0 0.5rem 0;
    letter-spacing: 0.02em;
}

.card-name-en {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.6;
    letter-spacing: 0.1em;
}

.director-card.selected .card-name-ja {
    opacity: 1;
}

@media (max-width: 599px) {
    .card-surname { font-size: 2.2rem; }
}

/* --- Updated Index List Styles --- */

.director-list {
    display: flex;
    flex-direction: column;
    margin-top: 5vh;
    width: 100%;
}

.director-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line-color);
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    width: 100%;
}

.director-item:first-child {
    border-top: 1px solid var(--line-color);
}

.director-item:hover {
    padding-left: 1rem;
    background: rgba(0,0,0,0.02);
}

.director-item.selected {
    background-color: rgba(0,0,0,0.055);
    color: var(--text-color);
    border-left: 3px solid var(--accent-color);
    padding-left: 2rem;
}

.director-item.search-dimmed {
    opacity: 0.28;
}

.director-item.search-dimmed:hover {
    opacity: 0.55;
}

.item-name-ja {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-name-en {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.5;
    letter-spacing: 0.1em;
    min-width: 0;
    overflow-wrap: anywhere;
}

.item-keywords {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-top: 0.3rem;
    color: #888888;
}

.director-item.selected .item-keywords {
    color: var(--secondary-text);
    opacity: 1;
}

@media (max-width: 899px) {
    .director-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

}

/* --- Scalable & Responsive List Styles --- */

.director-category-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #555555;
    text-align: left;
    padding: 0 0 0.8rem 0;
    letter-spacing: 0.08em;
    border-bottom: 2px solid #555555;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
}

.director-item + .director-category-title {
    margin-top: 4rem;
}

.director-search-note {
    padding: 0 0 1.4rem;
    color: var(--secondary-text);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-align: center;
    opacity: 0.55;
}

@media (max-width: 599px) {
    .director-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
        padding: 1.2rem 0;
    }
    .item-name-ja {
        font-size: 1.2rem;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .director-item.selected {
        padding-left: 1rem;
    }
}

/* --- Tablet Layout: 600px - 899px --- */

@media (min-width: 600px) and (max-width: 899px) {
    header {
        padding: 4rem 1.5rem 0.75rem;
    }

    .timeline-header {
        padding: 6.75rem 1.5rem 0.65rem;
    }

    .site-title {
        font-size: 0.95rem;
        letter-spacing: var(--title-letter-spacing);
        line-height: 1.35;
    }

    .header-nav {
        gap: 0.5rem 1.15rem;
        margin-top: 0;
        font-size: 0.95rem;
        letter-spacing: 0.07em;
    }

    .timeline-header .site-title-link {
        padding: 0.9rem 1rem 0.75rem;
    }

    .timeline-header .header-nav {
        top: 3.25rem;
    }

    .back-nav {
        left: 1.5rem;
        font-size: 0.65rem;
        letter-spacing: 0.16em;
    }

    .info-nav {
        right: 1.5rem;
        font-size: 0.65rem;
        letter-spacing: 0.16em;
    }

    .director-labels {
        top: 116px;
        grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
        padding: 0.6rem 1.5rem 0.7rem;
        box-shadow: 0 -120px 0 120px var(--bg-color);
    }

    .label-l {
        padding-right: 0;
    }

    .label-surname,
    .label-en {
        font-size: 1.25rem;
    }

    .label-ja {
        font-size: 0.68rem;
        letter-spacing: 0.14em;
    }

    .jump-nav {
        top: 184px;
        justify-content: flex-start;
        gap: 1.4rem;
        padding: 0.75rem 1.5rem;
    }

    .timeline-container {
        padding: 250px 1.25rem 90px;
    }

    .timeline-row,
    .timeline-container.single-mode .timeline-row {
        grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
        min-height: 112px;
    }

    .side {
        padding: 0 1.25rem;
    }

    .film-title {
        font-size: 1.25rem;
    }

    .work-medium {
        font-size: 0.58rem;
        margin-bottom: 0.35rem;
    }

    .film-context {
        font-size: 0.78rem;
    }

    .year-label {
        font-size: 1.12rem;
        padding: 5px 12px;
    }

    .episode-label {
        width: 104px;
        font-size: 0.68rem;
    }

    .home-container {
        padding: 5.9rem 1.75rem calc(8rem + env(safe-area-inset-bottom));
    }

    .home-container.directors-page-container {
        padding-top: 112px;
    }

    .home-hero h1 {
        font-size: 2.8rem;
    }

    .home-hero p {
        font-size: 0.875rem;
    }

    .comparison-themes {
        margin-bottom: 3.75rem;
    }

    .theme-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .theme-item,
    .theme-item:nth-child(odd),
    .theme-item:nth-child(even) {
        min-height: 0;
        padding: 1.2rem;
    }

    .director-search {
        margin-bottom: 2.3rem;
    }

    .director-item {
        grid-template-columns: minmax(0, 1fr);
        padding: 1.35rem 0;
    }

    .item-name-ja {
        font-size: 1.25rem;
    }

    .item-name-en {
        font-size: 0.9rem;
    }

    .item-keywords {
        font-size: 12px;
    }

    .compare-action {
        bottom: calc(1.2rem + env(safe-area-inset-bottom));
        width: min(620px, calc(100% - 2rem));
        padding: 1rem 1.4rem;
        font-size: 1rem;
        letter-spacing: 0.03em;
    }

    .info-container {
        padding: 125px 1.75rem 90px;
    }

    .info-intro h1 {
        font-size: 2.1rem;
    }

    .notice-item {
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 1.5rem;
    }
}

/* --- Phone Layout: up to 599px --- */

@media (max-width: 599px) {
    body {
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
    }

    header {
        padding: 3.45rem 1rem 0.85rem;
        text-align: left;
    }

    .timeline-header {
        padding: 6rem 0.75rem 0.55rem;
        text-align: center;
    }

    .back-nav {
        position: static;
        transform: none;
        display: inline-block;
        margin-bottom: 0.35rem;
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }

    .info-nav {
        position: static;
        transform: none;
        display: inline-block;
        margin-left: 1rem;
        margin-bottom: 0.35rem;
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }

    .site-title {
        font-size: 0.78rem;
        letter-spacing: var(--title-letter-spacing);
        line-height: 1.35;
        max-width: 100%;
    }

    .header-nav {
        flex-wrap: nowrap;
        gap: 0.62rem;
        justify-content: center;
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        margin-top: 0;
        padding: 0.82rem 0.75rem;
        font-size: 0.78rem;
        letter-spacing: 0.01em;
        line-height: 1.45;
    }

    .timeline-header .site-title-link {
        padding: 0.75rem 0.75rem 0.65rem;
    }

    .timeline-header .header-nav {
        top: 2.75rem;
    }

    .header-nav::-webkit-scrollbar {
        display: none;
    }

    .header-nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .director-labels {
        top: 96px;
        grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
        padding: 0.5rem 0.55rem 0.55rem;
        column-gap: 0.25rem;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        box-shadow: 0 -90px 0 90px var(--bg-color);
    }

    .director-labels > div:nth-child(2) {
        display: block;
    }

    .label-l {
        text-align: center;
        padding-right: 0;
    }

    .label-r {
        text-align: center;
    }

    .label-surname,
    .label-en {
        font-size: clamp(0.68rem, 3.2vw, 0.82rem);
        line-height: 1.35;
        letter-spacing: 0.01em;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }

    .label-ja {
        display: none;
    }

    .jump-nav {
        top: 154px;
        justify-content: flex-start;
        gap: 1.25rem;
        padding: 0.7rem 1rem;
    }

    .jump-nav button {
        flex: 0 0 auto;
        font-size: 0.68rem;
        min-height: 32px;
    }

    .timeline-container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 218px 0 calc(7rem + env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: visible;
    }

    .timeline-container::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-row,
    .timeline-container.single-mode .timeline-row {
        grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr);
        column-gap: 6px;
        width: 100%;
        min-height: 0;
        padding: 1rem 0;
        margin-bottom: 0.5rem;
    }

    .nolan-side {
        text-align: right;
    }

    .center-axis {
        justify-content: center;
        padding-top: 0;
    }

    .villeneuve-side {
        text-align: left;
        padding-top: 0;
        border-top: none;
    }

    .side {
        padding: 0 0.45rem;
    }

    .nolan-side .card-content {
        margin-left: auto;
    }

    .card-content {
        max-width: 100%;
    }

    .film-title {
        font-size: 0.82rem;
        line-height: 1.35;
        margin-bottom: 0.35rem;
    }

    .work-medium {
        font-size: 0.5rem;
        letter-spacing: 0.1em;
        margin-bottom: 0.25rem;
    }

    .film-context {
        display: none;
        font-size: 0.62rem;
        line-height: 1.55;
    }

    .year-label {
        font-size: 1rem;
        padding: 3px 6px;
    }

    .episode-label {
        width: 60px;
        margin-top: 0.45rem;
        font-size: 0.58rem;
        line-height: 1.45;
        max-height: none;
        overflow: visible;
    }

    .timeline-row.is-current {
        margin: 0.5rem 0;
    }

    .timeline-row.is-current .year-label {
        transform: none;
    }

    .other-films-container {
        gap: 0.65rem;
        padding: 0.35rem 0 0;
    }

    .other-film-item {
        font-size: 0.72rem;
        line-height: 1.45;
    }

    .home-container {
        padding: 5.25rem 1rem calc(7.5rem + env(safe-area-inset-bottom));
    }

    .home-container.directors-page-container {
        padding-top: 92px;
    }

    .site-footer {
        padding: 2rem 1rem calc(2.5rem + env(safe-area-inset-bottom));
        font-size: 0.62rem;
        letter-spacing: 0.1em;
    }

    .footer-title {
        font-size: 0.78rem;
        letter-spacing: 0.1em;
    }

    .footer-nav {
        gap: 0.65rem 1rem;
    }

    .footer-nav a {
        font-size: 0.6rem;
        letter-spacing: 0.11em;
    }

    .home-hero {
        margin-bottom: 3rem;
        text-align: center;
    }

    .home-hero h1 {
        font-size: 2rem;
        line-height: 1.1;
    }

    .home-hero p {
        font-size: 0.875rem;
        line-height: 1.85;
        letter-spacing: 0.05em;
        text-align: center;
    }

    .comparison-themes {
        margin-bottom: 3rem;
    }

    .section-heading {
        margin-bottom: 1rem;
    }

    .section-heading h2 {
        font-size: 1rem;
    }

    .explore-paths {
        margin-top: 0;
        margin-bottom: 3rem;
    }

    .explore-path-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem;
    }

    .explore-path-card {
        min-height: 0;
        padding: 1rem;
    }

    .explore-path-card span {
        font-size: 0.95rem;
    }

    .explore-path-card small {
        font-size: 0.72rem;
    }

    .theme-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .theme-item,
    .theme-item:nth-child(odd),
    .theme-item:nth-child(even) {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
        min-height: 0;
        padding: 1rem;
    }

    .theme-item h3 {
        font-size: 0.95rem;
    }

    .theme-item p {
        font-size: 0.72rem;
    }

    .theme-pair {
        align-items: flex-start;
        text-align: left;
        font-size: 0.75rem;
    }

    .theme-pair span {
        min-height: 1.65rem;
        padding: 0.2rem 0.5rem;
    }

    .director-search {
        margin-bottom: 1.75rem;
    }

    .info-container {
        padding: 110px 1rem 80px;
    }

    .year-container {
        padding: 92px 1rem 60px;
    }

    .page-hero {
        padding: 1.2rem 0 1.7rem;
    }

    .page-hero h1 {
        font-size: 1.55rem;
        margin-bottom: 0.75rem;
    }

    .page-hero > p:last-child {
        font-size: 0.8rem;
        line-height: 1.75;
    }

    .year-picker {
        gap: 0.32rem;
        margin-inline: -1rem;
        padding: 0 1rem 0.45rem;
    }

    .year-picker button {
        min-height: 2rem;
        min-width: 3.95rem;
        font-size: 0.82rem;
    }

    .year-results-header {
        display: block;
    }

    .year-results-header h2 {
        margin-bottom: 0.8rem;
        font-size: 2rem;
    }

    .year-summary {
        margin: -0.25rem 0 0.9rem;
        font-size: 0.82rem;
        line-height: 1.75;
    }

    .year-result-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.45rem;
    }

    .year-films-panel {
        order: 2;
    }

    .year-events-panel {
        order: 1;
    }

    .year-events-panel h3,
    .year-films-panel h3 {
        margin-bottom: 0.7rem;
        font-size: 0.95rem;
    }

    .year-events-panel #year-events {
        display: grid;
        gap: 0.45rem;
    }

    .year-event-item {
        display: flex;
        align-items: baseline;
        gap: 0.55rem;
        padding: 0.52rem 0;
    }

    .year-event-item span {
        flex: 0 0 auto;
        min-width: 3.8rem;
        margin-bottom: 0;
        font-size: 0.5rem;
        letter-spacing: 0.1em;
    }

    .year-event-item p {
        font-size: 0.72rem;
        line-height: 1.45;
    }

    .year-film-item {
        padding: 0.78rem 0;
    }

    .year-film-item {
        display: block;
    }

    .year-film-item > span {
        display: inline-block;
        margin-top: 0.35rem;
    }

    .info-section {
        padding: 1.5rem 0 3rem;
    }

    .info-kicker {
        font-size: 1rem;
        margin-bottom: 1.3rem;
    }

    .info-intro h1 {
        font-size: clamp(1.55rem, 7vw, 2rem);
        line-height: 1.32;
        margin-bottom: 1.6rem;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .info-section h2 {
        font-size: 1.35rem;
        margin-bottom: 1.35rem;
    }

    .info-copy p {
        font-size: 0.9rem;
        line-height: 1.95;
    }

    .notice-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem;
        padding: 1.25rem 0;
    }

    .notice-item time {
        font-size: 0.82rem;
    }

    .director-search input {
        padding: 0.75rem 0;
        font-size: 0.9rem;
    }

    .director-list {
        margin-top: 2rem;
    }

    .director-category-title {
        padding: 0 0 0.7rem;
        font-size: 1.2rem;
        letter-spacing: 0.06em;
        margin-bottom: 1.25rem;
    }

    .director-item + .director-category-title {
        margin-top: 3rem;
    }

    .director-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.45rem 0.7rem;
        padding: 1rem 0.25rem;
    }

    .director-item:hover {
        padding-left: 0.25rem;
        transform: none;
    }

    .director-item.selected {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .item-name-ja {
        font-size: 1.05rem;
        line-height: 1.45;
        letter-spacing: 0.02em;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .item-name-en {
        font-size: 0.78rem;
        line-height: 1.35;
        letter-spacing: 0.06em;
    }

    .item-keywords {
        font-size: 0.72rem;
        line-height: 1.55;
        letter-spacing: 0.02em;
    }

    .compare-action {
        left: 1rem;
        right: 1rem;
        bottom: calc(0.75rem + env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        transform: translateY(calc(100% + 1.5rem));
        padding: 0.95rem 1rem;
        font-size: 0.86rem;
        letter-spacing: 0.02em;
        line-height: 1.45;
    }

    .compare-action.visible {
        transform: translateY(0);
    }

    .compare-action:hover {
        padding: 0.95rem 1rem;
        opacity: 0.86;
    }

    .compare-action-note {
        font-size: 0.82rem;
    }
}

@media (max-width: 430px) {
    .timeline-container::before {
        left: 50%;
    }

    .timeline-row,
    .timeline-container.single-mode .timeline-row {
        grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
        column-gap: 4px;
        width: 100%;
        padding: 0.9rem 0;
    }

    .side {
        padding: 0 0.35rem;
    }

    .film-title {
        font-size: 0.74rem;
    }

    .film-context {
        display: none;
        font-size: 0.56rem;
    }

    .year-label {
        font-size: 0.94rem;
        padding: 2px 5px;
    }

    .episode-label {
        width: 56px;
        font-size: 0.54rem;
    }
}
