/* =========================================
   犬診断LP - 自己完結型 style.css
   ========================================= */

/* ---------- Variables ---------- */
:root {
  --color-primary: #FF8A3D;        /* 温かいオレンジ */
  --color-primary-dark: #F26F1F;
  --color-accent: #4FB3A9;          /* 青緑系 */
  --color-bg: #FFFBF5;              /* オフホワイト */
  --color-card: #FFFFFF;
  --color-text: #3A3A3A;            /* 濃いグレー */
  --color-text-sub: #7A7A7A;
  --color-line: #EFE6D9;
  --color-line-strong: #E2D6C2;

  --color-line-green: #06C755;
  --color-x-black: #000000;

  --shadow-card: 0 6px 20px rgba(196, 132, 60, 0.12);
  --shadow-cta: 0 8px 18px rgba(255, 138, 61, 0.35);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --max-w: 480px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

body {
  font-family: 'M PLUS Rounded 1c', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic', sans-serif;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* ---------- Layout / Screens ---------- */
#app {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

.screen {
  display: none;
  width: 100%;
  max-width: var(--max-w);
  padding: 24px 20px 64px;
  animation: fadeIn 0.35s ease both;
}
.screen.is-active { display: block; }

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

/* ---------- Top ---------- */
.top { text-align: center; padding-top: 20px; }
.top__title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}
.top__title::before {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.top__sub {
  font-size: 15px;
  color: var(--color-text-sub);
  margin: 0 0 22px;
  font-weight: 500;
}
.top__visual {
  margin: 0 -4px 28px;
}
.top__visual img {
  width: 100%;
  border-radius: var(--radius-lg);
}
.top__cta { width: 100%; margin-bottom: 10px; }
.top__note {
  font-size: 13px;
  color: var(--color-text-sub);
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 22px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  text-align: center;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover { background: var(--color-primary-dark); }
.btn--primary:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(255, 138, 61, 0.35); }

.btn__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- Question ---------- */
.question { padding-top: 8px; }

.question__visual {
  width: 78%;
  max-width: 280px;
  margin: 0 auto 18px;
}
.question__visual img {
  width: 100%;
  border-radius: var(--radius-md);
}

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.progress__bar {
  flex: 1;
  height: 8px;
  background: var(--color-line);
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.progress__num {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-sub);
  min-width: 36px;
  text-align: right;
}

.question__text {
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 28px;
  line-height: 1.6;
  min-height: 4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.choice {
  width: 100%;
  background: #fff;
  border: 2px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  line-height: 1.55;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.choice::before {
  content: attr(data-letter);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-line);
  color: var(--color-text-sub);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.choice:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(255, 138, 61, 0.15);
}
.choice:hover::before {
  background: var(--color-primary);
  color: #fff;
}
.choice:active { transform: translateY(0); }
.choice.is-selected {
  border-color: var(--color-primary);
  background: #FFF3E8;
}
.choice.is-selected::before { background: var(--color-primary); color: #fff; }

/* ---------- Result ---------- */
.result__lead {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-sub);
  margin: 8px 0 18px;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px 22px 26px;
  margin-bottom: 32px;
  border: 1px solid var(--color-line);
}
.card__visual {
  width: 70%;
  max-width: 240px;
  margin: 0 auto 8px;
}
.card__name { text-align: center; margin-bottom: 14px; }
.card__breed {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.02em;
}
.card__breed-en {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--color-text-sub);
  margin: 4px 0 0;
  text-transform: uppercase;
}
.card__catch {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary-dark);
  background: #FFF3E8;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 0 0 22px;
  line-height: 1.55;
}

/* Traits */
.traits {
  margin: 0 0 22px;
  padding: 14px 0;
  border-top: 1px dashed var(--color-line-strong);
  border-bottom: 1px dashed var(--color-line-strong);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.traits__row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
  margin: 0;
}
.traits__row dt {
  font-weight: 700;
  color: var(--color-text-sub);
  font-size: 12.5px;
  background: var(--color-bg);
  border-radius: 999px;
  padding: 3px 10px;
  text-align: center;
  white-space: nowrap;
}
.traits__row dd {
  margin: 0;
  font-weight: 500;
  line-height: 1.55;
}

/* Parameters (4-axis, 5-step) */
.params {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.params li {
  display: grid;
  grid-template-columns: 96px 1fr 24px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.params .label { font-weight: 700; }
.params .dots {
  display: inline-flex;
  gap: 6px;
}
.params .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-line);
  flex-shrink: 0;
}
.params .dot.is-on {
  background: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(255, 138, 61, 0.15);
}
.params .num {
  text-align: right;
  font-weight: 700;
  color: var(--color-primary-dark);
  font-size: 13px;
}

.card__desc {
  font-size: 14.5px;
  line-height: 1.85;
  margin: 0;
  color: var(--color-text);
}

/* ---------- Share ---------- */
.share {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  padding: 22px 20px;
  margin-bottom: 28px;
}
.share__title {
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 16px;
}
.share__buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.share__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  transition: opacity 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  line-height: 1.4;
}
.share__btn span:first-child {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.share__btn--x { background: var(--color-x-black); }
.share__btn--line { background: var(--color-line-green); }
.share__btn--copy { background: var(--color-text); }
.share__btn:hover { opacity: 0.85; transform: translateY(-1px); }
.share__btn:active { transform: translateY(0); }

.share__text {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  resize: none;
  line-height: 1.7;
}

/* ---------- Connect (保護犬接続) ---------- */
.connect {
  background: linear-gradient(180deg, #FFF6EC 0%, #FFFBF5 100%);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-lg);
  padding: 26px 22px 28px;
  margin-bottom: 24px;
}
.connect__body {
  font-size: 14.5px;
  line-height: 1.95;
  margin-bottom: 22px;
}
.connect__body p {
  margin: 0 0 14px;
}
.connect__body p:last-child { margin-bottom: 0; }
.connect__body strong {
  display: block;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--color-text);
  background: linear-gradient(transparent 65%, #FFD9B8 65%);
  font-weight: 800;
  margin-bottom: 14px;
  padding: 0 2px;
}
.connect__cta {
  width: 100%;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(58, 58, 58, 0.95);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  .screen { padding: 36px 28px 80px; }
  .top__title { font-size: 34px; }
  .top__sub { font-size: 16px; }
  .question__text { font-size: 21px; }
  .card { padding: 30px 28px 32px; }
}

@media (min-width: 900px) {
  body { background: #FAF3E7; }
  .screen {
    background: var(--color-bg);
    border-radius: 24px;
    margin: 24px auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  }
}

@media (max-width: 360px) {
  .top__title { font-size: 26px; }
  .question__text { font-size: 17px; }
  .card__breed { font-size: 22px; }
  .traits__row { grid-template-columns: 78px 1fr; }
  .params li { grid-template-columns: 84px 1fr 24px; }
}
