/* 推しルナ占い：ベビーピンク × ラベンダー × スカイブルー × 淡いゴールド */
:root {
  --pink: #ffd6e8;
  --pink-deep: #f59cc4;
  --lavender: #e5dbff;
  --lavender-deep: #a68ce8;
  --blue: #d6ecff;
  --blue-deep: #8cc3ee;
  --cream: #fff9ef;
  --yellow: #fff3c4;
  --yellow-deep: #e8c35a;
  --gold: #e6c06a;
  --ink: #5a4a78;
  --ink-soft: #8a7aa6;
  --white: #ffffff;
  --radius: 24px;
  --shadow: 0 10px 30px rgba(166, 140, 232, 0.22);
  --font: "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.8;
  background: #efe4ff;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* 背景のグラデーション（iOSでも長いページで途切れないよう固定要素で描く） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(170deg, #ffe3f0 0%, #efe4ff 45%, #dcefff 100%);
}

/* 背景の星 */
.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.twinkle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.8;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 18px 24px;
}

.screen { display: none; }
.screen.is-active {
  display: block;
  animation: fadeUp 0.45s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- トップ ---------- */
.hero { text-align: center; padding-top: 12px; }
.mascot {
  display: block;
  height: auto; /* width だけ指定し、縦横比は画像のまま */
  max-width: 100%;
  margin: 0 auto;
  /* フレックスやグリッドの中でも、枠が伸びて絵がゆがまないように（iPhone の Safari 対策） */
  flex: none;
  align-self: center;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.hero-art { width: min(260px, 70vw); margin: 4px auto 18px; }
.floaty { animation: floaty 4s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}
.eyebrow {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 14px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--lavender-deep);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
}
.title {
  margin: 0;
  font-size: clamp(2.1rem, 10vw, 2.6rem);
  letter-spacing: 0.12em;
  line-height: 1.3;
  background: linear-gradient(90deg, var(--pink-deep), var(--lavender-deep) 55%, var(--blue-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.concept {
  margin: 12px auto 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pink-deep);
  letter-spacing: 0.06em;
}
.daily-title {
  margin: 4px 0 0;
  text-align: center;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--lavender-deep);
}
.daily-omamori {
  margin: 0 0 16px;
  padding: 18px 18px 16px;
  text-align: center;
  background: linear-gradient(135deg, var(--pink) 0%, var(--yellow) 100%);
  border: 2px dashed var(--pink-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.daily-omamori-title { margin: 0 0 8px; font-size: 0.95rem; color: var(--pink-deep); letter-spacing: 0.06em; }
.daily-omamori-text { margin: 0; font-weight: 700; line-height: 1.85; word-break: auto-phrase; }
.daily-omamori-type {
  margin: 12px 0 0 !important;
  padding-top: 10px;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--ink);
  border-top: 1px dashed rgba(245, 156, 196, 0.6);
}
.daily-omamori-type[hidden] { display: none; }
.preview-notice { border-color: var(--blue-deep); background: #f2f8ff; }

/* ホーム画面への追加の案内 */
.a2hs-card {
  margin: 16px 0;
  padding: 20px 18px 12px;
  text-align: center;
  background: linear-gradient(160deg, #fff6fb 0%, #f1e8ff 60%, #e6f3ff 100%);
  border: 2px solid var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.a2hs-card[hidden] { display: none; }
.a2hs-title { margin: 0 0 8px; font-size: 1.05rem; color: var(--pink-deep); letter-spacing: 0.04em; }
.a2hs-text { margin: 0; font-size: 0.92rem; line-height: 1.85; }
.a2hs-link { margin-top: 18px; font-size: 0.85rem; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(90, 74, 120, 0.35);
}
.sheet-backdrop[hidden] { display: none; }
.sheet {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px); /* dvh 非対応の古い iOS 用 */
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px 18px 16px;
  background: linear-gradient(170deg, #fff8fc 0%, #f6f0ff 100%);
  border-radius: 28px;
  box-shadow: 0 -6px 30px rgba(90, 74, 120, 0.25);
  animation: fadeUp 0.3s ease both;
}
.sheet-title { margin: 0 0 8px; text-align: center; font-size: 1.15rem; color: var(--lavender-deep); outline: none; }
.sheet-lead { margin: 0 0 10px; font-size: 0.92rem; line-height: 1.8; }
.sheet-steps { margin: 0 0 6px; padding: 0; list-style: none; counter-reset: step; }
.sheet-steps[hidden] { display: none; }
.sheet-steps li {
  position: relative;
  margin-bottom: 8px;
  padding: 10px 12px 10px 46px;
  font-size: 0.92rem;
  line-height: 1.75;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  counter-increment: step;
}
.sheet-steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  background: var(--pink-deep);
  border-radius: 50%;
}
.sheet-status { min-height: 1.4em; margin: 6px 0 0; text-align: center; font-size: 0.9rem; font-weight: 700; color: var(--pink-deep); }
.sheet-note {
  margin: 10px 0 0;
  padding: 12px 14px;
  font-size: 0.84rem;
  line-height: 1.8;
  background: #fffbea;
  border: 1.5px dashed var(--yellow-deep);
  border-radius: 16px;
}
.sheet-note p { margin: 0; }
.sheet-note p + p { margin-top: 6px; }
.sheet-note p[hidden] { display: none; }
.sheet-note-title { font-weight: 700; color: var(--ink); }

/* 未診断の人への診断の案内（ホーム画面への追加の案内と同じ見た目を、画面の中央に） */
.popup-backdrop { align-items: center; }
.popup {
  position: relative;
  max-width: 360px;
  padding: 20px 18px 14px;
  text-align: center;
  box-shadow: 0 10px 34px rgba(90, 74, 120, 0.28);
}
.popup-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-soft);
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.popup-art { display: block; width: 104px; height: auto; margin: 2px auto 6px; }
.popup-title {
  margin: 0 0 8px;
  font-size: clamp(0.94rem, 4.6vw, 1.18rem); /* iPhone SE でも1行に収まる大きさ */
  line-height: 1.5;
  color: var(--lavender-deep);
  outline: none;
}
.popup-text { margin: 0 0 14px; font-size: 0.9rem; line-height: 1.7; }
.popup .btn + .btn { margin-top: 6px; }
.popup-sub { width: 100%; }
.popup-note { margin: 4px 0 0; font-size: 0.78rem; color: var(--ink-soft); }
@media (max-width: 380px) {
  /* iPhone SE などの細い画面：説明文は2行、メインのボタンは1行に収める */
  .popup { padding-left: 12px; padding-right: 12px; }
  .popup-text { font-size: 0.84rem; }
  .popup .btn-type { padding-left: 10px; padding-right: 10px; font-size: 1rem; }
}

/* 推し活タイプのシェア画像 */
.share-panel {
  margin: 14px 0 4px;
  padding: 18px 16px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  border: 2px dashed var(--lavender);
  border-radius: var(--radius);
}
.share-panel[hidden] { display: none; }
.share-panel-title { margin: 0 0 12px; font-weight: 700; color: var(--lavender-deep); }
.share-preview {
  display: block;
  width: min(100%, 300px);
  height: auto; /* 縦横比は画像のまま */
  margin: 0 auto 4px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  -webkit-touch-callout: default; /* 長押しで保存できるように */
}
.share-preview[hidden] { display: none; }
.share-hint { margin: 12px 0 4px; font-size: 0.82rem; line-height: 1.7; color: var(--ink-soft); }
.share-hint:empty { display: none; }
.share-status { min-height: 1.6em; margin: 8px 0 0; font-size: 0.9rem; font-weight: 700; line-height: 1.6; color: var(--pink-deep); }
.share-guide {
  margin: 10px 0 0;
  padding: 12px 14px;
  text-align: left;
  background: #fff7fb;
  border-radius: 16px;
}
.share-guide[hidden] { display: none; }
.share-guide-title { margin: 0 0 6px; font-size: 0.88rem; font-weight: 700; color: var(--lavender-deep); }
.share-steps { margin: 0; padding-left: 1.4em; font-size: 0.84rem; line-height: 1.7; color: var(--ink); }
.share-steps li + li { margin-top: 4px; }
.share-guide-note { margin: 8px 0 0; font-size: 0.78rem; line-height: 1.7; color: var(--ink-soft); }
.share-guide-note:empty { display: none; }
.daily-note { margin: 0; text-align: center; font-size: 0.78rem; color: var(--ink-soft); }
.note { text-align: center; font-size: 0.8rem; color: var(--ink-soft); margin-top: 14px; }

.daily-intro {
  margin: 14px 4px 4px;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- 推し活タイプ診断への案内カード ---------- */
.type-card {
  position: relative;
  margin: 34px 0 8px;
  padding: 26px 20px 20px;
  text-align: center;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
    linear-gradient(160deg, #fff6fb 0%, #f1e8ff 55%, #e6f3ff 100%);
  border: 2px solid var(--white);
  border-radius: 32px;
  box-shadow: 0 14px 34px rgba(166, 140, 232, 0.28);
}
.type-card-eyebrow {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 4px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--white);
  background: linear-gradient(100deg, #f8a8cc, #b9a2f2);
  border-radius: 999px;
}
.type-card-title {
  margin: 6px 0 10px;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
}
.type-card-text { margin: 0; font-size: 0.92rem; line-height: 1.85; }
.type-card-art { margin: 14px 0 6px; }
.type-card-art .mascot { width: 130px; }
.type-card-renewal { margin: 10px 0 0; font-size: 0.82rem; color: var(--pink-deep); }
.type-card-note { margin: 10px 0 0; font-size: 0.8rem; color: var(--ink-soft); }
.type-card-you { margin: 6px 0 12px; font-size: 0.95rem; font-weight: 700; color: var(--pink-deep); letter-spacing: 0.04em; }
#type-card-done .type-emblem.small { width: 104px; height: 104px; }
#type-card-done .type-emblem.small .emblem-cat { width: 84px; }
.type-card-name { margin: 12px 0 0; font-size: 1.15rem; font-weight: 700; line-height: 1.6; word-break: auto-phrase; }
.type-card-catch { margin: 4px 0 0; font-size: 0.88rem; line-height: 1.7; color: var(--ink-soft); word-break: auto-phrase; }

/* 診断の案内・お知らせ */
.notice {
  margin: 0 0 16px;
  padding: 14px 16px;
  font-size: 0.9rem;
  line-height: 1.8;
  background: rgba(255, 255, 255, 0.85);
  border: 2px dashed var(--lavender);
  border-radius: 20px;
}
.notice p { margin: 0; }
.notice[hidden] { display: none; }
.notice.confirm { border-color: var(--pink-deep); background: #fff7fb; }
.invite {
  margin: 22px 0 0;
  padding: 18px 16px 16px;
  text-align: center;
  background: linear-gradient(160deg, #fff6fb, #efe6ff);
  border-radius: 24px;
  border: 2px solid var(--white);
}
.invite[hidden] { display: none; }
.invite-title { margin: 0; font-weight: 700; line-height: 1.7; }

/* ---------- ボタン ---------- */
.btn {
  display: block;
  width: 100%;
  min-height: 58px;
  margin: 12px 0 0;
  padding: 14px 20px;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  color: var(--white);
  background: linear-gradient(100deg, #f8a8cc, #b9a2f2 60%, #9fcdf2);
  box-shadow: 0 8px 22px rgba(196, 140, 220, 0.45);
}
.btn-ghost {
  color: var(--lavender-deep);
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid var(--lavender);
}
a.btn { text-align: center; text-decoration: none; }
a.btn[hidden] { display: none; }
.btn-big { min-height: 64px; margin-top: 20px; font-size: 1.15rem; }
.nowrap { white-space: nowrap; }
/* 推し活タイプ診断のボタン（今日の占いとは別の体験だとわかる色） */
.btn-type {
  color: var(--white);
  background: linear-gradient(100deg, #f59cc4, #e8a0d8);
  box-shadow: 0 8px 20px rgba(245, 156, 196, 0.4);
}
.btn-text {
  display: block;
  margin: 10px auto 0;
  min-height: 44px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  cursor: pointer;
}
.btn-text[hidden] { display: none; }
.btn:disabled { opacity: 0.6; }
.btn[hidden] { display: none; }
button:focus-visible {
  outline: 3px solid var(--lavender-deep);
  outline-offset: 3px;
}

/* ---------- 質問 ---------- */
.quiz-head { display: flex; align-items: center; gap: 12px; }
.quiz-cat { width: 60px; margin: 0; flex: none; }
.quiz-progress { flex: 1; }
.quiz-progress .q-count { margin: 0 0 6px; text-align: left; }
.progress {
  height: 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink-deep), var(--lavender-deep), var(--blue-deep));
  transition: width 0.35s ease;
}
.q-count {
  margin: 18px 0 2px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: var(--lavender-deep);
}
.q-text {
  margin: 22px 0 22px;
  text-align: center;
  font-size: 1.3rem;
  line-height: 1.6;
  word-break: auto-phrase;
  outline: none;
}
.q-note { margin: -14px 0 18px; text-align: center; font-size: 0.82rem; color: var(--ink-soft); }
.q-note[hidden] { display: none; }
.options { display: grid; gap: 12px; }
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 14px 18px;
  font: inherit;
  font-size: 1rem;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  animation: fadeUp 0.4s ease both;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.option:active { transform: scale(0.98); }
@media (hover: hover) {
  .option:hover { border-color: var(--lavender); }
}
.option.is-chosen {
  background: linear-gradient(100deg, var(--pink), var(--lavender), var(--blue));
  border-color: var(--lavender-deep);
}
.option-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  background: var(--cream);
  border-radius: 50%;
}
.btn-back {
  display: block;
  margin: 22px auto 0;
  min-height: 48px;
  padding: 8px 18px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- 占い中 ---------- */
.loading { text-align: center; padding-top: 16vh; }
.loading-art { width: min(190px, 52vw); margin-bottom: 12px; animation: floaty 1.6s ease-in-out infinite; }
.loading-sky { height: 28px; font-size: 1.2rem; letter-spacing: 1.2em; color: var(--gold); }
.loading-sky span { display: inline-block; animation: twinkle 1.2s ease-in-out infinite; }
.loading-sky span:nth-child(2) { animation-delay: 0.3s; color: var(--lavender-deep); }
.loading-sky span:nth-child(3) { animation-delay: 0.6s; }
.loading-text { font-weight: 700; letter-spacing: 0.1em; }
.dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  border-radius: 50%;
  background: var(--lavender-deep);
  animation: bounce 1s ease-in-out infinite;
}
.dots span:nth-child(2) { animation-delay: 0.15s; background: var(--pink-deep); }
.dots span:nth-child(3) { animation-delay: 0.3s; background: var(--blue-deep); }
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-8px); opacity: 1; }
}

/* ---------- 結果 ---------- */
.result-head {
  text-align: center;
  padding: 24px 18px 22px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.result-date { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.result-type[hidden] { display: none; }
.result-type {
  display: inline-block;
  margin: 10px 0 0;
  padding: 2px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lavender-deep);
  background: var(--lavender);
  border-radius: 999px;
}
.card {
  margin: 0 0 16px;
  padding: 20px 20px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid rgba(255, 255, 255, 0.9);
}
.card p { margin: 0; }
.card-pink { background: linear-gradient(160deg, #fff 0%, var(--pink) 140%); }
.card-lavender { background: linear-gradient(160deg, #fff 0%, var(--lavender) 140%); }
.card-blue { background: linear-gradient(160deg, #fff 0%, var(--blue) 140%); }
.card-cream { background: linear-gradient(160deg, #fff 0%, var(--yellow) 140%); }
.card-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}
.card-sub { font-weight: 700; color: var(--pink-deep); margin-bottom: 4px !important; }
.card-note { margin: -4px 0 10px !important; font-size: 0.82rem; font-weight: 700; color: var(--blue-deep); }
.card-note[hidden] { display: none; }

/* 今日のあなたへのメッセージ（いちばん心に残るカード） */
.foryou {
  margin: 0 0 16px;
  padding: 20px 20px 22px;
  text-align: center;
  background: linear-gradient(160deg, #fffaf0 0%, #fff0f7 60%, #f1e9ff 100%);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(230, 192, 106, 0.25);
}
.foryou-art { width: 90px; margin: 0 auto 6px; }
.foryou-title { margin: 0 0 8px; font-size: 1rem; letter-spacing: 0.06em; color: var(--pink-deep); }
.foryou-text { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.9; word-break: auto-phrase; }

/* 推し活タイプ診断の結果 */
.type-hero {
  --type-color: var(--lavender);
  margin-bottom: 16px;
  padding: 26px 18px 22px;
  text-align: center;
  background: linear-gradient(180deg, #f4effe 0%, #fff 75%); /* color-mix 非対応（iOS 16.1以前）用 */
  background: linear-gradient(180deg, color-mix(in srgb, var(--type-color) 30%, #fff) 0%, #fff 75%);
  border: 2px solid var(--white);
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.type-emblem {
  --type-color: var(--lavender);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 55%, var(--lavender) 56%);
  background: radial-gradient(circle, #fff 55%, color-mix(in srgb, var(--type-color) 55%, #fff) 56%);
  box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--type-color);
}
.type-emblem .emblem-cat { width: 120px; margin: 0; }
.type-emoji {
  position: absolute;
  right: 2px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--type-color);
}
.type-emblem.small { flex: none; width: 76px; height: 76px; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--type-color); }
.type-emblem.small .emblem-cat { width: 60px; }
.type-lead { margin: 16px 0 2px; font-size: 0.88rem; color: var(--ink-soft); }
.type-name {
  margin: 0;
  font-size: clamp(1.35rem, 6.4vw, 1.7rem);
  line-height: 1.5;
  word-break: auto-phrase;
  color: var(--ink);
}
.type-catch { margin: 8px 0 0; font-weight: 700; line-height: 1.7; color: var(--pink-deep); word-break: auto-phrase; }
.type-sub {
  display: inline-block;
  margin: 12px 0 0;
  padding: 4px 14px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
}
.type-sub[hidden] { display: none; }
.points { margin: 0; padding: 0; list-style: none; }
.points li {
  position: relative;
  padding: 8px 10px 8px 28px;
  margin-bottom: 6px;
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
}
.points li::before {
  content: "✦";
  position: absolute;
  left: 10px;
  top: 8px;
  font-size: 0.8rem;
  color: var(--gold);
}
.match-types { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.match-chip {
  --type-color: var(--lavender);
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.6;
  background: var(--lavender);
  background: color-mix(in srgb, var(--type-color) 35%, #fff);
  border-radius: 999px;
}
.stars {
  font-size: 1.7rem;
  letter-spacing: 0.15em;
  color: #f5c542;
  text-shadow: 0 2px 6px rgba(245, 197, 66, 0.35);
  line-height: 1.3;
}

.actions { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: act; }
.actions li {
  position: relative;
  padding: 10px 12px 10px 46px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  counter-increment: act;
}
.actions li::before {
  content: counter(act);
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  background: var(--blue-deep);
  border-radius: 50%;
}
.lucky {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.lucky div {
  padding: 8px 4px;
  text-align: center;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 14px;
}
.lucky dt { font-size: 0.72rem; color: var(--ink-soft); }
.lucky dd {
  display: flex;
  flex-direction: column; /* 色チップ・アイコンを名前の上に置き、狭い画面でも横にはみ出さない */
  align-items: center;
  gap: 4px;
  margin: 4px 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.5;
}
.lucky-name {
  word-break: keep-all; /* 単語の途中では折り返さず、<wbr> の位置で折り返す */
  overflow-wrap: anywhere; /* それでも入りきらないときだけ途中で折り返す */
}
.lucky-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
}
.color-chip {
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px rgba(90, 74, 120, 0.25), 0 2px 6px rgba(166, 140, 232, 0.25); /* 白やシルバーでも見えるよう細い縁取り */
}
.lucky-icon { font-size: 1.2rem; line-height: 1; }

/* 白猫からのお守りメッセージ */
.omamori {
  margin: 8px 0 20px;
  padding: 24px 16px 18px;
  background: var(--cream);
  border: 2px dashed var(--pink-deep);
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.omamori { text-align: center; }
.omamori-art { width: 120px; margin: 0 auto 8px; }
.omamori-title {
  margin: 0 0 12px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--pink-deep);
  letter-spacing: 0.06em;
}
.omamori-charm {
  margin: 0 0 12px;
  padding: 14px 12px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.8;
  word-break: auto-phrase;
  background: linear-gradient(135deg, var(--pink) 0%, var(--yellow) 100%);
  border: 2px solid var(--white);
  border-radius: 20px;
}
.omamori-body { margin: 0; text-align: left; line-height: 1.95; }

/* 幅の狭いスマホ（iPhone SE など）では余白を詰めて、1行の文字数を確保する */
@media (max-width: 380px) {
  .app { padding-left: 14px; padding-right: 14px; }
  .omamori { padding: 20px 10px 14px; }
  .type-card { padding-left: 14px; padding-right: 14px; }
  .btn-big { padding-left: 10px; padding-right: 10px; font-size: 1.02rem; letter-spacing: 0.02em; } /* ボタンの文字を1行に */
  .type-card .btn { padding-left: 8px; padding-right: 8px; font-size: 0.96rem; letter-spacing: 0.02em; } /* 診断ボタンも1行に */
  /* ラッキーの3列：6文字のカタカナ（キーホルダー等）が1行に収まるように */
  .card { padding-left: 14px; padding-right: 14px; }
  .lucky { gap: 6px; }
  .lucky div { padding-left: 2px; padding-right: 2px; }
  .lucky dd { font-size: 0.78rem; }
}

.toast {
  min-height: 1.8em;
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--lavender-deep);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.toast.is-show { opacity: 1; }

.footer {
  position: relative;
  z-index: 1;
  padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
}
/* お問い合わせ（Googleフォームを別のタブで開く） */
.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 8px;
  padding: 0 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lavender-deep);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid var(--lavender);
  border-radius: 999px;
}
.footer-link:active { transform: scale(0.97); }

/* 動きを減らす設定の人にはアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
