/* 11amawip — 共通の骨組み。アプリごとの色は .app--<key> の --accent だけで変える */
:root {
  --navy: #13294B;
  --deep: #1F5299;
  --sky: #8FDDF7;
  --blue: #2F86F0;
  --yellow: #FFD84D;
  --white: #FFFFFF;
  --muted: #D6E6FA;
  --radius: 22px;
  --page: #1F5299;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--deep);
  color: var(--white);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------- 上の帯 ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(16px, 4vw, 40px);
  font-weight: 800; letter-spacing: .04em;
}
.top a { text-decoration: none; }
.lang {
  border: 2px solid rgba(255,255,255,.35); border-radius: 999px;
  padding: 4px 14px; font-size: 14px;
}
.lang:hover { border-color: var(--yellow); color: var(--yellow); }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 90px clamp(16px, 5vw, 64px) 70px;
  background:
    radial-gradient(55% 55% at 25% 40%, rgba(143,221,247,.55), transparent 70%),
    radial-gradient(45% 45% at 85% 75%, rgba(255,216,77,.22), transparent 70%),
    linear-gradient(170deg, #2F86F0 0%, #3E9BF4 55%, #2A72D6 100%);
  overflow: hidden;
}
.hero__inner {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 72px);
  align-items: center; max-width: 1100px; width: 100%;
}
.hero__inner > * { min-width: 0; }
.avatar {
  position: relative; width: clamp(200px, 32vw, 380px); aspect-ratio: 1;
}
.avatar::before { /* 電球のあたりがふわっと光る */
  content: ""; position: absolute; left: 4%; top: 2%; width: 45%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,216,77,.55), transparent 65%);
  filter: blur(6px); animation: glow 2.6s ease-in-out infinite; z-index: -1;
}
.avatar img { animation: bob 4s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .25em;
  color: var(--navy); background: var(--yellow); padding: 4px 12px; border-radius: 6px;
  transform: rotate(-2deg);
}
.hero h1 {
  margin: 14px 0 6px; font-size: clamp(52px, 8vw, 104px); line-height: .95;
  font-weight: 900; letter-spacing: -.02em;
  text-shadow: 6px 6px 0 var(--navy);
}
.hero h1 small {
  display: block; font-size: .32em; letter-spacing: .08em; text-shadow: 3px 3px 0 var(--navy);
  margin-bottom: .12em;
}
.hero .lead { margin: 18px 0 0; font-size: clamp(17px, 2.1vw, 22px); font-weight: 700; }
.hero .lead span { color: var(--yellow); }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.stats li {
  border: 2px solid var(--white); color: var(--white); background: rgba(19,41,75,.18); border-radius: 10px;
  padding: 6px 14px; font-weight: 800; font-size: 14px; letter-spacing: .06em;
}
.cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
  background: var(--white); color: var(--navy); text-decoration: none;
  font-weight: 900; padding: 14px 26px; border-radius: 14px;
  box-shadow: 0 6px 0 var(--navy); transition: transform .15s, box-shadow .15s;
}
.cta:hover { transform: translateY(3px); box-shadow: 0 3px 0 var(--navy); }
.cta .arrow { display: inline-block; animation: nudge 1.4s ease-in-out infinite; }

/* 漂うドット（アイコンの四角） */
.dots { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.dots i {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--s); height: var(--s); background: var(--c); border-radius: 3px;
  opacity: .85; animation: float var(--d) ease-in-out infinite alternate;
}

/* ---------- 流れる帯 ---------- */
.marquee {
  background: var(--yellow); color: var(--navy); overflow: hidden;
  border-block: 4px solid var(--navy); transform: rotate(-1.5deg); margin: 0 -20px;
}
.band { overflow: hidden; margin-top: -26px; padding: 14px 0; position: relative; z-index: 2; }
.marquee__track {
  display: flex; width: max-content; gap: 0; white-space: nowrap;
  font-weight: 900; font-size: clamp(18px, 3vw, 28px); padding: 10px 0;
  animation: marquee 26s linear infinite;
}
.marquee__track span { padding: 0 22px; }
.marquee__track span::after { content: "◆"; margin-left: 44px; font-size: .6em; vertical-align: middle; }

/* ---------- アプリ ---------- */
.games { padding: clamp(60px, 9vw, 120px) clamp(16px, 5vw, 64px) 40px; max-width: 1180px; margin: 0 auto; }
.games > h2 {
  font-size: clamp(30px, 5vw, 52px); font-weight: 900; margin: 0 0 8px; line-height: 1.1;
}
.games > p { color: var(--muted); margin: 0 0 clamp(36px, 6vw, 64px); font-weight: 600; }

.app {
  --accent: var(--sky);
  position: relative;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(20px, 5vw, 60px); align-items: center;
  padding: clamp(26px, 5vw, 56px);
  margin-bottom: clamp(28px, 5vw, 48px);
  border-radius: 32px;
  background:
    radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%),
    linear-gradient(160deg, #2E6CC0, #23599F);
  border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 18px 40px rgba(10,30,70,.25);
  overflow: hidden;
}
.app:nth-of-type(even) { grid-template-columns: .95fr 1.05fr; }
.app:nth-of-type(even) .app__text { order: 2; }
.app__num {
  position: absolute; right: 22px; bottom: -14px; font-size: clamp(90px, 16vw, 190px);
  font-weight: 900; line-height: 1; color: transparent;
  -webkit-text-stroke: 2px color-mix(in srgb, var(--accent) 55%, transparent);
  pointer-events: none;
}
.app:nth-of-type(even) .app__num { right: auto; left: 22px; }
.app__head { display: flex; gap: 16px; align-items: center; }
.app__icon {
  width: 76px; height: 76px; border-radius: 18px; flex: none;
  box-shadow: 0 0 0 3px var(--accent), 0 10px 24px rgba(0,0,0,.35);
}
.app__name { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 900; line-height: 1.2; }
.app__genre { margin: 2px 0 0; color: var(--accent); font-weight: 800; font-size: 14px; letter-spacing: .04em; }
.app__catch {
  margin: 22px 0 16px; font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; line-height: 1.25;
  word-break: auto-phrase; text-wrap: balance;
  letter-spacing: -.01em;
}
.app__catch em { font-style: normal; color: var(--accent); }
.app__feat { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 8px; }
.app__feat li { position: relative; padding-left: 26px; font-weight: 600; color: #F2F7FE; }
.app__feat li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 11px; height: 11px;
  background: var(--accent); border-radius: 2px; transform: rotate(45deg);
}
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--yellow); color: var(--navy); text-decoration: none; font-weight: 900;
  font-size: 17px; padding: 14px 24px; border-radius: 14px; white-space: nowrap;
  box-shadow: 0 6px 0 #C99A00; transition: transform .15s, box-shadow .15s;
}
.store:hover { transform: translateY(3px); box-shadow: 0 3px 0 #C99A00; }
.store svg { width: 20px; height: 20px; }
.soon {
  display: inline-block; font-weight: 900; padding: 12px 22px; border-radius: 14px;
  border: 2px dashed var(--accent); color: var(--accent);
}

/* スマホの画面 */
.phones { position: relative; height: clamp(340px, 46vw, 520px); }
.phone {
  position: absolute; width: 50%; max-width: 230px; aspect-ratio: 1206 / 2622;
  border-radius: 30px; padding: 7px; background: #050B16;
  box-shadow: 0 24px 50px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.08);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
.phone--a { left: 8%; top: 6%; transform: rotate(-7deg); z-index: 2; }
.phone--b { right: 8%; top: 0; transform: rotate(6deg) translateY(30px); }
.app:hover .phone--a { transform: rotate(-9deg) translateY(-10px); }
.app:hover .phone--b { transform: rotate(8deg) translateY(16px); }

/* アプリの色 */
.app--nawabari   { --accent: #7FD3FF; }
.app--suberidase { --accent: #5EE3D0; }
.app--chanbara   { --accent: #FF6B5B; }
.app--honey      { --accent: #FFC83D; }
.app--honey .app__name { white-space: normal; }  /* 英語名が長い */
.app--kirikae    { --accent: #9BE15D; }

/* ---------- 下 ---------- */
.foot {
  text-align: center; padding: 70px 16px 60px; background: linear-gradient(180deg, #2A72D6, #2F86F0);
  border-top: 4px solid var(--yellow);
}
.foot img { width: 96px; margin: 0 auto 14px; }
.foot h2 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 34px); font-weight: 900; }
.foot p { margin: 0 0 22px; color: var(--muted); font-weight: 600; }
.xbtn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--white); color: #000; font-weight: 900; padding: 13px 24px; border-radius: 999px;
}
.xbtn svg { width: 18px; height: 18px; }
.copy { margin-top: 36px; font-size: 13px; color: var(--muted); }

/* ---------- 動き ---------- */
@keyframes float { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(14px, -22px) rotate(25deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* スクロールで現れる（対応ブラウザだけ。未対応なら最初から見えている） */
@supports (animation-timeline: view()) {
  .app { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  .phone--a { animation: driftA linear both; animation-timeline: view(); animation-range: cover; }
  .phone--b { animation: driftB linear both; animation-timeline: view(); animation-range: cover; }
  @keyframes rise { from { transform: translateY(50px) scale(.97); } to { transform: none; } }
  @keyframes driftA { from { translate: 0 40px; } to { translate: 0 -40px; } }
  @keyframes driftB { from { translate: 0 -10px; } to { translate: 0 30px; } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- スマホ ---------- */
@media (max-width: 760px) {
  .hero { min-height: auto; padding-top: 80px; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .stats { justify-content: center; }
  .app, .app:nth-of-type(even) { grid-template-columns: 1fr; }
  .app:nth-of-type(even) .app__text { order: 0; }
  .phones { height: 380px; max-width: 360px; width: 100%; margin: 0 auto; }
  .phone { max-width: 170px; }
  .app__icon { width: 60px; height: 60px; border-radius: 14px; }
  .app__head { gap: 14px; }
  .app__name { font-size: 20px; white-space: nowrap; }
  .app__genre { font-size: 12.5px; letter-spacing: 0; }
}

/* 幅の狭い iPhone（SE・mini の拡大表示など） */
@media (max-width: 360px) {
  .app { padding: 22px 16px; }
  .app__head { gap: 10px; }
  .app__icon { width: 48px; height: 48px; border-radius: 12px; }
  .app__name { font-size: 17px; white-space: normal; }
  .store { white-space: normal; font-size: 15px; padding: 12px 16px; }
  .soon { font-size: 14px; padding: 10px 14px; }
}

/* ---------- スマホで札を畳む（JS が html.js を付けたときだけ） ---------- */
.app__more { display: none; }
@media (max-width: 760px) {
  html.js .app__more {
    display: inline-flex; align-items: center; gap: 8px; margin: 14px auto 0; padding: 10px 18px;
    border-radius: 999px; border: 2px solid var(--accent); background: transparent; color: var(--accent);
    font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; width: 100%; justify-content: center;
  }
  html.js .app__more::after { content: "▾"; transition: transform .25s; }
  html.js .app.is-open .app__more::after { transform: rotate(180deg); }
  html.js .app:not(.is-open) .app__feat, html.js .app:not(.is-open) .phones { display: none; }
  html.js .app:not(.is-open) .app__num { display: none; }  /* 畳んだ札では番号がボタンに重なる */
  html.js .app.is-open .phones { margin-top: 18px; }
  html.js .app { padding-bottom: 22px; }
  html.js .app__feat { margin-top: 18px; }
}
