/* うぴボ 紹介ページ (upyolic.com/upyvo/)
   色: アイコンの紫を基調に、感情の 6 色はアプリ (Models.swift) と同じ値 */
:root {
  --paper: #fbfaff;
  --paper-2: #f2effb;
  --ink: #241e38;
  --ink-soft: #5d5672;
  --line: #e2ddf0;
  --violet: #6b4fd6;
  --violet-deep: #4b33a8;
  --on-violet: #ffffff;
  --happy: #e68c0d;
  --sad: #4080d1;
  --angry: #d64540;
  --surprise: #9950d1;
  --fear: #2e9e8f;
  --neutral: #8a8699;
  --radius-window: 12px;
  --max: 1120px;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17141f;
    --paper-2: #211d2c;
    --ink: #f1eef8;
    --ink-soft: #b4adc6;
    --line: #353047;
    --violet: #9b85f0;
    --violet-deep: #b9a9ff;
    --on-violet: #17141f;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-width: 1200px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--violet); }
a:focus-visible, .button:focus-visible, summary:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--round); line-height: 1.35; margin: 0; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-size: 0.92em; background: var(--paper-2); padding: 1px 6px; border-radius: 4px; }
.note { font-size: 0.86rem; color: var(--ink-soft); }

/* ボタン */
.button {
  display: inline-block;
  font-family: var(--round); font-weight: 700; font-size: 1.05rem;
  padding: 12px 26px; border-radius: 999px;
  background: var(--violet); color: var(--on-violet); text-decoration: none;
  transition: background 0.15s;
}
.button:hover { background: var(--violet-deep); }
.button.ghost { background: transparent; color: var(--violet); box-shadow: inset 0 0 0 2px var(--violet); }
.button.ghost:hover { background: var(--paper-2); }
.button.small { padding: 6px 18px; font-size: 0.95rem; }

/* 上の帯 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 10px max(16px, calc((100% - var(--max)) / 2));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--round); font-weight: 900; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 8px; }
.topbar nav { display: flex; gap: 20px; margin-left: auto; }
.topbar nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.topbar nav a:hover { color: var(--violet); }

main > section { padding: 88px 16px; scroll-margin-top: 56px; }
main > section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
/* 幅の狭い表や一覧は、見出しと左をそろえる */
main > section > .plans, main > section > .spec-list, main > section > details {
  margin-left: max(0px, calc((100% - var(--max)) / 2)); margin-right: 0;
}
.section-head { margin-bottom: 40px; }
.section-head p { color: var(--ink-soft); max-width: 40em; margin-top: 10px; }
.section-head .credit { font-size: 0.9rem; margin-top: 4px; }

/* 冒頭 */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end;
  max-width: calc(var(--max) + 32px); margin: 0 auto;
  padding-top: 64px !important; padding-bottom: 72px !important;
}
.hero > * { margin: 0; }
.kicker { font-family: var(--round); font-weight: 700; color: var(--violet); margin-bottom: 8px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 900; letter-spacing: 0.01em; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 34em; margin-top: 20px; }
.hero-art img { display: block; height: 560px; width: auto; filter: drop-shadow(0 18px 30px rgba(75, 51, 168, 0.18)); }

/* 冒頭の主役: 文ごとに感情で塗り分けた台本 */
.script {
  margin: 32px 0 28px; padding: 22px 24px;
  background: var(--paper-2); border-radius: 18px;
  font-family: var(--round); font-size: clamp(1.1rem, 2.1vw, 1.35rem); font-weight: 500; line-height: 2.5;
}
.script p { margin: 0; }
.s { position: relative; padding: 2px 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; border-bottom: 3px solid currentColor; margin-right: 6px; color: var(--ink); }
.s i {
  font-style: normal; font-family: var(--sans); font-size: 0.68rem; font-weight: 700; line-height: 1;
  color: #fff; padding: 3px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 0.3em;
}
.s.neutral { border-color: var(--neutral); } .s.neutral i { background: var(--neutral); }
.s.happy { border-color: var(--happy); } .s.happy i { background: var(--happy); }
.s.sad { border-color: var(--sad); } .s.sad i { background: var(--sad); }
.s.surprise { border-color: var(--surprise); } .s.surprise i { background: var(--surprise); }
.script figcaption { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); line-height: 1.6; margin-top: 10px; }
/* 読み込み時に一度だけ、文の下線を順に引く */
@media (prefers-reduced-motion: no-preference) {
  .s { border-bottom-color: transparent; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 3px; animation: underline 0.5s ease-out forwards; }
  .s.neutral { color: var(--ink); background-image: linear-gradient(var(--neutral), var(--neutral)); }
  .s.happy { background-image: linear-gradient(var(--happy), var(--happy)); }
  .s.sad { background-image: linear-gradient(var(--sad), var(--sad)); }
  .s.surprise { background-image: linear-gradient(var(--surprise), var(--surprise)); }
  .s:nth-child(1) { animation-delay: 0.3s; } .s:nth-child(2) { animation-delay: 0.6s; }
  .s:nth-child(3) { animation-delay: 0.9s; } .s:nth-child(4) { animation-delay: 1.2s; }
  .s:nth-child(5) { animation-delay: 1.5s; }
  @keyframes underline { to { background-size: 100% 3px; } }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }

/* 声: 資料のプロフィールをもとに、1 人ずつ絵と紹介を並べる */
.voices { background: var(--paper-2); }
.chara {
  display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 56px; align-items: end;
  padding: 48px 0; border-bottom: 1px solid var(--line);
}
.chara:last-child { border-bottom: 0; }
.chara.flip { grid-template-columns: minmax(0, 1fr) 320px; }
.chara.flip .chara-art { order: 2; }
.chara-art { display: flex; justify-content: center; align-self: end; }
.chara-art img { height: 560px; width: auto; filter: drop-shadow(0 16px 24px rgba(36, 30, 56, 0.16)); }
.chara.bear { align-items: center; padding-bottom: 24px; }
.chara.bear .chara-art img { height: 280px; }
.chara-body { align-self: center; max-width: 46em; }
.chara h3 { font-size: 2.2rem; font-weight: 900; color: var(--c); line-height: 1.6; }
.chara rt { font-family: var(--sans); font-size: 0.42em; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.08em; }
.chara .cv { font-size: 0.92rem; color: var(--ink-soft); margin: 2px 0 14px; }
.chara .mood {
  font-family: var(--round); font-size: 1.2rem; font-weight: 700;
  padding-left: 14px; border-left: 4px solid var(--c); margin-bottom: 20px;
}
.profile { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 36px; margin: 0 0 20px; }
.profile div { display: flex; gap: 12px; }
.profile div.wide { grid-column: 1 / -1; }
.profile dt { color: var(--ink-soft); font-size: 0.9rem; min-width: 3.5em; }
.profile dd { margin: 0; font-weight: 500; }
.bio p { color: var(--ink-soft); }
.chara audio { margin-top: 8px; width: 320px; height: 36px; }
.chara audio[hidden] { display: none; }

/* 声優 */
.actors { margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; align-items: start; }
.actors > div { padding: 22px 0 22px 18px; border-left: 4px solid var(--c); margin-bottom: 20px; }
.actors dt { font-family: var(--round); font-size: 1.35rem; font-weight: 700; }
.actors .role { display: block; font-family: var(--sans); font-size: 0.92rem; font-weight: 500; color: var(--c); margin-top: 2px; }
.actors .role::before { content: "担当: "; color: var(--ink-soft); }
.actors dd { margin: 8px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.actors dd:empty { display: none; }

/* できること: 文章と画面写真を交互に */
.feature {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center;
  margin-bottom: 96px !important;
}
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-text { order: 2; }
.feature-text h3 { margin-bottom: 14px; }
.feature-text p { color: var(--ink-soft); }
.e { font-style: normal; font-weight: 700; padding: 0 2px; border-bottom: 3px solid; }
.e.happy { border-color: var(--happy); } .e.sad { border-color: var(--sad); } .e.angry { border-color: var(--angry); }
.e.surprise { border-color: var(--surprise); } .e.fear { border-color: var(--fear); } .e.neutral { border-color: var(--neutral); }

/* 画面写真: Mac のウインドウの枠に入れる */
.shot { margin: 0; }
.window {
  border-radius: var(--radius-window); overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line);
  box-shadow: 0 24px 48px -20px rgba(36, 30, 56, 0.35);
}
.window img { display: block; width: 100%; }
.window.narrow { max-width: 340px; margin: 0 auto; }  /* 縦長の画面写真 (話し方のつまみ) */
.shot figcaption { font-size: 0.85rem; color: var(--ink-soft); text-align: center; margin-top: 12px; }
/* 画面写真がまだ無いときの枠 (site.js が差し替える) */
.window.pending {
  aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px; color: var(--ink-soft); font-size: 0.9rem;
  background: repeating-linear-gradient(135deg, var(--paper-2) 0 14px, var(--paper) 14px 28px);
}

.facts { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 1px solid var(--line); padding-top: 40px; }
.facts li { color: var(--ink-soft); font-size: 0.95rem; }
.facts strong { display: block; color: var(--ink); font-family: var(--round); font-size: 1.1rem; margin-bottom: 6px; }

/* PRO: 深い紫の面で切り替える */
.pro { background: #2b2152; color: #f1eef8; }
.pro-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.pro .lead, .pro .note { color: #c9c0e6; }
.pro-badge {
  display: inline-block; font-family: var(--round); font-weight: 900; font-size: 0.9rem;
  color: #2b2152; background: #f2c14e; border-radius: 6px; padding: 2px 10px; margin-bottom: 14px;
}
.pro-list dt { font-family: var(--round); font-weight: 700; font-size: 1.15rem; margin-top: 22px; }
.pro-list dd { margin: 6px 0 0; color: #d9d2f0; }
.pro .window { border-color: #463a7a; background: #352a63; }
.pro .window.pending { color: #c9c0e6; background: repeating-linear-gradient(135deg, #352a63 0 14px, #2f255a 14px 28px); }
.pro .shot figcaption { color: #c9c0e6; }

/* 価格 */
.plans { width: 100%; border-collapse: collapse; font-size: 1rem; max-width: 760px; }
.plans th, .plans td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.plans th[scope="row"] { text-align: left; font-weight: 500; color: var(--ink-soft); }
.plans thead th { font-family: var(--round); font-size: 1.15rem; }
.plans .yen { font-family: var(--round); font-weight: 900; font-size: 1.6rem; }
.plans .pick { background: color-mix(in srgb, var(--violet) 8%, transparent); }
.plans thead .pick { color: var(--violet); }
.price-after { color: var(--ink-soft); margin-top: 20px; }
.price-after strong { color: var(--violet); }
.plans .deal { display: block; margin: 6px auto 0; width: fit-content; padding: 3px 12px; border-radius: 999px; background: var(--violet); color: #fff; font-family: var(--sans, inherit); font-size: .8rem; font-weight: 700; }
.price-actions { margin-top: 28px; }
.price-actions .note { margin-top: 12px; }

/* 使いはじめるまで (順番どおりなので番号を付ける) */
.start { background: var(--paper-2); }
.steps { list-style: none; counter-reset: step; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  font-family: var(--round); font-weight: 900; font-size: 1.3rem;
  background: var(--violet); color: var(--on-violet); margin-bottom: 14px;
}
.steps h3 { font-size: 1.15rem; margin-bottom: 8px; }
.steps p { color: var(--ink-soft); font-size: 0.95rem; }

/* ダウンロード */
.download-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: 32px; border: 2px solid var(--line); border-radius: 18px;
}
.download-inner > div { max-width: 40em; }
.download-inner h2 { margin-bottom: 12px; }
.download-inner p { color: var(--ink-soft); }

/* 動作環境 */
.spec-list { display: grid; grid-template-columns: 9em 1fr; max-width: 820px; }
.spec-list dt, .spec-list dd { padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; }
.spec-list dt { font-weight: 700; }

/* よくある質問 */
.faq details { max-width: 820px; border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 700; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.4rem; color: var(--violet); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-soft); padding-bottom: 8px; }

/* しめ */
.closing { text-align: center; }
.closing img { border-radius: 26px; }
.closing h2 { margin: 18px 0 26px; }

.footer { border-top: 1px solid var(--line); padding: 32px 16px 48px; text-align: center; color: var(--ink-soft); font-size: 0.85rem; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 16px; }
.footer p { max-width: 46em; margin: 0 auto 8px; }
