/* masudy の紹介ページ（/about）。アプリ本体とは別の静的ページ。
   色はアプリと同じエメラルドを核に、紹介ページ用に少し深くしてある。 */

:root {
  --bg: #f2f5f3;
  --bg-alt: #e7eeea;
  --surface: #ffffff;
  --ink: #0f221c;
  --ink-soft: #52665f;
  --line: rgba(15, 34, 28, 0.1);
  --accent: #10b981;
  --accent-ink: #047857;
  --accent-tint: #d6f4e7;
  --on-accent: #ffffff;
  --warn: #f59e0b;
  --night: #e7eeea;
  --night-surface: #ffffff;
  --night-ink: #0f221c;
  --night-soft: #52665f;
  --shadow: 0 1px 2px rgba(15, 34, 28, 0.06), 0 12px 32px -12px rgba(15, 34, 28, 0.18);
  --font-display: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-num: "Outfit", "Noto Sans JP", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1412;
    --bg-alt: #111b18;
    --surface: #16211d;
    --ink: #e5eeea;
    --ink-soft: #97aaa3;
    --line: rgba(255, 255, 255, 0.09);
    --accent: #34d399;
    --accent-ink: #6ee7b7;
    --accent-tint: rgba(52, 211, 153, 0.14);
    --on-accent: #04221a;
    --night: #060d0b;
    --night-surface: #0f1c18;
    --night-ink: #e3eee9;
    --night-soft: #93a9a1;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1412;
  --bg-alt: #111b18;
  --surface: #16211d;
  --ink: #e5eeea;
  --ink-soft: #97aaa3;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #34d399;
  --accent-ink: #6ee7b7;
  --accent-tint: rgba(52, 211, 153, 0.14);
  --on-accent: #04221a;
  --night: #060d0b;
  --night-surface: #0f1c18;
  --night-ink: #e3eee9;
  --night-soft: #93a9a1;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-wrap: balance;
  margin: 0;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 999px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .wrap {
    padding: 0 28px;
  }
}
.narrow {
  max-width: 760px;
}

/* ---------- ワードマーク（アプリと同じ図形を mask で敷く） ---------- */
.wordmark {
  display: block;
  height: 22px;
  aspect-ratio: 515 / 137;
  background-color: currentColor;
  -webkit-mask: url("/masudy-wordmark.svg") center / contain no-repeat;
  mask: url("/masudy-wordmark.svg") center / contain no-repeat;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--accent-ink);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  padding: 12px 22px;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--accent) 90%, transparent);
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}
.btn:hover svg {
  transform: translateX(3px);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}
.btn-lg {
  padding: 16px 28px;
  font-size: 17px;
}
.btn-outline {
  background: transparent;
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 2px var(--accent-ink);
}
.btn-outline:hover {
  box-shadow: inset 0 0 0 2px var(--accent-ink);
  background: var(--accent-tint);
}
.btn-ghost {
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 12px 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--accent);
}

/* ---------- 上の帯 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
@media (min-width: 640px) {
  .nav-inner {
    padding: 14px 28px;
  }
}
.nav-logo {
  color: var(--ink);
  margin-right: auto;
}
.nav-links {
  display: none;
  gap: 28px;
  font-size: 14px;
  font-weight: 700;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--ink);
}
@media (min-width: 820px) {
  .nav-links {
    display: flex;
  }
}

/* ---------- 共通の見出し ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
}
h3 {
  font-size: 1.2rem;
}
.fine {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.center {
  text-align: center;
}
.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.checks li {
  position: relative;
  padding-left: 30px;
  line-height: 1.7;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}
.card {
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
  outline: 1px solid var(--line);
  padding: 22px;
}
@media (min-width: 640px) {
  .card {
    padding: 28px;
  }
}
.card-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

/* ---------- 背景の光 ---------- */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  /* 光の端が帯の境目で切れて見えないよう、上下をぼかして消す */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 70%, transparent);
}
.hero .aurora {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 140px, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 140px, #000 70%, transparent);
}
.aurora i {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) {
  width: 520px;
  height: 520px;
  background: color-mix(in srgb, var(--accent) 45%, transparent);
  top: -180px;
  right: -120px;
}
.aurora i:nth-child(2) {
  width: 380px;
  height: 380px;
  background: color-mix(in srgb, #22d3ee 30%, transparent);
  top: 180px;
  right: 260px;
  animation-duration: 22s;
  animation-delay: -6s;
}
.aurora i:nth-child(3) {
  width: 300px;
  height: 300px;
  background: color-mix(in srgb, #a3e635 26%, transparent);
  bottom: -120px;
  left: -80px;
  animation-duration: 26s;
}
@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-60px, 40px) scale(1.12);
  }
}

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  padding: 28px 0 72px;
  overflow: hidden;
}
@media (min-width: 960px) {
  .hero {
    padding: 56px 0 104px;
  }
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
    gap: 40px;
  }
}
.hero-title {
  font-size: clamp(2rem, 0.9rem + 5vw, 3.6rem);
  line-height: 1.22;
  letter-spacing: 0;
  display: grid;
}
.hero-title > span {
  display: block;
}
.marker {
  position: relative;
  white-space: nowrap;
  z-index: 0;
}
.marker::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  bottom: 0.06em;
  height: 0.36em;
  border-radius: 0.1em;
  background: color-mix(in srgb, var(--accent) 42%, transparent);
  z-index: -1;
  transform-origin: left center;
  transform: scaleX(0);
  animation: sweep 0.9s cubic-bezier(0.7, 0, 0.2, 1) 0.9s forwards;
}
@keyframes sweep {
  to {
    transform: scaleX(1);
  }
}
.hero-lead {
  margin-top: 22px;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: clamp(15px, 0.9rem + 0.3vw, 17px);
}
.hero-cta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}
.hero-facts {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-facts li {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  outline: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
}

/* 読み込み時の順番の出方 */
.rise {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--d, 0) * 0.11s + 0.1s);
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- アプリの画面の見本（色と形はアプリの src/index.css・各部品に合わせる） ---------- */
.app {
  --a-base: #eef1f0;
  --a-surface: #fafbfb;
  --a-ink: #1a2e29;
  --a-soft: #5c6f6a;
  --a-line: rgba(15, 30, 26, 0.09);
  --a-seg: rgba(15, 30, 26, 0.07);
  --a-seg-on: #fafbfb;
  --a-accent: #10b981;
  --a-strong: #059669;
  --a-soft-bg: #d1fae5;
  --a-faint: #ecfdf5;
  color: var(--a-ink);
  font-family: var(--font-body);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app {
  --a-base: #0f1513;
  --a-surface: #1b2522;
  --a-ink: #e7efec;
  --a-soft: #9bada7;
  --a-line: rgba(255, 255, 255, 0.1);
  --a-seg: rgba(255, 255, 255, 0.08);
  --a-seg-on: #0f1513;
  --a-strong: #10b981;
  --a-soft-bg: color-mix(in srgb, #10b981 30%, transparent);
  --a-faint: color-mix(in srgb, #10b981 12%, transparent);
  }
}
:root[data-theme="dark"] .app,
.app.app-dark {
  --a-base: #0f1513;
  --a-surface: #1b2522;
  --a-ink: #e7efec;
  --a-soft: #9bada7;
  --a-line: rgba(255, 255, 255, 0.1);
  --a-seg: rgba(255, 255, 255, 0.08);
  --a-seg-on: #0f1513;
  --a-strong: #10b981;
  --a-soft-bg: color-mix(in srgb, #10b981 30%, transparent);
  --a-faint: color-mix(in srgb, #10b981 12%, transparent);
}
.i {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.a-card {
  background: var(--a-surface);
  border-radius: 22px;
  outline: 1px solid var(--a-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 18px;
}
.a-h {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}
.a-note {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--a-soft);
}
.a-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 12px;
}
.a-title > .i {
  font-size: 16px;
  color: var(--a-strong);
}
.a-av {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a-accent), #059669);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--a-surface), 0 1px 2px rgba(0, 0, 0, 0.1);
  font-size: 17px;
}
.a-bub {
  min-width: 0;
  max-width: 85%;
  background: var(--a-surface);
  border-radius: 16px;
  border-bottom-left-radius: 6px;
  padding: 9px 13px;
  outline: 1px solid var(--a-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.a-bub strong {
  color: var(--a-strong);
  font-weight: 700;
}
.a-bub code {
  background: var(--a-line);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}
.a-bub img {
  display: block;
  width: 100%;
  height: auto;
  margin: 8px 0;
  border-radius: 10px;
  border: 1px solid var(--a-line);
  background: #fff;
}
.a-bub p + p {
  margin-top: 8px;
}
.tl {
  text-decoration: underline dotted;
  text-decoration-color: color-mix(in srgb, var(--a-accent) 75%, transparent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ヒーローのスマホ（ホームのチャット） */
.hero-demo {
  display: flex;
  justify-content: center;
}
.phone {
  width: min(100%, 370px);
  height: 620px;
  background: var(--a-base);
  border-radius: 38px;
  box-shadow: var(--shadow), 0 0 0 10px color-mix(in srgb, var(--surface) 55%, transparent);
  outline: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (max-width: 420px) {
  .phone {
    height: 560px;
  }
}
.a-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 14px 10px;
  border-bottom: 1px solid var(--a-line);
}
.a-pill {
  margin-right: auto;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--a-surface);
  outline: 1px solid var(--a-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-weight: 900;
  font-size: 13px;
}
.a-ic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  outline: 1px solid var(--a-line);
  display: grid;
  place-items: center;
  color: var(--a-soft);
  font-size: 16px;
}
.chat {
  flex: 1;
  overflow: hidden;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.8;
}
.chat > * {
  flex: none;
  animation: pop 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.chat.fade {
  transition: opacity 0.5s;
  opacity: 0;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
.a-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.a-me {
  align-self: flex-end;
  max-width: 80%;
  background: var(--a-accent);
  color: #fff;
  border-radius: 16px;
  border-bottom-right-radius: 6px;
  padding: 8px 13px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--a-accent) 25%, transparent);
}
.typing {
  display: flex;
  gap: 4px;
  padding: 13px 14px;
}
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--a-soft);
  animation: blink 1s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes blink {
  0%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}
.a-quiz {
  min-width: 0;
  max-width: 88%;
  flex: 1;
  background: var(--a-surface);
  border-radius: 16px;
  border-top-left-radius: 6px;
  padding: 12px;
  outline: 1px solid var(--a-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.a-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}
.a-badge {
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
  background: var(--a-soft-bg);
  color: var(--a-strong);
}
.a-badge.n {
  background: var(--a-line);
  color: var(--a-soft);
}
.a-bm {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--a-soft);
}
.a-qt {
  font-weight: 500;
}
.a-src {
  margin-top: 4px;
  font-size: 9.5px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--a-soft) 65%, transparent);
}
.a-choices {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}
.a-ch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--a-line);
  background: var(--a-base);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  transition: background-color 0.25s, border-color 0.25s, opacity 0.3s, transform 0.15s, box-shadow 0.25s;
}
.a-ch > b {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--a-line);
  color: var(--a-soft);
  font-size: 10px;
  display: grid;
  place-items: center;
}
.a-ch > .i {
  margin-left: auto;
  font-size: 16px;
  color: var(--a-strong);
}
.a-ch.tap {
  border-color: var(--a-accent);
  background: var(--a-faint);
  transform: scale(0.985);
}
.a-ch.right {
  border-color: var(--a-accent);
  background: var(--a-faint);
  box-shadow: 0 0 0 1px var(--a-accent);
}
.a-ch.dim {
  opacity: 0.45;
}
.a-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 14px;
}
.a-field {
  flex: 1;
  min-width: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--a-line);
  background: var(--a-surface);
  color: var(--a-soft);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 0.2s;
}
.a-field.on {
  border-color: var(--a-accent);
  color: var(--a-ink);
}
.a-send {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  background: color-mix(in srgb, var(--a-accent) 50%, transparent);
  transition: background-color 0.2s, transform 0.15s;
}
.a-send.on {
  background: var(--a-accent);
}
.a-send.press {
  transform: scale(0.9);
}

/* ---------- 機能のセクション ---------- */
.feature {
  padding: 88px 0;
  position: relative;
}
@media (min-width: 960px) {
  .feature {
    padding: 120px 0;
  }
}
.feature.alt {
  background: var(--bg-alt);
}
.feature-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }
  .feature-grid.flip .feature-copy {
    order: 2;
  }
}
.feature-copy {
  display: grid;
  gap: 20px;
  max-width: 34em;
}
.feature-copy > .eyebrow {
  margin-bottom: -6px;
}
.feature-copy > p {
  color: var(--ink-soft);
}
.feature-copy strong {
  color: var(--ink);
}

/* スクロールで出てくる（JSが動くときだけ隠しておく） */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--rd, 0s);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* 口調の切り替え */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.seg button {
  border: 0;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-alt);
  color: var(--ink-soft);
  transition: background-color 0.25s, color 0.25s;
}
.seg button[aria-selected="true"] {
  background: var(--accent-ink);
  color: var(--on-accent);
}
.tone-chat {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 14em;
  padding: 14px 12px;
  border-radius: 18px;
  background: var(--a-base);
  margin-bottom: 14px;
}
.tone-text {
  max-width: none;
  font-size: 14px;
  line-height: 1.85;
  transition: opacity 0.25s, transform 0.25s;
}
.tone-text.swap {
  opacity: 0;
  transform: translateY(6px);
}

/* 問題演習：マークシート */
.stat {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-num {
  font-family: var(--font-num);
  font-weight: 800;
  font-size: clamp(2.8rem, 2rem + 3vw, 3.8rem);
  line-height: 1;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-num small {
  font-family: var(--font-display);
  font-size: 0.4em;
  margin-left: 4px;
}
.stat-label {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.mock-vis,
.dash {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.a-opts {
  display: grid;
  gap: 8px;
}
.a-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--a-line);
}
.a-opt b {
  display: block;
  font-weight: 900;
  font-size: 14.5px;
  line-height: 1.5;
}
.a-opt small {
  display: block;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--a-soft);
}
.a-radio {
  margin-left: auto;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--a-line);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
}
.a-opt.on {
  border: 2px solid var(--a-accent);
  background: var(--a-faint);
}
.a-opt.on .a-radio {
  background: var(--a-accent);
  border-color: var(--a-accent);
}
.a-opt.on .a-radio .i {
  stroke-width: 3;
}
.a-select {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--a-line);
  background: var(--a-base);
  font-size: 14.5px;
  font-weight: 500;
}
.a-select .i {
  font-size: 16px;
}
#year-sel.roll {
  display: inline-block;
}

/* シラバスの進捗（アプリの SyllabusProgressCard の写し） */
.syl-vis {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.s-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.s-head .a-title {
  margin: 0;
}
.s-head > span {
  font-size: 12px;
  font-weight: 700;
  color: var(--a-soft);
  font-variant-numeric: tabular-nums;
}
.s-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 12px 0 10px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  color: color-mix(in srgb, var(--a-soft) 75%, transparent);
}
.s-hint .i {
  font-size: 12px;
}
.s-major {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 4px;
}
.s-major b {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--a-strong);
}
.s-major i {
  flex: 1;
  height: 1px;
  background: var(--a-line);
}
.s-major > span {
  font-size: 10px;
  font-weight: 700;
  color: var(--a-soft);
  font-variant-numeric: tabular-nums;
}
.s-rows {
  display: grid;
  gap: 2px;
}
.s-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px 9px 10px;
  border-radius: 12px;
  transition: background-color 0.4s, box-shadow 0.4s;
}
.s-row.cur {
  background: var(--a-faint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a-accent) 40%, transparent);
}
.s-dot {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--a-line);
  transition: background-color 0.3s, transform 0.3s;
}
.s-dot .i {
  display: none;
  font-size: 14px;
  color: #fff;
  stroke-width: 3;
}
.s-dot i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--a-soft) 30%, transparent);
}
.s-row.cur .s-dot {
  background: var(--a-soft-bg);
}
.s-row.started .s-dot i {
  background: var(--a-strong);
}
.s-row.done .s-dot {
  background: var(--a-accent);
}
.s-row.done .s-dot .i {
  display: block;
}
.s-row.done .s-dot i {
  display: none;
}
.s-row.pop .s-dot {
  transform: scale(1.25);
}
.s-main {
  flex: 1;
  min-width: 0;
}
.s-main p {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.5;
}
.s-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.s-row.done .s-name {
  font-weight: 400;
  color: var(--a-soft);
  text-decoration: line-through;
  text-decoration-color: var(--a-line);
}
.s-badge {
  display: none;
  flex: none;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--a-soft-bg);
  color: var(--a-strong);
}
.s-row.cur .s-badge {
  display: inline-block;
}
.s-main em {
  flex: none;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--a-soft);
  font-variant-numeric: tabular-nums;
}
.s-bar {
  display: block;
  margin-top: 6px;
  height: 6px;
  border-radius: 6px;
  background: var(--a-line);
  position: relative;
  overflow: hidden;
}
.s-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--p, 0%);
  border-radius: 6px;
  background: var(--a-accent);
  transition: width 0.5s;
}
.s-row > .i {
  font-size: 16px;
  color: color-mix(in srgb, var(--a-soft) 50%, transparent);
}
.s-play {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: color-mix(in srgb, var(--a-soft) 50%, transparent);
}
.s-row.cur .s-play {
  color: var(--a-strong);
}

/* 分析 */
.a-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.a-tile {
  padding: 12px 8px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 2px;
}
.a-tile .i {
  font-size: 20px;
}
.a-tile b {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.a-tile small {
  font-size: 11px;
  font-weight: 700;
  color: var(--a-soft);
}
.flame {
  color: #f97316;
}
.flame .i {
  fill: #fb923c;
}
.violet {
  color: #8b5cf6;
}
.green {
  color: var(--a-accent);
}
.a-title > .flame .i {
  font-size: 16px;
}
.a-majors {
  display: grid;
  gap: 8px;
}
.a-maj {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--a-line);
}
.a-maj > div {
  flex: 1;
}
.a-maj p {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}
.a-maj em {
  font-style: normal;
  color: var(--a-soft);
  font-variant-numeric: tabular-nums;
}
.a-maj i {
  display: block;
  margin-top: 6px;
  height: 8px;
  border-radius: 8px;
  background: var(--a-line);
  position: relative;
  overflow: hidden;
}
.a-maj i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w);
  border-radius: 8px;
  background: var(--a-accent);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.a-maj i.amber::after {
  background: #fbbf24;
}
.a-maj:nth-child(2) i::after {
  transition-delay: 0.15s;
}
.a-maj:nth-child(3) i::after {
  transition-delay: 0.3s;
}
.js .reveal:not(.in) .a-maj i::after {
  transform: scaleX(0);
}
.a-maj > .i {
  font-size: 16px;
  color: var(--a-soft);
}
.a-cal {
  margin-top: 12px;
  display: flex;
  gap: 6px;
}
.a-wd {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 4px;
  font-size: 8px;
  font-weight: 700;
  line-height: 12px;
  color: color-mix(in srgb, var(--a-soft) 55%, transparent);
}
.heat {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(17, 12px);
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  gap: 4px;
  justify-content: space-between;
}
.heat i,
.a-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.heat i {
  transition: opacity 0.4s, transform 0.4s;
}
.js .reveal:not(.in) .heat i {
  opacity: 0;
  transform: scale(0.4);
}
.l0 {
  background: color-mix(in srgb, var(--a-line) 60%, transparent);
}
.heat i.l0 {
  background: var(--a-line);
}
.l1 {
  background: color-mix(in srgb, var(--a-accent) 30%, transparent);
}
.l2 {
  background: color-mix(in srgb, var(--a-accent) 60%, transparent);
}
.l3 {
  background: var(--a-accent);
}
.a-legend {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: color-mix(in srgb, var(--a-soft) 70%, transparent);
}
@media (max-width: 380px) {
  .heat {
    grid-template-columns: repeat(17, 10px);
    grid-template-rows: repeat(7, 10px);
    gap: 3px;
  }
  .heat i {
    width: 10px;
    height: 10px;
  }
  .a-wd {
    grid-template-rows: repeat(7, 10px);
    gap: 3px;
    line-height: 10px;
  }
}

/* ---------- 集中（夜の帯） ---------- */
.night {
  background: var(--night);
  color: var(--night-ink);
  overflow: hidden;
}
.night::before {
  content: "";
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  left: 50%;
  top: 40%;
  transform: translate(-80%, -10%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%);
  pointer-events: none;
}
.night-head {
  position: relative;
  display: grid;
  gap: 18px;
  max-width: 40em;
}
.night-head > .eyebrow {
  margin-bottom: -4px;
}
.night-head p {
  color: var(--night-soft);
}
.night-grid {
  position: relative;
  margin-top: 48px;
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 960px) {
  .night-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}
.focus-stage {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 28px;
  background: var(--a-base);
  outline: 1px solid var(--line);
}
.a-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: var(--a-seg);
}
.a-tabs span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 4px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  color: var(--a-soft);
  white-space: nowrap;
}
.a-tabs span .i {
  font-size: 15px;
}
.a-tabs .on {
  background: var(--a-seg-on);
  color: var(--a-accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.a-tabs3 {
  grid-template-columns: repeat(3, 1fr);
}
.a-tabs3 span {
  font-size: 12px;
}
.a-hint {
  margin: 8px 0 10px;
  text-align: center;
  font-size: 11.5px;
  color: var(--a-soft);
}
.a-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.a-tags b {
  font-size: 12px;
  font-weight: 900;
  color: var(--a-soft);
  margin-right: 2px;
}
.a-tags span {
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--a-line);
  color: var(--a-soft);
}
.a-tags .on {
  background: var(--a-accent);
  color: #fff;
}
.a-dial {
  position: relative;
  width: min(100%, 250px);
  aspect-ratio: 1;
  margin: 16px auto 8px;
  display: grid;
  place-items: center;
}
.a-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--a-accent) 20%, transparent);
  filter: blur(24px);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}
.a-dial svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.dial-track {
  fill: none;
  stroke: var(--a-line);
  stroke-width: 10;
}
.dial-ring {
  fill: none;
  stroke: var(--a-accent);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s linear;
}
.dial-center {
  position: relative;
  display: grid;
  justify-items: center;
  line-height: 1.2;
}
.dial-center small {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--a-soft);
}
.dial-center b {
  margin-top: 4px;
  font-size: 3.1rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.dial-center span {
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--a-soft);
}
.a-ctrl {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.a-round {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--a-line);
  color: var(--a-soft);
  font-size: 17px;
}
.a-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--a-accent);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--a-accent) 70%, transparent);
}
.a-play .i {
  font-size: 18px;
}
.a-title > .i {
  color: var(--a-accent);
}
.a-moods {
  margin-bottom: 12px;
}
.a-track {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 0;
  border-radius: 16px;
  background: var(--a-surface);
  outline: 1px solid var(--a-line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s, outline-color 0.25s;
}
.a-track:hover {
  outline-color: color-mix(in srgb, var(--a-accent) 40%, transparent);
}
.a-track:focus-visible {
  outline: 3px solid var(--a-accent);
}
.a-track.active {
  background: var(--a-faint);
  outline-color: color-mix(in srgb, var(--a-accent) 40%, transparent);
}
.a-track.active .a-round {
  background: var(--a-accent);
  color: #fff;
}
.a-track .i-pause,
.a-track.playing .i-play {
  display: none;
}
.a-track.playing .i-pause {
  display: block;
}
.a-track .i-play {
  margin-left: 2px;
}
.a-track.loading .a-round {
  animation: blink 1s infinite;
}
.a-tr-text {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}
.a-tr-text b {
  display: block;
  font-size: 14px;
  font-weight: 900;
}
.a-tr-text small {
  font-size: 12px;
  color: var(--a-soft);
  font-variant-numeric: tabular-nums;
}
.a-track > .i {
  font-size: 18px;
  color: var(--a-soft);
  margin-right: 6px;
}
/* 鳴っている行の印（アプリの EqBars と同じ。音に合わせては動かない） */
.a-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  color: var(--a-strong);
}
.a-track.playing .a-eq {
  display: flex;
}
.a-eq i {
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: bottom;
  animation: eq-bar 1s ease-in-out infinite;
}
.a-eq i:nth-child(2) {
  animation-delay: 0.2s;
}
.a-eq i:nth-child(3) {
  animation-delay: 0.4s;
}
.a-eq i:nth-child(4) {
  animation-delay: 0.15s;
}
@keyframes eq-bar {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}
.a-tr-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  color: var(--a-soft);
}
.night-cards {
  display: grid;
  gap: 14px;
}
.ncard {
  padding: 22px 24px;
  border-radius: 22px;
  background: var(--night-surface);
  outline: 1px solid var(--line);
  display: grid;
  gap: 8px;
  transition: transform 0.3s, outline-color 0.3s;
}
.ncard:hover {
  transform: translateX(4px);
  outline-color: rgba(52, 211, 153, 0.35);
}
.ncard p {
  color: var(--night-soft);
  font-size: 15px;
  line-height: 1.85;
}

/* ---------- その他の機能 ---------- */
.more {
  padding: 96px 0;
}
@media (min-width: 960px) {
  .more {
    padding: 128px 0;
  }
}
.section-head {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  margin: 0 auto 48px;
  max-width: 40em;
}
.section-head > .eyebrow {
  margin-bottom: -2px;
}
.section-head > p {
  color: var(--ink-soft);
}
.more-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) {
  .more-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .more-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}
.mcard {
  background: var(--surface);
  border-radius: 24px;
  outline: 1px solid var(--line);
  padding: 18px 18px 24px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.mcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.mcard h3 {
  font-size: 1.1rem;
  margin-top: 8px;
}
.mcard > p {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.mcard:nth-child(3n + 2) {
  --rd: 0.08s;
}
.mcard:nth-child(3n) {
  --rd: 0.16s;
}
.mvis {
  height: 184px;
  border-radius: 16px;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* 用語タップ */
.term-demo {
  place-items: start stretch;
  align-content: start;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.7;
}
.term {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline dotted;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.term-pop {
  margin-top: 10px;
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  outline: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
  display: grid;
  gap: 4px;
  animation: pop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.term-pop[hidden] {
  display: none;
}
.term-pop em {
  font-style: normal;
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.term-pop em i {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-ink);
}

/* ベン図 */
.venn-demo {
  grid-template-rows: 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  place-items: stretch;
  gap: 8px;
  padding: 10px;
}
.venn-demo svg {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.v-u {
  fill: var(--surface);
  stroke: var(--line);
}
.v-fill {
  opacity: 0;
  transition: opacity 0.35s;
}
.v-fill.on {
  opacity: 1;
}
.v-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
}
.v-t {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 15px;
  fill: var(--ink);
}
.v-fill {
  fill: color-mix(in srgb, var(--accent) 55%, transparent);
}
.venn-input {
  display: flex;
  gap: 6px;
}
.venn-input input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 700 16px/1 "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  transition: border-color 0.2s;
}
.venn-input input:focus {
  outline: none;
  border-color: var(--accent);
}
.venn-input input.bad {
  border-color: #f87171;
  animation: shake 0.3s;
}
@keyframes shake {
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}
.venn-input button {
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  outline: 1px solid var(--line);
  font: 700 16px/1 "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}
.venn-input button:hover {
  background: var(--accent-tint);
}
.venn-input button:active {
  transform: scale(0.94);
}

/* 計算ドリル */
.drill-demo {
  place-content: center;
  text-align: center;
  gap: 6px;
  line-height: 1.5;
  padding: 0 12px;
}
.drill-demo small {
  font-size: 11px;
  color: var(--ink-soft);
}
.drill-demo p {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 19px;
}
.drill-demo p span,
.drill-demo b span {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
}
.drill-demo b {
  font-family: var(--font-num);
  font-size: 22px;
}
.roll {
  animation: roll 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes roll {
  from {
    opacity: 0;
    transform: translateY(-60%);
  }
}

/* 端末をまたぐ */
.sync-demo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}
.dev {
  display: block;
  background: var(--surface);
  outline: 2px solid var(--ink);
  position: relative;
}
.dev::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 22%;
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 12px 0 color-mix(in srgb, var(--accent) 40%, transparent), 0 24px 0 color-mix(in srgb, var(--accent) 40%, transparent);
}
.dev-phone {
  width: 44px;
  height: 78px;
  border-radius: 10px;
}
.dev-pc {
  width: 104px;
  height: 68px;
  border-radius: 8px;
}
.sync-dots {
  display: flex;
  gap: 5px;
}
.sync-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: flow 1.4s ease-in-out infinite;
}
.sync-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.sync-dots i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes flow {
  0%,
  100% {
    opacity: 0.2;
    transform: translateX(-3px);
  }
  50% {
    opacity: 1;
    transform: translateX(3px);
  }
}

/* リマインダー */
.bell-demo {
  gap: 10px;
  place-content: center;
  justify-items: center;
}
.bell-demo svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  transform-origin: 50% 10%;
  animation: ring 3.2s ease-in-out infinite;
}
@keyframes ring {
  0%,
  60%,
  100% {
    transform: rotate(0);
  }
  65% {
    transform: rotate(14deg);
  }
  72% {
    transform: rotate(-12deg);
  }
  79% {
    transform: rotate(8deg);
  }
  86% {
    transform: rotate(-4deg);
  }
}
.bell-note {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* テーマ（押すとこのページの見た目が変わる） */
.theme-demo {
  place-content: center;
  gap: 10px;
  padding: 12px;
}
.sw-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.sw {
  border: 0;
  cursor: pointer;
  padding: 0;
  width: 64px;
  height: 54px;
  border-radius: 12px;
  outline: 1px solid var(--line);
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: transform 0.2s, outline-color 0.2s, box-shadow 0.2s;
}
.sw-row:first-child .sw {
  width: 96px;
  height: 44px;
}
.sw span {
  margin-bottom: 4px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 9.5px;
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.85);
  color: #1a2e29;
}
.sw:hover {
  transform: translateY(-3px);
}
.sw[aria-pressed="true"] {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}
.sw-light {
  background: linear-gradient(#fafbfb 45%, #10b981 45% 58%, #eef1f0 58%);
}
.sw-dark {
  background: linear-gradient(#1b2522 45%, #10b981 45% 58%, #0f1513 58%);
}
.sw-std {
  background: linear-gradient(135deg, #34d399, #10b981, #059669);
}
.sw-gold {
  background: linear-gradient(135deg, #a67c00, #f5d77a, #fff6cf, #d4af37);
}
.sw-rainbow {
  background: linear-gradient(160deg, #ef4444, #f59e0b, #eab308, #22c55e, #06b6d4, #3b82f6, #a855f7);
}
.sw-cyber {
  background: linear-gradient(135deg, #22d3ee, #3b82f6, #a855f7, #ec4899);
}
@media (max-width: 380px) {
  .sw {
    width: 56px;
  }
}

/* ---------- 料金 ---------- */
.pricing {
  padding: 96px 0;
  background: var(--bg-alt);
}
@media (min-width: 960px) {
  .pricing {
    padding: 128px 0;
  }
}
.plan-box {
  max-width: 560px;
  margin: 0 auto 24px;
  display: grid;
  gap: 18px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.plan-toggle {
  position: relative;
  justify-self: center;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 360px);
  padding: 5px;
  border-radius: 999px;
  background: var(--surface);
  outline: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.plan-toggle label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: color 0.3s;
}
.plan-toggle small {
  font-size: 10.5px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-ink);
  transition: background-color 0.3s, color 0.3s;
}
.plan-knob {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: var(--accent-ink);
  transition: transform 0.45s cubic-bezier(0.5, 0, 0.2, 1.2);
}
#plan-free:checked ~ .plan-toggle label[for="plan-free"],
#plan-prem:checked ~ .plan-toggle label[for="plan-prem"] {
  color: var(--on-accent);
}
#plan-prem:checked ~ .plan-toggle small {
  background: color-mix(in srgb, var(--on-accent) 22%, transparent);
  color: var(--on-accent);
}
#plan-prem:checked ~ .plan-toggle .plan-knob {
  transform: translateX(100%);
}
#plan-free:focus-visible ~ .plan-toggle label[for="plan-free"],
#plan-prem:focus-visible ~ .plan-toggle label[for="plan-prem"] {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.plan {
  background: var(--surface);
  border-radius: 28px;
  outline: 1px solid var(--line);
  padding: 26px 22px;
  display: grid;
  gap: 18px;
  transition: outline-color 0.4s, box-shadow 0.4s;
}
#plan-prem:checked ~ .plan {
  outline: 2px solid var(--accent);
  box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--accent) 60%, transparent);
}
.plan-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.price {
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.price b {
  font-family: var(--font-num);
  font-weight: 800;
  font-size: 48px;
  margin-right: 2px;
  font-variant-numeric: tabular-nums;
}
.price small {
  font-size: 13px;
  color: var(--ink-soft);
  margin-left: 4px;
}
/* 無料・プレミアムで中身を出し分ける（JSが無くても :checked で切り替わる） */
#plan-free:checked ~ .plan .v-prem,
#plan-prem:checked ~ .plan .v-free,
#plan-free:checked ~ .plan .only-prem {
  display: none;
}
.p-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.p-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.6;
}
.p-label {
  font-weight: 500;
}
.p-val {
  flex: none;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: right;
  perspective: 400px;
}
.p-val > span {
  display: inline-block;
}
.p-row.up .v-prem {
  color: var(--accent-ink);
}
.p-row.up .v-prem::before {
  content: "↑ ";
  font-size: 0.85em;
}
.p-row.flip .p-val > span {
  animation: flip 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--fd, 0s);
}
.p-row.only-prem.flip {
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--fd, 0s);
}
@keyframes flip {
  from {
    opacity: 0;
    transform: rotateX(80deg);
  }
}
.plan-cta {
  justify-self: stretch;
}

/* ---------- よくある質問 ---------- */
.faq {
  padding: 96px 0;
}
.faq-list {
  display: grid;
  gap: 10px;
}
.faq details {
  background: var(--surface);
  border-radius: 18px;
  outline: 1px solid var(--line);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 54px 18px 20px;
  font-weight: 700;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2.4px solid var(--ink-soft);
  border-bottom: 2.4px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.faq details p {
  padding: 0 20px 20px;
  color: var(--ink-soft);
  font-size: 15px;
}
.faq-more {
  text-align: center;
  margin-top: 24px;
  font-weight: 700;
  font-size: 14px;
}
.faq-more a {
  color: var(--accent-ink);
}

/* ---------- 最後の呼びかけ ---------- */
.final {
  position: relative;
  overflow: hidden;
  padding: 104px 0 112px;
  text-align: center;
}
.final .aurora i:nth-child(1) {
  right: auto;
  left: calc(50% - 260px);
  top: 40px;
}
.final-inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.final h2 {
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem);
}
.final p {
  color: var(--ink-soft);
  margin-bottom: 10px;
}

/* ---------- フッター ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
}
.foot-inner {
  display: grid;
  gap: 16px;
  justify-items: start;
  color: var(--ink-soft);
}
.foot .wordmark {
  height: 18px;
  color: var(--ink);
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}
.foot nav a {
  text-decoration: none;
}
.foot nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.foot small {
  font-size: 12px;
}

/* ---------- テーマカラー（テーマのカードで切り替え。アプリの src/index.css と同じ色の流れ） ---------- */
@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #10b981;
}
:root[data-accent] {
  --accent-ink: var(--accent);
  --accent-tint: color-mix(in srgb, var(--accent) 16%, transparent);
  --on-accent: #111;
}
:root[data-accent] .app,
:root[data-accent] .app.app-dark {
  --a-accent: var(--accent);
  --a-strong: var(--accent);
  --a-soft-bg: color-mix(in srgb, var(--accent) 30%, transparent);
  --a-faint: color-mix(in srgb, var(--accent) 14%, transparent);
}
:root[data-accent="gold"] {
  --text-grad: linear-gradient(90deg, #a67c00, #f5d77a, #fff6cf, #d4af37, #a67c00);
  animation: accent-gold 4s ease-in-out infinite;
}
:root[data-accent="rainbow"] {
  --text-grad: linear-gradient(90deg, #ef4444, #f59e0b, #eab308, #22c55e, #06b6d4, #3b82f6, #a855f7, #ef4444);
  animation: accent-rainbow 9s linear infinite;
}
:root[data-accent="cyber"] {
  --text-grad: linear-gradient(90deg, #22d3ee, #3b82f6, #a855f7, #ec4899, #22d3ee);
  animation: accent-cyber 7s linear infinite;
}
@keyframes accent-gold {
  0%,
  100% {
    --accent: #d4af37;
  }
  50% {
    --accent: #b8860b;
  }
}
@keyframes accent-rainbow {
  0% {
    --accent: #ef4444;
  }
  14% {
    --accent: #f59e0b;
  }
  28% {
    --accent: #eab308;
  }
  42% {
    --accent: #22c55e;
  }
  57% {
    --accent: #06b6d4;
  }
  71% {
    --accent: #3b82f6;
  }
  85% {
    --accent: #a855f7;
  }
  100% {
    --accent: #ef4444;
  }
}
@keyframes accent-cyber {
  0%,
  100% {
    --accent: #22d3ee;
  }
  33% {
    --accent: #3b82f6;
  }
  66% {
    --accent: #a855f7;
  }
}
/* ロゴは多色の流れる文字に（アプリと同じ演出） */
:root[data-accent] .wordmark {
  background-color: transparent;
  background-image: var(--text-grad);
  background-size: 200% 100%;
  animation: text-flow 4s linear infinite;
}
@keyframes text-flow {
  to {
    background-position: 200% 0;
  }
}

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
