/* ===== 初めて来た人向けのトップページ =====
   学習データが無い初回だけ表示。アプリ（.app--home）は hidden にする。 */

.app--home[hidden],
.welcome[hidden] {
  display: none !important;
}

.welcome {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 28px 16px 48px;
  color: #e2e8f0;
}

.welcome__hero {
  text-align: center;
  padding: 18px 0 8px;
}

.welcome__kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.welcome__title {
  margin: 0;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.welcome__lead {
  margin: 16px auto 0;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.7;
  color: #94a3b8;
}

.welcome__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.welcome__start {
  border: none;
  border-radius: 16px;
  padding: 16px 26px;
  background: #2563eb;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 0 #1e40af, 0 16px 34px rgba(37, 99, 235, 0.35);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.welcome__start:hover {
  transform: translateY(-1px);
}

.welcome__start:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 #1e40af;
}

.welcome__login {
  color: #93c5fd;
  font-size: 13px;
}

/* ミニ体験 */
.welcome-demo {
  margin: 34px auto 0;
  max-width: 560px;
}

.welcome-demo__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
}

.welcome-demo__dots {
  display: inline-flex;
  gap: 5px;
}

.welcome-demo__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
}

.welcome-demo__dots i.on {
  background: #22c55e;
}

.welcome-demo__card {
  padding: 22px 18px 16px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(96, 165, 250, 0.35);
  text-align: center;
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.35);
}

.welcome-demo__card--miss {
  animation: welcome-shake 0.25s ease;
}

@keyframes welcome-shake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-5px); }
  60% { transform: translateX(5px); }
}

.welcome-demo__ja {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
}

.welcome-demo__preview {
  min-height: 34px;
  margin: 10px 0 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.welcome-demo__preview span {
  display: inline-block;
  margin: 0 2px;
  text-shadow: 0 0 12px currentColor;
}

.welcome-demo__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(96, 165, 250, 0.5);
  background: #0b1220;
  color: #e2e8f0;
  font-size: 18px;
  text-align: center;
  outline: none;
}

.welcome-demo__input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.welcome-demo__msg {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.welcome-demo__msg--ok {
  color: #4ade80;
  font-weight: 700;
}

.welcome-demo__msg--reveal {
  color: #facc15;
}

.welcome-demo__after {
  text-align: center;
  margin-top: 14px;
}

/* 3ステップ */
.welcome-steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.welcome-steps li {
  position: relative;
  padding: 16px 16px 16px 52px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
}

.welcome-steps li b {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  color: #e2e8f0;
}

.welcome-steps__num {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* 学べるもの */
.welcome-content {
  margin-top: 40px;
}

.welcome-content h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
}

.welcome-content__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.welcome-content__grid li {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.55;
}

.welcome-content__grid li b {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
  color: #e2e8f0;
}

.welcome-content__more {
  margin: 12px 0 0;
  font-size: 14px;
}

.welcome-content__more a {
  color: #93c5fd;
  font-weight: 700;
}

.welcome-trust {
  margin-top: 28px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-size: 13px;
  color: #a7f3d0;
}

.welcome-trust p {
  margin: 0;
}

.welcome__bottom {
  margin-top: 34px;
  text-align: center;
}

.welcome__note {
  margin: 12px auto 0;
  max-width: 460px;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
}

/* ---- ライトテーマ ---- */
html[data-theme="light"] .welcome { color: #0f172a; }
html[data-theme="light"] .welcome__kicker { background: #dbeafe; color: #1d4ed8; }
html[data-theme="light"] .welcome__lead { color: #475569; }
html[data-theme="light"] .welcome__login { color: #1d4ed8; }
html[data-theme="light"] .welcome-demo__label { color: #64748b; }
html[data-theme="light"] .welcome-demo__card { background: #fff; border-color: #bfdbfe; box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08); }
html[data-theme="light"] .welcome-demo__input { background: #f8fafc; color: #0f172a; border-color: #93c5fd; }
html[data-theme="light"] .welcome-demo__msg { color: #64748b; }
html[data-theme="light"] .welcome-demo__msg--ok { color: #15803d; }
html[data-theme="light"] .welcome-demo__msg--reveal { color: #b45309; }
html[data-theme="light"] .welcome-steps li,
html[data-theme="light"] .welcome-content__grid li { background: #fff; border-color: #e2e8f0; color: #475569; }
html[data-theme="light"] .welcome-steps li b,
html[data-theme="light"] .welcome-content__grid li b { color: #0f172a; }
html[data-theme="light"] .welcome-content__more a { color: #1d4ed8; }
html[data-theme="light"] .welcome-trust { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
html[data-theme="light"] .welcome__note { color: #64748b; }
