@charset "UTF-8";

:root {
  --bg: #f9f9f9;
  --panel: #fdfdfb;
  --ink: #3e312b;
  --ink-soft: #6d605a;
  --muted: #887870;
  --accent: #c5a059;
  --line: #e0d8d0;
  --selected-ink: #3e312b;
  --enji: #5d000f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  font-family: "Shippori Mincho", serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.review-container {
  position: relative;
  background: var(--panel);
  padding: 40px 30px 32px;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  max-width: 640px;
  margin: 40px auto;
  border-top: 4px solid var(--accent);
}

/* === 言語スイッチャー === */
.lang-switch {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 2px;
  font-family: "Yu Gothic", sans-serif;
  font-size: 0.74em;
  letter-spacing: 0.08em;
  z-index: 5;
}

.lang-switch button {
  background: none;
  border: none;
  padding: 5px 9px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 2px;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  transition: color 0.2s, background-color 0.2s;
}

.lang-switch button:hover {
  color: var(--ink);
}

.lang-switch button.is-active {
  color: var(--ink);
  font-weight: 700;
  background: rgba(197, 160, 89, 0.14);
}

.brand-mark {
  text-align: center;
  font-size: 0.95em;
  color: var(--muted);
  letter-spacing: 0.3em;
  margin-bottom: 6px;
}

.powered-by {
  text-align: center;
  font-size: 0.72em;
  letter-spacing: 0.25em;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: -2px;
  font-family: "Yu Gothic", sans-serif;
}

.powered-by span {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.3em;
  margin-left: 4px;
}

.review-title {
  text-align: center;
  margin-bottom: 14px;
  font-size: 1.7em;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.review-desc {
  text-align: center;
  font-size: 1.0em;
  color: var(--muted);
  margin-bottom: 30px;
  line-height: 1.9;
}

.time-note {
  font-size: 0.85em;
  display: block;
  margin-top: 6px;
}

/* === ステッパー === */
.stepper {
  margin-bottom: 28px;
}

.stepper-label {
  text-align: center;
  font-size: 0.9em;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.stepper-total {
  color: var(--muted);
}

.progress-track {
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 33.3%;
  background: linear-gradient(90deg, var(--accent), #b88f47);
  transition: width 0.4s ease;
}

/* === ステップ表示切替 === */
.step {
  display: none;
  animation: stepIn 0.35s ease;
}

.step.is-active {
  display: block;
}

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

.step-title {
  font-size: 1.25em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0 0 8px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title::before,
.step-title::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--accent);
  margin: 0 12px;
}

.step-help {
  text-align: center;
  font-size: 0.9em;
  color: var(--muted);
  margin: 0 0 24px;
  font-family: "Yu Gothic", sans-serif;
}

/* === 選択肢グリッド === */
.radio-grid,
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.radio-grid label,
.check-grid label {
  display: inline-flex;
  align-items: center;
  padding: 14px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.95em;
  transition: all 0.25s ease;
  color: var(--ink-soft);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  line-height: 1.4;
  min-height: 52px;
}

.radio-grid label:hover,
.check-grid label:hover {
  border-color: var(--accent);
  background-color: #fcf9f2;
}

.radio-grid input,
.check-grid input {
  accent-color: var(--accent);
  margin-right: 10px;
  transform: scale(1.1);
  flex-shrink: 0;
}

.radio-grid label.is-selected,
.check-grid label.is-selected {
  background-color: var(--selected-ink);
  border-color: var(--selected-ink);
  color: #fff;
  box-shadow: 0 6px 16px rgba(62, 49, 43, 0.28);
}

.radio-grid label.is-selected span,
.check-grid label.is-selected span {
  color: #fff;
  font-weight: 600;
}

/* === ナビゲーション === */
.step-header {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 110px;
  gap: 18px;
  align-items: center;
  margin-bottom: 6px;
}

.step-header .back-btn { justify-self: start; }
.step-header .next-btn { justify-self: end; }
.step-header .nav-btn {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95em;
  white-space: nowrap;
}
.step-header .step-title { margin: 0; }

.nav-btn {
  padding: 16px;
  border-radius: 4px;
  border: none;
  font-family: "Shippori Mincho", serif;
  font-size: 1.05em;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.back-btn {
  background: #fff;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.back-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.next-btn {
  background: linear-gradient(135deg, #5d4037 0%, #3e312b 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(62, 49, 43, 0.25);
}

.next-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(62, 49, 43, 0.35);
}

.next-btn:disabled {
  background: #c9c1bb;
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
}

/* === ローディングオーバーレイ === */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(253, 253, 251, 0.94);
  backdrop-filter: blur(2px);
  z-index: 9999;
  animation: fadeIn 0.25s ease;
}

.loading-overlay.is-active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.spinner {
  width: 64px;
  height: 64px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 28px;
  font-family: "Shippori Mincho", serif;
  font-size: 1.1em;
  color: var(--ink);
  letter-spacing: 0.18em;
}

/* === 結果エリア === */
.result-area {
  display: none;
  background: #fcfbf9;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  animation: stepIn 0.5s ease;
}

.result-title {
  text-align: center;
  font-size: 1.1em;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.6;
  color: var(--ink);
}

.result-sub {
  display: block;
  font-size: 0.78em;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}

.result-text {
  width: 100%;
  height: 200px;
  padding: 16px;
  border: 1px solid #d4c8c0;
  background: #fff;
  border-radius: 2px;
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 18px;
  font-family: "Yu Gothic", sans-serif;
  color: #333;
  resize: vertical;
}

.action-btn {
  display: block;
  width: 100%;
  padding: 16px;
  text-align: center;
  border-radius: 4px;
  margin-top: 12px;
  border: none;
  font-family: "Shippori Mincho", serif;
  font-weight: 600;
  font-size: 1.05em;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.15s;
}

.google-btn {
  background: linear-gradient(135deg, #5d4037 0%, #3e312b 100%);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 6px 18px rgba(62, 49, 43, 0.28);
  line-height: 1.45;
}

.google-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(62, 49, 43, 0.36);
}

.reset-btn {
  background: #fff;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  font-size: 0.95em;
}

.reset-btn:hover {
  background: #faf6ef;
}

/* === スマホ === */
@media screen and (max-width: 600px) {
  .review-container {
    padding: 28px 18px 24px;
    margin: 18px auto;
    border-radius: 6px;
  }

  .review-title {
    font-size: 1.4em;
  }

  .step-title {
    font-size: 1.1em;
  }

  .step-title::before,
  .step-title::after {
    width: 10px;
    margin: 0 8px;
  }

  .radio-grid,
  .check-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .radio-grid label,
  .check-grid label {
    padding: 12px 10px;
    font-size: 0.88em;
    min-height: 50px;
  }

  .step-header {
    grid-template-columns: 78px minmax(0, 1fr) 78px;
    gap: 8px;
  }
  .step-header .nav-btn {
    padding: 10px 6px;
    font-size: 0.8em;
  }
}
