/* ===========================================================================
   ServicesTourismDx — Film player, stage controls, compare switch,
   and deliverable preview cards (T1–T4).
   =========================================================================== */

/* ---------------------------------------------------------------------------
   課題 film: container, stage, narrative line, controls
   --------------------------------------------------------------------------- */
.td-fig {
  margin: 0 auto;
  max-width: 640px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.td-fig__say {
  margin: 0 0 8px;
  padding: 16px 20px;
  background: var(--td-surface);
  border-left: 4px solid var(--td-blue);
  border-radius: 4px;
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--td-navy);
  min-height: 4em;
  display: flex;
  align-items: center;
}

.td-fig__stage {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.td-film__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.td-film__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.td-go,
.td-film__btn {
  position: relative;
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--td-line-strong);
  background: var(--td-white);
  color: var(--td-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  overflow: hidden;
}

.td-go:focus-visible,
.td-film__btn:focus-visible {
  outline: 3px solid var(--td-blue);
  outline-offset: 2px;
}

.td-go.is-on,
.td-film__btn.is-on {
  background: var(--td-navy);
  color: var(--td-white);
  border-color: var(--td-navy);
}

.td-film__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--td-amber);
  flex: none;
}

.td-film__prog {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--td-amber);
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
}

/* Bar runs only while auto-play is on; its animationend is the film's one clock */
.td-fig.is-live .td-film__btn.is-on .td-film__prog {
  animation: td-prog 3.8s linear both;
}

.td-fig.is-held .td-film__prog {
  animation-play-state: paused;
}

@keyframes td-prog {
  from { transform: scaleX(0); }
  to { transform: none; }
}

.td-play {
  position: relative;
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--td-line-strong);
  background: var(--td-white);
  color: var(--td-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.td-play:focus-visible {
  outline: 3px solid var(--td-blue);
  outline-offset: 2px;
}

.td-play__txt {
  font-size: 14px;
  font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Compare switch: 導入効果
   --------------------------------------------------------------------------- */
.td-cmp {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 24px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.td-cmp__nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.td-cmp__btn {
  position: relative;
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 700;
  min-height: 44px;
  min-width: 120px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: var(--td-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.td-cmp__btn:focus-visible {
  outline: 3px solid var(--td-amber);
  outline-offset: 2px;
}

.td-cmp__btn.is-on {
  background: var(--td-white);
  color: var(--td-navy);
  border-color: var(--td-white);
}

.td-cmp__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--td-amber);
  flex: none;
}

/* ---------------------------------------------------------------------------
   Deliverable Cards: T1–T4
   --------------------------------------------------------------------------- */
.td-tcard {
  overflow: hidden;
  border: 1px solid var(--td-line-strong);
  border-radius: 12px;
  background: var(--td-white);
  box-shadow: 0 4px 16px rgba(16, 42, 67, 0.05);
  margin-top: 20px;
}

.td-tcard__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--td-line);
  background: var(--td-surface);
}

.td-tcard__kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--td-muted);
  white-space: nowrap;
}

.td-tcard__title {
  margin: 0 0 12px;
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--td-navy);
}

.td-tcard__bd {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.td-chip {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--td-blue-pale) 25%, var(--td-white));
  color: var(--td-blue-dark);
}

.td-tcard__cap {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--td-muted);
  font-style: normal;
}

/* Card Mock Rows */
.td-mock {
  border: 1px solid var(--td-line);
  border-radius: 6px;
  background: var(--td-surface-tint);
  padding: 12px;
}

.td-mock--dl {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.td-mock__row {
  display: grid;
  grid-template-columns: 24px 1fr 60px;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--td-line);
  font-size: 13px;
  color: var(--td-ink);
}

.td-mock__row:last-child {
  border-bottom: none;
}

.td-mock__row--head {
  font-weight: 700;
  color: var(--td-muted);
  border-bottom: 2px solid var(--td-line);
}

.td-mock__row b {
  font-weight: 700;
  color: var(--td-navy);
}

.td-mock__line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--td-ink);
}

.td-mock__line dt {
  width: 4.5em;
  flex: none;
  font-weight: 700;
  color: var(--td-muted);
  margin: 0;
}

.td-mock__line dd {
  margin: 0;
  flex: 1;
  color: var(--td-navy);
  font-weight: 500;
}

.td-mock__bar-wrap {
  display: flex;
  align-items: center;
  width: 100%;
}

.td-mock__bar {
  width: 70%;
  height: 8px;
  background: var(--td-blue);
  border-radius: 4px;
}

.td-cv {
  display: flex;
  align-items: center;
  gap: 14px;
}

.td-cv__ph {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--td-line);
  flex: none;
}

.td-cv__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.td-cv__bar {
  height: 8px;
  width: 60%;
  background: var(--td-blue);
  border-radius: 4px;
}

.td-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.td-tags span {
  display: inline-block;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--td-white);
  border: 1px solid var(--td-line);
  color: var(--td-navy);
}

.td-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.td-toc li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--td-ink);
  padding: 4px 0;
  border-bottom: 1px solid var(--td-line);
}

.td-toc li:last-child {
  border-bottom: none;
}

.td-toc b {
  font-weight: 700;
  color: var(--td-blue);
}

.td-toc__bar {
  display: inline-block;
  height: 8px;
  width: 50%;
  background: var(--td-line);
  border-radius: 4px;
}

/* <=600px: five step buttons share one row; pause/play sits on its own row */
@media (max-width: 600px) {
  .td-film__btns {
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
  }
  .td-film__btn {
    flex: 1 1 0;
    min-width: 44px;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
  }
  .td-play {
    margin-left: auto;
  }
}
