:root {
  --bg: #fafafa;
  --text: #18181b;
  --muted: #71717a;
  --faint: #a1a1aa;
  --line: #e4e4e7;
  --hover: rgba(0, 0, 0, 0.035);
  --glow-1: rgba(122, 150, 255, 0.16);
  --glow-2: rgba(196, 160, 255, 0.12);
  --glow-3: rgba(120, 220, 210, 0.10);
  --font: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --text: #ededef;
    --muted: #9b9ba3;
    --faint: #6b6b73;
    --line: #27272a;
    --hover: rgba(255, 255, 255, 0.05);
    --glow-1: rgba(90, 120, 255, 0.14);
    --glow-2: rgba(150, 100, 255, 0.10);
    --glow-3: rgba(60, 180, 170, 0.07);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  isolation: isolate;
}

/* 背景のうすいグラデーション（Safari 対策で filter は使わない）
   iPhone の上下のバーの裏まで届くように、画面より少し大きくしておく */
body::before {
  content: "";
  position: fixed;
  top: -15vh;
  bottom: -15vh;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42vmax 28vmax at 35% 50%, var(--glow-1), transparent 70%),
    radial-gradient(38vmax 26vmax at 68% 46%, var(--glow-2), transparent 70%),
    radial-gradient(40vmax 24vmax at 50% 62%, var(--glow-3), transparent 70%);
}

h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.page {
  max-width: 600px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

/* ---------- intro ---------- */
.i18n-wait body { visibility: hidden; }

.intro-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--faint);
}
.lang button {
  padding: 2px;
  border: 0;
  background: none;
  font: inherit;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.2s;
}
.lang button:hover { color: var(--muted); }
.lang button[aria-pressed="true"] {
  color: var(--text);
  font-weight: 500;
}

/* 言語切り替え時のクロスフェード */
[data-i18n],
[data-i18n-html] {
  transition: opacity 0.2s ease, filter 0.2s ease, height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.i18n-swap [data-i18n],
.i18n-swap [data-i18n-html] {
  opacity: 0;
  filter: blur(3px);
}
@media (prefers-reduced-motion: reduce) {
  [data-i18n],
  [data-i18n-html] { transition: none; }
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}
.name {
  margin-top: 24px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.tagline {
  color: var(--muted);
}
.nowrap { white-space: nowrap; }

/* ---------- blocks ---------- */
.block { margin-top: 64px; }
.label {
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
}
.prose { color: var(--muted); }

.link {
  color: var(--text);
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s;
}
.link:hover { text-decoration-color: currentColor; }
.ext {
  margin-left: 2px;
  font-size: 0.8em;
  color: var(--faint);
}

/* ---------- apps ---------- */
.apps {
  display: flex;
  flex-direction: column;
  margin: 0 -12px;
}
.app {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  transition: background-color 0.2s;
}
a.app:hover,
.app-split:hover { background: var(--hover); }
.app-split { position: relative; }
/* 行全体をサイトへのリンクにする（App Store ボタンはその上に重ねる） */
.app-main::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}
.store {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.store:hover { color: var(--text); border-color: var(--faint); }
.app-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 22%;
}
.app-icon-empty {
  border: 1px dashed var(--line);
}
.app-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
.app-name { font-weight: 500; }
.platform {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
}
.app-desc {
  font-size: 14px;
  color: var(--muted);
}
.app-soon .app-name,
.app-soon .app-desc { color: var(--faint); }
.arrow {
  flex: none;
  color: var(--faint);
  transition: transform 0.2s, color 0.2s;
}
a.app:hover .arrow,
.app-split:has(.app-main:hover) .arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

/* ---------- contact ---------- */
.mail {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mail-address {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}
.mail-address:hover { text-decoration-color: currentColor; }
.copy {
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.copy:hover { color: var(--text); border-color: var(--faint); }

/* ---------- elsewhere ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* ---------- footer ---------- */
.footer {
  margin-top: 96px;
  font-size: 13px;
  color: var(--faint);
}

/* ---------- fade in ---------- */
@media (prefers-reduced-motion: no-preference) {
  .fade {
    animation: fade-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .fade:nth-child(2) { animation-delay: 0.08s; }
  .fade:nth-child(3) { animation-delay: 0.16s; }
  .fade:nth-child(4) { animation-delay: 0.24s; }
  .fade:nth-child(5) { animation-delay: 0.32s; }
  .fade:nth-child(6) { animation-delay: 0.4s; }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); filter: blur(4px); }
}

@media (max-width: 480px) {
  .page { padding-top: calc(64px + env(safe-area-inset-top)); }
  .block { margin-top: 56px; }
}
