/* 잇츠무비 스타일 — 모바일 우선 */
:root {
  --bg: #f6f6f8; --card: #ffffff; --ink: #16181d; --ink2: #5b6170; --ink3: #8a909c;
  --line: #e7e8ec; --accent: #e5484d; --accent-soft: #fdecec; --head: #14161c; --head-ink: #f2f3f5;
  --up: #e5484d; --down: #3e7bfa; --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 28, .05), 0 4px 16px rgba(20, 22, 28, .04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --card: #181b21; --ink: #eceef2; --ink2: #a9afbb; --ink3: #7c8390;
    --line: #262a32; --accent-soft: #3a1d20; --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Malgun Gothic", "맑은 고딕", helvetica, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 16px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* 상단 */
.top { background: var(--head); color: var(--head-ink); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 16px; height: 56px; }
.logo { font-weight: 800; font-size: 19px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.logo-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 11px; }
.top-nav { display: none; gap: 4px; margin-left: 12px; }
.top-nav a { padding: 6px 12px; border-radius: 999px; color: #c4c8d0; font-size: 15px; }
.top-nav a[aria-current] { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.search-btn { margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: #dfe2e8; }

/* 하단 탭 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 11px; color: var(--ink3); }
.tabbar a[aria-current] { color: var(--accent); font-weight: 700; }
@media (min-width: 860px) {
  .top-nav { display: flex; }
  .tabbar { display: none; }
  body { padding-bottom: 0; }
}

/* 공통 */
.hero { padding: 28px 2px 8px; }
.hero h1 { font-size: 30px; line-height: 1.25; margin: 4px 0 8px; letter-spacing: -.03em; }
.hero p { margin: 0; color: var(--ink2); }
.eyebrow { color: var(--accent) !important; font-weight: 700; font-size: 14px; }
.page-title { font-size: 25px; line-height: 1.3; letter-spacing: -.02em; margin: 6px 2px 16px; }
.page-title small, .sec-head small { font-size: 14px; font-weight: 500; color: var(--ink3); }
.lead { color: var(--ink2); margin: -6px 2px 16px; }
.crumbs { font-size: 13px; color: var(--ink3); padding: 14px 2px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs i { font-style: normal; }
.sec { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 16px; margin: 14px 0; border: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sec-head h2 { font-size: 18px; margin: 0; letter-spacing: -.02em; }
.more { font-size: 14px; color: var(--ink3); white-space: nowrap; }
.empty { color: var(--ink3); margin: 6px 0; font-size: 15px; }
.note { color: var(--ink3); font-size: 13px; margin: 8px 2px; }
.summary { margin: 0 0 12px; padding: 12px 14px; background: var(--accent-soft); border-radius: 10px; font-size: 15px; line-height: 1.7; }

/* 순위 */
.ranks { list-style: none; margin: 0; padding: 0; }
.ranks li + li { border-top: 1px solid var(--line); }
.ranks a { display: grid; grid-template-columns: 30px 40px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; }
.rk { font-size: 20px; font-weight: 800; text-align: center; color: var(--ink2); font-variant-numeric: tabular-nums; }
.ranks li:nth-child(-n+3) .rk { color: var(--accent); }
.rk-main { min-width: 0; display: flex; flex-direction: column; }
.rk-main b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-main small, .rk-side small { color: var(--ink3); font-size: 12.5px; }
.rk-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.rk-side b { font-size: 15px; }
.chg { font-size: 11.5px; font-weight: 700; }
.chg.up { color: var(--up); } .chg.down { color: var(--down); } .chg.same { color: var(--ink3); }
.chg.new { color: #fff; background: var(--accent); border-radius: 4px; padding: 0 5px; }

/* 탭 버튼 */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; padding: 9px 0; border-radius: 9px; font: inherit; font-size: 15px; color: var(--ink2); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--head); color: #fff; font-weight: 700; }
.filter { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.filter button { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink2); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }

/* OTT·목록 */
.otts { list-style: none; margin: 0; padding: 0; }
.otts li + li { border-top: 1px solid var(--line); }
.otts li > a, .otts li > div { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.od { flex: none; width: 46px; text-align: center; display: flex; flex-direction: column; line-height: 1.2; }
.od b { font-size: 16px; font-variant-numeric: tabular-nums; }
.od small { color: var(--ink3); font-size: 12px; }
.ot { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ot b { font-size: 16px; }
.ot small { color: var(--ink3); font-size: 13px; }
.plat { flex: none; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--line); color: var(--ink2); }
.plat-netflix { background: #e50914; color: #fff; }
.plat-tving { background: #ff153c; color: #fff; }
.plat-coupang { background: #1b1f3b; color: #fff; }
.plat-wavve { background: #1351f9; color: #fff; }
.plat-disney { background: #0b1f5c; color: #fff; }
.plat-watcha { background: #ff0558; color: #fff; }
.plat-apple { background: #111; color: #fff; }
.plat-theater { background: #f2a516; color: #1b1300; }
@media (prefers-color-scheme: dark) { .plat-coupang, .plat-apple, .plat-disney { box-shadow: inset 0 0 0 1px #3a3f4a; } }

/* 글 카드 */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li + li { border-top: 1px solid var(--line); }
.posts a { display: flex; gap: 12px; padding: 12px 0; align-items: flex-start; }
.posts img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; background: var(--line); }
.posts span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.posts b { font-size: 16px; line-height: 1.45; }
.posts small { color: var(--ink3); font-size: 13px; }
.posts .desc { color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.posts.compact a { padding: 9px 0; }
.posts.compact b { font-size: 15px; font-weight: 600; }

.chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { display: inline-block; font-size: 13.5px; padding: 6px 11px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink2); }
details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.pager { display: flex; justify-content: space-between; margin: 10px 2px 20px; font-size: 15px; }
.pager a { color: var(--accent); font-weight: 600; }

/* 영화 상세 */
.movie-head { display: flex; gap: 16px; align-items: flex-end; padding: 6px 2px 4px; }
.poster { width: 120px; border-radius: 10px; box-shadow: var(--shadow); }
.movie-head h1 { font-size: 28px; line-height: 1.25; margin: 0; letter-spacing: -.03em; }
.movie-head .en { margin: 4px 0 0; color: var(--ink3); font-size: 14px; }
.movie-head .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.movie-head .tags span { font-size: 12.5px; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink2); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stats small { display: block; color: var(--ink3); font-size: 12.5px; }
.stats b { font-size: 19px; letter-spacing: -.02em; }
.plot { margin: 0; line-height: 1.8; }
.facts { display: grid; grid-template-columns: 84px 1fr; gap: 8px 12px; margin: 0; font-size: 15px; }
.facts dt { color: var(--ink3); }
.facts dd { margin: 0; }
.cast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cast li { background: var(--bg); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; }
.cast small { color: var(--ink3); font-size: 12.5px; }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); }
.chart .area { fill: var(--accent); opacity: .12; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .dot { fill: var(--accent); }
.chart .lbl { font-size: 12px; font-weight: 700; fill: var(--ink); }
.chart .tick { font-size: 11px; fill: var(--ink3); }
.chart figcaption { font-size: 12.5px; color: var(--ink3); margin-top: 4px; }
.faq-list details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq-list details:first-child { border-top: 0; }
.faq-list p { margin: 2px 0 8px; color: var(--ink2); }
.movie-link { display: block; margin: 20px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--head); color: #fff; font-weight: 700; }

/* 글 본문 (원고 HTML 클래스 지원) */
.post header { padding: 8px 2px 4px; }
.post h1 { font-size: 26px; line-height: 1.38; letter-spacing: -.03em; margin: 6px 0 8px; }
.post-meta { color: var(--ink3); font-size: 14px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px 18px; margin-top: 14px; font-size: 17px; line-height: 1.85; }
.post-body h2 { font-size: 20px; line-height: 1.45; margin: 34px 0 6px; padding-left: 10px; border-left: 4px solid var(--accent); }
.post-body h3 { font-size: 18px; margin: 26px 0 4px; }
.post-body p { margin: 16px 0; }
.post-body strong { color: var(--ink); }
.post-body img { border-radius: 10px; display: block; margin: 18px auto; }
.post-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.post-body th { background: var(--bg); width: 30%; font-weight: 700; }
.post-body .faq { background: var(--bg); border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
.post-body .faq p { margin: 4px 0; }
.post-body .faq .q { font-weight: 700; }
.post-body .emph { color: var(--accent); font-weight: 700; }
.post-body .emph-blue { color: #2f6fe4; font-weight: 700; }
.post-body mark, .post-body .mark { background: linear-gradient(transparent 55%, #ffe58a 55%); color: inherit; padding: 0 2px; }
@media (prefers-color-scheme: dark) { .post-body mark, .post-body .mark { background: linear-gradient(transparent 55%, #6b5a12 55%); } .post-body .emph-blue { color: #79a6ff; } }
.post-body blockquote { margin: 18px 0; padding: 10px 16px; border-left: 3px solid var(--line); color: var(--ink2); }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 2px; }
.post-tags span { font-size: 13.5px; color: var(--ink2); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }

/* 고정 페이지 */
.prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px 16px; }
.prose h2 { font-size: 17px; margin: 22px 0 4px; }
.prose a { color: var(--accent); }
.mail { font-size: 18px; font-weight: 700; }

/* 검색 */
.search input { width: 100%; font: inherit; font-size: 17px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
#results { margin-top: 12px; background: var(--card); border-radius: var(--radius); padding: 0 16px; }

/* 하단 */
.foot { margin-top: 28px; padding: 22px 0 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink3); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; color: var(--ink2); }
.foot p { margin: 4px 0; }
.sample-flag { position: fixed; top: 64px; right: 10px; z-index: 40; background: #f2a516; color: #1b1300; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 6px; }

/* 포스터 썸네일 */
.thumb { width: 40px; height: 57px; object-fit: cover; border-radius: 6px; background: var(--line); display: block; }
.thumb.none { background: var(--bg); border: 1px dashed var(--line); }
.poster { width: 116px; aspect-ratio: 2 / 3; object-fit: cover; flex: none; }

/* 고정 페이지 */
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; }
.prose th { background: var(--bg); width: 34%; }
.prose ul { padding-left: 20px; }
.prose li { margin: 4px 0; }
.mailbox { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; }
.mailbox img { display: block; max-width: 100%; height: auto; background: #fff; border-radius: 6px; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn { font: inherit; font-size: 14px; font-weight: 700; border: 0; border-radius: 9px; padding: 9px 14px; background: var(--accent); color: #fff; cursor: pointer; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.faq-list summary { list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before { content: "Q. "; color: var(--accent); }
.faq-list p::before { content: "A. "; font-weight: 700; color: var(--ink3); }
