/* ========== 基本 ========== */
:root {
  /* アプリ本体の AppColors に合わせている（lib/theme/app_colors.dart）。
     アプリ側の色を変えるときは、ここも一緒に直すこと。
     --accent は明るいので、上に載せる文字は --primary にする（白は不可）。 */
  --primary: #0E6B74;
  --primary-dark: #123C44;
  --primary-darker: #123C44;
  --primary-soft: #E3F4F2;
  --accent: #57D2C9;
  --ink: #0B2A30;
  --bg: #FFFFFF;
  --bg-alt: #F7F4EE;
  --text: #16292D;
  --text-soft: #4E6064;
  --text-muted: #7F8C8E;
  --border: #E6E1D6;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-darker);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Header ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.brand-name {
  font-size: 19px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.5px;
}
.nav {
  display: flex;
  gap: 22px;
}
.nav a {
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 500;
  transition: color .2s;
}
.nav a:hover {
  color: var(--primary-darker);
  text-decoration: none;
}

/* 日本語の途中で不自然に折り返さないユニット。
   ブラウザは span 間で改行するので、文単位で改行が起こる */
.phrase {
  display: inline-block;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-soft) 0%, #FFF 100%);
  padding: 72px 0 96px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 460px;
  height: 460px;
  background: radial-gradient(closest-side, rgba(87,210,201,0.35), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.hero-title {
  font-size: 44px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--text);
  /* 句読点や英単語・数字を含めても綺麗に折り返す */
  text-wrap: pretty;
}
.hero-desc {
  font-size: 16px;
  color: var(--text-soft);
  margin-bottom: 28px;
  text-wrap: pretty;
}
.hero-desc strong {
  color: var(--primary-darker);
  font-weight: 700;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid transparent;
}
.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0,0,0,0.10);
}
.btn-store {
  background: var(--ink);
  color: #fff;
}
.btn-store svg {
  width: 18px;
  height: 18px;
}
.hero-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.hero-screenshot {
  display: flex;
  justify-content: center;
}
.hero-screenshot img {
  max-width: 320px;
  border-radius: 30px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
  border: 6px solid var(--ink);
}

/* ========== Section 共通 ========== */
.section {
  padding: 80px 0;
}
.section-about {
  background: var(--bg-alt);
}
.section-features {
  background: #fff;
}
.section-news {
  background: var(--bg-alt);
}
.section-contact {
  background: #fff;
}
.section-title {
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 18px;
  color: var(--text);
  position: relative;
  padding-bottom: 16px;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
}
.section-lead {
  text-align: center;
  color: var(--text-soft);
  max-width: 720px;
  margin: 0 auto 48px;
  font-size: 15px;
}

/* ========== About cards ========== */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  background: #fff;
  padding: 24px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.10);
}
.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-darker);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 1.5px;
}
.card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.card p {
  font-size: 13px;
  color: var(--text-soft);
}

/* ========== Features（カルーセル） ==========
   スワイプと慣性は scroll-snap に任せ、JS は自動送りと表示の同期だけを持つ。
   矢印とドットを消しても指で操作できる状態を保つのが狙い。 */
.carousel {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  /* 左右に隣のスライドを覗かせる量（トラック幅に対する割合）。
     「次がある」と分かるようにするためのもの。
     トラックの左右余白に使っており、スライド幅は自動的に残りになる。 */
  --slide-peek: 22%;
  /* 端末画像の高さ。1画面に収まる範囲でできるだけ大きく見せたい。
     510px は画像以外（見出し・番号・タイトル・説明文・ドット・余白）の
     実測合計500pxに少し余裕を足したもので、それを引いた残りを画像に充てている。
     覗かせる量を変えると説明文の行数が変わり、この500pxも変わるので測り直すこと。
     矢印の縦位置もこの値から出しているので、変えるときはここだけ直せばよい。 */
  --slide-img-h: clamp(300px, calc(100vh - 510px), 660px);
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* スクロールバーは出さない（矢印とドットで位置を示す） */
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* 左右の余白ぶんだけ隣のスライドが見える。スライドは flex: 0 0 100%（＝内容幅）
     なので、この余白を変えるだけで覗く量が決まる。
     上下の4pxはフォーカスリングが端末画像に食い込まないための余白。 */
  padding: 4px var(--slide-peek);
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.carousel-track:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: var(--radius);
}
.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 24px 0;
}
/* 選択中以外を控えめにして、真ん中がいまの1枚だと分かるようにする。
   JSが動いた時だけ付く is-enhanced を条件にしているので、
   JSが失敗しても全部が薄いままにはならない。 */
.carousel.is-enhanced .slide {
  transition: opacity 0.35s ease;
}
.carousel.is-enhanced .slide:not(.is-active) {
  opacity: 0.38;
}
.carousel.is-enhanced .slide .slide-image img {
  transition: transform 0.35s ease;
}
.carousel.is-enhanced .slide:not(.is-active) .slide-image img {
  transform: scale(0.94);
}

.slide-image {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}
.slide-image img {
  /* 端末画像の高さで1画面に収まるかが決まるので、幅ではなく高さで抑えている */
  max-height: var(--slide-img-h);
  width: auto;
  border-radius: 24px;
  border: 5px solid var(--ink);
  box-shadow: 0 14px 36px rgba(0,0,0,0.16);
}
.slide-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2.5px;
  margin-bottom: 6px;
}
.slide-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
  color: var(--primary-darker);
}
.slide-desc {
  font-size: 15px;
  color: var(--text-soft);
  max-width: 560px;
}

.carousel-arrow {
  position: absolute;
  /* 端末画像の縦中央に置く（12px = .carousel-track の上余白4px + .slide の上余白8px） */
  top: calc(12px + var(--slide-img-h) / 2);
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  color: var(--primary-darker);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.15s ease, transform 0.15s ease;
}
.carousel-arrow:hover {
  background: #fff;
  /* translateY を消すと縦位置がずれるので必ず併記する */
  transform: translateY(-50%) scale(1.06);
}
.carousel-arrow:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
/* 覗いている隣のスライドの上に重ねる。外側に出すと画面幅が狭い時にはみ出す。 */
.carousel-prev {
  left: 8px;
}
.carousel-next {
  right: 8px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dot:hover {
  background: var(--primary-dark);
}
.carousel-dot:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.carousel-dot[aria-current="true"] {
  background: var(--primary);
  transform: scale(1.35);
}

/* ========== News (更新情報) ========== */
.news-list {
  list-style: none;
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.news-item {
  border-bottom: 1px solid var(--border);
}
.news-link {
  display: grid;
  grid-template-columns: 110px 110px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 8px;
  color: var(--text);
  transition: background 0.15s ease;
}
.news-link:hover {
  background: var(--bg-alt);
  text-decoration: none;
}
/* リンクを持たない行（更新情報）。矢印の列がないぶん3列 */
.news-row {
  display: grid;
  grid-template-columns: 110px 110px 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 8px;
}
.news-date {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.news-tag {
  display: inline-block;
  text-align: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.news-tag-press {
  background: var(--primary-soft);
  color: var(--primary-darker);
}
.news-tag-update {
  background: #FEF3E0;
  color: #B97A12;
}
.news-tag-info {
  background: #E8EFF6;
  color: #3F6489;
}
.news-tag-ops {
  background: var(--primary-soft);
  color: var(--primary-darker);
}
.news-title {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}
.news-link:hover .news-title {
  color: var(--primary-darker);
}
.news-arrow {
  color: var(--text-muted);
  font-size: 14px;
  transition: transform 0.15s ease, color 0.15s ease;
}

/* 9件目以降の折りたたみ。JSは使わず details/summary に任せている。
   閉じていても中身はHTMLにあるので、検索エンジンからは全件見える。 */
.news-more {
  max-width: 820px;
  margin: 0 auto;
}
.news-more-toggle {
  display: block;
  padding: 16px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--primary-darker);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  list-style: none; /* 三角マークを消す（Firefox） */
  transition: background 0.15s ease;
}
/* Safari/Chrome の三角マーク */
.news-more-toggle::-webkit-details-marker {
  display: none;
}
.news-more-toggle:hover {
  background: var(--bg-alt);
}
.news-more-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
/* ラベル横の下向き矢印。開いたら上を向く */
.news-more-label::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.news-more-label-close::after {
  transform: translateY(1px) rotate(-135deg);
}
/* 開閉でラベルを入れ替える */
.news-more-label-close,
.news-more[open] .news-more-label-open {
  display: none;
}
.news-more[open] .news-more-label-close {
  display: inline;
}
/* 8件目の下線とボタンの上線が重ならないよう、続きのリストは上線を持たない */
.news-list-rest {
  border-top: 0;
}
.news-link:hover .news-arrow {
  color: var(--primary-darker);
  transform: translate(2px, -2px);
}

@media (max-width: 720px) {
  .news-link,
  .news-row {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 16px 4px;
  }
  .news-date {
    grid-column: 1;
    grid-row: 1;
    font-size: 12px;
  }
  .news-tag {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .news-title {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 14px;
  }
  .news-arrow {
    display: none;
  }
}

/* ========== Contact ========== */
.contact-card {
  background: var(--bg-alt);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.contact-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-align: center;
}
.contact-alt {
  text-align: center;
  margin-top: 20px;
}
.contact-alt p {
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-soft);
}

/* ========== Footer ========== */
.footer {
  background: var(--ink);
  color: #fff;
  padding: 36px 0 28px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}
.footer-name {
  font-weight: 800;
  font-size: 16px;
}
.footer-tag {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.footer-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}
.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  margin-top: 12px;
}
/* アクセス解析の告知。読めるが主張しない大きさに留める */
.footer-note {
  width: 100%;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
  color: rgba(255,255,255,0.35);
  margin-top: 8px;
}
.footer-note a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
}

/* ========== Responsive ========== */
@media (max-width: 880px) {
  .nav {
    display: none;
  }
  .hero {
    padding: 56px 0 64px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .hero-title {
    font-size: 30px;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-screenshot img {
    max-width: 240px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .carousel {
    /* スマホは説明文の行数が増えるぶん、画像を少し抑える。
       覗かせる量も、本体が狭くなりすぎないよう控えめにする。 */
    --slide-img-h: min(52vh, 460px);
    --slide-peek: 10%;
  }
  .slide {
    padding: 8px 8px 0;
  }
  .slide-title {
    font-size: 18px;
  }
  .slide-desc {
    font-size: 14px;
  }
  /* 指でスワイプできるので矢印は出さない（端末画像に重なるのも避ける） */
  .carousel-arrow {
    display: none;
  }
  .section {
    padding: 56px 0;
  }
  .section-title {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .btn {
    flex: 1;
    justify-content: center;
  }
  .hero-title {
    font-size: 26px;
  }
}

/* ========== Contact（アプリ内の導線） ========== */
.contact-steps {
  text-align: center;
  font-size: 15px;
  color: var(--text);
}
.contact-steps strong {
  color: var(--primary-darker);
}

/* ========== 規約・ポリシー ========== */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 0 80px;
}
.legal h1 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}
.legal .legal-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.legal h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 36px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-soft);
}
.legal h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 8px;
}
.legal p,
.legal li {
  font-size: 15px;
  color: var(--text-soft);
}
.legal ul {
  padding-left: 1.4em;
  margin: 8px 0;
}
.legal strong {
  color: var(--text);
}
