/* 利息メーター Web — 共通スタイル
   配色はアプリアイコン（深緑 + ゴールド）に合わせる。ダークモード対応。 */

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

:root {
  --primary: #1f7a4d;
  --primary-dark: #145c39;
  --primary-deep: #0e3b26;
  --primary-ink: #082417;
  --primary-soft: #e6f3ea;
  --mint: #3fcf8e;
  --accent: #f2b824;
  --accent-soft: #fff4d6;

  --text: #10221a;
  --text-muted: #55685d;
  --bg: #f7faf8;
  --surface: #ffffff;
  --surface-2: #eef5f0;
  --border: rgba(14, 59, 38, 0.10);
  --border-strong: rgba(14, 59, 38, 0.18);

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(8, 36, 23, 0.06);
  --shadow: 0 1px 2px rgba(8, 36, 23, 0.05), 0 12px 32px -8px rgba(8, 36, 23, 0.14);
  --shadow-lg: 0 30px 60px -20px rgba(8, 36, 23, 0.45);

  --font: "Plus Jakarta Sans", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --header-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #3fcf8e;
    --primary-dark: #2fae74;
    --primary-soft: rgba(63, 207, 142, 0.12);
    --accent-soft: rgba(242, 184, 36, 0.14);
    --text: #e8f1ec;
    --text-muted: #9db1a5;
    --bg: #07140e;
    --surface: #0d1f16;
    --surface-2: #11291d;
    --border: rgba(232, 241, 236, 0.08);
    --border-strong: rgba(232, 241, 236, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -8px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--primary-ink); }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ---------- Header (glass) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(8, 36, 23, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: 0.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: rgba(255, 255, 255, 0.78); font-size: 0.9rem; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.10); text-decoration: none; }
.site-nav .nav-cta { background: var(--accent); color: var(--primary-ink); }
.site-nav .nav-cta:hover { background: #ffc93d; color: var(--primary-ink); }
@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  font-weight: 700; font-size: 1rem; line-height: 1.2;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
.btn small { display: block; font-size: 0.68rem; font-weight: 600; opacity: 0.75; letter-spacing: 0.04em; }
.btn-store { background: #fff; color: var(--primary-ink); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); text-align: left; }
.btn-store:hover { box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.55); }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-primary { background: var(--primary); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { color: var(--primary-ink); } }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff;
  background: var(--primary-ink);
  padding: 72px 0 96px;
}
.hero::before {
  content: ""; position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(40% 40% at 78% 30%, rgba(242, 184, 36, 0.30), transparent 70%),
    radial-gradient(45% 50% at 15% 80%, rgba(63, 207, 142, 0.30), transparent 70%),
    radial-gradient(60% 60% at 50% 0%, rgba(31, 122, 77, 0.65), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
}
@keyframes drift { to { transform: translate3d(-3%, 2%, 0) scale(1.05); } }

.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem; font-weight: 600; color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
}
.eyebrow .dot { background: var(--accent); color: var(--primary-ink); font-weight: 800; font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; }
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.2rem);
  line-height: 1.15; font-weight: 800; letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(100deg, #ffd95e 0%, var(--accent) 40%, var(--mint) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 1.12rem; color: rgba(255, 255, 255, 0.78); max-width: 34em; margin-bottom: 32px; }
.hero-meta { margin-top: 24px; display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }
.hero-meta span::before { content: "✓"; color: var(--mint); font-weight: 800; margin-right: 6px; }

/* Phone mockups */
.phones { position: relative; height: 560px; }
.phone {
  position: absolute; width: 250px; aspect-ratio: 460 / 1000;
  border-radius: 40px; padding: 8px;
  background: linear-gradient(145deg, #2a3a31, #0b1611);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; }
.phone-front { left: 50%; top: 0; transform: translateX(-30%) rotate(4deg); z-index: 2; animation: float 7s ease-in-out infinite; }
.phone-back { left: 50%; top: 56px; transform: translateX(-95%) rotate(-7deg); opacity: 0.92; animation: float 7s ease-in-out -3.5s infinite; }
@keyframes float { 50% { translate: 0 -12px; } }
.glow-card {
  position: absolute; z-index: 3; right: 0; bottom: 60px;
  padding: 14px 18px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); line-height: 1.5;
}
.glow-card strong { display: block; font-size: 1.35rem; color: #fff; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .hero .lead { margin-inline: auto; }
  .btn-row, .hero-meta { justify-content: center; }
  .phones { height: 470px; max-width: 420px; margin: 0 auto; width: 100%; }
  .phone { width: 210px; }
  .glow-card { right: 4px; bottom: 30px; }
}
@media (max-width: 420px) {
  .phones { height: 400px; }
  .phone { width: 178px; }
}

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-alt { background: var(--surface-2); }
@media (max-width: 600px) { .section { padding: 72px 0; } }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.kicker { display: inline-block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Bento features ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  grid-column: span 2; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.tile.wide { grid-column: span 3; }
.tile.big { grid-column: span 4; }
.tile h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; line-height: 1.5; }
.tile p { color: var(--text-muted); font-size: 0.95rem; }
.tile .ico {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: var(--primary-soft); color: var(--primary);
}
.tile .ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile.dark {
  background: linear-gradient(150deg, var(--primary-deep), var(--primary-ink));
  border-color: transparent; color: #fff;
}
.tile.dark p { color: rgba(255, 255, 255, 0.72); }
.tile.dark .ico { background: rgba(242, 184, 36, 0.16); color: var(--accent); }
.badge { display: inline-block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--primary-ink); margin-left: 8px; vertical-align: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chips span { font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); font-variant-numeric: tabular-nums; }
.tile:not(.dark) .chips span { background: var(--surface-2); border-color: var(--border); }
.tile .bars { display: flex; align-items: flex-end; gap: 6px; height: 84px; margin-top: 20px; }
.tile .bars i { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent), rgba(242, 184, 36, 0.35)); }
.big-num { font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: var(--primary); margin-bottom: 12px; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile.wide { grid-column: span 1; }
  .tile.big { grid-column: span 2; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .tile, .tile.wide, .tile.big { grid-column: span 1; }
}

/* ---------- Live calculator demo ---------- */
.calc {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.calc-form { padding: 36px; display: grid; gap: 22px; }
.field label { display: flex; justify-content: space-between; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.field output { color: var(--primary); font-variant-numeric: tabular-nums; }
.field input[type="range"] { width: 100%; accent-color: var(--primary); height: 28px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.seg button {
  font: inherit; font-weight: 700; font-size: 0.9rem; border: 0; cursor: pointer;
  min-height: 44px; border-radius: 9px; background: transparent; color: var(--text-muted);
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.calc-result {
  padding: 36px; color: #fff;
  background:
    radial-gradient(60% 60% at 90% 10%, rgba(242, 184, 36, 0.22), transparent 70%),
    linear-gradient(160deg, var(--primary-deep), var(--primary-ink));
  display: flex; flex-direction: column;
}
.calc-result .label { font-size: 0.85rem; color: rgba(255, 255, 255, 0.65); font-weight: 600; }
.calc-result .total { font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; margin: 4px 0 20px; }
.calc-result dl { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; font-size: 0.95rem; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.calc-result dt { color: rgba(255, 255, 255, 0.7); }
.calc-result dd { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-result dd.gain { color: var(--accent); }
.calc-chart { display: flex; align-items: flex-end; gap: 3px; height: 96px; margin-top: auto; padding-top: 24px; }
.calc-chart span { flex: 1; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 2px 2px; overflow: hidden; min-height: 2px; transition: height .3s ease; }
.calc-chart span b { display: block; background: rgba(255, 255, 255, 0.22); }
.calc-chart span i { display: block; background: var(--accent); }
.calc-note { margin-top: 14px; font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); }
@media (max-width: 800px) {
  .calc { grid-template-columns: 1fr; }
  .calc-form, .calc-result { padding: 24px; }
}

/* ---------- Screens gallery ---------- */
.gallery {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 24px 32px; margin: 0 -24px;
  scrollbar-width: thin;
}
.gallery figure { flex: 0 0 230px; scroll-snap-align: center; text-align: center; }
.gallery .phone { position: static; width: 100%; transform: none; animation: none; box-shadow: var(--shadow); }
.gallery figcaption { margin-top: 16px; font-weight: 700; font-size: 0.92rem; }
.gallery figcaption small { display: block; color: var(--text-muted); font-weight: 500; font-size: 0.8rem; }
@media (min-width: 1100px) { .gallery { justify-content: center; overflow: visible; } }
@media (max-width: 600px) { .gallery { padding: 8px 16px 24px; margin: 0 -16px; } .gallery figure { flex-basis: 200px; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-size: 2.2rem; font-weight: 800; line-height: 1; margin-bottom: 16px;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.step p { color: var(--text-muted); font-size: 0.92rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta-card {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 36px; padding: 72px 40px; text-align: center; color: #fff;
  background: var(--primary-ink);
}
.cta-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 80% at 100% 0%, rgba(242, 184, 36, 0.35), transparent 70%),
    radial-gradient(50% 80% at 0% 100%, rgba(63, 207, 142, 0.30), transparent 70%);
}
.cta-card img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 24px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.cta-card h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.cta-card p { color: rgba(255, 255, 255, 0.72); margin-bottom: 32px; }
.cta-card .btn-row { justify-content: center; }
@media (max-width: 600px) { .cta-card { padding: 48px 20px; border-radius: 28px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-ink); color: rgba(255, 255, 255, 0.6); padding: 56px 0 40px; font-size: 0.88rem; }
.site-footer .container { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.site-footer .brand { margin-bottom: 8px; }
.site-footer nav { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.site-footer nav a { color: rgba(255, 255, 255, 0.82); }
.site-footer nav a:hover { color: var(--accent); }
.site-footer .copy { width: 100%; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.8rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Sub pages (privacy / data-handling / support) ---------- */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background: var(--primary-ink); padding: 64px 0 56px;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(40% 80% at 90% 0%, rgba(242, 184, 36, 0.25), transparent 70%),
    radial-gradient(40% 80% at 0% 100%, rgba(63, 207, 142, 0.25), transparent 70%);
}
.page-hero h1 { font-size: clamp(1.8rem, 4.4vw, 2.8rem); font-weight: 800; line-height: 1.3; }
.page-hero .meta { margin-top: 12px; color: rgba(255, 255, 255, 0.65); font-size: 0.9rem; }
.crumb { display: inline-block; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 16px; }
.crumb:hover { color: #fff; }

.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 56px 24px 96px; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: 0.85rem; }
.toc p { font-weight: 800; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.toc ol { list-style: none; border-left: 2px solid var(--border); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text-muted); line-height: 1.5; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--primary); border-left-color: var(--primary); font-weight: 700; }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; padding: 32px 16px 72px; }
  .toc { display: none; }
}

.prose { max-width: 760px; }
.prose > p:first-child { font-size: 1.05rem; }
.prose h2 { font-size: 1.4rem; font-weight: 800; line-height: 1.45; margin: 56px 0 16px; padding-top: 8px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.08rem; font-weight: 800; margin: 28px 0 10px; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 16px; padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--primary); }
.prose strong { font-weight: 800; }
.table-wrap { overflow-x: auto; margin: 16px 0 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px; }
.prose th, .prose td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface-2); font-weight: 800; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.callout {
  display: flex; gap: 14px; padding: 18px 20px; margin-bottom: 32px;
  border-radius: var(--radius); background: var(--primary-soft); border: 1px solid var(--border);
  font-size: 0.95rem;
}
.callout::before { content: "i"; flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 0.85rem; font-style: italic; }

/* FAQ */
.faq { display: grid; gap: 12px; margin-bottom: 64px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; font-weight: 700; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 0.85rem; }
.faq summary::after { content: ""; margin-left: auto; flex: 0 0 10px; height: 10px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg) translateY(-3px); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq .answer { padding: 0 22px 20px 66px; color: var(--text-muted); }
.faq .answer p + p { margin-top: 8px; }
.faq .answer strong { color: var(--text); }
@media (max-width: 600px) { .faq .answer { padding-left: 22px; } }

.contact {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  padding: 36px; border-radius: var(--radius-lg); color: #fff;
  background:
    radial-gradient(60% 100% at 100% 0%, rgba(242, 184, 36, 0.25), transparent 70%),
    linear-gradient(150deg, var(--primary-deep), var(--primary-ink));
}
.contact h2 { color: #fff; margin: 0 0 6px !important; padding: 0 !important; font-size: 1.4rem; font-weight: 800; }
.contact p { color: rgba(255, 255, 255, 0.72); margin: 0; }
.contact .note { font-size: 0.85rem; margin-top: 8px; color: rgba(255, 255, 255, 0.55); }
@media (max-width: 700px) { .contact { grid-template-columns: 1fr; padding: 28px 22px; } .contact .btn { width: 100%; } }
.field-label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }

/* ---------- Language link（ヘッダー・フッター。scripts/gen_web.py が挿入） ---------- */
.lang-link { display: inline-flex; align-items: center; gap: 6px; }
.lang-link svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 720px) {
  .site-nav a.lang-link { display: inline-flex; min-height: 44px; min-width: 44px; justify-content: center; padding: 8px 12px; }
  .site-nav a.lang-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- Languages page（web/languages.html） ---------- */
.lang-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; padding: 56px 0 96px; }
.lang-grid li { min-width: 0; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.lang-grid li > a { display: block; font-weight: 700; color: var(--text); min-height: 28px; }
.lang-grid li > a:hover { color: var(--primary); }
.lang-grid .code { display: block; font-size: 0.75rem; color: var(--text-muted); }
.lang-grid .variants { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 0.8rem; }
@media (max-width: 600px) { .lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 32px 0 72px; } }

/* ---------- Right-to-left (ar / fa / he / ur)。LTR の見た目は変えない ---------- */
[dir="rtl"] .btn-store { text-align: right; }
[dir="rtl"] .eyebrow { padding: 6px 8px 6px 14px; }
[dir="rtl"] .hero-meta span::before { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .glow-card { right: auto; left: 0; }
[dir="rtl"] .badge { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .calc-result dd { text-align: left; }
[dir="rtl"] .prose ul { padding-left: 0; padding-right: 1.4em; }
[dir="rtl"] .prose th, [dir="rtl"] .prose td { text-align: right; }
[dir="rtl"] .toc ol { border-left: 0; border-right: 2px solid var(--border); }
[dir="rtl"] .toc a { padding: 5px 14px 5px 0; margin-left: 0; margin-right: -2px; border-left: 0; border-right: 2px solid transparent; }
[dir="rtl"] .toc a.active { border-right-color: var(--primary); }
[dir="rtl"] .faq summary::after { margin-left: 0; margin-right: auto; }
[dir="rtl"] .faq .answer { padding: 0 66px 20px 22px; }
@media (max-width: 600px) { [dir="rtl"] .faq .answer { padding-right: 22px; } }
@media (max-width: 900px) { [dir="rtl"] .glow-card { left: 4px; right: auto; } }
