@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;700;900&family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* LicenceHub Stream — TikTok型 3問体験 */

.stream {
  --bg: #F6F5F3;
  --bg-card: #FCFBF9;
  --text: #1A1A1A;
  --text-sub: #4A4A4A;
  --text-muted: #8A8A8A;
  --border: #E2E1DE;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
  --accent: #1F9E8F;
  --accent-dim: color-mix(in srgb, var(--accent) 8%, white);
  --correct: #10B981;
  --wrong: #EF4444;
  --radius: 14px;
  --font-display: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;

  position: fixed;
  inset: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.stream *, .stream *::before, .stream *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.stream button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* --- subtle noise --- */
.stream::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
  z-index: 0;
}

/* --- header --- */
.stream-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(246, 245, 243, 0.88);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.stream-header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}

.stream-header__cta {
  font-size: 13px;
  color: var(--text-sub);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 200ms ease;
}

.stream-header__cta:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* --- progress dots --- */
.stream-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 8px;
  z-index: 5;
  position: relative;
}

.stream-progress__dot {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 250ms ease, transform 250ms ease;
}

.stream-progress__dot--done { background: var(--accent); }
.stream-progress__dot--active {
  background: var(--accent);
  transform: scaleY(1.4);
}

/* --- viewport --- */
.stream-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8px 20px 32px;
  overflow: hidden;
  z-index: 1;
}

/* --- card base --- */
.card,
.system-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 300ms ease, border-color 300ms ease;
}

.card--feedback {
  background: var(--bg-card);
}

.card--correct { border-color: color-mix(in srgb, var(--correct) 40%, var(--border)); }
.card--wrong { border-color: color-mix(in srgb, var(--wrong) 30%, var(--border)); }

/* --- question content --- */
.card__chip {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.card__prompt {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

/* --- choices --- */
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choices--ox {
  flex-direction: row;
  gap: 14px;
}

.choices--ox .choice {
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 24px 8px;
  font-size: 16px;
}

.choices--ox .choice__index {
  font-size: 36px;
  font-weight: 800;
  width: auto;
  height: auto;
  background: none;
  color: var(--accent);
  border-radius: 0;
  display: block;
  margin-bottom: 4px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  transition: all 160ms ease;
}

.choice:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.choice:active {
  transform: translateY(0);
}

.choice__index {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--bg);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.choice__text { flex: 1; }

.card__hint {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* --- feedback state --- */
.feedback {
  display: flex;
  flex-direction: column;
  animation: fadeUp 280ms cubic-bezier(.2,.7,.2,1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.feedback__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
}

.card--correct .feedback__label { color: var(--correct); }
.card--wrong .feedback__label { color: var(--wrong); }

.feedback__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  color: white;
}

.card--correct .feedback__icon { background: var(--correct); }
.card--wrong .feedback__icon { background: var(--wrong); }

.feedback__answer {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.feedback__answer-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.feedback__answer-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.feedback__answer-index {
  font-weight: 700;
  color: var(--accent);
}

.feedback__explanation {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-sub);
  margin-bottom: 24px;
}

.feedback__next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  background: var(--text);
  color: white;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 160ms ease, background 160ms ease;
}

.feedback__next:hover { transform: translateY(-1px); background: #000; }
.feedback__next-arrow { font-size: 14px; }

.feedback__swipe-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* --- system card (CTA) --- */
.system-card {
  max-width: 480px;
  padding: 32px 24px 28px;
  text-align: center;
  animation: scaleIn 360ms cubic-bezier(.2,.7,.2,1);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.system-card__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 8px;
}

.system-card__score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.system-card__score-num {
  font-size: 64px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.system-card__score-denom {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-muted);
}

.system-card__score-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 6px;
}

.system-card__comment {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 24px;
  line-height: 1.7;
}

.system-card__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg);
  border-radius: 12px;
  padding: 18px 12px;
  margin-bottom: 20px;
}

.system-card__meta-item { flex: 1; }

.system-card__meta-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.system-card__meta-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}

.system-card__meta-value small {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  margin-left: 2px;
}

.system-card__meta-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

.system-card__pitch {
  margin-bottom: 22px;
  text-align: left;
  background: linear-gradient(180deg, var(--accent-dim), transparent);
  border-radius: 12px;
  padding: 18px 18px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
}

.system-card__pitch-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 8px;
}

.system-card__pitch-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
}

.system-card__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  background: var(--text);
  color: white;
  border: 1px solid var(--text);
  cursor: not-allowed;
  opacity: 0.75;
  transition: opacity 200ms ease;
}

.cta-btn--android {
  background: white;
  color: var(--text);
  border-color: var(--border);
  opacity: 0.55;
}

.cta-btn__store {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}

.cta-btn__status {
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
}

.cta-btn--android .cta-btn__status {
  background: var(--bg);
  color: var(--text-muted);
}

.system-card__note {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.system-card__sub {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.system-card__link,
.system-card__retry {
  font-size: 13px;
  color: var(--text-sub);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
}

.system-card__link:hover,
.system-card__retry:hover {
  color: var(--accent);
}

/* --- transitions --- */
.slide-up-enter-active,
.slide-up-leave-active {
  transition: transform 320ms cubic-bezier(.2,.7,.2,1), opacity 280ms ease;
}
.slide-up-enter-from { transform: translateY(40px); opacity: 0; }
.slide-up-leave-to { transform: translateY(-40px); opacity: 0; }

.fade-enter-active,
.fade-leave-active {
  transition: opacity 200ms ease;
}
.fade-enter-from,
.fade-leave-to { opacity: 0; }

/* --- responsive --- */
@media (max-width: 480px) {
  .stream-header { padding: 12px 16px; }
  .stream-viewport { padding: 6px 14px 24px; }
  .card, .system-card { padding: 24px 18px; }
  .card__prompt { font-size: 16px; line-height: 1.6; margin-bottom: 22px; }
  .choices--ox .choice { padding: 20px 8px; }
  .choices--ox .choice__index { font-size: 32px; }
  .system-card__score-num { font-size: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .stream *, .stream *::before, .stream *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
