/* ココロタイプ — スタイルシート
   設計: モバイル優先 / 多言語対応（ラテン書体を先に、CJK をフォールバックに置く） */

/*
  hidden 属性を必ず効かせる。
  ブラウザ既定の [hidden] { display: none } は詳細度が最も低いため、
  .btn { display: inline-flex } のようなクラス指定に負けてしまう。
  実際に「hidden なのに表示される」ボタンが生じていたため、明示的に固定する。
*/
[hidden] { display: none !important; }

:root {
  --bg: #101527;
  --bg-2: #1a2340;
  --panel: #ffffff;
  --panel-soft: #f5f7fc;
  --panel-tint: #f8f9fd;
  --ink: #1a1f36;
  --ink-soft: #667085;
  --line: #e3e6f0;
  --brand: #5b5bd6;
  --brand-2: #7c6cf6;
  --accent: #7c6cf6;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --maxw: 1080px;
  /* 多言語対応: ラテン書体を先頭に、CJK をフォールバックとして並べる。
     言語を追加してもフォントスタックを書き換えずに済む。 */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo,
    "Yu Gothic UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-display: var(--font);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--panel);
  line-height: 1.85;
  font-size: 16px;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

img, svg { max-width: 100%; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }

h1, h2, h3, h4 { line-height: 1.4; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 2.2vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.7rem); margin-top: 1.8em; }
h3 { font-size: 1.1rem; }
.h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.section { padding: 44px 0; }
.muted { color: var(--ink-soft); }
.small { font-size: .86rem; }
.lead { font-size: 1.05rem; color: var(--ink-soft); }

.skip {
  position: absolute; left: -9999px;
}
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; border-radius: 8px; }

/* ---------- ヘッダー ---------- */
.hdr {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 16, 32, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
}
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  line-height: 0;
}
.brand-mark svg { width: 22px; height: 22px; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: #c9cee6; text-decoration: none; font-size: .9rem; padding: 6px 9px; border-radius: 8px;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.btn-primary { color: #fff; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  text-decoration: none; transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 6px 18px rgba(91, 91, 214, .28); }
.btn-primary:hover { color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel-soft); color: var(--ink); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-sm { padding: 7px 13px; font-size: .87rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- ヒーロー ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 12% -10%, rgba(124, 108, 246, .35), transparent 60%),
    radial-gradient(700px 400px at 92% 0%, rgba(52, 211, 153, .22), transparent 55%),
    var(--bg);
  color: #fff;
  padding: 56px 0 64px;
}
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: .5em; }
.hero h1 strong { color: #a99cff; }
.hero .lead { color: #c2c8e0; }
.eyebrow {
  display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: #d7dbf0; font-size: .8rem; letter-spacing: .06em;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.hero .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .22); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.badges { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 6px; color: #b9c0dc; font-size: .9rem; }
.badges li::before { content: "✓"; color: #34d399; margin-right: 8px; font-weight: 700; }

/* ヒーローの抽象ビジュアル */
.hero-art {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(6, 10, 24, .5);
  line-height: 0;
}
.hero-art svg { width: 100%; height: auto; display: block; }

.center { text-align: center; }
.center svg { max-width: 100%; height: auto; }

.sample-card {
  margin-top: 22px; padding: 22px 20px; border-radius: var(--radius);
  background: var(--panel-soft); border: 1px solid var(--line);
}
.hc-title { font-size: .85rem; color: var(--ink-soft); margin: 0 0 14px; letter-spacing: .06em; }
.hc-note { font-size: .78rem; color: var(--ink-soft); margin: 14px 0 0; }

/* ---------- カード・グリッド ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }

.grp { margin: 28px 0; }
.grp-h {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border-left: 4px solid var(--accent, var(--brand)); padding-left: 14px;
}
.grp-h .muted { font-size: .85rem; font-weight: 400; }
.grp-mark { line-height: 0; flex: 0 0 auto; }
.grp-mark svg { display: block; }

.tcard {
  display: flex; gap: 12px; align-items: flex-start;
  text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; box-shadow: var(--shadow);
  border-top: 3px solid var(--accent, var(--brand));
  transition: transform .1s ease, box-shadow .15s ease;
}
.tcard:hover { transform: translateY(-2px); color: inherit; box-shadow: 0 10px 26px rgba(16, 24, 40, .12); }
.tcard-emblem { flex: 0 0 auto; line-height: 0; }
.tcard-emblem svg { display: block; }
.tcard-body { display: block; min-width: 0; }
.tcard-code { display: block; font-weight: 800; letter-spacing: .08em; color: var(--accent, var(--brand)); font-size: 1.05rem; }
.tcard-nick { display: block; font-weight: 700; margin: 2px 0 6px; }
.tcard-tag { display: block; font-size: .85rem; color: var(--ink-soft); line-height: 1.6; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ---------- 指標バー ---------- */
.dimbar { margin: 0 0 18px; }
.dimbar-head { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 6px; }
.dimbar-label { font-weight: 600; }
.dimbar-letter { font-weight: 800; color: var(--accent, var(--brand)); letter-spacing: .1em; }
.dimbar-track {
  position: relative; height: 12px; border-radius: 999px; background: #eceefa; overflow: hidden;
}
.dimbar-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #c7cbe4; z-index: 2; }
.dimbar-band { position: absolute; top: 0; bottom: 0; background: rgba(124, 108, 246, .22); z-index: 1; }
.dimbar-fill {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 3;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 999px;
}
.dimbar-ends { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-soft); margin-top: 5px; }
.hero-card .dimbar-track { background: rgba(255, 255, 255, .14); }
.hero-card .dimbar-mid { background: rgba(255, 255, 255, .3); }
.hero-card .dimbar-ends, .hero-card .dimbar-label { color: #c2c8e0; }
.dimlist { display: grid; gap: 4px; }

/* ---------- テスト ---------- */
.page-test { background: var(--panel-soft); }
.test-wrap { max-width: 720px; padding-top: 32px; padding-bottom: 56px; }
.test-intro h1 { margin-bottom: .3em; }
.progress-wrap { position: sticky; top: 62px; z-index: 20; background: var(--panel-soft); padding: 12px 0; }
.progress-bar { height: 8px; border-radius: 999px; background: #e2e5f3; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #34d399); transition: width .25s ease; }
.progress-meta { display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-soft); margin-top: 6px; }

.qcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow); margin-top: 12px;
}
.qcard-dim { font-size: .8rem; color: var(--brand); letter-spacing: .06em; margin: 0 0 14px; font-weight: 600; }
.poles { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 20px; }
.pole {
  font: inherit; font-size: .98rem; font-weight: 600; color: var(--ink); text-align: center;
  background: var(--panel-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 12px; cursor: pointer; line-height: 1.6; min-height: 84px;
  display: grid; place-items: center;
}
.pole:hover { border-color: var(--brand); background: #f0f0ff; }
.poles-vs { font-size: .75rem; color: var(--ink-soft); letter-spacing: .1em; }

.scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.scale-dot {
  background: none; border: 0; padding: 8px 0 4px; cursor: pointer;
  display: grid; justify-items: center; gap: 6px; font: inherit; border-radius: 10px;
}
.scale-dot .dot {
  width: 100%; max-width: 40px; height: 34px; border-radius: 8px;
  background: #eef0fa; border: 1px solid var(--line); transition: all .12s ease;
}
.scale-dot:hover .dot { border-color: var(--brand); background: #e8e8ff; }
.scale-dot.is-active .dot { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; }
.scale-cap { font-size: .68rem; color: var(--ink-soft); line-height: 1.3; text-align: center; }
.scale-mid .dot { background: #f7f7fb; }
.qcard-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.why-panel {
  margin-top: 14px; padding: 14px; border-radius: var(--radius-sm);
  background: #f6f5ff; border: 1px solid #e4e1ff; font-size: .9rem;
}
.why-chip {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: #ece9ff; color: var(--brand); font-size: .78rem; font-weight: 600;
}
.kbd-hint kbd {
  background: #fff; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 6px; padding: 1px 6px; font-size: .78rem; font-family: ui-monospace, monospace;
}
.notice { background: #fff7ed; border: 1px solid #fed7aa; padding: 12px 14px; border-radius: var(--radius-sm); }

/* ---------- 結果 ---------- */
.result-wrap { max-width: 760px; }
.result-hero {
  background: linear-gradient(160deg, var(--bg), #1d2547); color: #fff;
  border-radius: var(--radius); padding: 26px 22px; margin-bottom: 22px;
}
.result-hero h1 { margin: 0 0 4px; }
.result-code { font-size: clamp(2.4rem, 1.6rem + 5vw, 4rem); font-weight: 800; letter-spacing: .12em; line-height: 1.1; }
.result-nick { font-size: 1.15rem; color: #cfd4ea; }
.result-hero .muted { color: #aeb5d4; }
.quality {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: .9rem; margin-bottom: 12px;
}
.quality.warn { background: #fff7ed; border: 1px solid #fed7aa; }
.quality.info { background: #eff6ff; border: 1px solid #bfdbfe; }
.prob-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.prob-list li { display: grid; grid-template-columns: 62px 1fr 52px; gap: 10px; align-items: center; font-size: .9rem; }
.prob-track { height: 10px; border-radius: 999px; background: #eceefa; overflow: hidden; }
.prob-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

.paywall {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; background: linear-gradient(180deg, #fbfbff, #f2f2fb); margin: 26px 0;
}
.paywall h2 { margin-top: 0; }
.blur-sample { filter: blur(4px); user-select: none; color: var(--ink-soft); margin: 0 0 16px; }

.share-box { display: grid; gap: 12px; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
canvas#share-canvas { width: 100%; max-width: 420px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }

/* ---------- リスト・テーブル ---------- */
.list { padding-left: 1.2em; }
.list li { margin-bottom: 6px; }
.list.numbered { padding-left: 1.4em; }
.tick, .cross { list-style: none; padding: 0; }
.tick li, .cross li { padding-left: 24px; position: relative; margin-bottom: 8px; }
.tick li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.cross li::before { content: "!"; position: absolute; left: 0; color: var(--warn); font-weight: 700; }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  background: #f1f2fb; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 13px; font-size: .87rem;
}

.table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .93rem; }
.table th, .table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.table thead th { background: var(--panel-soft); }
.table th[scope="row"] { background: var(--panel-soft); width: 30%; }

.tsection { margin: 30px 0; }
.crumbs { font-size: .83rem; color: var(--ink-soft); margin-bottom: 14px; }

/* タイプページの帯（シンボル＋コード） */
.type-banner { border-radius: var(--radius); overflow: hidden; line-height: 0; box-shadow: var(--shadow); }
.type-banner svg { width: 100%; height: auto; display: block; }
.type-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin: 18px 0 8px; }
.type-code { color: var(--accent, var(--brand)); letter-spacing: .1em; }
.type-en { display: block; font-size: .95rem; color: var(--ink-soft); font-weight: 400; letter-spacing: .04em; }
.type-tag { font-size: 1.05rem; color: var(--ink-soft); }
.card-emblem { line-height: 0; margin: 0 0 10px; }
.art-cell { text-align: center; }
.art-cell .card-emblem { display: flex; justify-content: center; }

.faq-list details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px;
  margin-bottom: 10px; background: #fff;
}
.faq-list summary { cursor: pointer; font-weight: 600; }
.faq-list details[open] { background: #fbfbff; }
.faq-list details > div { margin-top: 10px; color: var(--ink-soft); }

.prose { max-width: 760px; }
.prose h2 { padding-bottom: 6px; border-bottom: 1px solid var(--line); }

/* ---------- 料金 ---------- */
.plan { display: flex; flex-direction: column; }
.plan .btn { margin-top: auto; }
.plan-featured { border-color: var(--brand); box-shadow: 0 12px 32px rgba(91, 91, 214, .16); }
.plan-badge {
  align-self: flex-start; background: var(--brand); color: #fff; font-size: .75rem;
  padding: 3px 10px; border-radius: 999px; margin: 0 0 10px; letter-spacing: .06em;
}
.price { font-size: 2rem; font-weight: 800; margin: 0 0 12px; }
.price .muted { font-size: .85rem; font-weight: 400; }

.cta-final { text-align: center; background: var(--panel-soft); border-radius: var(--radius); padding: 34px 20px; }

/* ---------- フッター ---------- */
.ftr { background: var(--bg); color: #b9c0dc; margin-top: 40px; padding: 40px 0 24px; font-size: .9rem; }
.ftr-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 24px; }
.ftr-brand { font-weight: 700; color: #fff; letter-spacing: .04em; margin-bottom: 4px; }
.ftr-h { font-weight: 700; color: #fff; margin: 0 0 8px; font-size: .88rem; }
.ftr-links { list-style: none; padding: 0; margin: 0; }
.ftr-links li { margin-bottom: 4px; }
.ftr a { color: #b9c0dc; }
.ftr a:hover { color: #fff; }
.ftr .btn-primary { color: #fff; }
.ftr-note { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 26px; padding-top: 16px; font-size: .8rem; color: #98a0c0; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 15.5px; line-height: 1.8; }
  .section { padding: 32px 0; }
  .hero { padding: 36px 0 44px; }
  .nav a:not(.btn) { display: none; }
  .nav a.btn { display: inline-flex; }
  .poles { grid-template-columns: 1fr; }
  .poles-vs { display: none; }
  .pole { min-height: 62px; }
  .scale { gap: 3px; }
  .scale-dot .dot { height: 30px; }
  .scale-cap { font-size: 0; }
  .scale-dot[data-value="1"] .scale-cap, .scale-dot[data-value="7"] .scale-cap { font-size: .66rem; }
  .progless { display: block; }
  .ftr-grid { grid-template-columns: 1fr; }
  .prob-list li { grid-template-columns: 54px 1fr 44px; }
  .grid-4 { grid-template-columns: 1fr; }
  .tcard-emblem svg { width: 44px; height: 44px; }
  .card-emblem svg { width: 76px; height: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* プライバシーポリシー内のコード例（URL形式の説明） */
.code {
  display: block;
  margin: 10px 0 14px;
  padding: 12px 14px;
  background: var(--panel-soft, #f5f7fc);
  border: 1px solid rgba(91, 91, 214, 0.18);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink, #1a1f36);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.code + p { margin-top: 0; }
