/* 메통디 이슈 페이지.
   팔레트는 랜딩 본페이지(landing.src.html)의 토큰을 그대로 가져왔다.
   한글 웹폰트는 본페이지에 쓰인 글자만 서브셋돼 있어 이슈 본문의 새 글자가
   깨진다. 그래서 여기서는 시스템 폰트 스택을 쓴다. */
:root {
  --bg: #EDE4D4;
  --card-bg: #FBF6EB;
  --card-hover: #FFFDF6;
  --inset: #F4EDE0;
  --ink-block: #2B241B;
  --accent-blue: #56708F;
  --accent-taupe: #8A7A5E;
  --live: #4E8A5C;
  --text-main: #241E15;
  --text-muted: #7C6F5C;
  --border: #DCCFB8;
  --border-hover: #C3B092;
  --c-hot: #B4453C;
  --c-info: #56708F;
  --c-price: #A8802E;
  --c-warn: #C1732F;
  --c-talk: #7A5F92;
  --c-notice: #4E8A5C;
  --mono: ui-monospace, Consolas, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-main);
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* ── 상단 ── */
.top {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.brand { font-weight: 800; font-size: 16px; letter-spacing: -.01em; color: var(--text-main); text-decoration: none; }
.top nav { display: flex; gap: 16px; font-size: 13.5px; }
.top nav a { color: var(--text-muted); text-decoration: none; }
.top nav a:hover { color: var(--text-main); }
.top nav a.on { color: var(--text-main); font-weight: 700; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.crumb { font-size: 12.5px; color: var(--text-muted); font-family: var(--mono); }
.crumb a { color: var(--text-muted); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb b { color: var(--text-main); font-weight: 600; }

h1 { margin: 0; font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; text-wrap: balance; }
.lede { margin: 0; color: var(--text-muted); font-size: 15px; max-width: 62ch; }

.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--live); font-weight: 700; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex-shrink: 0; }

/* ── 게임 탭 / 허브 ── */
.gtabs { display: flex; gap: 7px; flex-wrap: wrap; }
.gtab {
  font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card-bg); color: var(--text-muted); text-decoration: none;
}
.gtab:hover { border-color: var(--border-hover); color: var(--text-main); }
.gtab.on { background: var(--ink-block); border-color: var(--ink-block); color: #F4EDE0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.gcard {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 9px;
  text-decoration: none; color: inherit; transition: border-color .15s, background .15s;
}
.gcard:hover { background: var(--card-hover); border-color: var(--border-hover); }
.gcard .g-name { font-weight: 800; font-size: 15.5px; letter-spacing: -.01em; }
.gcard .g-meta { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.gcard .g-head { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }

/* ── 슬라이드 배너 ── */
.slider { display: flex; flex-direction: column; gap: 10px; }
.slider-head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.slider-head .h { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.slider-head .m { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.more {
  margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--accent-blue);
  text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px;
}
.more::after { content: "→"; transition: transform .18s; }
.more:hover { text-decoration: underline; }
.more:hover::after { transform: translateX(3px); }

.track {
  display: flex; gap: 10px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: 2px; scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.slide {
  scroll-snap-align: start; flex: 0 0 100%; min-width: 0;
  background: var(--card-bg); border: 1px solid var(--border); border-left-width: 4px;
  border-radius: 10px; padding: 14px 16px 15px;
  display: flex; flex-direction: column; gap: 7px;
}
.slide.hot { border-left-color: var(--c-hot); }
.slide.info { border-left-color: var(--c-info); }
.slide.price { border-left-color: var(--c-price); }
.slide.warn { border-left-color: var(--c-warn); }
.slide.talk { border-left-color: var(--c-talk); }
.slide.notice { border-left-color: var(--c-notice); }
.slide .chip { align-self: flex-start; }
.slide h3 { margin: 0; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; line-height: 1.35; text-wrap: balance; }
.slide p { margin: 0; font-size: 13.5px; line-height: 1.6; }

.slider-foot { display: flex; align-items: center; gap: 10px; }
.arrow {
  appearance: none; background: var(--card-bg); border: 1px solid var(--border);
  color: var(--text-muted); width: 28px; height: 28px; border-radius: 999px;
  font: inherit; font-size: 13px; line-height: 1; cursor: pointer; flex-shrink: 0;
}
.arrow:hover { border-color: var(--border-hover); color: var(--text-main); background: var(--card-hover); }
.dots { display: flex; gap: 6px; flex: 1; align-items: center; }
.dots button {
  appearance: none; border: none; padding: 0; width: 7px; height: 7px;
  border-radius: 999px; background: var(--border-hover); cursor: pointer;
  flex-shrink: 0; overflow: hidden;
  transition: width .3s cubic-bezier(.4, 0, .2, 1), background .2s;
}
.dots button:hover { background: var(--accent-taupe); }
.dots button[aria-current="true"] { width: 34px; background: var(--border); }
.dots .fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--ink-block); }
/* 남은 시간이 채워진다. 배너에 마우스를 올리면 그 자리에서 멈춘다. */
.dots button[aria-current="true"] .fill { animation: fill var(--dur, 6s) linear forwards; }
.slider:hover .dots button[aria-current="true"] .fill,
.slider:focus-within .dots button[aria-current="true"] .fill,
.slider.is-paused .dots button[aria-current="true"] .fill { animation-play-state: paused; }
@keyframes fill { from { width: 0; } to { width: 100%; } }

.pause {
  appearance: none; background: transparent; border: none; color: var(--text-muted);
  font: inherit; font-size: 11px; font-family: var(--mono); cursor: pointer;
  padding: 4px 6px; border-radius: 5px; flex-shrink: 0;
}
.pause:hover { color: var(--text-main); background: var(--inset); }
.hint { font-size: 11px; color: var(--text-muted); opacity: 0; transition: opacity .2s; flex-shrink: 0; }
.slider:hover .hint { opacity: 1; }

/* ── 날짜 · 회차 ── */
.day { display: flex; flex-direction: column; gap: 10px; }
.day-head { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--border); padding-bottom: 7px; }
.day-head .d { font-family: var(--mono); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.day-head .rel { font-size: 12px; color: var(--text-muted); }

.ed { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; scroll-margin-top: 16px; }
.ed-head { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-muted); }
.ed-head .badge {
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--text-main);
  background: var(--inset); border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 9px; font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.ed-head .anchor { color: var(--border-hover); text-decoration: none; font-family: var(--mono); opacity: 0; }
.ed:hover .ed-head .anchor { opacity: 1; }
.ed-head::after { content: ""; flex: 1; height: 1px; background: var(--border); order: 9; }

.item { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.item[open] { background: var(--card-hover); border-color: var(--border-hover); }
.item > summary {
  list-style: none; cursor: pointer; padding: 11px 14px;
  display: flex; align-items: flex-start; gap: 10px;
  font-weight: 600; font-size: 14.5px; line-height: 1.45;
}
.item > summary::-webkit-details-marker { display: none; }
.item > summary::after {
  content: "+"; margin-left: auto; font-family: var(--mono);
  color: var(--text-muted); font-weight: 400; flex-shrink: 0; line-height: 1.45;
}
.item[open] > summary::after { content: "\2212"; }
.item .body { padding: 0 14px 14px 44px; font-size: 14.5px; display: flex; flex-direction: column; gap: 11px; }
.item .body p { margin: 0; }
.item .body strong { font-weight: 700; }

/* ── 칩 ── */
.chip {
  flex-shrink: 0; font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px; color: #FBF6EB; margin-top: 2px; white-space: nowrap;
}
.chip.hot { background: var(--c-hot); }
.chip.info { background: var(--c-info); }
.chip.price { background: var(--c-price); }
.chip.warn { background: var(--c-warn); }
.chip.talk { background: var(--c-talk); }
.chip.notice { background: var(--c-notice); }

/* ── 아카이브 · CTA · 푸터 ── */
.archive { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.archive .t { color: var(--text-muted); font-weight: 700; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.archive a {
  color: var(--accent-blue); text-decoration: none; font-family: var(--mono);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 11px; background: var(--card-bg);
}
.archive a:hover { border-color: var(--border-hover); }
.back { margin: 0; font-size: 13.5px; }
.back a { color: var(--accent-blue); }

.cta {
  background: var(--ink-block); color: #F4EDE0; border-radius: 14px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 8px;
}
.cta .h { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.cta .s { font-size: 13.5px; opacity: .78; }
.cta .btn {
  align-self: flex-start; background: #F4EDE0; color: #2B241B; font-weight: 800;
  font-size: 13.5px; padding: 8px 16px; border-radius: 7px; text-decoration: none; margin-top: 4px;
}

.foot {
  max-width: 760px; margin: 0 auto; padding: 22px 20px 46px;
  border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted);
  display: flex; flex-direction: column; gap: 6px;
}
.foot p { margin: 0; }
.foot .muted { opacity: .8; }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-blue); outline-offset: 2px; border-radius: 4px;
}

@media (max-width: 620px) {
  main { padding: 20px 14px 32px; }
  h1 { font-size: 23px; }
  .item .body { padding-left: 14px; }
  .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .dots button[aria-current="true"] .fill { width: 100%; }
}
