/*
Theme Name: Cinemaspace Theme
Theme URI: https://cinemaspace.jp/
Author: You
Description: Monochrome movie review theme (CPT UI + ACF).
Version: 1.3.0
License: GPL-2.0-or-later
Text Domain: cinemaspace-theme
*/
/* Shared tokens: adjust colors, spacing and fonts here. */
:root {
  --font-ja: "M PLUS 1p", sans-serif;
  --font-en: "Montserrat", "M PLUS 1p", sans-serif;
  --fg: #202020; --ink: #202020; --bg: #fff;
  --surface: #f5f5f5; --muted: #686868; --line: #e1e1e1;
  --border: #e1e1e1; --hover: #ededed; --radius: 8px;
  --gap: 28px; --maxw: 1440px;
  --reading-width: 860px; --movie-card-min: 220px;
  --page-pad: clamp(20px, 2.5vw, 40px); --sidebar-width: 232px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; font-family: var(--font-ja); font-size: 15px; font-weight: 400; font-style: normal; line-height: 1.85; color: var(--fg); background: var(--bg); overflow-wrap: anywhere; }
.m-plus-1p-regular { font-family: "M PLUS 1p", sans-serif; font-weight: 400; font-style: normal; }
h1, h2, h3, h4 { color: var(--fg); font-weight: 700; line-height: 1.5; letter-spacing: .035em; }
h1 { font-size: clamp(25px, 2.7vw, 38px); margin: 0 0 32px; }
h2 { font-size: clamp(21px, 2.1vw, 27px); }
h3 { font-size: 17px; }
p { margin: 0; }
strong, b { font-weight: 700; }
a { color: inherit; text-decoration: none; text-underline-offset: .25em; }
img { max-width: 100%; height: auto; vertical-align: middle; }
iframe, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button, [type="submit"] { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea {
  min-width: 0; min-height: 46px; border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 13px; background: #fff; line-height: 1.5;
}
input::placeholder, textarea::placeholder { color: #787878; opacity: 1; }
select { padding-right: 28px; }
select:not([multiple]) {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 12px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}
:focus-visible { outline: 2px solid #222; outline-offset: 4px; }
:where(.btn, .button, button:not(.slick-arrow):not([role="tab"]), input[type="submit"]) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border: 1px solid #222; border-radius: 6px;
  background: #222; color: #fff; font-weight: 500; line-height: 1.5;
  text-decoration: none; transition: background .2s, border-color .2s, color .2s;
}
:where(.btn:hover, .button:hover, button:not(.slick-arrow):not([role="tab"]):hover) { background: #444; border-color: #444; }
.button.reset { color: var(--fg); border-color: var(--line); background: #fff; }
.button.reset:hover { background: var(--hover); }
.wrap, main.tax-archive { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--page-pad); }
main.wrap, main.tax-archive { padding-top: 40px; padding-bottom: 72px; flex: 1; min-width: 0; }
.muted, .meta, .term-desc { color: var(--muted); }
time { font-family: var(--font-en); font-size: 12px; font-weight: 500; letter-spacing: .05em; }
.sr-only, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 12px; left: 12px; width: auto; height: auto; margin: 0; padding: 12px 18px; overflow: visible; clip: auto; background: #222; color: #fff; z-index: 2000; }
.badge, .chip, .chips a, .platform-chips a, .platforms li a {
  display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px;
  border: 1px solid var(--line); border-radius: 4px; background: #f5f5f5;
  color: #4b4b4b; font-size: 11px; font-weight: 400; line-height: 1.5;
}
a.badge:hover, a.chip:hover, .chips a:hover { color: #111; background: #e9e9e9; }
.badge--new, .badge.updated { color: #fff; border-color: #222; background: #222; }
.badge--updated { background: #e8e8e8; color: #333; }
.badges, .chips, .platform-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; list-style: none; padding: 0; }
.taxbits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.taxbits > span { display: flex; flex-wrap: wrap; gap: 6px; }
.grid, .movie-grid, .related-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--movie-card-min)), 1fr)); list-style: none; padding: 0; margin: 0; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: #bcbcbc; box-shadow: 0 8px 24px rgb(0 0 0 / 5%); transform: translateY(-2px); }
.card h2, .card h3 { margin: 0; font-size: 15px; line-height: 1.7; letter-spacing: .015em; }
.card-body { padding: 16px; }
.card .meta { font-size: 12px; margin-top: 7px; line-height: 1.8; }
.card .excerpt { font-size: 12px; line-height: 1.9; color: var(--muted); margin-top: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.no-content { width: 100%; padding: 40px 24px; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); }
.no-content h1, .no-content h2 { margin: 0 0 12px; }
.no-content .btn { margin-top: 20px; }
.post-list { padding: 24px 0; border-bottom: 1px solid var(--line); }
.post-list h2 { margin: 0 0 10px; font-size: 20px; }
.post-list > div { color: var(--muted); font-size: 14px; }
.post-list a:hover, .entry-content a:hover { text-decoration: underline; }
.navigation.pagination { margin-top: 40px; }
.nav-links, .page-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.page-numbers, .page-link { display: inline-flex; justify-content: center; align-items: center; min-width: 42px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; font-family: var(--font-en); font-size: 13px; }
.page-numbers.current, .post-page-numbers.current .page-link { background: #222; color: #fff; border-color: #222; }
a.page-numbers:hover { background: #eee; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.breadcrumbs a:hover { text-decoration: underline; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 28px 0; margin-top: 40px; border-block: 1px solid var(--line); font-size: 13px; }
.post-nav .next { text-align: right; }
.post-nav a:hover { text-decoration: underline; }
.entry-content, body.page main article > .content, .single-person > .content, .single-media > .content { font-size: 15px; line-height: 2.05; overflow-wrap: anywhere; }
.entry-content > * + *, body.page main article > .content > * + * { margin-top: 1.5em; }
.entry-content h2, body.page main article > .content h2 { margin-top: 2.8em; margin-bottom: 1.1em; padding-bottom: 13px; border-bottom: 1px solid var(--line); font-size: 24px; }
.entry-content h3 { margin-top: 2em; margin-bottom: 1em; font-size: 19px; }
.entry-content a, body.page main article > .content a { text-decoration: underline; }
.entry-content ul, .entry-content ol { padding-left: 1.5em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li + li { margin-top: .4em; }
.entry-content blockquote { margin-inline: 0; padding: 20px 24px; border-left: 3px solid #777; background: var(--surface); color: #555; }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption { color: var(--muted); font-size: 12px; text-align: center; margin-top: 10px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.entry-content th, .entry-content td { padding: 12px; border: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--surface); }
.entry-content pre { padding: 20px; overflow-x: auto; background: var(--surface); border-radius: 6px; }
/* Keep the page shell wide; limit only long-form reading content. */
body.page main.wrap > article, body.single-post main.wrap > article { max-width: var(--reading-width); margin-inline: auto; }
body.search .post-list > div { max-width: var(--reading-width); }

/* Optional horizontal ad areas. No markup or spacing is output when inactive. */
.ad-slot { width: 100%; max-width: 1100px; margin: 48px auto; padding-block: 20px; border-block: 1px solid var(--line); }
.ad-slot__label { margin: 0 0 16px; color: var(--muted); text-align: center; font-size: 10px; letter-spacing: .12em; }
.ad-slot__body { display: grid; gap: 24px; min-width: 0; }
.ad-slot__widget { min-width: 0; max-width: 100%; text-align: center; }
.ad-slot__widget > * { max-width: 100%; margin-inline: auto; }
.ad-slot__widget img { height: auto; }
.ad-slot__widget iframe { max-width: 100%; }
.ad-slot__title { margin: 0 0 16px; font-size: 18px; }
.filmography { margin-top: 40px; }
.filmography ul { padding-left: 1.5em; list-style: disc; }
.filters { margin: 24px 0; padding: 24px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.filters .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filters label { display: block; font-size: 12px; margin-bottom: 8px; }
.filters select { width: 100%; }
@media (max-width: 900px) {
  :root { --page-pad: 24px; --gap: 20px; }
  main.wrap, main.tax-archive { padding-top: 28px; padding-bottom: 48px; }
}
@media (max-width: 560px) {
  :root { --page-pad: 20px; --gap: 14px; }
  body { font-size: 14px; }
  input:not([type="hidden"]), select, textarea { font-size: 16px; }
  h1 { font-size: 25px; margin-bottom: 24px; }
  .grid, .movie-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-body { padding: 12px; }
  .card h2, .card h3 { font-size: 13px; }
  .entry-content { font-size: 14px; line-height: 2; }
  .entry-content h2 { font-size: 21px; }
  .entry-content h3 { font-size: 17px; }
  .filters { padding: 16px; }
  .filters .grid { grid-template-columns: 1fr 1fr; }
  .no-content { padding: 28px 18px; }
  .ad-slot { margin-block: 32px; padding-block: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
