/* 色づかいのルール：ページの背景は白。部品（ボタン・カード・ラベル・質問）は「淡い色の背景＋濃い色のふち＋濃い色の文字」で統一する */
:root {
  --bg: #ffffff;
  --text: #2b2433;
  --muted: #6f6779;
  --line: #ece6ef;
  /* オレンジ系 */
  --o-bg: #fff2ea; --o-bd: #ee724a; --o-tx: #b83f17;
  /* むらさき系 */
  --v-bg: #f0eeff; --v-bd: #7c6cf0; --v-tx: #4638b8;
  /* グレー系 */
  --g-bg: #f3f2f5; --g-bd: #8a8494; --g-tx: #575161;
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Apple SD Gothic Neo", "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", Meiryo, sans-serif;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--v-tx); }
img { max-width: 100%; display: block; }
.wrap { width: min(1040px, 100% - 32px); margin-inline: auto; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav nav { display: flex; align-items: center; gap: 4px; }
.nav nav a { white-space: nowrap; color: var(--text); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 999px; }
.nav nav a:hover { background: var(--o-bg); }
.nav nav a.btn-sm { background: var(--o-bg); color: var(--o-tx); font-weight: 700; border: 1.5px solid var(--o-bd); padding: 4px 14px; }
@media (max-width: 520px) { .nav nav a:not(.btn-sm) { display: none; } }
/* 言語メニュー（ヘッダー右端）。部品のルール：淡い背景＋濃いふち＋濃い文字 */
.lang { position: relative; margin-left: 6px; }
.lang summary {
  list-style: none; cursor: pointer; user-select: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: var(--v-tx);
  background: var(--v-bg); border: 1.5px solid var(--v-bd); border-radius: 999px; padding: 4px 10px;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: #e4e0ff; }
.lang summary:focus-visible, .lang button:focus-visible { outline: 2px solid var(--v-bd); outline-offset: 2px; }
.lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lang .chev { width: 13px; height: 13px; transition: transform .15s; }
.lang[open] .chev { transform: rotate(180deg); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; min-width: 148px;
  background: #fff; border: 1.5px solid var(--v-bd); border-radius: 16px; box-shadow: 0 10px 28px rgba(70, 56, 184, .16);
}
.lang li { margin: 0; }
.lang button {
  width: 100%; text-align: left; font: inherit; font-size: 14px; color: var(--text); background: none; border: 0;
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
}
.lang button:hover { background: var(--v-bg); }
.lang button[aria-current="true"] { background: var(--v-bg); color: var(--v-tx); font-weight: 800; }
@media (max-width: 520px) {
  .nav nav a.btn-sm { padding: 4px 10px; font-size: 13px; }
  .lang { margin-left: 2px; }
  .lang summary { padding: 4px 8px; }
  .lang #lang-current { display: none; }
  .lang .chev { display: none; }
}
.brand { white-space: nowrap; font-weight: 800; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--o-bg); border: 2px solid var(--o-bd); display: inline-block; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; text-align: center; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: 0; }
.b1 { width: 340px; height: 340px; background: #ffc9b3; top: -90px; left: -80px; }
.b2 { width: 300px; height: 300px; background: #cfc8ff; top: 40px; right: -90px; }
.b3 { width: 260px; height: 260px; background: #ffe2a8; bottom: -100px; left: 35%; }
.hero-in { position: relative; z-index: 1; }
.kicker { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .22em; color: var(--o-tx); }
.hero h1 { text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; font-size: clamp(26px, 6vw, 48px); line-height: 1.35; margin: 4px 0 16px; letter-spacing: .01em; }
.hero-icons { margin-top: 44px; display: flex; justify-content: center; gap: 12px; }
.hero-icons.loop {
  --s: 64px; --g: 16px;
  display: block; overflow: hidden; padding: 18px 14px; margin: 40px auto 0;
  width: calc(4 * var(--s) + 3 * var(--g) + 28px); max-width: 100%;
}
@media (min-width: 700px) { .hero-icons.loop { --s: 80px; --g: 24px; } }
@media (max-width: 380px) { .hero-icons.loop { --s: 54px; --g: 12px; } }
.hi-track { display: flex; width: max-content; animation: slide3 36s linear infinite; }
.hi-group { display: flex; }
.hero-icons.loop img:nth-child(n) { width: var(--s); height: var(--s); flex: none; margin-right: var(--g); transform: none; box-shadow: 0 4px 10px rgba(120, 70, 40, .16); }
@keyframes slide3 { to { transform: translateX(-33.3333%); } }
.hero-icons img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 4px 10px rgba(120, 70, 40, .16); }
.hero-icons img:nth-child(odd) { transform: translateY(8px) rotate(-4deg); }
.hero-icons img:nth-child(even) { transform: translateY(-4px) rotate(4deg); }
@media (min-width: 700px) { .hero-icons img { width: 80px; height: 80px; border-radius: 18px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 12px 26px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 15px;
  color: var(--o-tx); background: var(--o-bg); border: 1.5px solid var(--o-bd);
  transition: background .15s ease;
}
.btn:hover { background: #ffe4d4; }
.btn.ghost { color: var(--v-tx); background: var(--v-bg); border-color: var(--v-bd); }
.btn.ghost:hover { background: #e4e0ff; }
.btn.big { padding: 16px 36px; font-size: 17px; }
.btn .ico { width: 1.3em; height: 1.3em; margin-right: .55em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- sections ---------- */
.sec { padding: 64px 0; }
.sec h2 { font-size: clamp(24px, 4vw, 32px); margin: 0 0 28px; }

/* ---------- apps（2列・1アプリ＝1枚） ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  --c-bg: var(--o-bg); --c-bd: var(--o-bd); --c-tx: var(--o-tx);
  position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(112px, auto); align-items: center; column-gap: 20px;
  padding: 40px 22px 18px; background: var(--c-bg); border: 1.5px solid var(--c-bd); border-radius: var(--radius);
}
.card.g-study { --c-bg: var(--v-bg); --c-bd: var(--v-bd); --c-tx: var(--v-tx); }
.card.g-soon { --c-bg: var(--g-bg); --c-bd: var(--g-bd); --c-tx: var(--g-tx); }
.card .icon { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 3px 8px rgba(0, 0, 0, .15); }
.card h3 { margin: 0; font-size: 17px; line-height: 1.5; min-height: 3em; display: flex; align-items: center; }
.tag {
  position: absolute; top: -1.5px; left: -1.5px; border-radius: var(--radius) 0 14px 0; padding: 3px 16px 3px 18px;
  font-size: 11px; font-weight: 800; line-height: 1.7; color: var(--c-tx); background: var(--c-bg); border: 1.5px solid var(--c-bd);
}
.links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.badge { display: inline-block; line-height: 0; }
.badge img { height: 40px; width: auto; max-width: none; }
.store.off {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; width: 109px; padding: 0;
  font-size: 13px; font-weight: 700; border-radius: 999px; text-decoration: none;
  background: var(--g-bg); color: var(--g-tx); border: 1.5px solid var(--g-bd); cursor: not-allowed; pointer-events: none;
}
/* 画面がせまいとき：アイコン・タイトル・ダウンロードを、1行のまま小さめに並べる */
@media (max-width: 899px) {
  .card { grid-template-columns: 56px minmax(0, 1fr) minmax(109px, auto); column-gap: 12px; padding: 36px 16px 14px; }
  .card .icon { width: 56px; height: 56px; border-radius: 14px; }
  .card h3 { font-size: 15px; min-height: 0; }
}
@media (max-width: 759px) { .cards { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .card { column-gap: 10px; padding: 36px 12px 14px; }
  .card .icon { width: 48px; height: 48px; border-radius: 12px; }
}

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--o-bg); border: 1.5px solid var(--o-bd); border-radius: 16px; overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 48px 16px 16px; font-weight: 700; position: relative; display: flex; gap: 12px; align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 22px; color: var(--o-tx); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.q { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1.5px solid var(--o-bd); color: var(--o-tx); font-size: 13px; display: grid; place-items: center; margin-top: 2px; }
.a { padding: 0 16px 18px 52px; color: var(--muted); font-size: 14.5px; }
.a strong { color: var(--text); }
.faq details[hidden] { display: none; }

/* ---------- contact ---------- */
.contact-btns { display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap; }
.contact-btns [hidden] { display: none; }
.small { font-size: 12.5px; color: var(--muted); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 32px 0 48px; background: var(--bg); }
.foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-links { display: grid; gap: 4px; font-size: 13px; }
.foot-links a { color: var(--muted); }
.foot-links b { font-size: 12px; letter-spacing: .05em; }
.footer .small { margin: 6px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .hi-track { animation: none; }
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}


/* 言語ごとの調整 */
:lang(en) .hero h1, :lang(fr) .hero h1 { word-break: normal; }
:lang(en) .hero h1, :lang(fr) .hero h1, :lang(ko) .hero h1 { line-height: 1.3; }
:lang(en) body, :lang(fr) body { line-height: 1.7; }
