:root {
  --paper: #f7f5f0;
  --surface: #fff;
  --ink: #202426;
  --muted: #657071;
  --line: #d8ddda;
  --teal: #126b67;
  --teal-dark: #0b4745;
  --teal-soft: #e4f0ed;
  --coral: #b94734;
  --gold: #e6b955;
  --shadow: 0 8px 24px rgb(28 42 42 / 8%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif; line-height: 1.75; }
img { max-width: 100%; height: auto; }
a { color: var(--teal-dark); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--coral); }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #a95700; outline-offset: 3px; }
.skip-link { position: absolute; z-index: 100; top: -4rem; left: 1rem; padding: 0.7rem 1rem; background: #111; color: #fff; }
.skip-link:focus { top: 0.7rem; }
.movie-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.movie-header { border-bottom: 1px solid #d4d8d5; background: rgb(255 255 255 / 94%); }
.movie-header__inner { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 2rem; }
.movie-brand { color: #202426; font-size: 1.02rem; font-weight: 900; letter-spacing: 0.045em; text-decoration: none; }
.movie-brand span { color: var(--coral); }
.movie-brand small { margin-left: 0.55rem; color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0; }
.movie-header nav { display: flex; align-items: center; gap: 1.25rem; }
.movie-header nav a { color: #394142; font-size: 0.76rem; font-weight: 800; text-decoration: none; }

.movie-breadcrumbs { padding-block: 0.75rem; font-size: 0.7rem; }
.movie-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.movie-breadcrumbs li + li::before { margin-right: 0.35rem; color: #9aa2a1; content: "/"; }
.movie-breadcrumbs span { color: var(--muted); }

.movie-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: end; margin-bottom: 1rem; padding: 2rem 2.2rem; border: 1px solid #d9ddda; background: var(--surface); box-shadow: var(--shadow); }
.movie-kicker { margin: 0 0 0.3rem; color: var(--teal); font-size: 0.69rem; font-weight: 900; letter-spacing: 0.08em; }
.movie-intro h1 { max-width: 760px; margin: 0; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; font-size: clamp(1.85rem, 4vw, 3.15rem); line-height: 1.25; letter-spacing: -0.045em; }
.movie-intro > div > p:last-child { max-width: 710px; margin: 0.8rem 0 0; color: var(--muted); font-size: 0.9rem; }
.movie-intro dl { display: grid; grid-template-columns: repeat(3, auto); gap: 1.5rem; margin: 0; }
.movie-intro dl div { min-width: 70px; border-left: 2px solid var(--teal-soft); padding-left: 0.8rem; }
.movie-intro dt { color: var(--muted); font-size: 0.62rem; font-weight: 800; }
.movie-intro dd { margin: 0.05rem 0 0; font-size: 1.4rem; font-weight: 900; line-height: 1.1; }
.movie-intro dd small { margin-left: 0.15rem; font-size: 0.58rem; }

.movie-discovery { margin-bottom: 1rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); background: var(--surface); }
.movie-discovery > label { display: block; margin-bottom: 0.3rem; font-size: 0.7rem; font-weight: 900; }
.movie-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; }
.movie-search input { width: 100%; min-height: 46px; border: 1px solid #aeb8b5; border-radius: 0; padding: 0 0.85rem; background: #fbfcfb; color: var(--ink); }
.movie-search span { min-width: 4rem; color: var(--teal-dark); font-size: 0.74rem; font-weight: 900; text-align: right; }
.decade-filter { display: flex; flex-wrap: wrap; gap: 0.38rem; margin-top: 0.75rem; }
.decade-filter button { border: 1px solid #c8cfcc; border-radius: 999px; padding: 0.35rem 0.7rem; background: #fff; color: #4f5959; font-size: 0.68rem; font-weight: 800; cursor: pointer; }
.decade-filter button small { margin-left: 0.28rem; color: #87918f; font-size: 0.58rem; }
.decade-filter button.is-active { border-color: var(--teal); background: var(--teal); color: #fff; }
.decade-filter button.is-active small { color: #d9eeeb; }

.movie-ranking { margin-bottom: 2.8rem; border: 1px solid var(--line); background: var(--surface); }
.movie-ranking > header, .related-movies > header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.movie-ranking h2, .related-movies h2 { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.movie-ranking > header > p { margin: 0; color: var(--muted); font-size: 0.65rem; }
.poster-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.poster-card { min-width: 0; background: #fff; }
.poster-card[hidden] { display: none; }
.poster-card > a { display: block; height: 100%; color: inherit; text-decoration: none; }
.poster-card__image { position: relative; display: block; overflow: hidden; aspect-ratio: 2 / 2.95; background: #dfe3e0; }
.poster-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 180ms ease-out; }
.poster-card:hover .poster-card__image img { transform: scale(1.018); }
.score { position: absolute; right: 0.45rem; bottom: 0.45rem; display: inline-flex; align-items: baseline; gap: 0.1rem; min-width: 3.6rem; justify-content: center; border: 1px solid rgb(255 255 255 / 70%); padding: 0.25rem 0.4rem; background: rgb(11 71 69 / 94%); color: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 22%); line-height: 1; }
.score b { font-size: 1rem; }
.score small { font-size: 0.55rem; }
.rank { position: absolute; top: 0.45rem; left: 0; padding: 0.2rem 0.45rem; background: rgb(255 255 255 / 92%); color: #26302f; font-size: 0.58rem; font-weight: 900; }
.poster-card__body { display: block; min-height: 78px; padding: 0.65rem 0.7rem 0.75rem; }
.poster-card__body strong { display: -webkit-box; overflow: hidden; font-size: 0.79rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.poster-card__body small { display: block; overflow: hidden; margin-top: 0.25rem; color: var(--muted); font-size: 0.61rem; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { padding: 3rem 1rem; color: var(--muted); text-align: center; }

.synopsis-page { padding-bottom: 3rem; }
.synopsis-article { border: 1px solid var(--line); background: var(--surface); }
.synopsis-hero { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 2.2rem; padding: 1.7rem; border-bottom: 1px solid var(--line); }
.synopsis-poster { position: relative; align-self: start; overflow: hidden; aspect-ratio: 2 / 2.96; background: #dfe3e0; box-shadow: 0 7px 20px rgb(22 38 36 / 16%); }
.synopsis-poster > img { width: 100%; height: 100%; object-fit: cover; }
.score--large { right: 0.65rem; bottom: 0.65rem; min-width: 4.5rem; padding: 0.4rem 0.5rem; }
.score--large b { font-size: 1.35rem; }
.synopsis-heading { align-self: center; }
.synopsis-heading h1 { max-width: 760px; margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.3; letter-spacing: -0.035em; }
.synopsis-heading > p:not(.movie-kicker) { max-width: 760px; margin: 0.85rem 0; color: #4e5959; font-size: 0.93rem; }
.synopsis-heading > ul { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 1rem 0; padding: 0; list-style: none; }
.synopsis-heading > ul li { border: 1px solid #cad3d0; border-radius: 999px; padding: 0.22rem 0.55rem; color: #4b5756; font-size: 0.64rem; }
.rating-line { display: flex; align-items: center; gap: 0.65rem; margin-top: 1.2rem; }
.rating-line > strong { color: var(--teal-dark); font-size: 2.3rem; line-height: 1; }
.rating-line > span { color: #4b5655; font-size: 0.72rem; font-weight: 800; line-height: 1.35; }
.rating-line small { display: block; color: #818a89; font-size: 0.58rem; font-weight: 600; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; }
.article-main { min-width: 0; padding: 1.7rem 2rem 2.5rem; border-right: 1px solid var(--line); }
.article-sidebar { position: sticky; top: 1rem; padding: 1.25rem; }
.article-sidebar section { border-top: 3px solid var(--teal); }
.article-sidebar h2 { margin: 0; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.article-sidebar dl { margin: 0; }
.article-sidebar dl div { padding: 0.6rem 0; border-bottom: 1px solid #e5e8e6; }
.article-sidebar dt { color: var(--muted); font-size: 0.58rem; font-weight: 900; }
.article-sidebar dd { margin: 0.15rem 0 0; font-size: 0.7rem; line-height: 1.55; }
.back-link { display: block; margin-top: 1rem; border: 1px solid var(--teal); padding: 0.65rem; color: var(--teal-dark); font-size: 0.7rem; font-weight: 900; text-align: center; text-decoration: none; }
.article-toc { margin-bottom: 2rem; border: 1px solid #ccd8d5; padding: 1rem 1.1rem; background: #f7fbfa; }
.article-toc > strong { display: block; margin-bottom: 0.4rem; color: var(--teal-dark); font-size: 0.78rem; }
.article-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 1rem; margin: 0; padding-left: 1.4rem; }
.article-toc a { font-size: 0.72rem; }
.article-section { scroll-margin-top: 1rem; margin: 0 0 2.6rem; }
.article-section h2 { margin: 0 0 1rem; border-bottom: 1px solid #ccd4d2; padding: 0 0 0.55rem; font-size: 1.45rem; line-height: 1.4; }
.article-section h2::after { display: block; width: 56px; margin-bottom: -0.62rem; padding-top: 0.55rem; border-bottom: 3px solid var(--teal); content: ""; }
.article-section h3 { margin: 1.8rem 0 0.55rem; padding-left: 0.75rem; border-left: 4px solid var(--teal); font-size: 1.02rem; line-height: 1.5; }
.article-section p { margin: 0.75rem 0; color: #313839; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 0.94rem; line-height: 2; }
.section-label { display: inline-block; margin: 0 0 0.35rem; padding: 0.15rem 0.45rem; background: var(--teal-soft); color: var(--teal-dark); font-size: 0.61rem; font-weight: 900; }
.section-label--spoiler { background: #f7e5df; color: #9e3828; }
.spoiler-warning { margin: 0 0 2.5rem; border: 1px solid #e2b4a9; border-left: 5px solid var(--coral); padding: 0.85rem 1rem; background: #fff7f4; }
.spoiler-warning strong { color: #922f21; font-size: 0.8rem; }
.spoiler-warning p { margin: 0.15rem 0 0; color: #6d554f; font-size: 0.7rem; }
.article-section--ending { padding: 1.2rem 1.3rem; border: 1px solid #ddc6c0; background: #fffaf8; }
.point-list, .check-list { display: grid; gap: 0.45rem; padding: 0; list-style: none; }
.point-list li, .check-list li { position: relative; padding: 0.55rem 0.75rem 0.55rem 2rem; border: 1px solid #dce2df; background: #fafcfb; font-size: 0.76rem; }
.point-list li::before { position: absolute; left: 0.7rem; color: var(--gold); content: "★"; }
.check-list li::before { position: absolute; left: 0.7rem; color: var(--teal); content: "✓"; font-weight: 900; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { padding: 0.75rem 0.3rem; color: var(--teal-dark); font-size: 0.8rem; font-weight: 900; cursor: pointer; }
.faq details p { margin: 0; padding: 0 0.5rem 0.9rem; font-family: inherit; font-size: 0.76rem; line-height: 1.75; }
.article-sources { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.article-sources h2 { margin: 0; font-size: 0.86rem; }
.article-sources > p { margin: 0.35rem 0; color: var(--muted); font-size: 0.65rem; }
.article-sources ul { margin: 0.7rem 0 0; padding-left: 1.2rem; }
.article-sources li { margin: 0.28rem 0; font-size: 0.68rem; }
.article-sources li small { margin-left: 0.5rem; color: var(--muted); }

.related-movies { margin-top: 1rem; border: 1px solid var(--line); background: #fff; }
.poster-grid--related { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.poster-grid--related .poster-card__body { min-height: 72px; }
.movie-footer { padding: 2rem 0; background: #163c3a; color: #d9e5e2; }
.movie-footer .movie-brand { color: #fff; }
.movie-footer p { margin: 0.6rem 0; font-size: 0.68rem; }
.movie-footer nav { display: flex; gap: 1rem; }
.movie-footer a:not(.movie-brand) { color: #d9e5e2; font-size: 0.66rem; }
.movie-footer small { display: block; margin-top: 1rem; color: #a7c0bc; font-size: 0.58rem; }

@media (max-width: 900px) {
  .movie-intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .movie-intro dl { justify-content: start; }
  .poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .synopsis-hero { grid-template-columns: 220px minmax(0, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-main { border-right: 0; border-bottom: 1px solid var(--line); }
  .article-sidebar { position: static; }
  .poster-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .movie-shell { width: min(100% - 24px, 1180px); }
  .movie-header__inner { min-height: 56px; }
  .movie-brand small, .movie-header nav a:nth-child(2) { display: none; }
  .movie-header nav { gap: 0.8rem; }
  .movie-header nav a { font-size: 0.68rem; }
  .movie-intro { padding: 1.25rem; }
  .movie-intro h1 { font-size: 1.75rem; }
  .movie-intro dl { width: 100%; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
  .movie-intro dl div { min-width: 0; padding-left: 0.5rem; }
  .movie-intro dd { font-size: 1rem; }
  .movie-search { grid-template-columns: 1fr; gap: 0.2rem; }
  .movie-search span { text-align: left; }
  .poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poster-card__body { min-height: 74px; }
  .synopsis-hero { grid-template-columns: 112px minmax(0, 1fr); gap: 1rem; padding: 1rem; }
  .synopsis-heading h1 { font-size: 1.45rem; }
  .synopsis-heading > p:not(.movie-kicker) { font-size: 0.75rem; line-height: 1.7; }
  .synopsis-heading > ul { display: none; }
  .rating-line { margin-top: 0.6rem; }
  .rating-line > strong { font-size: 1.65rem; }
  .score--large { right: 0.35rem; bottom: 0.35rem; min-width: 3.5rem; }
  .score--large b { font-size: 1rem; }
  .article-main { padding: 1.1rem 1rem 2rem; }
  .article-toc ol { grid-template-columns: 1fr; }
  .article-section h2 { font-size: 1.2rem; }
  .article-section p { font-size: 0.9rem; line-height: 1.9; }
  .article-section--ending { margin-inline: -0.2rem; padding: 1rem; }
  .article-sources li small { display: block; margin-left: 0; }
  .poster-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .synopsis-hero { grid-template-columns: 96px minmax(0, 1fr); }
  .synopsis-heading h1 { font-size: 1.25rem; }
  .rating-line > span { font-size: 0.62rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .poster-card__image img { transition: none; }
}
