:root {
  --bg: #f6f1e8;
  --ink: #1c2740;
  --muted: #5c6775;
  --card: #fffdf9;
  --line: rgba(28, 39, 64, 0.1);
  --coral: #e86a45;
  --shadow: 0 16px 40px rgba(28, 39, 64, 0.08);
  --chrome: 4.75rem;
  color-scheme: light;
}

[data-tone="1"] { --tone: #2f6396; }
[data-tone="2"] { --tone: #e86a45; }
[data-tone="3"] { --tone: #1d7f86; }
[data-tone="4"] { --tone: #2f7d4a; }
[data-tone="5"] { --tone: #8a4d86; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body { overflow: hidden; }

button, a { font: inherit; }

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 5px;
  background: rgba(28, 39, 64, 0.08);
  z-index: 30;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--coral);
}

.deck {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.slide {
  display: none;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: clamp(1.4rem, 3.2vh, 2.6rem) clamp(1.1rem, 4vw, 4.2rem) calc(var(--chrome) + env(safe-area-inset-bottom, 0px) + 2rem);
}

.slide.is-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.slide-close .close-copy,
.slide-close .close-meta {
  flex: none;
}

.slide-head, .kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-weight: 700;
}

.num, .steps span, .skills span {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 2.7rem;
  height: 2.7rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.03em;
}

h1, h2, h3, p { margin: 0; }

h1 {
  font-size: clamp(2rem, 3.6vw, 3.45rem);
  line-height: 1.28;
  font-weight: 900;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.85rem);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.lead, .theme {
  margin-top: 0.75rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--muted);
}

.pill, .closing-line {
  margin-top: auto;
  align-self: flex-start;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf9;
  font-weight: 700;
}

.slide-hero .pill { margin-top: 1.4rem; }

.hero-grid, .session-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
  min-height: 0;
}

.hero-grid { flex: 1; }

.session-body {
  flex: 1;
  margin-top: 1rem;
}

.figure {
  margin: 0;
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(58vh, 520px);
  object-fit: contain;
}

.steps, .skills, .road, .audiences, .safety {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.steps-3, .steps {
  display: grid;
  gap: 0.8rem;
}

.steps-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 1;
  align-content: center;
}

.steps li, .skills li, .road article, .audiences article, .safety article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.steps li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 700;
}

.steps-3 li {
  align-items: flex-start;
  flex-direction: column;
  min-height: 11rem;
  padding: 1.15rem;
}

.steps-3 h3 {
  margin: 0.8rem 0 0.35rem;
  font-size: 1.45rem;
}

.steps-3 p { color: var(--muted); font-weight: 500; line-height: 1.55; }

.steps span { background: var(--tone, var(--ink)); }

.road {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  flex: 1;
  align-content: center;
  margin-top: 1.1rem;
}

.road article {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
  padding: 1rem 0.9rem 1rem;
  border-top: 7px solid var(--tone);
}

.round {
  color: var(--tone);
  font-weight: 900;
  font-size: 0.92rem;
}

.road h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }

.road p { color: var(--muted); font-weight: 700; line-height: 1.45; }

.chip {
  margin-top: auto;
  align-self: flex-start;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 14%, white);
  color: var(--tone);
  font-size: 0.86rem;
}

.goal, .note {
  margin-top: 0.85rem;
  font-weight: 700;
}

.goal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.goal span {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--tone, var(--coral));
  color: #fff;
  font-size: 0.86rem;
}

.note { color: var(--muted); }

.closing-line {
  margin-top: 1rem;
  background: transparent;
  color: var(--ink);
  padding: 0.2rem 0 0;
  border-radius: 0;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.skills {
  display: grid;
  gap: 0.65rem;
  flex: 1;
  align-content: center;
}

.skills li {
  display: grid;
  grid-template-columns: auto minmax(9rem, 16rem) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.75rem 1rem;
}

.skills h3 { font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
.skills p { color: var(--muted); font-weight: 700; }

.audiences, .safety {
  display: grid;
  gap: 0.8rem;
  flex: 1;
  align-content: center;
}

.audiences { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.safety { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.audiences article, .safety article { padding: 1.15rem 1.2rem; }

.audiences h3, .safety h3 {
  margin-bottom: 0.45rem;
  font-size: 1.3rem;
}

.audiences p, .safety p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.audiences article:nth-child(1) { border-top: 7px solid #2f6396; }
.audiences article:nth-child(2) { border-top: 7px solid #e86a45; }
.audiences article:nth-child(3) { border-top: 7px solid #1d7f86; }
.safety article:nth-child(1) { border-top: 7px solid #2f6396; }
.safety article:nth-child(2) { border-top: 7px solid #e86a45; }
.safety article:nth-child(3) { border-top: 7px solid #2f7d4a; }
.safety article:nth-child(4) { border-top: 7px solid #8a4d86; }

.slide-close {
  justify-content: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(232, 106, 69, 0.28), transparent 28%),
    radial-gradient(circle at 88% 80%, rgba(47, 99, 150, 0.35), transparent 32%),
    #17233a;
  color: #f7f3ec;
}

.slide-close .num { background: #f7f3ec; color: #17233a; }
.slide-close h1 { font-size: clamp(1.7rem, 2.8vw, 2.7rem); }
.slide-close .lead, .slide-close .sub { color: rgba(247, 243, 236, 0.78); }
.slide-close .pill { margin-top: 0.85rem; background: var(--coral); align-self: flex-start; }
.slide-close .sub { margin-top: 0.55rem; font-weight: 700; }

.close-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px);
  gap: clamp(0.8rem, 2vw, 1.4rem);
  align-items: center;
  width: 100%;
  margin-top: 1rem;
}

.session-time {
  margin: 1rem 0 0;
  font-weight: 900;
}

.dates {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.dates li {
  padding: 0.55rem 0.4rem 0.65rem;
  border-radius: 14px;
  background: rgba(247, 243, 236, 0.1);
  font-weight: 900;
}

.dates span {
  display: block;
  margin-bottom: 0.15rem;
  color: #f0a080;
  font-size: 0.75rem;
}

.qr-card {
  margin: 0;
  padding: 0.7rem 0.7rem 0.8rem;
  border-radius: 22px;
  background: #fff;
  color: #17233a;
  text-align: center;
}

.qr-card img {
  display: block;
  width: 100%;
  height: auto;
}

.qr-card figcaption {
  margin-top: 0.45rem;
  font-weight: 900;
}

.qr-card p {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-all;
}

.chrome {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--chrome);
  padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(246, 241, 232, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand, .hint {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.brand {
  min-width: 0;
  line-height: 1.35;
}

.hint { justify-self: end; }

.pager { display: flex; align-items: center; gap: 0.45rem; }

.pager button {
  min-width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.pager button:disabled {
  opacity: 0.35;
  cursor: default;
}

#jump {
  min-width: 6.2rem;
  padding: 0 0.9rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.jump-panel {
  position: fixed;
  left: 50%;
  bottom: calc(var(--chrome) + 0.4rem);
  transform: translateX(-50%);
  z-index: 25;
  width: min(26rem, calc(100vw - 1.5rem));
  max-height: min(68vh, 32rem);
  overflow: auto;
  padding: 0.4rem;
  background: #fffdf9;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(23, 35, 58, 0.2);
}

.jump-panel a {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.55rem;
  padding: 0.4rem 0.7rem;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.jump-panel a span { color: var(--muted); }
.jump-panel a.is-current { background: var(--ink); color: #fff; }
.jump-panel a.is-current span { color: rgba(255, 255, 255, 0.7); }

@media (max-width: 980px) {
  .deck { position: relative; }
  .slide {
    padding-bottom: calc(var(--chrome) + env(safe-area-inset-bottom, 0px) + 3.5rem);
  }
  .slide.is-active {
    display: block;
    position: absolute;
    inset: 0;
    height: auto;
  }
  .hero-grid, .session-body, .steps-3, .audiences { grid-template-columns: 1fr; }
  .slide-close { justify-content: flex-start; }
  .close-meta { grid-template-columns: minmax(0, 1fr) 128px; align-items: start; }
  .dates { grid-template-columns: 1fr; }
  .dates li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.7rem;
  }
  .dates span { margin: 0; }
  .qr-card p { font-size: 0.58rem; }
  .road { grid-template-columns: 1fr; gap: 0.55rem; }
  .steps-3 li {
    flex-direction: row;
    align-items: center;
    min-height: 0;
    padding: 0.8rem 0.95rem;
  }
  .steps-3 h3 { margin: 0 0 0.15rem; font-size: 1.15rem; }
  .road article { padding: 0.75rem 0.85rem; }
  .session-body { flex: none; }
  .goal { margin-top: 0.85rem; }
  .figure img { max-height: 180px; }
  .hint { display: none; }
  .chrome { grid-template-columns: 1fr auto; }
  .brand { font-size: 0.82rem; }
}

@media (max-width: 720px) {
  .skills li { grid-template-columns: auto 1fr; }
  .skills p { grid-column: 2; }
  .safety { grid-template-columns: 1fr; }
  h1 { font-size: 2.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
