/* Layout: ゴシック体の太さの差だけで強弱をつける。上から ニュース → 診断 → 6タイプ(中央) → 本能とは → 販売。診断は全画面パネルで開く。 */
:root {
  --paper: #ffffff;
  --ink: #141517;
  --sub: #5a5f66;
  --soft: #f3f4f5;
  --rule: #d8dadd;
  --f: "Hanken Grotesk", "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lock, html.lock body { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f); font-weight: 400; font-size: 16px; line-height: 1.85; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
section { scroll-margin-top: 56px; }
.in { max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--paper); z-index: 40; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); border-bottom: 1px solid var(--rule); }
.top .in { display: flex; align-items: center; justify-content: space-between; gap: 4px 24px; flex-wrap: wrap; padding-block: 12px; }
.logo { font-weight: 800; letter-spacing: 0.02em; font-size: 1rem; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 24px; font-size: 0.875rem; font-weight: 500; }
.nav a { padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }
.lang { display: inline-flex; align-items: center; color: var(--sub); cursor: default; }
.lang svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 480px) { .nav { gap: 2px 16px; } }

/* buttons */
.btn { font: inherit; font-weight: 700; cursor: pointer; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 999px; padding: 14px 36px; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.small { padding: 8px 18px; min-height: 40px; font-size: 0.875rem; }

/* rows: 左見出し + 右内容 */
.row { display: grid; grid-template-columns: 1fr; gap: 20px; padding-block: 64px; border-bottom: 1px solid var(--rule); }
@media (min-width: 860px) { .row { grid-template-columns: 220px 1fr; gap: 48px; } }
.row h2, .ctr-h { font-weight: 800; font-size: 1.375rem; line-height: 1.3; letter-spacing: 0.01em; }
.row h2 small, .ctr-h small { display: block; margin-top: 4px; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sub); }
.row > div { min-width: 0; }

/* news */
.news li { display: grid; grid-template-columns: 8.5em 1fr; gap: 4px 20px; padding-block: 16px; border-top: 1px solid var(--rule); align-items: baseline; }
.news li:first-child { border-top: 0; padding-top: 0; }
.news time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
@media (max-width: 520px) { .news li { grid-template-columns: 1fr; } }

/* hero (診断) */
.hero { padding-block: 72px 56px; position: relative; overflow: hidden; }
.hero > *:not(.hero-art) { position: relative; z-index: 1; }
.hero-art { position: absolute; z-index: 0; top: 50%; right: -14vw; transform: translateY(-50%); width: 82vw; max-width: 420px; height: auto; opacity: 0.09; pointer-events: none; }
@media (min-width: 720px) { .hero-art { right: max(16px, env(safe-area-inset-right, 0px)); width: min(42vw, 440px); max-width: none; opacity: 1; } }
.shapes { display: inline-flex; gap: 5px; vertical-align: -2px; margin-right: 4px; }
.shapes svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.hero .meta { font-size: 0.8125rem; font-weight: 500; color: var(--sub); letter-spacing: 0.04em; }
#start { border-bottom: 1px solid var(--rule); }
@media (min-width: 720px) { .hero { min-height: 600px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; } }
.hero h1 { margin-top: 18px; font-weight: 800; font-size: clamp(3.5rem, 15vw, 9rem); line-height: 1.05; letter-spacing: 0.02em; }
.hero .lead { margin-top: 28px; max-width: 30em; font-size: 1.0625rem; font-weight: 500; }
.hero .btn { margin: 32px auto 0; display: flex; width: fit-content; }
.cast-band { background: var(--soft); border-block: 1px solid var(--rule); }
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 12px; align-items: end; padding-block: 40px; }
.cast img { width: 100%; max-width: 128px; margin: 0 auto; }
@media (min-width: 720px) { .cast { grid-template-columns: repeat(6, 1fr); } }

/* types (中央) */
.types-wrap { padding-block: 72px; border-bottom: 1px solid var(--rule); text-align: center; }
.tgrid { margin: 44px auto 0; max-width: 720px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px 24px; }
.tgrid .nm { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 10px; }
.tgrid .code { font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.06em; color: var(--sub); }
@media (max-width: 480px) { .tgrid { gap: 40px 12px; } .tgrid img { width: 92px; height: 92px; } .tgrid .sum { font-size: 0.875rem; } }
.tgrid li { display: grid; justify-items: center; align-content: start; gap: 6px; min-width: 0; }
.tgrid img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 8px; }
.tgrid b { font-weight: 800; font-size: 0.9375rem; line-height: 1.5; }
.tgrid .tag { font-weight: 500; line-height: 1.6; }
.tgrid .sum { font-size: 0.9375rem; color: var(--sub); line-height: 1.75; max-width: 22em; }
.types-wrap .btn { margin-top: 52px; }


/* type links / banner / detail pages */
.tlink { display: grid; justify-items: center; align-content: start; gap: 6px; color: inherit; min-width: 0; }
.tlink img { transition: transform 0.2s ease; }
.tlink:hover img { transform: translateY(-4px); }
.tlink .more, .more { font-size: 0.8125rem; font-weight: 700; border-bottom: 1px solid var(--ink); margin-top: 6px; line-height: 1.6; }
.banner { display: flex; align-items: center; justify-content: center; text-align: center; gap: 20px; margin-top: 32px; padding: 22px 24px; background: #ebe8e1; color: #161a2e; border-radius: 24px; }
.banner:hover { background: #e0dbd1; }
.banner .bt { font-weight: 800; font-size: 1.125rem; line-height: 1.4; }
.banner small { display: block; font-weight: 400; font-size: 0.8125rem; color: #5a5f66; margin-top: 2px; }
.banner .ar { font-size: 1.5rem; line-height: 1; flex: none; }
.dt { padding-block: 40px 56px; }
.back-link { display: inline-block; font-weight: 700; font-size: 0.9375rem; border-bottom: 2px solid transparent; padding: 4px 0; }
.back-link:hover { border-bottom-color: var(--ink); }
.dt-hero { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 28px; padding-bottom: 56px; border-bottom: 1px solid var(--rule); }
@media (min-width: 720px) { .dt-hero { grid-template-columns: 280px 1fr; gap: 56px; align-items: center; } }
.dt-hero .pic { background: var(--soft); border: 1px solid var(--rule); padding: 32px; display: grid; place-items: center; }
.dt-hero .pic img { width: min(200px, 56vw); height: auto; }
.dt h1 { font-weight: 800; font-size: clamp(2.5rem, 9vw, 4.5rem); line-height: 1.1; margin-top: 4px; letter-spacing: 0.01em; }
.dt h1:focus { outline: none; }
.dt-code { margin-top: 8px; font-weight: 700; letter-spacing: 0.1em; color: var(--sub); }
.dt-lead { margin-top: 16px; font-size: 1.25rem; font-weight: 700; line-height: 1.6; }
.order li { display: grid; grid-template-columns: 11em 1fr; gap: 4px 20px; padding-block: 16px; border-top: 1px solid var(--rule); align-items: baseline; }
.order li:first-child { border-top: 0; padding-top: 0; }
.order .o-k { font-weight: 700; }
.order .o-k small { display: block; font-size: 0.75rem; font-weight: 500; color: var(--sub); letter-spacing: 0.06em; }
@media (max-width: 520px) { .order li { grid-template-columns: 1fr; } }
.note { color: var(--sub); max-width: 36em; }
.prose p { max-width: 36em; }
.prose p + p { margin-top: 14px; }
.others { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.others a { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 18px 8px; border: 1px solid var(--rule); border-radius: 20px; }
.others a:hover { border-color: var(--ink); }
.others img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 6px; }
.others b { font-weight: 800; }
.others span { font-size: 0.8125rem; color: var(--sub); letter-spacing: 0.06em; }
.dt-cta { padding-block: 56px; text-align: center; }
.dt-visual { margin-top: 24px; background: var(--tt, var(--soft)); border-radius: 12px; display: grid; justify-items: center; gap: 20px; padding: 40px 16px 28px; }
.dt-visual img { width: min(260px, 62vw); height: auto; }
.dt-visual .dt-lead { margin: 0; text-align: center; font-size: clamp(1.75rem, 7.5vw, 2.75rem); font-weight: 800; line-height: 1.3; letter-spacing: 0.04em; text-wrap: balance; padding-top: 4px; }
.dt-id { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-block: 28px; text-align: center; }
.dt-id h1 { font-size: clamp(1.5rem, 6vw, 3rem); margin-top: 0; }
.dt-id .dt-code { margin-top: 0; font-size: clamp(1.25rem, 5vw, 2.25rem); color: var(--ink); letter-spacing: 0.04em; font-weight: 700; }
.prose.long { max-width: 38em; }
.prose.long p { line-height: 2; font-size: 1rem; }
.prose.long p + p { margin-top: 12px; }
.prose h3 { font-size: 1.375rem; font-weight: 800; line-height: 1.5; margin-top: 52px; margin-bottom: 14px; padding: 2px 0 2px 14px; border-left: 8px solid var(--tc, #1aa7ff); }
.dt-bar { align-self: start; padding: 2px 0 2px 14px; border-left: 8px solid var(--tc, #1aa7ff); }
.prose .key { font-weight: 800; font-size: 1.1875rem; line-height: 1.7; margin-top: 24px; margin-bottom: 4px; }
.prose h3.shape { border-left: 0; padding-left: 0; display: flex; align-items: center; gap: 10px; }
.prose h3 .sh { flex: none; }
#detail[hidden] { display: none; }
.icon-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px 24px; align-items: center; }
.icon-row a { display: block; }
.icon-row img { width: 56px; height: 56px; object-fit: contain; transition: transform 0.2s ease; }
.icon-row a:hover img { transform: translateY(-4px); }
#detail h1:focus { outline: none; }
#detail h2 { scroll-margin-top: 72px; }

/* about */
.about p { max-width: 36em; font-size: 1.0625rem; }
.points { margin-top: 28px; display: grid; border-top: 1px solid var(--rule); }
.points li { padding-block: 14px; border-bottom: 1px solid var(--rule); display: flex; gap: 14px; align-items: baseline; font-weight: 500; }

/* shop */
.shop { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.shop li { border: 1px solid var(--rule); border-radius: 24px; padding: 16px; display: grid; gap: 10px; justify-items: start; }
.shop .ph { border-radius: 16px; width: 100%; aspect-ratio: 1; background: var(--soft); display: grid; place-items: center; }
.shop .ph img { width: 40%; }
.shop .n { font-weight: 700; }
.shop .s { font-size: 0.8125rem; color: var(--sub); }

/* footer */
.foot { background: #ebe8e1; color: #161a2e; padding-block: 56px 36px; }
.foot .big { font-weight: 800; font-size: clamp(1.75rem, 6vw, 2.5rem); letter-spacing: -0.01em; }
.icons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ico { width: 48px; height: 48px; border: 1px solid #161a2e; border-radius: 50%; display: grid; place-items: center; color: #161a2e; }
a.ico:hover { background: #161a2e; color: #ebe8e1; }
.ico.off { border-style: dashed; color: #8f8c86; border-color: #aaa69e; }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.foot .cp { margin-top: 36px; padding-top: 18px; border-top: 1px solid #d3cfc6; color: #6a6760; font-size: 0.8125rem; }

/* quiz overlay */
.overlay { position: fixed; inset: 0; z-index: 60; background: var(--paper); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.overlay[hidden] { display: none; }
.ov-in { min-height: 100%; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.ov-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.qcount { font-weight: 700; font-size: 0.875rem; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.seg { display: flex; gap: 4px; margin-top: 20px; }
.seg i { flex: 1; height: 4px; background: var(--rule); }
.seg i.on { background: var(--ink); }
.qtext { font-weight: 800; font-size: clamp(1.5rem, 5.5vw, 2.25rem); line-height: 1.45; margin: 40px 0 32px; text-wrap: balance; text-align: center; }
.qtext:focus { outline: none; }
.choices { display: grid; gap: 12px; }
.choice { font: inherit; font-weight: 500; text-align: center; cursor: pointer; width: 100%; color: var(--ink); background: var(--paper);
  border: 1px solid var(--ink); border-radius: 22px; padding: 16px 18px; min-height: 64px; display: flex; align-items: center; justify-content: center; line-height: 1.6; }
.choice .n { width: 32px; height: 32px; border: 1px solid currentColor; display: grid; place-items: center; font-weight: 700; font-size: 0.875rem; }
.back { display: flex; width: fit-content; margin: 28px auto 0; }

.res { text-align: center; }
.res .pic { border: 1px solid var(--rule); background: var(--soft); padding: 36px 16px; margin-top: 24px; display: flex; justify-content: center; }
.res .pic img { height: clamp(150px, 40vw, 220px); width: auto; }
.res .you { margin-top: 32px; font-weight: 500; font-size: 0.875rem; color: var(--sub); letter-spacing: 0.06em; }
.res h2 { font-weight: 800; font-size: clamp(2rem, 9vw, 3.25rem); line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; margin-top: 4px; }
.res h2:focus { outline: none; }
.res .tagline { margin-top: 8px; font-weight: 700; font-size: 1.125rem; }
.res .desc { margin: 20px auto 0; max-width: 32em; text-align: left; }
.kw { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.chip { border: 1px solid var(--ink); border-radius: 999px; padding: 0 12px; font-weight: 700; font-size: 0.875rem; line-height: 1.8; }
.score { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 360px; margin-left: auto; margin-right: auto; }
.score li { display: grid; gap: 4px; justify-items: center; min-width: 0; }
.tico b { font-size: 1rem; letter-spacing: 0.04em; }
.tico { width: 100%; max-width: 72px; aspect-ratio: 1; background: var(--soft); border: 1px solid var(--rule); display: grid; place-items: center; }
.tico img { width: 68%; height: 68%; object-fit: contain; }
.score b { font-variant-numeric: tabular-nums; font-size: 0.8125rem; font-weight: 700; }
.res .row2 { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 32px; }
.toast { margin-top: 12px; min-height: 1.6em; font-size: 0.875rem; font-weight: 500; color: var(--sub); }
.copyfb { margin-top: 12px; width: 100%; font: inherit; font-size: 0.875rem; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 14px; background: var(--paper); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* 本能コードは大文字表記 */
.tgrid .code, .dt-code, .order .o-k, .others span { text-transform: uppercase; }
.res .temper { margin-top: 12px; display: inline-block; border: 1px solid var(--ink); border-radius: 999px; padding: 0 12px; font-weight: 700; font-size: 0.875rem; line-height: 1.9; letter-spacing: 0.06em; }
.dt-id .note { font-size: 0.75rem; letter-spacing: 0.04em; }

/* 診断結果のシェア(説明ページの下部) */
.share { padding-block: 56px 72px; text-align: center; border-top: 1px solid var(--rule); }
.share-h { display: inline-block; font-weight: 800; font-size: 1.125rem; letter-spacing: 0.2em; padding-bottom: 10px; border-bottom: 3px dotted var(--ink); }
.share-icons { display: flex; justify-content: center; gap: 28px; margin-top: 32px; flex-wrap: wrap; }
.sh-btn { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 800; line-height: 1.25; text-decoration: none; transition: transform 0.15s ease; }
.sh-btn:hover { transform: translateY(-3px); }
.sh-x { background: var(--ink); color: #fff; }
.sh-x svg, .sh-line svg { width: 32px; height: 32px; fill: currentColor; }
.sh-line { background: #06c755; color: #fff; }
.sh-url { background: #cfe8ff; color: #0b3a66; font-size: 1.0625rem; letter-spacing: 0; }
.share-msg { margin-top: 18px; min-height: 1.6em; font-size: 0.875rem; font-weight: 500; color: var(--sub); }
.share .copyfb { max-width: 420px; display: block; margin-inline: auto; }

/* 結果画面(簡易) */
.res .pic { border: 0; border-radius: 12px; }
.res .rid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.res .rid .note { font-size: 0.75rem; letter-spacing: 0.04em; margin: 0 auto; }
.res .rid-v { font-weight: 800; font-size: clamp(1.25rem, 5.5vw, 1.75rem); letter-spacing: 0.04em; line-height: 1.5; }
.res .share { padding-block: 32px 8px; border-top: 0; }
.res .desc { margin-top: 24px; }
.res .share-h { font-size: 1.125rem; letter-spacing: 0.2em; margin-top: 0; line-height: 1.6; text-wrap: balance; }
.share.flush { border-top: 0; border-bottom: 1px solid var(--rule); padding-block: 72px 64px; }

/* 本能の並び(SP=直角三角形 / SO=四角形 / SX=円)・中央寄せ */
.order-row { display: block; text-align: center; }
.order-row > h2 { margin-bottom: 28px; }
.flow { display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; gap: 6px; }
.flow .fc { position: relative; width: 84px; height: 84px; flex: none; }
.flow .fc svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--tc, var(--ink)); stroke-width: 3; }
.flow .fc b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-weight: 800; font-size: 1.3125rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; }
.flow .fc-sp b { left: 50%; top: 62%; }
.flow .fa { width: 44px; flex: none; display: grid; place-items: center; }
.flow .fa svg { width: 100%; height: auto; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 420px) { .flow .fc { width: 68px; height: 68px; } .flow .fc b { font-size: 1.0625rem; } .flow .fa { width: 30px; } }

/* フッター */
.foot .fh { font-weight: 800; font-size: 1rem; letter-spacing: 0.14em; }
.foot .icons { margin-top: 16px; }
.flinks { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 36px; font-size: 0.875rem; font-weight: 500; }
.flinks .fl { border-bottom: 1px solid #161a2e; padding-bottom: 2px; cursor: default; }

/* トップページの各セクションを中央揃え */
#about .row, #shop .row, #news .row { display: block; text-align: center; }
#about .row > h2, #shop .row > h2, #news .row > h2 { margin-bottom: 28px; }
#about .about p, #about .points, #about .banner { margin-left: auto; margin-right: auto; }
#about .about p { max-width: 36em; }
#about .points { max-width: 36em; }
#about .points li { justify-content: center; text-align: center; }
#about .banner { max-width: 36em; }
.shop li { justify-items: center; text-align: center; }
.news li { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 4px; }
.news li:first-child { padding-top: 16px; border-top: 0; }
.foot .in { text-align: center; }
.foot .icons, .foot .flinks { justify-content: center; }

/* ほかのタイプ:5体を常に1列に */
.icon-row { flex-wrap: nowrap; gap: 12px 16px; }
.icon-row a { flex: none; }
.icon-row img { width: min(56px, calc((100vw - 32px - 4 * 12px) / 5)); height: auto; aspect-ratio: 1; }
@media (min-width: 480px) { .icon-row { gap: 24px; } }

/* 本能の並び:図形の色を統一(三角=青 / 四角=緑 / 円=赤) */
.flow .fc-sp svg { stroke: #0a5cff; }
.flow .fc-so svg { stroke: #f2c200; }
.flow .fc-sx svg { stroke: #ff2a2a; }

/* 気質:左の本能が強い=「−」/ 右の本能が強い=「+」/ 診断前=「±0」 */
.tm-sign { display: inline-block; font-family: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif; font-weight: 800; font-size: 1.8em; line-height: 0.95; color: var(--tc, var(--ink)); }
.tm-sign.zero { color: var(--ink); font-size: 1em; line-height: 1.5; }
.dt-id { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }

/* 「診断をはじめる」ボタンはベージュ */
.hero .btn { background: #ebe8e1; color: #161a2e; border-color: #ebe8e1; }
.hero .btn:hover { background: #e0dbd1; color: #161a2e; border-color: #e0dbd1; }

/* 設問クリアのページ(6体のお祝い・紙吹雪) */
.overlay.celebrate { background: linear-gradient(180deg, #ffe3ec 0%, #fff3d9 55%, #e3f4ff 100%); }
.done { flex: 1; display: flex; flex-direction: column; text-align: center; position: relative; }
.done-body, .done-btn { position: relative; z-index: 1; }
.done-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding-block: 32px 28px; }
.done-chars { display: grid; grid-template-columns: repeat(3, minmax(0, 92px)); gap: 6px 14px; justify-items: center; margin-bottom: 22px; }
.done-chars img { width: 92px; height: 92px; max-width: 100%; object-fit: contain; animation: dn-bounce 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.done-chars img:nth-child(odd) { animation-delay: -0.8s; }
.done-chars img:nth-child(3n) { animation-delay: -0.4s; }
.done h2 { font-weight: 900; font-size: clamp(2rem, 9vw, 2.75rem); line-height: 1.35; text-wrap: balance; }
.done h2 span { font-size: 0.78em; }
.done h2:focus { outline: none; }
.done-sub { font-weight: 600; color: var(--sub); margin-top: 6px; }
.done .banner.done-btn { width: 100%; margin-top: 0; border: 0; font: inherit; cursor: pointer; background: #fff; max-width: none; }
.done .banner.done-btn:hover { background: #fff7fa; }
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.confetti i { position: absolute; top: -24px; opacity: 0.92; animation: dn-fall linear infinite; }
@keyframes dn-fall { from { transform: translateY(-5vh) rotate(var(--r)); } to { transform: translateY(110vh) rotate(calc(var(--r) + 540deg)); } }
@keyframes dn-bounce { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .confetti i, .done-chars img { animation: none; } .confetti i { top: calc(var(--r) / 4); } }

/* ヘッダー:地球儀はそのまま左、ほかの項目は右寄せ(スマホでロゴの下に段が分かれるとき) */
@media (max-width: 720px) {
  .nav { flex: 1 1 100%; justify-content: flex-end; align-items: center; gap: 2px 12px; }
  .nav .lang { margin-right: auto; }
}

/* 販売:書籍は1点だけ・すぐ下にバナー */
.shop { grid-template-columns: minmax(0, 280px); justify-content: center; }
.shop .ph.book { background: transparent; aspect-ratio: auto; }
.shop .ph.book img { width: 100%; border-radius: 10px; box-shadow: 0 4px 14px rgba(20, 21, 23, 0.18); }
.shop-banner { margin-top: 20px; max-width: 280px; margin-left: auto; margin-right: auto; }

/* 書籍ページ */
.book-page { text-align: center; padding-bottom: 72px; display: grid; justify-items: center; gap: 10px; }
.book-cover { width: min(300px, 78vw); height: auto; border-radius: 10px; box-shadow: 0 6px 22px rgba(20, 21, 23, 0.2); margin-bottom: 18px; }
.book-page h1 { font-weight: 800; font-size: clamp(2rem, 8vw, 3.25rem); line-height: 1.2; }
.book-page .dt-lead { margin-top: 6px; }
.book-text { margin-top: 18px; text-align: center; }
.book-text p + p { margin-top: 10px; }
.book-buy { margin-top: 32px; padding: 24px 20px; background: #ebe8e1; border-radius: 24px; width: min(100%, 520px); }
.book-soon { margin-top: 6px; font-weight: 700; }

/* 「詳しく見る」バナーを販売のバナーと同じ大きさに */
#about .banner, .shop-banner { width: 100%; max-width: 280px; min-height: 80px; padding-block: 14px; margin-left: auto; margin-right: auto; }
#about .banner { margin-top: 32px; }

/* ボタンの黒塗りはすべてベージュに */
.btn { background: #ebe8e1; color: #161a2e; border-color: #ebe8e1; }
.btn:hover { background: #e0dbd1; color: #161a2e; border-color: #e0dbd1; }
.btn.ghost { background: var(--paper); color: #161a2e; border-color: #161a2e; }
.btn.ghost:hover { background: #ebe8e1; color: #161a2e; border-color: #161a2e; }

/* 「診断をはじめる」を「詳しく見る」等のバナーと同じ大きさに */
.hero .btn { width: 100%; max-width: 280px; min-height: 80px; border-radius: 24px; font-size: 1.125rem; font-weight: 800; }

/* 気質の＋/−は黒で統一 */
.tm-sign, .tm-sign.zero { color: var(--ink); }

/* 気質:カタカナの「プラス」「マイナス」 */
.tm-sign.word { font-family: inherit; font-size: 1em; line-height: 1.5; letter-spacing: 0.02em; }

/* 進行バーは黄色(未回答は薄い黄色) */
.seg i { background: #fff8d6; }
.seg i.on { background: #f2c200; }
.overlay .ov-top { position: relative; z-index: 2; }

/* 解説ページ:3つの本能(SP=△ / SX=○ / SO=□) */
.order .o-k { display: flex; align-items: center; gap: 12px; }
.order .fc-s { position: relative; width: 56px; height: 56px; flex: none; }
.order .fc-s svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 3; }
.order .fc-s b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-weight: 800; font-size: 0.9375rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; }
.order .fc-sp b { top: 62%; }
.order .fc-sp svg { stroke: #0a5cff; } .order .fc-so svg { stroke: #f2c200; } .order .fc-sx svg { stroke: #ff2a2a; }
.order .o-n { font-weight: 800; font-size: 1.0625rem; }
.order li:has(.fc-s) { grid-template-columns: 14em 1fr; align-items: center; }
@media (max-width: 520px) { .order li:has(.fc-s) { grid-template-columns: 1fr; } }

/* ヘッダーのロゴを大きく・中央 */
.top .logo { flex: 1 1 100%; text-align: center; font-size: 1.375rem; letter-spacing: 0.06em; }
.top .nav { flex: 1 1 100%; justify-content: flex-end; align-items: center; }
.top .nav .lang { margin-right: auto; }
.order-row { padding-top: 24px; }
#about .about p + p { margin-top: 16px; }
#about .about p { text-align: left; }
#about .about p { font-size: 1.0625rem; font-weight: 500; line-height: inherit; letter-spacing: normal; }
#about .about p { text-align: center; }

.foot a.ico { border: 0; background: none; padding: 0; overflow: hidden; }
.foot a.ico img { width: 48px; height: 48px; display: block; border-radius: 50%; }
.foot a.ico:hover { background: none; opacity: .8; }
.book-buy { padding: 14px 20px; border-radius: 20px; width: min(100%, 340px); }
.book-buy .note { font-size: 0.6875rem; }
.book-soon { margin-top: 2px; font-size: 0.8125rem; }

/* 購入ボタン + ポップアップ */
button.book-buy { display: block; margin: 32px auto 0; border: 0; cursor: pointer; text-align: center; font: inherit; color: inherit; }
button.book-buy:hover { background: #e0dbd1; }
button.book-buy .note, button.book-buy .book-soon { display: block; }
body.buy-lock { overflow: hidden; }
.buy-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(22, 26, 46, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.buy-card { position: relative; width: min(100%, 420px); background: #fff; border-radius: 28px; padding: 36px 24px 32px; text-align: center; box-shadow: 0 16px 48px rgba(22, 26, 46, .25); }
.buy-card h2 { font-size: 1.25rem; font-weight: 800; color: #161a2e; }
.buy-note { margin-top: 4px; font-size: 0.8125rem; color: var(--sub); }
.buy-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.buy-list a { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 16px 20px; border-radius: 20px; background: #ebe8e1; color: #161a2e; font-weight: 800; font-size: 1.125rem; text-decoration: none; }
.buy-list a:hover { background: #e0dbd1; }
.buy-list small { font-size: 0.75rem; font-weight: 600; color: var(--sub); }
.buy-x { position: absolute; top: -14px; right: -6px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #161a2e; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }

button.book-buy .book-soon { margin-top: 0; font-size: 0.9375rem; }

button.banner.buy-open { width: 100%; border: 0; font: inherit; cursor: pointer; margin-top: 32px; }

/* バナー・診断ボタンに黒いフチ */
.hero .btn, .btn, .banner, button.banner.buy-open, .done .banner.done-btn,
.hero .btn:hover, .btn:hover, .btn.ghost:hover { border: 1.5px solid #141517; }
.flinks .fl { border-bottom: 0; padding-bottom: 0; }

.book-price { margin-top: 28px; text-align: center; font-weight: 700; font-size: 0.9375rem; }
.book-price b { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.02em; }
.book-price + .banner { margin-top: 12px; }
button.banner.buy-open { margin-top: 12px; }
.book-price .tax { font-size: 0.8125rem; font-weight: 600; margin-left: 4px; color: var(--sub); }
.book-price { font-size: 0.8125rem; }
.book-price b { font-size: 1.125rem; }
.book-price .tax { font-size: 0.6875rem; }

/* バナー・診断ボタンを赤に統一 */
.hero .btn, .btn:not(.ghost), .banner, button.banner.buy-open, .done .banner.done-btn { background: #e8352a; color: #fff; border: 1.5px solid #141517; }
.hero .btn:hover, .btn:not(.ghost):hover, .banner:hover, button.banner.buy-open:hover, .done .banner.done-btn:hover { background: #cf2b21; color: #fff; border: 1.5px solid #141517; }
.banner .bt, .banner .ar { color: #fff; }
.banner small { color: rgba(255, 255, 255, .85); }
.seg i { background: #ffdcd8; }
.seg i.on { background: #e8352a; }

/* フッターを赤に */
.foot { background: #e8352a; color: #fff; }
.foot .cp { border-top-color: rgba(255, 255, 255, .45); color: rgba(255, 255, 255, .9); }
.foot, .foot .fh, .flinks .fl { color: #141517; }
.foot .cp { color: #141517; border-top-color: rgba(20, 21, 23, .45); }
.foot, .foot .fh, .flinks .fl { color: #fff; }
.foot .cp { color: rgba(255, 255, 255, .9); border-top-color: rgba(255, 255, 255, .45); }
.sh-url { background: #ffd60a; color: #0050ff; box-shadow: none; }

/* ヘッダー:🌐を右上へ、メニューは均等配置 */
.top .in { position: relative; }
.top .nav .lang { position: absolute; top: 14px; right: max(16px, env(safe-area-inset-right, 0px)); margin: 0; }
.top .nav { justify-content: space-between; gap: 2px 8px; }
.top .nav a { flex: 1 1 0; text-align: center; }
.top .nav { justify-content: space-between; flex-wrap: nowrap; }
.top .nav a { flex: 0 0 auto; white-space: nowrap; }
.top .nav a:hover, .top .nav a:focus-visible, .top .nav a:active { border-bottom-color: #e8352a; }
.foot { border-top: 1.5px solid #141517; }

/* ヘッダー:ロゴを左上、全体を少し大きく、ロゴとメニューの間を広げる */
.top .in { padding-block: 22px; gap: 20px 8px; }
.top .logo { text-align: left; }
.top .nav .lang { top: 32px; }
.top .in { gap: 32px 8px; }

/* ヘッダーを赤に(ロゴは黒、メニューは白) */
.top, body::before { background: #e8352a; }
.top { border-bottom: 1.5px solid #141517; }
.top .logo { color: #141517; }
.top .nav a, .top .nav .lang { color: #fff; }
.top .nav a:hover, .top .nav a:focus-visible, .top .nav a:active { border-bottom-color: #fff; }
.top, body::before { background: #e8352a; }
.top, body::before { background: #7b7b7b; }
.top, body::before { background: #fff; }
.top .nav a, .top .nav .lang { color: #e8352a; }
.top .nav a:hover, .top .nav a:focus-visible, .top .nav a:active { border-bottom-color: #e8352a; }

/* 解説メニュー:電球アイコン+下に灰色の文字 */
.top .nav a.nav-guide { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.top .nav a.nav-guide svg { width: 26px; height: 26px; fill: none; stroke: #e8352a; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.top .nav a.nav-guide span { font-size: 0.6875rem; line-height: 1.2; color: #8a8a8a; }

/* ヘッダーを縮める */
.top .in { padding-block: 10px 8px; gap: 6px 8px; }
.top .logo { font-size: 1.25rem; line-height: 1.3; }
.top .nav .lang { top: 14px; }

/* ヘッダーを赤に、アイコンと文字を白に(ロゴは黒) */
.top, body::before { background: #e8352a; }
.top .nav a, .top .nav .lang { color: #fff; }
.top .nav a.nav-guide svg { stroke: #fff; }
.top .nav a.nav-guide span { color: rgba(255, 255, 255, .92); }
.top .nav a:hover, .top .nav a:focus-visible, .top .nav a:active { border-bottom-color: #fff; }

/* ヘッダー・フッター・バナーの黒い縁を消去 */
.top, .foot { border: 0; }
.hero .btn, .btn:not(.ghost), .banner, button.banner.buy-open, .done .banner.done-btn,
.hero .btn:hover, .btn:not(.ghost):hover, .banner:hover, button.banner.buy-open:hover, .done .banner.done-btn:hover { border: 0; }
.sh-url { color: #fff; }
.sh-url { background: #3a86ff; color: #fff; box-shadow: none; }
.top .logo { color: #fff; }

/* フッターを小さく */
.foot { padding-block: 28px 20px; }
.foot .fh { font-size: 0.8125rem; }
.foot .icons { margin-top: 10px; }
.foot a.ico, .foot a.ico img { width: 36px; height: 36px; }
.flinks { margin-top: 16px; font-size: 0.8125rem; gap: 6px 20px; }
.foot .cp { margin-top: 16px; padding-top: 12px; font-size: 0.75rem; }

/* header: logo bar follows on scroll, icon bar scrolls away */
header.top { position: static; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; }
body::before { position: fixed; }
.topbar .in { position: relative; padding-block: 10px 8px; }
.topbar .lang { position: absolute; top: 14px; right: max(16px, env(safe-area-inset-right, 0px)); margin: 0; color: #fff; }
header.top .in { padding-block: 0 8px; gap: 0; }

/* buy modal close button: red and white */
.buy-x { background: #e8352a; color: #fff; box-shadow: 0 0 0 3px #fff; }
.buy-x:hover, .buy-x:active { background: #cf2b21; }
.buy-x:focus-visible { outline: 2px solid #e8352a; outline-offset: 5px; }

/* quiz close: same look as the "← 戻る" link */
.close-link { appearance: none; -webkit-appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; font-family: inherit; color: inherit; cursor: pointer; }
.close-link:hover, .close-link:focus-visible { border-bottom-color: var(--ink); }

/* AI info page */
.ai-head .prose { margin-top: 20px; }
.ai-card { margin: 0; display: grid; grid-template-columns: 7em 1fr; gap: 10px 16px; font-size: 0.9375rem; line-height: 1.8; }
.ai-card dt { font-weight: 700; }
.ai-card dd { margin: 0; }
.ai-list { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; line-height: 1.9; }
.ai-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.ai-list li:first-child { padding-top: 0; }
.ai-list li:last-child { border-bottom: 0; }
.ai-list a { font-weight: 700; border-bottom: 1px solid currentColor; }
.ai-sum { color: #5b5f66; }
.ai-note, .ai-more { margin-top: 14px; font-size: 0.8125rem; color: #5b5f66; line-height: 1.8; }
.ai-more a { font-weight: 700; color: var(--ink); }
.flinks a.fl { cursor: pointer; }

/* footer links: two rows */
.flinks + .flinks { margin-top: 8px; }

/* terms page */
.terms-ul { list-style: disc; margin: 10px 0 0; padding-left: 1.4em; font-size: 0.9375rem; line-height: 1.9; }
.terms-ul li + li { margin-top: 4px; }
.prose.terms p { line-height: 1.95; font-size: 0.9375rem; }
.ct-mail { font-size: 1.25rem; font-weight: 800; word-break: break-all; }


/* ダブルタップでの拡大を止める(ピンチでの拡大は、そのまま使えます) */
html, body, .overlay, .overlay * { touch-action: manipulation; }
