/* 🔰 はじめての しつもん(tut.js)。入口の 上に 全面で 出る。色と 字は common.css の もの */
.tut {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: linear-gradient(175deg, var(--cold-soft), var(--acc-soft) 60%, var(--gold-soft));
  color: var(--ink);
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}
.tut-prog {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 0;
}
.tut-prog .track {
  flex: 1;
  display: flex;
  gap: 4px;
}
.tut-prog .seg {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--card) 40%, transparent);
}
.tut-prog .seg.now {
  background: color-mix(in srgb, var(--card) 75%, transparent);
}
.tut-prog .seg.done {
  background: var(--card);
}
.tut-prog .cnt {
  font: 700 12.5px var(--head);
  color: var(--sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tut-scr {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px 12px;
  max-width: 560px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}
.tut .big {
  font-size: 46px;
  line-height: 1;
  text-align: center;
  margin-top: 10px;
}
.tut .q {
  font: 700 21px/1.6 var(--head);
  text-align: center;
  text-wrap: balance;
  margin: 0;
}
.tut .hint {
  color: var(--sub);
  font-size: 14.5px;
  text-align: center;
  margin: 0;
  text-wrap: balance;
}
.tut .need {
  align-self: center;
  font: 700 13.5px var(--head);
  color: var(--teal);
  background: var(--card);
  border-radius: 99px;
  padding: 5px 14px;
  text-align: center;
}
.tut-btns {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tut .tb {
  position: relative;
  font: 700 16px var(--head);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 14px;
  color: #fff;
  background: var(--teal);
}
:root[data-theme="dark"] .tut .tb {
  color: #16302d;
}
.tut .tb.soft,
:root[data-theme="dark"] .tut .tb.soft {
  background: color-mix(in srgb, var(--card) 72%, transparent);
  color: var(--sub);
  border-color: var(--line);
}
.tut .tb.was {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.tut .tb.was::before {
  content: "✓ ";
}
.tut .tb.dim {
  opacity: 0.55;
}
.tut-name {
  font: 700 18px var(--head);
  text-align: center;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
}
.tut-pv {
  text-align: center;
  font-size: 13.5px;
  color: var(--sub);
  min-height: 1.6em;
}
.tut-nav {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px 16px;
  max-width: 560px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}
.tut-nav .nv {
  font: 700 14px var(--head);
  color: var(--sub);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  border: 1.5px solid var(--line);
  border-radius: 99px;
  padding: 8px 18px;
}
.tut-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 6px;
}
.tut-chips .chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font: 700 11.5px var(--head);
  color: var(--sub);
  background: none;
  padding: 0;
  min-width: 0;
}
.tut-chips .chip i {
  font-style: normal;
  font-size: 24px;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--card) 72%, transparent);
  border: 2px solid var(--line);
}
.tut-chips .chip.on i {
  border-color: var(--teal);
  background: var(--card);
}
.tut-chips .chip.on {
  color: var(--ink);
}
/* 入口に ただよう もくもくさん と 🔰 の ふきだし */
.tut-fly {
  position: fixed;
  z-index: 8;
  right: max(18px, env(safe-area-inset-right));
  top: 52vh; /* アプリの 四角の 下の 空いた ところ(日付や 四角に 重ならない) */
  width: 124px;
  height: 150px;
  pointer-events: none;
  animation: tut-fuyo 6.5s ease-in-out infinite;
}
.tut-fly .ys-box {
  position: absolute;
  inset: 40px 0 0 0;
  pointer-events: none;
}
.tut-fly .bub {
  position: absolute;
  left: -6px;
  top: 0;
  z-index: 2;
  pointer-events: auto;
  font-size: 24px;
  line-height: 1;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 8px 11px;
  box-shadow: 0 4px 10px rgba(58, 50, 45, 0.18);
  animation: tut-tw 2.4s ease-in-out infinite;
}
@keyframes tut-fuyo {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}
@keyframes tut-tw {
  0%,
  100% {
    scale: 1;
  }
  50% {
    scale: 1.08;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tut-fly,
  .tut-fly .bub {
    animation: none;
  }
}
/* おえた あとの 案内(1 回 だけ) */
.tut-after {
  position: fixed;
  z-index: 8;
  left: 16px;
  right: 16px;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  max-width: 528px;
  margin: 0 auto;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 12px 40px 12px 14px;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}
.tut-after a {
  color: var(--teal);
  font-weight: 700;
}
.tut-after .x {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: none;
  color: var(--sub);
  font-size: 18px;
}
.tut-fly .bx {
  position: absolute;
  right: -4px;
  top: 8px;
  z-index: 3;
  pointer-events: auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--line);
  color: var(--sub);
  font-size: 16px;
  line-height: 1;
}
.tut-x {
  position: absolute;
  right: max(10px, env(safe-area-inset-right));
  top: calc(40px + env(safe-area-inset-top, 0px));
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}
.tut-x {
  background: color-mix(in srgb, var(--card) 72%, transparent);
  border: 1.5px solid var(--line);
  color: var(--sub);
  font-size: 18px;
  line-height: 1;
}
.tut-ys {
  position: relative;
  width: 150px;
  height: 130px;
  margin: 6px auto 0;
}
