/* styles-quiz.css — クイズ画面とリビール画面 */

/* === Swipe Card === */
.sc-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 880px;
  gap: 32px;
}

.sc-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 280px;
}
.sc-progress-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-50);
  display: flex;
  gap: 6px;
}
.sc-pcurrent { color: var(--ink-100); font-weight: 500; }
.sc-progress-bar {
  width: 100%;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.sc-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--metal-grad);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 12px var(--accent-a);
}

.sc-question {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 300;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--ink-100);
  max-width: 600px;
  line-height: 1.4;
  animation: questionIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes questionIn {
  from { opacity: 0; transform: translateY(8px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* カード本体 */
.sc-card {
  position: relative;
  width: min(680px, 90vw);
  height: 280px;
  border-radius: 24px;
  background: var(--glass-strong);
  backdrop-filter: blur(40px) saturate(140%);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  border: 0.5px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  cursor: grab;
  user-select: none;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 -1px 0 rgba(0,0,0,0.2) inset,
    0 30px 80px rgba(0,0,0,0.5),
    0 12px 30px rgba(0,0,0,0.3);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
  animation: cardIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.sc-card:active { cursor: grabbing; }
.sc-card.sc-drag { transition: none; }
.sc-card.sc-exit { transition: transform 0.5s cubic-bezier(0.4, 0, 0.6, 1); pointer-events: none; }

/* カード上の液体メタルの輝き */
.sc-card::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: var(--metal-grad);
  background-size: 200% 200%;
  opacity: 0.10;
  filter: blur(40px);
  animation: shimmer 8s linear infinite;
  pointer-events: none;
  z-index: -1;
}

.sc-half {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  position: relative;
  transition: background 0.3s;
}
.sc-half-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sc-half-b .sc-half-header { flex-direction: row-reverse; }
.sc-half-swipe {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-30);
}
.sc-half-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-50);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0.5px solid var(--line);
  background: var(--glass);
  flex-shrink: 0;
}
.sc-half-text {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-100);
  letter-spacing: 0.01em;
}
.sc-half-a { text-align: left; }
.sc-half-b { text-align: right; }
.sc-half-b .sc-half-header { margin-left: auto; }

.sc-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
  gap: 12px;
}
.sc-divider-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(180deg, transparent, var(--line), transparent);
}
.sc-divider-or {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-50);
  background: var(--metal-grad);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: shimmer 4s linear infinite;
}

/* スワイプ方向のオーバーレイ（強調表示） */
.sc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 3;
}
.sc-overlay-a {
  justify-content: flex-start;
  background: linear-gradient(90deg, color-mix(in oklch, var(--accent-a) 30%, transparent), transparent 60%);
  padding-left: 32px;
}
.sc-overlay-b {
  justify-content: flex-end;
  background: linear-gradient(270deg, color-mix(in oklch, var(--accent-b) 30%, transparent), transparent 60%);
  padding-right: 32px;
}
.sc-overlay-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-100);
  padding: 12px 20px;
  border: 1px solid currentColor;
  border-radius: 100px;
}
.sc-overlay-a .sc-overlay-label { color: var(--accent-a); }
.sc-overlay-b .sc-overlay-label { color: var(--accent-b); }

/* 操作ボタン */
.sc-controls {
  display: flex;
  align-items: center;
  gap: 32px;
}
.sc-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0.5px solid var(--line);
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  color: var(--ink-90);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.sc-btn:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 30px var(--accent-a);
  border-color: var(--accent-a);
}
.sc-btn-b:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 30px var(--accent-b); border-color: var(--accent-b); }
.sc-btn-arrow { font-size: 16px; }
.sc-hint {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-50);
}

/* === Reveal === */
.rv-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 32px 32px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1;
}

/* 霧（複数レイヤーで奥行き） */
.rv-fog {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  z-index: 20;
  filter: blur(40px);
  transition: opacity 1.4s ease, transform 3s ease;
  background-size: 200% 200%;
}
.rv-fog-1 {
  background: radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.5), transparent 60%),
              radial-gradient(ellipse at 70% 60%, rgba(180,200,255,0.4), transparent 55%);
  opacity: 1;
  animation: fogDrift 12s ease-in-out infinite;
}
.rv-fog-2 {
  background: radial-gradient(ellipse at 60% 30%, rgba(220,210,255,0.5), transparent 65%),
              radial-gradient(ellipse at 20% 80%, rgba(140,200,220,0.35), transparent 60%);
  opacity: 0.95;
  animation: fogDrift 18s ease-in-out infinite reverse;
}
.rv-fog-3 {
  background: radial-gradient(ellipse at 50% 50%, rgba(80,90,120,0.6), transparent 70%);
  opacity: 0.8;
  mix-blend-mode: multiply;
}
.theme-porcelain .rv-fog-3 { background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.7), transparent 70%); mix-blend-mode: normal; }
@keyframes fogDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, -3%) scale(1.1); }
}
.rv-phase-1 .rv-fog-1 { opacity: 0.5; transform: scale(1.15) translate(2%, -2%); }
.rv-phase-1 .rv-fog-2 { opacity: 0.4; }
.rv-phase-1 .rv-fog-3 { opacity: 0.3; }
.rv-phase-2 .rv-fog-1, .rv-phase-3 .rv-fog-1, .rv-phase-4 .rv-fog-1 { opacity: 0.18; transform: scale(1.3); }
.rv-phase-2 .rv-fog-2, .rv-phase-3 .rv-fog-2, .rv-phase-4 .rv-fog-2 { opacity: 0.10; transform: scale(1.2); }
.rv-phase-2 .rv-fog-3, .rv-phase-3 .rv-fog-3, .rv-phase-4 .rv-fog-3 { opacity: 0; }

/* 計算中表示 */
.rv-calc {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  z-index: 25;
  transition: opacity 0.6s, transform 0.6s;
}
.rv-phase-1 .rv-calc, .rv-phase-2 .rv-calc, .rv-phase-3 .rv-calc, .rv-phase-4 .rv-calc {
  opacity: 0;
  transform: translate(-50%, -60%) scale(1.2);
  pointer-events: none;
}
.rv-calc-ring {
  position: relative;
  width: 80px; height: 80px;
}
.rv-calc-ring-inner, .rv-calc-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 0.5px solid transparent;
  border-top-color: var(--accent-a);
  border-right-color: var(--accent-b);
  animation: spin 2s linear infinite;
}
.rv-calc-ring-outer {
  inset: -12px;
  border-top-color: var(--accent-c);
  border-left-color: var(--accent-a);
  animation-duration: 3s;
  animation-direction: reverse;
}
.rv-calc-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-90);
  text-transform: uppercase;
}
.rv-calc-dots { display: inline-flex; gap: 3px; }
.rv-calc-dots i {
  width: 3px; height: 3px;
  background: var(--ink-90);
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite;
}
.rv-calc-dots i:nth-child(2) { animation-delay: 0.2s; }
.rv-calc-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* タイトル */
.rv-title {
  text-align: center;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rv-phase-2 .rv-title, .rv-phase-3 .rv-title, .rv-phase-4 .rv-title {
  opacity: 1;
  transform: translateY(0);
}
.rv-title-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-70);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.rv-title-h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin: 0;
  background: var(--metal-grad);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: shimmer 6s linear infinite;
}
.rv-title-w {
  display: inline-block;
  animation: wordIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.rv-phase-2 .rv-title-w, .rv-phase-3 .rv-title-w, .rv-phase-4 .rv-title-w { animation-name: wordIn; }
@keyframes wordIn {
  from { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* 商品カード */
.rv-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1100px;
  margin-bottom: 32px;
}
@media (max-width: 900px) {
  .rv-products { grid-template-columns: 1fr; }
}
.rv-card {
  position: relative;
  border-radius: 20px;
  background: var(--glass-strong);
  backdrop-filter: blur(30px) saturate(140%);
  -webkit-backdrop-filter: blur(30px) saturate(140%);
  border: 0.5px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
  transition-delay: calc(var(--i) * 0.18s);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 20px 60px rgba(0,0,0,0.4);
}
.rv-phase-3 .rv-card, .rv-phase-4 .rv-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.rv-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 30px 80px rgba(0,0,0,0.5),
    0 0 60px color-mix(in oklch, var(--accent-a) 25%, transparent);
}
.rv-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--metal-grad);
  opacity: 0.06;
  filter: blur(20px);
  z-index: -1;
}
.rv-card-rank {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-50);
  align-self: flex-start;
}
.rv-card-visual {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.rv-card-info { display: flex; flex-direction: column; gap: 8px; }
.rv-card-cat {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-50);
  text-transform: uppercase;
}
.rv-card-name {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-100);
  line-height: 1.3;
}
.rv-card-blurb {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-70);
}
.rv-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 0.5px solid var(--line);
}
.rv-card-price {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--ink-90);
  font-weight: 500;
}
.rv-card-cta {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-100);
  background: transparent;
  border: 0.5px solid var(--line);
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s;
}
.rv-card-cta:hover {
  border-color: var(--accent-a);
  color: var(--accent-a);
  box-shadow: 0 0 20px color-mix(in oklch, var(--accent-a) 30%, transparent);
}

/* もっと見る */
.rv-more {
  width: 100%;
  max-width: 1100px;
  margin-bottom: 32px;
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
}
.rv-phase-4 .rv-more { opacity: 1; }
.rv-more-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-50);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.rv-more-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rv-more-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 0.5px solid var(--line);
  border-radius: 100px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  font-size: 12px;
  color: var(--ink-90);
  transition: all 0.25s;
}
.rv-more-chip:hover {
  border-color: var(--accent-a);
  background: var(--glass-strong);
}
.rv-more-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--metal-grad);
}
.rv-more-price {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-50);
}

/* リセット */
.rv-reset {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 0.5px solid var(--line);
  border-radius: 100px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  color: var(--ink-90);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 24px;
  opacity: 0;
  transition-delay: 0.5s;
}
.rv-phase-4 .rv-reset { opacity: 1; }
.rv-reset:hover {
  border-color: var(--accent-a);
  transform: translateY(-2px);
}
.rv-reset-arrow { font-size: 14px; }

/* === ProductVisual === */
.pv-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pv-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.4));
  animation: pvFloat 5s ease-in-out infinite;
}
@keyframes pvFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}
.pv-cat {
  position: absolute;
  bottom: 0; right: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-30);
  text-transform: uppercase;
}
