/* ============================================
   Gem Type — 16タイプ宝石診断
   Stylesheet
   ============================================ */

:root {
  --bg: #080c22;
  --bg-card: rgba(8, 14, 48, 0.82);
  --ink: #e8e4d8;
  --ink-sub: #8888a8;
  --ink-faint: #5a5a7a;
  --gold: #c8923a;
  --gold-light: #e8c870;
  --gold-bg: rgba(212, 168, 67, 0.14);
  --gold-deep: #d4a843;
  --line: rgba(255, 255, 255, 0.1);
  --pink-soft: rgba(212, 168, 67, 0.06);
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================
   Background Gems
   ============================================ */
.bg-gems {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bg-gem {
  position: absolute;
}

/* 暗背景での宝石をより鮮明に */
.bg-gem polygon {
  fill-opacity: 0.22;
  stroke-opacity: 0.45;
}
.bg-gem line {
  stroke-opacity: 0.28;
}

/* ゴールド六角形 — 右上 */
.bg-gem--1 {
  width: 160px;
  height: 160px;
  top: -30px;
  right: -40px;
  animation: bgFloat1 9s ease-in-out infinite;
}

/* アメジスト ダイヤ — 左上 */
.bg-gem--2 {
  width: 110px;
  height: 110px;
  top: 80px;
  left: -25px;
  animation: bgFloat2 11s ease-in-out infinite;
}

/* ローズクォーツ六角形 — 右中 */
.bg-gem--3 {
  width: 90px;
  height: 90px;
  top: 38%;
  right: -20px;
  animation: bgFloat3 7.5s ease-in-out infinite;
}

/* アクアマリン ダイヤ — 左下 */
.bg-gem--4 {
  width: 130px;
  height: 130px;
  bottom: 10%;
  left: -35px;
  animation: bgFloat1 10s ease-in-out infinite reverse;
}

/* エメラルド六角形 — 右下 */
.bg-gem--5 {
  width: 140px;
  height: 140px;
  bottom: -30px;
  right: -30px;
  animation: bgFloat2 12s ease-in-out infinite;
}

/* 小ゴールド ダイヤ — 左中上 */
.bg-gem--6 {
  width: 60px;
  height: 60px;
  top: 22%;
  left: 8%;
  animation: bgFloat3 8s ease-in-out infinite 1s;
}

/* 小アメジスト六角形 — 右中下 */
.bg-gem--7 {
  width: 70px;
  height: 70px;
  bottom: 28%;
  right: 6%;
  animation: bgFloat1 9.5s ease-in-out infinite 2s;
}

@keyframes bgFloat1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-14px) rotate(8deg); }
}

@keyframes bgFloat2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-10px) rotate(-6deg); }
}

@keyframes bgFloat3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%       { transform: translate(6px, -10px) rotate(12deg); }
}

.container { position: relative; z-index: 1; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 65% 5%,  rgba(90, 40, 200, 0.28), transparent 52%),
    radial-gradient(ellipse at 10% 95%, rgba(10, 50, 180, 0.22), transparent 50%),
    var(--bg);
  padding: 20px 0;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* ============================================
   Header
   ============================================ */
.header { text-align: center; margin-bottom: 36px; }

.header-icon {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 32px;
  color: var(--gold);
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold-deep);
  background: var(--gold-bg);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 18px;
  font-weight: 600;
}

h1 {
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 12px;
}

h1 .accent { color: var(--gold-deep); }

.subtitle {
  font-size: 15px;
  color: var(--ink-sub);
  line-height: 1.8;
  font-weight: 500;
}

/* ============================================
   Screen Container
   ============================================ */
.screen { display: none; animation: fadeIn 0.6s ease both; }
.screen.active { display: block; }

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

/* ============================================
   Card
   ============================================ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 36px 28px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  text-align: center;
}

.card-subtitle {
  font-size: 14px;
  color: var(--ink-sub);
  text-align: center;
  margin-bottom: 28px;
}

/* ============================================
   Form
   ============================================ */
.form-group { margin-bottom: 22px; overflow: hidden; }

label {
  display: block;
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 10px;
}

label .req {
  color: var(--gold);
  font-size: 12px;
  margin-left: 4px;
}

input[type="text"],
input[type="date"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  color: var(--ink);
  font-weight: 500;
  transition: all 0.25s;
  outline: none;
  box-sizing: border-box;
}

/* iOS Safari のネイティブカレンダーボタンが border-box 外にはみ出る問題を修正。
   appearance:none で内部コンテンツ高さがゼロになるため height で固定する */
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  height: 56px;
}

input[type="text"] {
  height: 56px;
}

input[type="text"]:focus,
input[type="date"]:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.2);
}

input::placeholder { color: var(--ink-faint); font-weight: 400; }

/* ============================================
   Button
   ============================================ */
.btn {
  display: block;
  width: 100%;
  padding: 18px 32px;
  border: none;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #fff;
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(176, 137, 71, 0.3);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(176, 137, 71, 0.4);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-icon { margin-left: 8px; font-size: 14px; }
.btn-wrap { margin-top: 28px; }

/* ============================================
   Progress
   ============================================ */
.progress-wrap { margin-bottom: 24px; }

.progress-bar {
  height: 6px;
  background: var(--line);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  border-radius: 100px;
  transition: width 0.5s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-sub);
  font-weight: 500;
}

.progress-num { color: var(--gold-deep); font-weight: 600; }

.btn-back {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--ink-sub);
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.btn-back:hover { color: var(--gold-deep); }
.btn-back-arrow {
  font-size: 11px;
  transition: transform 0.2s;
}
.btn-back:hover .btn-back-arrow { transform: translateX(-3px); }

/* ============================================
   Question
   ============================================ */
.question-num-badge {
  display: inline-block;
  font-size: 12px;
  color: var(--gold-deep);
  background: var(--gold-bg);
  padding: 5px 14px;
  border-radius: 100px;
  font-weight: 600;
  margin-bottom: 14px;
}

.question-text {
  font-size: 19px;
  line-height: 1.7;
  margin-bottom: 28px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.choices { display: flex; flex-direction: column; gap: 12px; }

.choice {
  padding: 18px 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 500;
  text-align: left;
  font-family: 'Noto Serif JP', serif;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.choice-marker {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  margin-top: 3px;
  transition: all 0.25s;
  position: relative;
}

.choice:hover {
  border-color: rgba(212, 168, 67, 0.5);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}
.choice:hover .choice-marker { border-color: var(--gold); }

.choice.selected {
  border-color: var(--gold);
  background: var(--gold-bg);
}
.choice.selected .choice-marker {
  border-color: var(--gold);
  background: var(--gold);
}
.choice.selected .choice-marker::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: #fff;
  border-radius: 50%;
}

/* ============================================
   Result
   ============================================ */
.result-greeting {
  text-align: center;
  font-size: 15px;
  color: var(--ink-sub);
  margin-bottom: 8px;
  font-weight: 500;
}

.result-greeting .name { color: var(--gold-deep); font-weight: 600; }

.result-eyebrow {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold-deep);
  background: var(--gold-bg);
  padding: 6px 16px;
  border-radius: 100px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 24px;
}

.result-eyebrow-wrap { text-align: center; }

.gem-visual {
  width: 200px;
  height: 200px;
  margin: 8px auto 24px;
  animation: gentleFloat 4s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.gem-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 16px 32px rgba(212, 168, 67, 0.45));
}

.gem-name-jp {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.gem-name-en {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--gold-deep);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  font-style: italic;
}

.gem-catch {
  text-align: center;
  font-size: 16px;
  color: var(--gold-deep);
  font-weight: 600;
  background: var(--gold-bg);
  padding: 12px 20px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 24px;
}

.gem-catch-wrap { text-align: center; }

.gem-description {
  font-size: 15px;
  line-height: 2;
  color: var(--ink);
  margin-bottom: 28px;
  font-weight: 500;
  padding: 0 4px;
}

.traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.trait {
  padding: 8px 18px;
  background: var(--gold-bg);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 100px;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--gold);
  border-radius: 2px;
}

.meta-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.meta-item {
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-label {
  font-size: 11px;
  color: var(--ink-sub);
  margin-bottom: 6px;
  font-weight: 500;
}

.meta-value { font-size: 15px; color: var(--ink); font-weight: 600; }

.combo-message {
  background: var(--gold-bg);
  border: 1px solid rgba(212, 168, 67, 0.2);
  border-radius: 14px;
  padding: 20px 20px 20px 44px;
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink);
  font-weight: 500;
  position: relative;
}

.combo-message::before {
  content: '✦';
  position: absolute;
  left: 18px;
  top: 18px;
  color: var(--gold);
  font-size: 18px;
}

/* ============================================
   Share Buttons
   ============================================ */
.share-wrap {
  margin-bottom: 16px;
  text-align: center;
}

.share-label {
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.15em;
  margin-bottom: 14px;
  font-weight: 500;
}

.share-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border: none;
  border-radius: 100px;
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.04em;
  min-height: 44px;
}

.share-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.share-btn--x {
  background: #000;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.share-btn--x:hover { background: #1a1a1a; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.5); }

.share-btn--line {
  background: #06C755;
  color: #fff;
  box-shadow: 0 2px 12px rgba(6, 199, 85, 0.35);
}
.share-btn--line:hover { background: #05b04c; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(6,199,85,0.45); }

.share-btn--instagram {
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(220, 39, 67, 0.35);
}
.share-btn--instagram:hover { opacity: 0.88; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(220,39,67,0.45); }

/* コピー完了トースト */
.share-toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(212, 168, 67, 0.95);
  color: #fff;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  z-index: 99999;
  pointer-events: none;
  animation: fadeIn 0.3s ease both;
  white-space: nowrap;
}

/* ============================================
   購買訴求セクション
   ============================================ */
.appeal-section {
  background: linear-gradient(135deg, #fff8f0, #fdf3e3);
  border: 1px solid var(--gold-light);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.appeal-text {
  font-size: 15px;
  line-height: 2;
  color: #3a2a10;
  font-weight: 500;
  margin-bottom: 20px;
  white-space: pre-line;
}

.btn-shop {
  display: block;
  width: 100%;
  padding: 18px 32px;
  border-radius: 100px;
  background: linear-gradient(135deg, #c8974a 0%, #8a6a2e 100%);
  color: #fff;
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(176, 137, 71, 0.35);
}
.btn-shop:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(176, 137, 71, 0.5);
}

.power-appeal-section {
  background: linear-gradient(135deg, #fff8f0, #fdf3e3);
  border: 1px solid var(--gold-light);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.power-gem-visual {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  overflow: hidden;
}
.power-gem-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.22));
}

.power-appeal {
  margin-top: 12px;
  font-size: 14px;
  line-height: 2;
  color: #3a2a10;
  font-weight: 500;
  text-align: left;
  white-space: pre-line;
  font-style: italic;
}

.btn-power-shop {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 15px 32px;
  border-radius: 100px;
  background: linear-gradient(135deg, #4a3a8a 0%, #2a1f5a 100%);
  color: #fff;
  font-family: 'Noto Serif JP', serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(74, 58, 138, 0.35);
}
.btn-power-shop:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(74, 58, 138, 0.5);
}

.restart-btn {
  width: 100%;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  color: var(--ink-sub);
  font-family: 'Noto Serif JP', serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.restart-btn:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  background: var(--gold-bg);
}

/* ============================================
   Result — 入場アニメーション
   ============================================ */
@keyframes gemReveal {
  0%   { opacity: 0; transform: scale(0.1) rotate(-60deg); filter: brightness(1); }
  55%  { opacity: 1; transform: scale(1.2) rotate(6deg);   filter: brightness(2.4); }
  75%  { transform: scale(0.94) rotate(-2deg);              filter: brightness(1); }
  100% { opacity: 1; transform: scale(1) rotate(0deg);      filter: brightness(1); }
}

@keyframes lightRing {
  0%   { opacity: 0.8; transform: translate(-50%, -50%) scale(0.4); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(5.5); }
}

@keyframes sparklePop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0deg); }
  35%  { opacity: 1; transform: translate(-50%, -50%) scale(1.4) rotate(20deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5) rotate(48deg); }
}

@keyframes edgeBurst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  8%   { opacity: 1; }
  80%  { opacity: 0.5; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); }
}

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

@keyframes particleBurst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  18%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.25) rotate(var(--rot)); }
}

#screen-result.result-entering .result-eyebrow-wrap { animation: slideUpIn 0.45s ease both 0.05s; }
#screen-result.result-entering .result-greeting     { animation: slideUpIn 0.45s ease both 0.12s; }
#screen-result.result-entering .gem-name-jp         { animation: slideUpIn 0.5s  ease both 0.78s; }
#screen-result.result-entering .gem-name-en         { animation: slideUpIn 0.45s ease both 0.9s;  }
#screen-result.result-entering .gem-catch-wrap      { animation: slideUpIn 0.45s ease both 1.02s; }
#screen-result.result-entering .gem-description     { animation: slideUpIn 0.45s ease both 1.12s; }
#screen-result.result-entering .section-title       { animation: slideUpIn 0.45s ease both 1.22s; }
#screen-result.result-entering .traits              { animation: slideUpIn 0.45s ease both 1.32s; }
#screen-result.result-entering .meta-card           { animation: slideUpIn 0.45s ease both 1.42s; }
#screen-result.result-entering .combo-message       { animation: slideUpIn 0.45s ease both 1.52s; }
#screen-result.result-entering .appeal-section      { animation: slideUpIn 0.45s ease both 1.62s; }
#screen-result.result-entering .power-appeal-section { animation: slideUpIn 0.45s ease both 1.72s; }
#screen-result.result-entering .share-wrap          { animation: slideUpIn 0.45s ease both 1.82s; }
#screen-result.result-entering .restart-btn         { animation: slideUpIn 0.45s ease both 1.92s; }

/* ============================================
   Loading
   ============================================ */
.loading { text-align: center; padding: 60px 20px; }

.loading-gem {
  width: 70px;
  height: 70px;
  margin: 0 auto 24px;
  animation: gemPulse 1.8s ease-in-out infinite;
}

.loading-gem svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 16px rgba(212, 168, 67, 0.45));
}

@keyframes gemPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(180deg); }
}

.loading-text {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.loading-sub { color: var(--ink-sub); font-size: 13px; }

/* ============================================
   Footer
   ============================================ */
.footer {
  text-align: center;
  margin-top: 32px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.2em;
}

/* ============================================
   Responsive — スマートフォン
   ============================================ */

/* タップ時のハイライト除去・遅延解消 */
button, .choice {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Safe-area (iPhone ノッチ / Dynamic Island) */
body {
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}

@media (max-width: 600px) {
  /* ---- Container ---- */
  .container {
    padding: 16px 16px 72px;
  }

  /* ---- Header ---- */
  .header {
    margin-bottom: 20px;
  }
  .header-icon {
    font-size: 26px;
    margin-bottom: 10px;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    padding: 5px 12px;
    margin-bottom: 14px;
  }
  h1 {
    font-size: clamp(22px, 6.5vw, 30px);
    margin-bottom: 8px;
  }
  .subtitle {
    font-size: 13px;
    line-height: 1.9;
  }

  /* ---- Card ---- */
  .card {
    padding: 24px 18px;
    border-radius: 16px;
  }
  .card-title {
    font-size: 16px;
    margin-bottom: 4px;
  }
  .card-subtitle {
    font-size: 13px;
    margin-bottom: 22px;
  }

  /* ---- Form ---- */
  .form-group {
    margin-bottom: 16px;
  }
  label {
    font-size: 13px;
    margin-bottom: 8px;
  }
  input[type="text"],
  input[type="date"] {
    padding: 14px 16px;
    font-size: 16px; /* iOS自動ズーム防止 */
    border-radius: 10px;
    height: 52px;
  }
  .btn {
    padding: 16px 24px;
    font-size: 15px;
  }
  .btn-wrap {
    margin-top: 22px;
  }

  /* ---- Progress ---- */
  .progress-wrap {
    margin-bottom: 18px;
  }
  .progress-bar {
    height: 5px;
  }
  .progress-label {
    font-size: 12px;
  }
  .btn-back {
    font-size: 12px;
    min-height: 36px; /* タップターゲット確保 */
    padding: 6px 0;
  }

  /* ---- Question ---- */
  .question-num-badge {
    font-size: 11px;
    padding: 4px 12px;
    margin-bottom: 12px;
  }
  .question-text {
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 20px;
  }
  .choices {
    gap: 10px;
  }
  .choice {
    padding: 15px 16px;
    font-size: 14px;
    border-radius: 12px;
    gap: 12px;
    min-height: 52px; /* タップターゲット確保 */
  }
  .choice-marker {
    width: 20px;
    height: 20px;
    margin-top: 2px;
  }

  /* ---- Loading ---- */
  .loading {
    padding: 44px 16px;
  }
  .loading-gem {
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
  }
  .loading-text {
    font-size: 15px;
  }
  .loading-sub {
    font-size: 12px;
  }

  /* ---- Result ---- */
  .result-eyebrow {
    font-size: 10px;
    letter-spacing: 0.2em;
    padding: 5px 12px;
    margin-bottom: 18px;
  }
  .result-greeting {
    font-size: 13px;
    margin-bottom: 6px;
  }
  .gem-visual {
    width: 150px;
    height: 150px;
    margin: 4px auto 18px;
  }
  .gem-name-jp {
    font-size: 26px;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
  }
  .gem-name-en {
    font-size: 15px;
    margin-bottom: 14px;
  }
  .gem-catch {
    font-size: 13px;
    padding: 10px 16px;
    margin-bottom: 18px;
  }
  .gem-description {
    font-size: 13px;
    line-height: 1.95;
    margin-bottom: 22px;
  }
  .section-title {
    font-size: 13px;
    margin-bottom: 10px;
  }
  .traits {
    gap: 7px;
    margin-bottom: 22px;
  }
  .trait {
    font-size: 12px;
    padding: 6px 14px;
  }
  .meta-card {
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 12px;
  }
  .meta-grid {
    gap: 8px;
  }
  .meta-item {
    padding: 10px 8px;
    border-radius: 8px;
  }
  .meta-label {
    font-size: 10px;
    margin-bottom: 4px;
  }
  .meta-value {
    font-size: 14px;
  }
  .combo-message {
    padding: 14px 14px 14px 38px;
    font-size: 13px;
    line-height: 1.85;
    margin-bottom: 22px;
    border-radius: 12px;
  }
  .combo-message::before {
    left: 13px;
    top: 13px;
    font-size: 15px;
  }
  .share-buttons { gap: 8px; }
  .share-btn { padding: 10px 14px; font-size: 12px; min-height: 44px; }
  .share-icon { width: 14px; height: 14px; }

  .restart-btn {
    padding: 13px;
    font-size: 13px;
    min-height: 48px;
  }

  /* ---- Footer ---- */
  .footer {
    margin-top: 24px;
    font-size: 10px;
    padding-bottom: env(safe-area-inset-bottom, 8px);
  }

  /* ---- 背景宝石 — モバイル調整 ---- */
  .bg-gem--1 { width: 110px; height: 110px; top: -20px; right: -30px; }
  .bg-gem--2 { width: 80px;  height: 80px;  top: 60px;  left: -18px; }
  .bg-gem--3 { width: 70px;  height: 70px;  top: 35%;   right: -15px; }
  .bg-gem--4 { width: 95px;  height: 95px;  bottom: 12%; left: -24px; }
  .bg-gem--5 { width: 105px; height: 105px; bottom: -20px; right: -22px; }
  .bg-gem--6 { width: 42px;  height: 42px;  top: 20%;   left: 4%; }
  .bg-gem--7 { width: 48px;  height: 48px;  bottom: 30%; right: 4%; }
}

/* ---- 超小型端末 (iPhone SE 第1世代等 ≤360px) ---- */
@media (max-width: 360px) {
  .container {
    padding: 12px 14px 68px;
  }
  .card {
    padding: 20px 14px;
  }
  h1 {
    font-size: 21px;
  }
  .question-text {
    font-size: 15px;
  }
  .choice {
    font-size: 13px;
    padding: 13px 14px;
  }
  .gem-visual {
    width: 130px;
    height: 130px;
  }
  .gem-name-jp {
    font-size: 23px;
  }
  .gem-description {
    font-size: 12px;
  }
  .meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}
