:root {
  --bg: #fffafb;
  --surface: #ffffff;
  --text: #3d2630;
  --muted: #7a5a66;
  --line: #f5dde4;
  --accent: #d0587e;
  --accent-soft: #fdeef2;
  --coral: #f2715a;
  --sea-top: #fff6f8;
  --sea-mid: #fde4ea;
  --sea-deep: #f8cfda;
  --abyss: #a8506d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  line-height: 1.8;
  font-size: 16px;
}
a { color: var(--accent); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
header.site {
  background: var(--surface);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--sea-mid), var(--coral)) 1;
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.brand svg { width: 34px; height: 34px; flex: none; }
nav a { margin-left: 14px; font-size: 14px; text-decoration: none; color: var(--muted); }
nav a:first-child { margin-left: 0; }
nav a:hover { color: var(--accent); }

/* 海のヒーロー */
.ocean {
  position: relative;
  background: linear-gradient(180deg, var(--sea-top) 0%, var(--sea-mid) 45%, var(--sea-deep) 100%);
  color: var(--text);
  overflow: hidden;
}
.ocean::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(255,255,255,.35), transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 10%, rgba(255,255,255,.2), transparent 70%);
  pointer-events: none;
}
.brand img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.ocean .hero {
  position: relative; padding: 40px 16px 8px;
  display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: center;
}
.hero-img {
  width: 300px; height: 300px; border-radius: 50%;
  box-shadow: 0 10px 36px rgba(208,88,126,.22), 0 0 0 6px rgba(255,255,255,.75);
}
.ocean > svg { display: block; width: 100%; height: 60px; position: relative; }
@media (max-width: 720px) {
  .ocean .hero { grid-template-columns: 1fr; text-align: left; }
  .hero-img { width: 220px; height: 220px; justify-self: center; order: -1; }
}
.ocean .hero h1 { font-size: 32px; line-height: 1.45; margin: 0 0 14px; color: #5a2a3c; }
.ocean .hero p { margin: 0; max-width: 620px; color: #6b3d4d; }
.ocean svg.reef { display: block; width: 100%; height: 190px; position: relative; }
.bubbles circle { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 2; }

/* 小さな海の帯（下層ページ） */
.ocean-mini {
  background: linear-gradient(180deg, var(--sea-mid), var(--sea-deep));
  color: #5a2a3c;
}
.ocean-mini .wrap { padding-top: 28px; padding-bottom: 8px; }
.ocean-mini h1 { margin: 0; font-size: 26px; }
.ocean-mini .meta { color: #7a5060; font-size: 14px; margin: 4px 0 0; }
.ocean-mini svg { display: block; width: 100%; height: 70px; }

/* カード */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 8px 0 8px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  box-shadow: 0 6px 18px rgba(208,88,126,.07);
}
.card .ico { width: 40px; height: 40px; margin-bottom: 6px; }
.card h3 { margin: 0 0 6px; font-size: 16px; color: var(--accent); }
.card p { margin: 0; font-size: 14px; color: var(--muted); }

section { margin: 40px 0; }
h2 { font-size: 20px; border-left: 5px solid var(--coral); padding-left: 10px; margin: 32px 0 14px; }
h3 { font-size: 17px; margin: 24px 0 8px; }
table.info { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
table.info th, table.info td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
table.info tr:last-child th, table.info tr:last-child td { border-bottom: none; }
table.info th { width: 32%; background: var(--accent-soft); font-weight: 600; }

/* 文書ページ */
.doc { padding: 24px 16px 48px; }
.doc .meta { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.doc ol, .doc ul { padding-left: 1.4em; }
.note { background: var(--accent-soft); border-radius: 12px; padding: 14px 16px; font-size: 15px; }
.en { margin-top: 48px; padding-top: 24px; border-top: 1px dashed var(--line); }

/* フッター（深い海） */
footer.site { color: #fbe6ec; font-size: 13px; margin-top: 40px; }
footer.site svg { display: block; width: 100%; height: 60px; margin-bottom: -2px; }
footer.site .foot { background: var(--abyss); }
footer.site .wrap { padding-top: 8px; padding-bottom: 32px; }
footer.site a { color: #ffffff; margin-right: 14px; }

@media (max-width: 480px) {
  .ocean .hero h1 { font-size: 25px; }
  .ocean svg.reef { height: 130px; }
  table.info th { width: 38%; }
}
svg.wave-down { display: block; width: 100%; height: 60px; margin-top: -1px; }

/* BGMボタン（ヒーローの右上の端。イラストには重ねない） */
.bgm-row { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-bottom: -8px; }
.bgm-hero {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border: 2px solid #f3cf4a; border-radius: 999px;
  background: #fff2b0; color: #000;
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(208,88,126,.22);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .2s, color .2s;
}
@media (max-width: 720px) {
  .bgm-row { order: -2; margin-bottom: 0; }
  .bgm-hero { padding: 7px 13px; font-size: 13px; }
}
.bgm-hero:hover { background: #ffe98a; }
.bgm-hero.playing { background: var(--accent); color: #fff; }
.bgm-hero:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.bgm-ico { font-size: 20px; line-height: 1; display: inline-block; }
.bgm-hero.playing .bgm-ico { animation: bgm-bob 1.6s ease-in-out infinite; }

@keyframes bgm-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .bgm-hero.playing .bgm-ico { animation: none; } }

/* 仕上げ：メニューの文字が途中で折り返さないように／見出しを意味の切れ目で改行 */
nav { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 2px; }
nav a, nav a:first-child { margin-left: 0; white-space: nowrap; }
.nb { display: inline-block; }

/* Android版で公開中のアプリ */
.apps { display: grid; gap: 14px; }
.app { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.app img { flex: none; width: 72px; height: 72px; border-radius: 18px; }
.app-body h3 { margin: 0 0 6px; font-size: 17px; color: var(--accent); }
.app-body p { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.play-btn { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.play-btn:hover { opacity: .88; }
@media (max-width: 480px) { .app { padding: 14px; gap: 12px; } .app img { width: 56px; height: 56px; border-radius: 14px; } }
.line-btn { background: #06c755; }

/* アプリ一覧：横に2つずつ（タイトルとボタンだけ） */
.apps-2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apps-2col .app { align-items: center; }
.apps-2col .app-body h3 { margin-bottom: 10px; }
@media (max-width: 600px) {
  .apps-2col { gap: 10px; }
  .apps-2col .app { flex-direction: column; align-items: center; text-align: center; padding: 14px 10px; gap: 8px; }
  .apps-2col .app-body h3 { font-size: 15px; }
  .apps-2col .play-btn { font-size: 12px; padding: 7px 12px; }
}
.apps-2col .app-body h3 .sub { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 2px; }
@media (max-width: 600px) {
  .apps-2col .app { align-items: center; }
  .apps-2col .app-body { display: flex; flex-direction: column; align-items: center; flex: 1; width: 100%; }
  .apps-2col .app-body .play-btn { margin-top: auto; }
  .apps-2col .app-body h3 { font-size: 14px; }
}

/* 英語の自己紹介 */
.intro { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 18px; }
.intro p { margin: 0 0 8px; }
.intro .flags-label { font-weight: 700; margin-top: 12px; }
.flags { display: flex; flex-wrap: wrap; gap: 8px; }
.flags img { width: 32px; height: 24px; display: block; }

/* 海の写真（Aboutの上） */
.photo-band { margin: 0 0 16px; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(30,80,120,.15); }
.photo-band img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; object-position: center 90%; }
@media (max-width: 600px) { .photo-band img { aspect-ratio: 3 / 1; object-position: center 100%; } }
.photo-band figcaption { background: var(--surface); padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--muted); }
.photo-band figcaption a { color: inherit; text-decoration: none; }
.photo-band figcaption a:hover { text-decoration: underline; }
.photo-band figcaption .cap-ja { display: block; font-size: 12px; font-weight: 500; margin: 2px 0 0 1.4em; }
