/* 발표 슬라이드. site.css의 색 토큰을 그대로 쓰고, 크기는 화면에 맞춰 함께 커지는 단위(--u)로 잡는다.
   16:9 화면에서 --u는 화면 너비의 1%다. 더 길쭉하거나 납작한 화면에서도 글자가 넘치지 않게 작은 쪽을 고른다. */

html, body { height: 100%; overflow: hidden; }
body { line-height: 1.5; }

.deck {
  --u: min(1vw, 1.7778vh);
  position: fixed; inset: 0 0 calc(var(--u) * 4.2) 0;
}
.slide {
  position: absolute; inset: 0;
  display: none;
  padding: calc(var(--u) * 5) calc(var(--u) * 7) calc(var(--u) * 3);
  font-size: calc(var(--u) * 2.25);
  overflow: hidden;
}
.slide.is-current { display: flex; flex-direction: column; justify-content: center; gap: 1.1em; }
@media (prefers-reduced-motion: no-preference) {
  .slide.is-current { animation: arrive 220ms ease-out; }
  @keyframes arrive { from { opacity: 0; transform: translateY(0.4em); } to { opacity: 1; transform: none; } }
}

.slide h2 { font-size: 2em; font-weight: 700; letter-spacing: -0.035em; line-height: 1.2; }
.slide h3 { font-size: 1.2em; font-weight: 700; }
.slide p, .slide li { line-height: 1.55; }
.slide ul, .slide ol { padding-left: 1.2em; display: grid; gap: 0.5em; }
.slide .soft { color: var(--ink-soft); }
.slide .small { font-size: 0.78em; }
.slide .tag { font-size: 0.75em; font-weight: 600; color: var(--deep); }
.slide code { font-size: 0.88em; }
.slide strong { font-weight: 700; }

/* 표지 */
.s-title { flex-direction: row !important; align-items: center; justify-content: space-between !important; gap: 4em !important; }
.s-title h1 { font-size: 3.6em; font-weight: 700; letter-spacing: -0.045em; line-height: 1.1; }
.s-title h1 small { display: block; font-size: 0.4em; font-weight: 500; letter-spacing: -0.01em; color: var(--ink-soft); margin-bottom: 0.55em; }
.s-title .by { margin-top: 1.4em; color: var(--ink-soft); }
.qr-card { flex: 0 0 auto; text-align: center; font-size: 0.8em; color: var(--ink-soft); }
.qr-card img { width: 9.5em; height: 9.5em; display: block; background: #fff; padding: 0.5em; border-radius: 0.4em; border: 1px solid var(--rule); margin: 0 auto 0.6em; }
.qr-card b { display: block; color: var(--ink); font-family: var(--mono); font-weight: 500; font-size: 0.95em; }

/* 파트 첫 장: 막히는 순간 */
.s-stuck .tag { font-size: 0.85em; }
.s-stuck .quote { font-size: 2.6em; font-weight: 700; letter-spacing: -0.04em; line-height: 1.32; max-width: 22em; }
.s-stuck .after { color: var(--ink-soft); max-width: 34em; }
.s-stuck .alarm { color: var(--alarm); font-weight: 600; font-size: 0.8em; }

/* 크게 한 문장 */
.s-big .line { font-size: 2.3em; font-weight: 700; letter-spacing: -0.035em; line-height: 1.3; max-width: 22em; }

/* 두 단 */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5em; align-items: start; }
.cols.wide-left { grid-template-columns: 1.3fr 1fr; }

/* 코드 */
.slide .code { max-width: none; border-radius: 0.4em; }
.slide .code .cap { font-size: 0.62em; padding: 0.35em 0.8em; }
.slide .code pre { font-size: 0.72em; padding: 0.8em 1em; line-height: 1.55; overflow: hidden; }

/* 표 */
.slide table { font-size: 0.82em; }
.slide th, .slide td { padding: 0.55em 0.9em 0.55em 0; }

/* 흐름 그림(슬라이드용) */
.sflow { display: grid; gap: 0.9em; }
.sflow .row { display: flex; align-items: stretch; }
.sflow .title { font-weight: 700; font-size: 0.8em; }
.sflow .title.bad { color: var(--alarm); }
.sflow .title.good { color: var(--deep); }
.sflow .node { flex: 1 1 0; font-size: 0.8em; border-radius: 0.4em; padding: 0.6em 0.8em; border-width: 2px; }
.sflow .node b { font-size: 1.15em; }
.sflow .edge { font-size: 0.62em; min-width: 6.5em; }
.sflow .branch { display: grid; gap: 0.6em; flex: 2 1 0; }
.sflow .note { font-size: 0.75em; color: var(--ink-soft); }
.sflow .note.bad { color: var(--alarm); font-weight: 600; }

/* 습관 세 가지처럼 같은 무게의 묶음 */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5em; }
.trio > div { border-top: 0.2em solid var(--deep); padding-top: 0.7em; }
.trio h3 { margin-bottom: 0.4em; }
.trio p { font-size: 0.85em; color: var(--ink-soft); }

.slide .marked { padding: 0 0.05em; }

/* 고리 */
.slide .ring { max-width: 15em; }
.slide .ring figcaption { display: none; }

/* 아래 막대 */
.deck-bar {
  --u: min(1vw, 1.7778vh);
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--u) * 4.2); min-height: 2.6rem;
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem; color: var(--ink-soft);
  background: var(--paper);
}
.deck-bar .where { font-family: var(--mono); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-bar .progress { flex: 1; height: 3px; background: var(--rule); border-radius: 9px; overflow: hidden; }
.deck-bar .progress i { display: block; height: 100%; background: var(--deep); width: 0; transition: width 200ms ease; }
.deck-bar .count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.deck-bar .btn { padding: 0.2rem 0.65rem; }
.deck-bar .icon { padding: 0.2rem 0.5rem; }

@media (max-width: 760px) {
  .slide { padding: 1.4rem 1.2rem 1rem; font-size: 1rem; overflow-y: auto; justify-content: flex-start !important; }
  .s-title { flex-direction: column !important; align-items: flex-start; gap: 2em !important; }
  .s-title h1 { font-size: 2.4em; }
  .cols, .cols.wide-left, .trio { grid-template-columns: 1fr; gap: 1.2em; }
  .s-stuck .quote, .s-big .line { font-size: 1.8em; }
  .sflow .row { flex-direction: column; }
  .sflow .edge::after { content: '▼'; }
  .deck-bar .where, .deck-bar .hide-narrow { display: none; }
  .slide .code pre { overflow-x: auto; }
}
