/* =========================================================
   人間OS診断 — style.css
   方向性: 心理テスト × SaaS / 白〜薄いグレー / 角丸カード / スマホ最優先
   ========================================================= */

:root {
  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --surface-2: #F0F2F8;
  --text: #171A2B;
  --text-2: #4A4F66;
  --muted: #8A8FA6;
  --border: #E4E7F0;
  --primary: #5B4CF0;
  --primary-2: #8B5CF6;
  --primary-soft: #EEEBFF;
  --accent: var(--primary);           /* タイプごとに上書き */
  --accent-soft: var(--primary-soft);

  --c-openness: #8B5CF6;
  --c-conscientiousness: #3B82F6;
  --c-extraversion: #F97316;
  --c-agreeableness: #10B981;
  --c-emotionalStability: #EC4899;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(23, 26, 43, .04), 0 2px 8px rgba(23, 26, 43, .04);
  --shadow: 0 2px 4px rgba(23, 26, 43, .04), 0 12px 32px rgba(23, 26, 43, .08);
  --font: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --max: 640px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-feature-settings: "palt";
  word-break: auto-phrase;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
main { flex: 1; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.container--wide { max-width: 960px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 246, 250, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 16px; color: var(--text); text-decoration: none; letter-spacing: .02em; }
.logo__mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-size: 11px; font-weight: 900; display: grid; place-items: center; letter-spacing: 0;
}
.header-link { font-size: 13px; color: var(--text-2); text-decoration: none; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 24px rgba(91, 76, 240, .32);
}
.btn--primary:hover { box-shadow: 0 10px 28px rgba(91, 76, 240, .42); }
.btn--accent { color: #fff; background: var(--accent); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn--dark { color: #fff; background: #111; }
.btn--ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--block { width: 100%; }
.btn--lg { min-height: 60px; font-size: 18px; padding: 0 36px; }
.btn--sm { min-height: 40px; font-size: 14px; padding: 0 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px 20px; }
.card + .card { margin-top: 16px; }
.card__title { font-size: 17px; font-weight: 900; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card__title .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: var(--accent-soft); flex: none; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--primary); text-transform: uppercase; }

/* ---------- Top: Hero ---------- */
.hero { padding: 40px 0 32px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 -20% auto; height: 620px; z-index: -1;
  background:
    radial-gradient(closest-side, rgba(139, 92, 246, .18), transparent) 20% 40% / 60% 70% no-repeat,
    radial-gradient(closest-side, rgba(59, 130, 246, .14), transparent) 80% 30% / 60% 70% no-repeat,
    radial-gradient(closest-side, rgba(236, 72, 153, .10), transparent) 50% 80% / 60% 60% no-repeat;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--primary);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; margin-bottom: 20px;
}
.hero__badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.hero__title { font-size: clamp(30px, 8.4vw, 48px); font-weight: 900; letter-spacing: -.01em; line-height: 1.3; }
.hero__title .grad { background: linear-gradient(135deg, var(--primary), #C026D3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { margin-top: 18px; color: var(--text-2); font-size: 15px; line-height: 1.9; text-wrap: balance; }
.hero__lead .nb { display: inline-block; }
.hero__lead strong { color: var(--text); }
.hero__meta { display: flex; justify-content: center; gap: 16px; margin: 22px 0 18px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.hero__meta span { display: inline-flex; align-items: center; gap: 4px; }
.hero__cta { max-width: 360px; margin: 0 auto; }
.hero__sub { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* Hero preview (mini result) */
.preview {
  margin: 36px auto 0; max-width: 360px; text-align: left;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px;
  transform: rotate(-1.5deg);
}
.preview__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.preview__emoji { width: 48px; height: 48px; border-radius: 14px; background: #F3EEFF; display: grid; place-items: center; font-size: 26px; }
.preview__label { font-size: 11px; color: var(--muted); font-weight: 700; }
.preview__name { font-size: 18px; font-weight: 900; }

/* ---------- Sections ---------- */
.section { padding: 40px 0; }
.section__head { text-align: center; margin-bottom: 24px; }
.section__title { font-size: 24px; font-weight: 900; margin-top: 6px; }
.section__lead { margin-top: 10px; color: var(--text-2); font-size: 14px; }

.trait-list { display: grid; gap: 12px; list-style: none; }
.trait-item { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.trait-item__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex: none; }
.trait-item__name { font-weight: 900; font-size: 15px; }
.trait-item__name small { font-weight: 500; color: var(--muted); font-size: 11px; margin-left: 6px; letter-spacing: .03em; }
.trait-item__desc { font-size: 13px; color: var(--text-2); margin-top: 2px; line-height: 1.7; }

.steps { display: grid; gap: 12px; counter-reset: step; list-style: none; }
.steps li { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); font-size: 14px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 900; font-size: 14px;
}
.steps b { display: block; font-size: 15px; }
.steps span { color: var(--text-2); font-size: 13px; }


.faq details { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 0 18px; }
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 16px 24px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { font-size: 13px; color: var(--text-2); padding-bottom: 16px; }

.cta-band { text-align: center; padding: 40px 0 56px; }
.cta-band .btn { max-width: 360px; width: 100%; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 36px; font-size: 12px; color: var(--muted); background: var(--surface); }
.site-footer__notice { line-height: 1.8; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 10px; }
.site-footer__links a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.site-footer__links a:hover { text-decoration: underline; }

/* =========================================================
   Diagnosis
   ========================================================= */
.diag { padding: 12px 0 40px; }
.progress { position: sticky; top: 56px; z-index: 10; background: var(--bg); padding: 8px 0 12px; }
.progress__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-2); margin-bottom: 8px; font-weight: 500; }
.progress__count { font-weight: 900; color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.progress__count small { color: var(--muted); font-weight: 500; font-size: 13px; }
.progress__bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress__fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-2)); transition: width .35s cubic-bezier(.3, .7, .3, 1); }

.q-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 36px 20px 28px; margin-top: 8px; text-align: center; }
.q-card.is-enter { animation: qIn .32s cubic-bezier(.2, .8, .2, 1) both; }
.q-card.is-enter-back { animation: qInBack .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes qIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes qInBack { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.q-card__num { font-size: 13px; font-weight: 900; color: var(--primary); letter-spacing: .08em; }
.q-card__text { font-size: clamp(19px, 5.4vw, 24px); font-weight: 700; line-height: 1.6; margin: 10px 0 32px; min-height: 3.2em; display: flex; align-items: center; justify-content: center; text-wrap: balance; }

.scale { display: flex; justify-content: space-between; align-items: center; gap: 4px; max-width: 420px; margin: 0 auto; }
.scale__btn {
  --size: 52px; --c: var(--primary);
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  border: 2.5px solid color-mix(in srgb, var(--c) 55%, white);
  background: var(--surface); cursor: pointer; position: relative;
  display: grid; place-items: center; font-weight: 900; font-size: 15px; color: color-mix(in srgb, var(--c) 80%, black);
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.scale__btn[data-v="1"], .scale__btn[data-v="5"] { --size: 60px; }
.scale__btn[data-v="3"] { --size: 44px; }
.scale__btn[data-v="1"], .scale__btn[data-v="2"] { --c: #64748B; }
.scale__btn[data-v="3"] { --c: #A1A7BA; }
.scale__btn:hover { background: color-mix(in srgb, var(--c) 10%, white); }
.scale__btn:active { transform: scale(.92); }
.scale__btn.is-selected { background: var(--c); border-color: var(--c); color: #fff; transform: scale(1.06); }
.scale__btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 3px; }
.scale__labels { display: flex; justify-content: space-between; max-width: 440px; margin: 12px auto 0; font-size: 12px; color: var(--text-2); font-weight: 500; line-height: 1.4; }
.scale__labels span { width: 7.5em; }
.scale__labels span:first-child { text-align: left; }
.scale__labels span:last-child { text-align: right; }

.diag__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.link-btn { background: none; border: 0; padding: 10px 4px; font-size: 14px; color: var(--text-2); cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { color: var(--text); }
.link-btn[disabled] { opacity: .35; pointer-events: none; }
.diag__hint { text-align: center; font-size: 12px; color: var(--muted); margin-top: 20px; }

/* Analyzing */
.analyzing { min-height: calc(100vh - 200px); display: grid; place-items: center; text-align: center; padding: 40px 0; }
.analyzing__ring { width: 88px; height: 88px; margin: 0 auto 24px; border-radius: 50%; position: relative; background: conic-gradient(var(--primary), var(--primary-2), #EC4899, var(--primary)); animation: spin 1.1s linear infinite; }
.analyzing__ring::after { content: ""; position: absolute; inset: 8px; background: var(--bg); border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing__title { font-size: 20px; font-weight: 900; }
.analyzing__step { margin-top: 10px; color: var(--text-2); font-size: 14px; min-height: 1.7em; }

/* =========================================================
   Result
   ========================================================= */
.result { padding: 8px 0 40px; }
.result-hero {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  border-radius: var(--radius-lg); padding: 32px 20px 28px; margin-top: 8px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, .22), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(0, 0, 0, .18), transparent 60%),
    var(--accent);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 35%, transparent);
}
.result-hero__label { font-size: 13px; font-weight: 700; letter-spacing: .12em; opacity: .85; }
.result-hero__emoji {
  width: 112px; height: 112px; margin: 16px auto 14px; border-radius: 32px;
  background: rgba(255, 255, 255, .95); display: grid; place-items: center; font-size: 60px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  animation: pop .6s cubic-bezier(.2, 1.4, .4, 1) both .1s;
}
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.result-hero__name { font-size: clamp(30px, 8.8vw, 42px); font-weight: 900; letter-spacing: .02em; animation: fadeUp .5s ease both .25s; }
.result-hero__tagline { margin-top: 10px; font-size: 15px; font-weight: 500; opacity: .95; line-height: 1.7; animation: fadeUp .5s ease both .35s; }
.result-hero__note { margin-top: 18px; font-size: 11px; opacity: .78; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.result-desc { font-size: 14px; color: var(--text-2); line-height: 1.9; }

.bars { display: grid; gap: 18px; }
.bar__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bar__label { font-weight: 900; font-size: 15px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bar__level { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, white); color: color-mix(in srgb, var(--c) 85%, black); }
.bar__value { font-weight: 900; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--c); line-height: 1; }
.bar__track { height: 12px; border-radius: 999px; background: var(--surface-2); margin: 8px 0 6px; overflow: hidden; }
.bar__fill { height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.bar__ends { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.bar__text { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.7; }

.list { list-style: none; display: grid; gap: 10px; }
.list li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.75; }
.list li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 12px; border-radius: 4px; background: var(--accent); opacity: .85; }
.list--check li::before { content: "✓"; background: none; color: #10B981; font-weight: 900; top: 0; left: 2px; width: auto; height: auto; opacity: 1; font-size: 15px; }
.list--caution li::before { content: "!"; background: #FEF3C7; color: #B45309; font-weight: 900; font-size: 11px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; top: .25em; left: 0; opacity: 1; }

.insight {
  position: relative; border-radius: var(--radius); padding: 24px 20px; margin-top: 16px;
  background: linear-gradient(135deg, #FFF7ED, #FDF2F8 55%, #F5F3FF);
  border: 1px solid #FBE3D0;
}
.insight__label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; color: #C2410C; background: #fff; border-radius: 999px; padding: 4px 12px; box-shadow: var(--shadow-sm); }
.insight__text { margin-top: 14px; font-size: 17px; font-weight: 700; line-height: 1.8; }

.share { text-align: center; }
.share__title { font-size: 18px; font-weight: 900; }
.share__lead { font-size: 13px; color: var(--text-2); margin: 6px 0 18px; }
.share__buttons { display: grid; gap: 10px; }
.share__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.compare { text-align: center; background: linear-gradient(135deg, var(--primary-soft), #FDF2F8); }
.compare__demo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 16px 0; background: var(--surface); border-radius: var(--radius-sm); padding: 14px; font-size: 12px; color: var(--text-2); }
.compare__demo b { display: block; font-size: 22px; color: var(--text); font-variant-numeric: tabular-nums; }
.compare__diff { font-weight: 900; color: var(--primary); font-size: 13px; background: var(--primary-soft); border-radius: 999px; padding: 4px 10px; }
.compare__soon { font-size: 11px; color: var(--muted); margin-top: 10px; }

.notice { font-size: 12px; color: var(--muted); line-height: 1.8; background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 16px; }

.empty { text-align: center; padding: 72px 0; }
.empty__emoji { font-size: 56px; }
.empty h1 { font-size: 22px; font-weight: 900; margin: 12px 0 8px; }
.empty p { color: var(--text-2); font-size: 14px; margin-bottom: 24px; }

.retake { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; align-items: center; }

/* Modal (画像保存) */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; background: rgba(15, 17, 30, .6); padding: 16px; }
.modal.is-open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal__panel { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow: auto; padding: 20px; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet { from { transform: translateY(30px); opacity: 0; } }
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal__title { font-weight: 900; font-size: 16px; }
.modal__close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; font-size: 18px; }
.modal__img { width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow); background: var(--surface-2); aspect-ratio: 1080 / 1350; object-fit: contain; }
.modal__hint { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 0; }
.modal__actions { display: grid; gap: 10px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #171A2B; color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200; white-space: nowrap; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Static pages ---------- */
.page { padding: 24px 0 48px; }
.page h1 { font-size: 26px; font-weight: 900; margin: 8px 0 20px; }
.prose h2 { font-size: 18px; font-weight: 900; margin: 32px 0 10px; }
.prose p, .prose li { font-size: 14px; color: var(--text-2); line-height: 1.95; }
.prose p + p { margin-top: 10px; }
.prose ul { padding-left: 1.3em; margin-top: 8px; }
.prose li + li { margin-top: 4px; }
.prose .card { margin-top: 12px; }
.prose strong { color: var(--text); }
.updated { font-size: 12px; color: var(--muted); }

/* ---------- Larger screens ---------- */
@media (min-width: 720px) {
  .hero { padding: 72px 0 48px; }
  .hero__lead { font-size: 16px; }
  .section { padding: 56px 0; }
  .section__title { font-size: 28px; }
  .trait-list { grid-template-columns: repeat(2, 1fr); }
  .trait-list li:last-child { grid-column: span 2; }
  .card { padding: 28px; }
  .q-card { padding: 48px 40px 36px; }
  .result-hero { padding: 44px 32px 36px; }
  .modal { align-items: center; }
  .share__buttons { grid-template-columns: 1fr 1fr; }
  .share__buttons > .btn:first-child { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Type cards（12タイプ一覧シートのデザイン）
   ========================================================= */
.brand-copy { margin-top: 14px; font-size: 13px; letter-spacing: .3em; color: var(--text-2); font-weight: 500; }
.brand-copy::before, .brand-copy::after { content: "—"; letter-spacing: 0; margin: 0 .6em; color: var(--muted); }

.container--xl { max-width: 1240px; }
.tcard-grid { display: grid; gap: 12px; list-style: none; padding: 0; }
.tcard {
  display: grid; grid-template-columns: 40% minmax(0, 1fr); min-height: 196px;
  background: var(--ts); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.type-art {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, .55), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--tc) 30%, white), color-mix(in srgb, var(--tc) 70%, white));
}
.type-art__emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; color: var(--tc); }
.type-art__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.type-art__kw {
  position: absolute; left: 10px; bottom: 6px; z-index: 1;
  font-family: "Dancing Script", cursive; font-weight: 700; font-size: 30px; line-height: 1; color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35); transform: rotate(-8deg); transform-origin: left bottom;
}
.tcard__body { min-width: 0; padding: 18px 14px 16px 16px; display: flex; flex-direction: column; }
.tcard__name { font-size: clamp(16px, 4.6vw, 19px); font-weight: 900; color: var(--tc); display: flex; align-items: center; gap: 6px; line-height: 1.3; }
.tcard__icon { font-size: 20px; flex: none; }
.tcard__tagline { margin-top: 10px; font-size: 13px; font-weight: 500; line-height: 1.75; color: var(--text); }
.tcard__tags { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--text-2); }

.closing { text-align: center; padding: 8px 0 8px; }
.closing__title { font-size: 18px; font-weight: 700; letter-spacing: .2em; }
.closing__text { margin-top: 10px; font-size: 13px; color: var(--text-2); letter-spacing: .08em; line-height: 2; }
.closing__hand { margin-top: 22px; font-family: "Yomogi", cursive; font-size: 26px; color: #22305A; transform: rotate(-4deg); }
.closing__en { margin-top: 6px; font-size: 11px; letter-spacing: .3em; color: var(--muted); }

/* Result: イラスト・キーワード・タグ */
.result-hero__emoji { position: relative; overflow: hidden; color: var(--accent); }
.result-hero__emoji .type-art__img { opacity: 0; transition: opacity .3s; }
.result-hero__emoji.has-img { width: 168px; height: 210px; }
.result-hero__emoji.has-img .type-art__img { opacity: 1; }
.result-hero__emoji.has-img .result-hero__glyph { display: none; }
.result-hero__kw { display: block; margin-top: 2px; font-family: "Dancing Script", cursive; font-weight: 700; font-size: 26px; opacity: .9; }
.result-hero__tags { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.result-hero__tags span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); }

@media (min-width: 720px) {
  .tcard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .tcard-grid { grid-template-columns: repeat(3, 1fr); }
}
.prose .tcard-grid { grid-template-columns: 1fr; }
.prose .tcard .tcard__tagline { font-size: 13px; color: var(--text); line-height: 1.75; }
.prose .tcard .tcard__tags { font-size: 12px; }
.prose .tcard p + p { margin-top: 0; }

/* イラストが明るいため、英字キーワードの下にタイプカラーのグラデーションを敷く */
.type-art::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--tc) 78%, transparent), transparent);
}

/* =========================================================
   Compare（友達と比べる）
   ========================================================= */
.compare-banner {
  display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 14px 16px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: var(--text); border: 2px solid var(--primary-soft);
}
.compare-banner > span:first-child { font-size: 24px; }
.compare-banner b { display: block; font-size: 15px; }
.compare-banner small { display: block; font-size: 12px; color: var(--text-2); }
.compare-banner > span:last-child { margin-left: auto; font-size: 20px; color: var(--primary); font-weight: 900; }

.invite-hero { text-align: center; padding: 16px 0 8px; }
.invite-hero__title { font-size: 26px; font-weight: 900; margin: 6px 0 18px; }
.invite-hero__card {
  display: grid; grid-template-columns: 42% minmax(0, 1fr); text-align: left;
  background: var(--ts); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.invite-hero__art { min-height: 240px; }
.invite-hero__body { padding: 20px 16px; display: flex; flex-direction: column; }
.invite-hero__name { font-size: 20px; font-weight: 900; color: var(--tc); line-height: 1.35; }
.invite-hero__tagline { margin-top: 10px; font-size: 14px; font-weight: 500; line-height: 1.75; }
.invite-hero__lead { margin: 24px 0 16px; font-size: 15px; color: var(--text-2); line-height: 1.9; }
.invite-hero__lead b { color: var(--text); }

.cmp-hero { text-align: center; padding: 16px 0 4px; }
.cmp-hero__title { font-size: 26px; font-weight: 900; margin: 6px 0 18px; }
.cmp-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 8px; }
.cmp-pair__vs { align-self: center; }
.cmp-pair__vs { font-weight: 900; font-size: 13px; color: var(--primary); background: var(--surface); border-radius: 999px; padding: 6px 8px; box-shadow: var(--shadow-sm); }
.cmp-card { background: var(--ts); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-align: left; height: 100%; }
.cmp-card__art { aspect-ratio: 4 / 5; }
.cmp-card__art .type-art__kw { font-size: 24px; }
.cmp-card__body { padding: 10px 12px 14px; }
.cmp-card__who { display: inline-block; font-size: 11px; font-weight: 900; color: #fff; background: var(--tc); border-radius: 999px; padding: 2px 10px; }
.cmp-card__name { margin-top: 6px; font-size: 15px; font-weight: 900; color: var(--tc); line-height: 1.35; }
.cmp-card__tagline { margin-top: 4px; font-size: 11px; line-height: 1.6; color: var(--text-2); }
.cmp-summary { margin-top: 20px; font-size: 18px; font-weight: 700; line-height: 1.6; }
.cmp-summary b { font-size: 26px; color: var(--primary); margin: 0 2px; }
.cmp-summary__note { margin: 4px 0 16px; font-size: 11px; color: var(--muted); }

.cmp-rows { display: grid; gap: 20px; }
.cmp-row__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cmp-row__label { font-weight: 900; font-size: 15px; }
.cmp-badge { font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-variant-numeric: tabular-nums; }
.cmp-badge--same { background: #DCFCE7; color: #15803D; }
.cmp-bar { display: grid; grid-template-columns: 3em minmax(0, 1fr) 2.2em; align-items: center; gap: 8px; }
.cmp-bar + .cmp-bar { margin-top: 6px; }
.cmp-bar__who { font-size: 11px; color: var(--text-2); font-weight: 700; }
.cmp-bar__track { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cmp-bar__fill { height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.cmp-bar--friend .cmp-bar__fill { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 55%, white) 0 6px, color-mix(in srgb, var(--c) 35%, white) 6px 12px); }
.cmp-bar__val { font-weight: 900; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; color: var(--c); }
.cmp-bar--friend .cmp-bar__val { color: var(--text-2); }

.cmp-list { list-style: none; display: grid; gap: 14px; }
.cmp-list li { font-size: 14px; line-height: 1.85; color: var(--text-2); padding-left: 14px; border-left: 3px solid var(--primary-soft); }
.cmp-list li b { display: block; color: var(--text); font-size: 15px; }
.cmp-list .cmp-empty { border-left-color: var(--border); }

@media (min-width: 720px) {
  .cmp-pair { gap: 16px; }
  .cmp-card__name { font-size: 18px; }
  .cmp-card__tagline { font-size: 13px; }
}
