/*
  元素ごよみ Web サイトの共通スタイル（日本語版・英語版で共通）。
  色はアイコンとロゴ（image/icon/）に合わせた：紺（背景・文字）、青緑（元素のマス）、黄（今日）。
  白い文字を載せる色と、本文の文字色は、背景とのコントラスト比 4.5:1 以上にしてある。
*/
:root {
  --navy: #011853;
  --teal: #019FBC;
  --teal-text: #036C84;
  --yellow: #FED904;
  --text: #16213F;
  --text-muted: #55607A;
  --bg: #F6F8FC;
  --surface: #FFFFFF;
  --surface-2: #EEF3FA;
  --border: #DFE5F0;
  --link: #036C84;
  --shadow: 0 1px 2px rgba(1, 24, 83, 0.06), 0 8px 24px rgba(1, 24, 83, 0.08);
  --radius: 18px;
  --max: 1080px;
  --read: 760px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #E7ECF7;
    --text-muted: #A3AEC6;
    --bg: #0A1022;
    --surface: #121A33;
    --surface-2: #18223F;
    --border: #26314F;
    --link: #5ED6EA;
    --teal-text: #5ED6EA;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Segoe UI", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

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

a { color: var(--link); text-underline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- 上部のメニュー（全ページ共通） ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(1, 24, 83, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav-links a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.1); }
.nav-links a[aria-current="page"] { color: #FFFFFF; background: rgba(255, 255, 255, 0.14); }
.nav-links .lang-link { border: 1px solid rgba(255, 255, 255, 0.3); margin-left: 6px; }

/* ---------- トップの見出し（ヒーロー） ---------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(3, 193, 214, 0.35), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(1, 136, 206, 0.35), transparent 60%),
    var(--navy);
}

/* 方眼の模様（暦のマスのイメージ） */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 88px;
}

.hero h1 { margin: 0 0 20px; line-height: 0; }
.hero-logo { width: 420px; max-width: 100%; display: block; }

.hero h1.wordmark {
  line-height: 1.05;
  font-size: clamp(40px, 7vw, 60px);
  letter-spacing: -0.01em;
  font-weight: 900;
  margin-bottom: 14px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--navy);
  background: var(--yellow);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero .tagline {
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 800;
  line-height: 1.45;
  margin: 0 0 14px;
}

.hero .lead {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 28px;
  max-width: 34em;
}

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 14px;
  border-radius: 14px;
  background: #FFFFFF;
  color: var(--navy);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
}

.store-badge img { width: 36px; height: 36px; border-radius: 9px; }
.store-badge .label { line-height: 1.3; }
.store-badge small { display: block; font-size: 11px; font-weight: 600; color: #4A5672; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

/* 小さな周期表（飾り） */
.ptable-card {
  position: relative;
  padding: 28px 24px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.ptable-card .app-icon {
  position: absolute;
  top: -52px;
  right: -28px;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  transform: rotate(6deg);
}

.ptable {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  gap: 4px;
}

.ptable span {
  aspect-ratio: 1;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.ptable span.on { background: var(--teal); }
.ptable span.today { background: var(--yellow); box-shadow: 0 0 0 3px rgba(254, 217, 4, 0.3); }
.ptable span.gap { background: transparent; }

.ptable-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

.ptable-caption .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- セクション ---------- */

.section { padding: 80px 0; }
.section + .section { padding-top: 0; }

.section-head { max-width: 640px; margin-bottom: 32px; }

.kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--teal-text);
  text-transform: uppercase;
}

.section-head h2 {
  margin: 6px 0 8px;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.section-head p { margin: 0; color: var(--text-muted); }

/* 毎日の流れ */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 24px;
  box-shadow: var(--shadow);
}

.tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--teal-text);
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.tile small {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 11px;
  font-weight: 700;
}

.tile.today { background: var(--yellow); color: var(--navy); }

@media (prefers-color-scheme: dark) {
  .tile { background: #037E99; }
  .tile.today { background: var(--yellow); }
}

.steps h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.5; }
.steps p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.75; }

/* 特徴 */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.feature .sym {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--teal-text);
  font-weight: 800;
  font-size: 16px;
}

.feature p { margin: 0; font-size: 15px; line-height: 1.75; }

/* 動作環境とダウンロードの帯 */
.band {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 36px 40px;
  border-radius: 28px;
  color: #FFFFFF;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(3, 193, 214, 0.4), transparent 60%),
    var(--navy);
}

.band h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.35; }
.band p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.band img { width: 88px; height: 88px; border-radius: 20px; }

/* ---------- 下層ページ（サポート・プライバシー） ---------- */

.page-head {
  color: #FFFFFF;
  background:
    radial-gradient(700px 300px at 90% -20%, rgba(3, 193, 214, 0.35), transparent 60%),
    var(--navy);
}

.page-head .wrap { max-width: var(--read); padding-top: 48px; padding-bottom: 44px; }
.page-head .kicker { color: #7FE3F2; }
.page-head h1 { margin: 4px 0 0; font-size: clamp(28px, 4.4vw, 38px); line-height: 1.3; letter-spacing: -0.01em; }

main.doc {
  max-width: var(--read);
  margin: 0 auto;
  padding: 40px 20px 80px;
}

main.doc h2 {
  font-size: 22px;
  line-height: 1.45;
  margin: 48px 0 14px;
}

main.doc h2::before {
  content: "";
  display: block;
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: var(--teal);
  margin-bottom: 12px;
}

main.doc h3 { font-size: 17px; line-height: 1.55; margin: 28px 0 8px; }
main.doc p, main.doc li { font-size: 15.5px; }
main.doc li + li { margin-top: 6px; }

/* よくある質問は Q ごとにカードにする */
main.doc .faq h3 {
  margin: 14px 0 0;
  padding: 18px 20px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

main.doc .faq h3 + p {
  margin: 0;
  padding: 0 20px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  color: var(--text-muted);
}

main.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
  word-break: break-all;
}

main.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 12px 0 20px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}

main.doc th, main.doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
main.doc th { background: var(--surface-2); font-weight: 700; }
main.doc tr:last-child td, main.doc tr:last-child th { border-bottom: 0; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}

.lead { font-size: 17px; color: var(--text-muted); }
.muted { color: var(--text-muted); font-size: 13px; }

.btn {
  display: inline-block;
  background: var(--teal-text);
  color: #FFFFFF !important;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

/* ---------- フッター ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- 画面幅 ---------- */

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; padding-top: 48px; padding-bottom: 64px; }
  .ptable-card { margin: 24px 20px 0 0; }
  .features { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; padding: 28px 24px; }
  .band img { display: none; }
  .section { padding: 56px 0; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .nav-links a:not(.lang-link) { display: none; }
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; padding: 18px; }
  .steps .tile { margin: 0; grid-row: span 2; }
  .hero-logo { width: 300px; }
  .ptable { gap: 3px; }
  .ptable-card { padding: 22px 16px 18px; }
  .ptable-card .app-icon { width: 72px; height: 72px; border-radius: 16px; top: -44px; right: -14px; }
  main.doc { padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
