/* 주말24 — Apple 공식 사이트·스토어 톤 */
:root {
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --text: #1D1D1F;
  --text2: #6E6E73;
  --text3: #86868B;
  --line: #E8E8ED;
  --line2: #D2D2D7;
  --link: #0066CC;
  --btn: #0071E3;
  --orange: #B64400;
  --blue: #0066CC;
  --purple: #8944AB;
  --radius: 18px;
  --gutter: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
img { display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.dot { margin: 0 6px; color: var(--text3); }
.muted { color: var(--text2); }

/* 상단 내비 */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(245, 245, 247, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.nav-in { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); height: 48px; display: flex; align-items: center; gap: 24px; }
.logo { font-weight: 700; font-size: 19px; color: var(--text); letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--orange); font-weight: 700; }
.nav nav { display: flex; gap: 18px; margin-left: auto; font-size: 13px; }
.nav nav a { color: var(--text); opacity: 0.8; }
.nav nav a:hover { opacity: 1; text-decoration: none; }

/* 첫 화면 머리 */
.hero { padding: 36px 0 20px; }
.hero h1 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; }
.hero h1 span { color: var(--text2); }
.hero-s h1 { font-size: 34px; }
.when { margin: 14px 0 0; font-size: 15px; color: var(--text2); }
.weather { margin: 6px 0 0; font-size: 15px; color: var(--text2); }
.weather .hint { display: block; color: var(--orange); margin-top: 2px; }

/* 조작 */
.controls { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 8px; }
.seg { display: flex; background: #E3E3E8; border-radius: 10px; padding: 2px; width: 100%; max-width: 420px; }
.seg button { flex: 1; white-space: nowrap; border: 0; background: transparent; padding: 7px 0; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); font-weight: 600; }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; border: 0; background: #fff; border-radius: 980px; padding: 7px 15px; font-size: 14px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.pill[aria-pressed="true"] { background: var(--text); color: #fff; box-shadow: none; }
.pill-o[aria-pressed="true"] { background: var(--blue); }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 0 14px; box-shadow: inset 0 0 0 1px var(--line); max-width: 420px; }
.search svg { width: 17px; height: 17px; color: var(--text3); flex: none; }
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; padding: 11px 0; width: 100%; color: var(--text); }

/* 섹션 */
.sec { margin-top: 32px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.sec-head a { font-size: 14px; white-space: nowrap; }
.empty-sec { margin: 0; background: var(--card); border-radius: var(--radius); padding: 20px; color: var(--text2); font-size: 15px; }
.no-result { text-align: center; color: var(--text2); padding: 40px 0; }

/* 목록 */
.list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.row + .row { border-top: 1px solid var(--line); }
.row.extra, .row[hidden] { display: none; }
.filtering .row.extra:not([hidden]) { display: block; }
.row a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: inherit; }
.row a:hover { text-decoration: none; background: #FAFAFC; }
.row .poster { width: 60px; height: 80px; flex: none; border-radius: 8px; overflow: hidden; background: var(--line); }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.rb { min-width: 0; flex: 1; }
.rt { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; line-height: 1.3; }
.type { color: var(--text2); font-weight: 500; }
.bd { font-weight: 600; }
.bd-orange { color: var(--orange); }
.bd-blue { color: var(--blue); }
.bd-purple { color: var(--purple); }
.bd-gray { color: var(--text2); }
.bd-dark { color: var(--text); }
.title { margin-top: 3px; font-size: 16px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin-top: 3px; font-size: 13px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .dot { margin: 0 4px; }
.sub { margin-top: 4px; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-k { color: var(--orange); font-weight: 600; margin-right: 4px; }
.chev { width: 8px; height: 14px; color: var(--line2); flex: none; }

/* 이번 주가 마지막 */
.cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.card { flex: none; width: 168px; scroll-snap-align: start; background: var(--card); border-radius: var(--radius); overflow: hidden; color: inherit; }
.card:hover { text-decoration: none; }
.card .poster { width: 100%; aspect-ratio: 3 / 4; background: var(--line); }
.cb { padding: 12px 14px 14px; }
.card .meta.strong { color: var(--orange); font-weight: 600; }
.card-popular .meta.strong { color: var(--text); }
.card-opening .meta.strong { color: var(--blue); }
.sec-row { margin-top: 28px; }
.sec-row + .sec-row { margin-top: 24px; }

/* 임시 포스터 */
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 6px; overflow: hidden; }
.ph-tag { font-size: 7px; font-weight: 700; letter-spacing: 0.12em; opacity: 0.8; }
.ph-title { font-size: 10px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card .ph, .ph-big { padding: 14px; }
.card .ph-tag, .ph-big .ph-tag { font-size: 10px; }
.card .ph-title { font-size: 17px; }
.ph-big .ph-title { font-size: 26px; -webkit-line-clamp: 6; }

/* 안내 페이지 */
.detail { padding-top: 28px; padding-bottom: 20px; }
.d-layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "side" "body"; gap: 16px; }
.d-head { grid-area: head; }
.d-head h1 { margin: 6px 0 0; font-size: 32px; line-height: 1.15; letter-spacing: -0.03em; }
.d-head p { margin: 8px 0 0; color: var(--text2); font-size: 16px; }
.d-side { grid-area: side; display: flex; flex-direction: column; gap: 16px; }
.d-body { grid-area: body; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.d-poster { width: 220px; align-self: center; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); }
.d-poster img { object-fit: contain; background: #1D1D1F; }
.box-admit .admit-head { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.box-admit .btn { margin-top: 8px; }
.kv dt { white-space: nowrap; }
.box-admit .kv { grid-template-columns: 72px minmax(0, 1fr); }
.box { background: var(--card); border-radius: var(--radius); padding: 20px; }
.box h2 { margin: 0 0 12px; font-size: 19px; letter-spacing: -0.02em; }
.box p { margin: 0 0 10px; font-size: 15px; line-height: 1.65; }
.box p:last-child { margin-bottom: 0; }
.box dl { margin: 0; }
.kv { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 9px 0; font-size: 14px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv dt { color: var(--text2); }
.kv dd { margin: 0; white-space: pre-line; }
.links { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.links li { padding: 8px 0; display: flex; justify-content: space-between; gap: 12px; }
.links li + li { border-top: 1px solid var(--line); }
.links span { color: var(--text3); white-space: nowrap; font-size: 12px; }
.chips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: block; background: var(--bg); border-radius: 980px; padding: 6px 12px; font-size: 14px; color: var(--text); }
.note { color: var(--text2); font-size: 13px !important; }
.btn { display: inline-block; background: var(--btn); color: #fff; border-radius: 980px; padding: 9px 18px; font-size: 14px; }
.btn:hover { text-decoration: none; background: #0077ED; }
.ai-note { color: var(--text3); font-size: 12px; margin: 4px 4px 0; }

/* 바닥글 */
.foot { margin-top: 56px; border-top: 1px solid var(--line2); padding: 20px 0 40px; font-size: 12px; color: var(--text2); }
.foot p { margin: 0 0 8px; }
.foot-fam span { color: var(--orange); font-weight: 600; margin-right: 6px; }

@media (min-width: 768px) {
  :root { --gutter: 24px; }
  .hero { padding: 56px 0 24px; }
  .hero h1 { font-size: 56px; }
  .controls { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .seg { width: auto; }
  .seg button { padding: 7px 18px; }
  .pills { margin: 0; padding: 0; }
  .search { flex: 1; min-width: 240px; }
  .card { width: 200px; }
  .d-layout { grid-template-columns: 240px minmax(0, 1fr); grid-template-areas: "head head" "side body"; column-gap: 28px; }
  .d-poster { width: 100%; }
}
@media (min-width: 1024px) {
  /* 두 칸 신문식 배치: 한 칸의 목록이 끝나면 바로 아래에 다음 목록이 붙어 빈 공간이 생기지 않는다 */
  .secs { columns: 2; column-gap: 24px; margin-top: 32px; }
  .secs > .sec { break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 32px; }
  .secs-one { columns: auto; }
  .d-layout { grid-template-columns: 340px minmax(0, 1fr); grid-template-areas: "side head" "side body"; grid-template-rows: auto 1fr; column-gap: 40px; row-gap: 20px; align-items: start; }
  .d-head h1 { font-size: 44px; }
  .d-head p { font-size: 20px; }
}
