/* かがみ箱 スタイル。色は body の CSS 変数で切替 (結果の出たページはタイプの色: --accent / --type-ink) */
:root {
  --accent: #ff5c8a;
  --accent2: #ffb3c6;
  --accent-ink: #c2255c;
  --type-ink: #c2255c;
  --bg: #fff5f8;
  --text: #3b2530;
  --muted: #7a6a70;
  --card: #ffffff;
  --border: #f0e4e8;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(60, 20, 40, 0.08);
  --font: "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", "Noto Sans JP", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent-ink); }
b { font-weight: 700; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

.container { width: 100%; max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; flex: 1; }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; max-width: 640px; margin: 0 auto; width: 100%;
}
.brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 20px; }
.brand-mark { display: block; flex: none; }
.site-footer { padding: 24px 16px 40px; text-align: center; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-bottom: 8px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer; background: #fff; color: var(--text);
  transition: transform .08s ease, box-shadow .15s ease, opacity .15s;
  line-height: 1.2; white-space: nowrap; min-height: 44px;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent-ink); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-ink) 30%, transparent); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.05); }
.btn-ghost { background: #fff; border-color: var(--border); }
.btn-danger { background: #fff; color: #d6336c; border-color: #ffc9d9; }
.btn-x { background: #000; color: #fff; }
/* LINE ブランド色 #06c755 は白文字と 2.3:1 しかないため、AA (4.5:1) を満たす濃い緑にする */
.btn-line { background: #067a35; color: #fff; }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.btn-lg { padding: 14px 26px; font-size: 17px; }
.btn-xl { padding: 16px 34px; font-size: 19px; }
.btn-block { width: 100%; }
/* 長い表示名を含むボタンは折り返して横スクロールを防ぐ */
.btn-lg, .btn-xl, .btn-block { white-space: normal; max-width: 100%; overflow-wrap: anywhere; text-align: center; }

/* cards & layout */
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.big { font-size: 20px; font-weight: 700; }
.section { margin: 28px 0; }
.section-title { font-size: 17px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.page-title { font-size: 24px; margin: 8px 0 12px; }
.badge { display: inline-block; background: var(--accent2); color: var(--text); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.link-muted { color: var(--muted); font-size: 13px; }
.pc-only { display: none; }
@media (min-width: 600px) { .pc-only { display: inline; } }

.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; }
.flash-ok { background: #e6fbf1; color: #0f7a4d; }
.flash-err { background: #fff0f3; color: #c2255c; }
.flash-info { background: #eef4ff; color: #2b4a9c; }

/* forms */
.form .field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.field input[type="text"] { width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: 12px; background: #fff; }
.field input[type="text"]:focus { border-color: var(--accent-ink); }
.field-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500 !important; font-size: 14px; margin-bottom: 8px; }
.check input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.url-box { display: flex; gap: 8px; margin: 8px 0; }
.url-box input { flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid var(--border); border-radius: 12px; background: #fafafa; }
.url-box input[type="password"] { letter-spacing: 2px; }
.share-text { width: 100%; padding: 10px 12px; border: 2px solid var(--border); border-radius: 12px; background: #fafafa; margin-bottom: 10px; resize: none; }

/* hero */
.hero { text-align: center; padding: 24px 0 12px; }
.hero-eyebrow { display: inline-block; background: #fff; border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 700; color: var(--accent-ink); margin-bottom: 14px; }
.hero-title { font-size: 34px; line-height: 1.3; margin: 0 0 14px; letter-spacing: -0.01em; }
/* 語の途中で改行させない (前後の句読点でだけ折り返す) */
.keep { white-space: nowrap; }
.hero-accent { color: var(--accent-ink); }
.hero-lead { font-size: 16px; color: var(--muted); margin: 0 0 22px; }
.hero-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
@media (min-width: 600px) { .hero-title { font-size: 42px; } }

/* sample card on LP */
.sample { margin: 20px 0 8px; overflow-x: clip; padding: 8px 0 4px; }
/* 結果の例: 3 枚のカードを扇状に重ねる (真ん中が手前) */
.sample-stack { position: relative; height: 300px; max-width: 460px; margin: 0 auto; }
.sc { position: absolute; top: 10px; left: 50%; width: 196px; background: #fff; border-radius: 18px; padding: 12px; box-shadow: 0 10px 30px rgba(60, 20, 40, 0.16); text-align: left; }
.sc-0 { transform: translateX(-50%) translateX(-96px) rotate(-9deg) scale(0.86); z-index: 1; }
.sc-1 { transform: translateX(-50%); z-index: 2; top: 0; }
.sc-2 { transform: translateX(-50%) translateX(96px) rotate(9deg) scale(0.86); z-index: 1; }
.sc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 13px; margin-bottom: 8px; }
.sc-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-head span { color: var(--muted); font-size: 12px; flex: none; }
.sc-type { background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 8px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sc-label { font-size: 11px; font-weight: 700; opacity: 0.85; letter-spacing: 0.08em; }
.sc-emoji { font-size: 44px; line-height: 1.25; }
.sc-adj { font-size: 14px; font-weight: 700; }
.sc-noun { font-size: 21px; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; justify-content: center; }
.sc-tags span { font-size: 11.5px; background: color-mix(in srgb, var(--c) 16%, #fff); color: var(--text); border-radius: 999px; padding: 3px 8px; }
@media (min-width: 600px) {
  .sc-0 { transform: translateX(-50%) translateX(-150px) rotate(-8deg) scale(0.9); }
  .sc-2 { transform: translateX(-50%) translateX(150px) rotate(8deg) scale(0.9); }
}
.sample-caption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 6px; }
.sample-caption b { color: var(--text); }

.how h2, .tags-preview h2, .types-preview h2, .faq h2, .final-cta h2 { font-size: 20px; text-align: center; margin: 32px 0 16px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { background: #fff; border-radius: 14px; padding: 14px 16px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.steps li .step-no { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.steps li span:not(.step-no) { font-size: 13px; color: var(--muted); }
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
/* 8 タイプが割り切れるよう、PC は 4 列 × 2 段、スマホは 2 列 × 4 段 */
.type-cell { display: block; background: #fff; border-radius: 14px; padding: 12px 8px; text-align: center; border-bottom: 4px solid var(--type-color); font-size: 13px; color: var(--text); text-decoration: none; }
.type-cell b { display: block; white-space: nowrap; }
/* スマホ幅では 2 列にする (3 列だと「エンターテイナー」「フリースピリット」が途中で折れる) */
@media (max-width: 600px) { .type-grid { grid-template-columns: repeat(2, 1fr); } }
.type-cell.is-current { background: color-mix(in srgb, var(--type-color) 16%, #fff); outline: 2px solid var(--type-color); }
.type-cell-adj { display: block; font-size: 11px; color: var(--muted); }
.type-emoji { display: block; font-size: 26px; }
.faq details { background: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 8px 0 4px; font-size: 14px; color: var(--muted); }
.final-cta { text-align: center; padding: 16px 0 24px; }

/* box (vote) page */
.box-head { text-align: center; padding: 10px 0 18px; }
.box-eyebrow { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.box-title { font-size: 28px; line-height: 1.3; margin: 0 0 8px; }
.box-name { color: var(--accent-ink); }
.box-sub { font-size: 14px; color: var(--muted); margin: 10px 0 0; }

.tag-group { border: none; padding: 0; margin: 0 0 18px; }
.tag-group legend { padding: 0; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.tag-group-label { font-weight: 800; font-size: 15px; }
.tag-group-hint { font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span, .chip-static {
  display: inline-block; padding: 8px 13px; border-radius: 999px; background: #fff; border: 2px solid var(--border);
  font-size: 14px; line-height: 1.5; min-height: 44px; cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: background-color .12s, border-color .12s, color .12s, transform .12s;
}
.chip input:checked + span { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; transform: scale(1.04); }
.chip input:focus-visible + span { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.chip-link { color: var(--accent-ink); text-decoration: none; }
.chip-static { cursor: default; }
.chip-static.chip-strong { background: color-mix(in srgb, var(--type-color) 22%, #fff); border-color: var(--type-color); font-weight: 800; }
.picked-bar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 5; display: flex; justify-content: center; align-items: center; gap: 8px; margin: 8px 0 16px; }
.picked-count { background: var(--text); color: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px; box-shadow: var(--shadow); }
.picked-bar .btn { box-shadow: var(--shadow); }
.card-preview img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: var(--shadow); background: #fff; }
.card-preview { margin: 12px 0; }
.mini-chip { display: inline-block; background: #fff; border: 2px solid var(--border); border-radius: 999px; padding: 2px 8px; font-size: 12px; margin-right: 4px; }

/* result card (結果の出たページは --accent / --type-ink がタイプの色) */
.result-card { padding: 22px 20px 16px; border-top: 6px solid var(--accent); }
/* 名前が長いときは票数を次の行へ送る (横並びのままだと潰れる) */
.result-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; margin-bottom: 14px; }
.result-name { font-size: 20px; font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.result-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-item { display: grid; grid-template-columns: 26px 24px minmax(0, 1fr) minmax(44px, 90px) 40px; align-items: center; gap: 6px; margin-bottom: 10px; }
.rank-label { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; font-size: 15px; }
.rank-no { width: 26px; height: 26px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 28%, #fff); color: var(--text); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.rank-1 .rank-no { background: var(--type-ink); color: #fff; }
.rank-1 .rank-label { font-weight: 800; font-size: 17px; }
.rank-emoji { font-size: 18px; text-align: center; }
@media (max-width: 400px) {
  .result-card { padding: 18px 14px 14px; }
  .rank-1 .rank-label { font-size: 16px; }
  .rank-label { font-size: 14px; }
}
.rank-bar { height: 10px; background: #f1f1f1; border-radius: 5px; overflow: hidden; }
.rank-fill { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.rank-pct { text-align: right; font-size: 13px; color: var(--muted); }
.type-box { margin-top: 16px; border-radius: 14px; padding: 14px 16px; background: color-mix(in srgb, var(--accent) 12%, #fff); border-left: 5px solid var(--accent); }
.type-label { font-size: 12px; font-weight: 700; color: var(--type-ink); }
.type-title { font-size: 21px; font-weight: 800; margin: 2px 0 6px; color: var(--type-ink); }
.type-catch { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.6; }
.type-rarity { margin: 8px 0 0; font-size: 13px; color: var(--type-ink); }
.type-rarity b { font-size: 17px; }
.type-detail { margin: 12px 0 0; font-size: 14px; line-height: 1.7; }
.type-detail dt { font-size: 12px; font-weight: 800; color: var(--type-ink); margin-top: 10px; }
.type-detail dd { margin: 2px 0 0; }
/* みんなと比べる (レーダーチャート) */
.radar-box { margin-top: 14px; border-top: 1px dashed var(--border); padding: 12px 0 4px; }
.radar-title { margin: 0 0 4px 6px; font-size: 13px; font-weight: 800; color: var(--type-ink); }
.radar { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.radar-legend { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.radar-key { display: inline-block; width: 18px; height: 10px; border-radius: 3px; vertical-align: middle; }
.radar-key-you { background: color-mix(in srgb, var(--c) 45%, #fff); border: 2px solid var(--ink); }
.radar-key-avg { border: 2px dashed #8a7a80; margin-left: 10px; }
.radar-note { margin: 6px 0 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--type-ink); }
/* タイプ解説: 同じタイプの 4 通り */
.focus { margin: 20px 0 28px; padding: 16px 16px 6px; border-radius: 16px; background: color-mix(in srgb, var(--type-color) 12%, #fff); border: 2px solid color-mix(in srgb, var(--type-color) 45%, #fff); }
.focus-eyebrow { margin: 0; font-size: 12px; font-weight: 800; color: var(--type-ink); }
.prose .focus-title { margin: 2px 0 6px; padding: 0; border: 0; font-size: 22px; color: var(--type-ink); }
.focus-catch { font-size: 17px; font-weight: 800; line-height: 1.6; margin: 0 0 6px; }
.prose .focus h3 { font-size: 14px; color: var(--type-ink); margin: 16px 0 4px; }
.focus p, .focus li { font-size: 14.5px; }
.voices { display: grid; gap: 6px; }
.voice { margin: 0; background: #fff; border-radius: 14px 14px 14px 4px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
/* タイプ解説: 同じタイプの 4 つのかたち (リンク) */
.variant-links { list-style: none; padding: 0; margin: 8px 0 20px; display: grid; gap: 6px; }
.variant-links a { display: block; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.variant-links b { display: block; color: var(--type-ink); font-size: 15px; }
.variant-links span { display: block; font-size: 13px; color: var(--muted); }
.variant-links .is-current a { border: 2px solid var(--type-color); background: color-mix(in srgb, var(--type-color) 10%, #fff); }
/* 統計: タイプの割合 */
.type-share { list-style: none; padding: 0; margin: 12px 0 16px; }
.type-share li { display: grid; grid-template-columns: minmax(0, 150px) 1fr 52px; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 14px; }
.type-share-name { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-share-bar { height: 12px; background: #f1f1f1; border-radius: 6px; overflow: hidden; }
.type-share-bar span { display: block; height: 100%; background: var(--c); border-radius: 6px; }
.type-share-pct { text-align: right; font-size: 13px; color: var(--muted); }
.type-rank { padding-left: 26px; margin: 8px 0; }
.type-rank li { margin-bottom: 4px; font-size: 14px; }
.type-rank li span:first-child { color: var(--ink); font-weight: 700; margin-right: 8px; }
.type-rank-more summary { cursor: pointer; font-size: 13px; color: var(--accent-ink); margin: 4px 0; }
.type-hidden { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.type-more { margin: 8px 0 0; font-size: 13px; }
.type-more a { color: var(--type-ink); }
.result-brand { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 12px; }

.share-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.share-block { margin: 12px 0; }
.voted-share { text-align: center; margin: 16px 0; border: 2px solid color-mix(in srgb, var(--accent) 40%, #fff); }
.voted-title { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.share-block .share-row { margin: 0 0 8px; }
.share-row-sub .btn { font-size: 13px; }
.btn-ig { background: linear-gradient(45deg, #d62976, #962fbf); color: #fff; }
.save-image { margin: 16px 0 4px; text-align: center; }
/* 名前入り画像の保存 (共有メニューが使えない端末・PC 向けの表示) */
.save-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.save-sheet { background: #fff; border-radius: var(--radius); padding: 16px; max-width: 360px; width: 100%; max-height: 100%; overflow: auto; }
.save-sheet img { display: block; width: 100%; height: auto; border-radius: 12px; }
.cta-box { text-align: center; background: linear-gradient(135deg, #fff 0%, var(--bg) 100%); border: 2px dashed var(--accent2); border-radius: var(--radius); padding: 24px 18px; margin: 28px 0; }
.cta-title { font-size: 19px; font-weight: 800; margin: 0 0 4px; }
.cta-sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.cta-small { padding: 18px 16px; }
.thanks-head { text-align: center; padding: 10px 0; }
.thanks-emoji { display: flex; justify-content: center; margin-bottom: 6px; }
.thanks-picked { font-size: 15px; margin: 6px 0 0; }
.thanks-picked p { margin: 4px 0; }
.thanks-picked .mini-chip { font-size: 14px; padding: 4px 10px; margin: 4px 2px; }
.cta-form { margin-top: 16px; }
.inline-create { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.inline-create input { flex: 1; min-width: 0; padding: 10px 14px; border: 2px solid var(--border); border-radius: 999px; background: #fff; }
.inline-create input:focus { border-color: var(--accent-ink); }

/* admin */
.created-card { background: linear-gradient(135deg, #fff 0%, var(--bg) 100%); text-align: center; }
.danger-zone { border: 2px solid #ffd6e0; }
.danger-zone.compact { padding: 14px 16px; }
.danger-zone.compact .section-title { margin-bottom: 6px; }
.hint-list { text-align: left; font-size: 13.5px; color: var(--muted); padding-left: 20px; margin: 12px auto; max-width: 420px; }
.steps-list { padding-left: 22px; margin: 6px 0 14px; line-height: 1.7; }
.steps-list li { margin-bottom: 4px; }
.box-list { list-style: none; padding: 0; margin: 0; }
.box-list-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.box-list-item .share-row { margin: 0; justify-content: flex-end; }

/* prose / legal / 読み物 */
.prose { background: #fff; border-radius: var(--radius); padding: 24px 20px; }
.prose h1 { font-size: 24px; margin-top: 0; }
.prose .lead { font-size: 15.5px; }
.type-eyebrow { font-size: 13px; color: var(--type-ink); font-weight: 700; margin: 0 0 4px; }
.type-emoji-big { font-size: 30px; }
.type-article h2 { border-left: 4px solid var(--type-color); padding-left: 10px; }
.type-article h3 { font-size: 15px; margin: 16px 0 6px; color: var(--type-ink); }
.type-article .focus-title { border-left: 0; padding-left: 0; }
.prose .rank-list { margin: 12px 0; }
.rank-list-stats .rank-fill { background: var(--c); }
.rank-list-stats .rank-no { background: color-mix(in srgb, var(--c) 25%, #fff); }
/* 統計: 1〜3 位は表彰台 */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; margin: 16px 0 22px; }
.podium-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.podium-emoji { font-size: 40px; line-height: 1.2; }
.podium-1 .podium-emoji { font-size: 58px; }
.podium-label { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.podium-1 .podium-label { font-size: 19px; }
.podium-pct { font-size: 13px; color: var(--muted); }
.podium-base { width: 100%; margin-top: 8px; border-radius: 14px 14px 4px 4px; background: color-mix(in srgb, var(--c) 22%, #fff); display: flex; justify-content: center; padding-top: 10px; }
.podium-1 .podium-base { height: 100px; background: color-mix(in srgb, var(--c) 38%, #fff); }
.podium-2 .podium-base { height: 72px; }
.podium-3 .podium-base { height: 52px; }
.podium-base span { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #3b2530; background: #fff; }
.podium-1 .podium-base span { background: #f5c542; }
.podium-2 .podium-base span { background: #d9dee4; }
.podium-3 .podium-base span { background: #e8b07e; }
.prose h2 { font-size: 17px; margin: 24px 0 8px; }
.prose p, .prose li { font-size: 14.5px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table th { text-align: left; width: 30%; padding: 8px; background: var(--bg); font-weight: 700; }
.info-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 24px; }
.stat span { font-size: 12px; color: var(--muted); }

/* レスポンシブ広告の実高 (モバイル 250〜300px) を先に確保して CLS を防ぐ。スロット未設定時は要素自体が出ない */
.ad-slot { margin: 20px 0; min-height: 280px; }
@media (min-width: 600px) { .ad-slot { min-height: 250px; } }

/* キーボード操作のフォーカス位置を見失わないように (outline:none は使わない) */
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); z-index: 300; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* 相性を調べる欄 (結果ページ・管理画面) */
.compat-entry { margin: 28px 0; }
.card .compat-entry { margin: 0; }
.compat-form { display: grid; gap: 10px; }
.compat-steps { margin: 0 0 12px; padding-left: 1.4em; font-size: 14px; color: var(--muted); }
.compat-steps li { margin: 2px 0; }
.compat-input-row { display: flex; gap: 8px; align-items: center; }
.compat-input-row .compat-input { flex: 1; min-width: 0; }
.compat-nobox { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--bg); font-size: 14px; }
.compat-input { width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: 12px; background: #fff; font-size: 16px; }
.compat-input:focus { border-color: var(--accent-ink); }

/*
 * 相性ページ: 最初は「計算中」を画面いっぱいに重ねて結果を隠す (html.calc は app.js が外す)。
 * 結果や広告枠は display:none にしない (幅が 0 の枠には広告が入らないため)。上に重ねて見えなくするだけ
 */
.compat-calc { display: none; text-align: center; padding: 56px 16px; }
html.calc .compat-calc, .compat-calc-overlay { display: flex; flex-direction: column; justify-content: center; position: fixed; inset: 0; z-index: 250; background: var(--bg); }
.compat-calc-names { font-size: 18px; font-weight: 800; margin: 0 0 16px; }
.compat-calc-spinner { font-size: 56px; animation: kb-pulse 0.9s ease-in-out infinite; }
.compat-calc-label { font-size: 15px; color: var(--muted); font-weight: 700; margin: 12px 0 0; }
@keyframes kb-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .compat-calc-spinner { animation: none; } }

.compat-card { text-align: center; border-top: 6px solid var(--a-color); border-image: linear-gradient(90deg, var(--a-color), var(--b-color)) 1; border-image-slice: 1 0 0 0; }
.compat-names { font-size: 20px; margin: 4px 0 8px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.compat-name-a { color: var(--a-ink); }
.compat-name-b { color: var(--b-ink); }
.compat-x { color: var(--muted); font-size: 16px; }
.compat-score-label { margin: 8px 0 0; font-size: 14px; font-weight: 800; color: var(--muted); }
.compat-score { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.1; }
.compat-score b { font-size: 72px; }
.compat-level { display: inline-block; margin: 6px 0 0; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: color-mix(in srgb, var(--a-color) 14%, #fff); color: var(--text); }
.compat-tip { margin: 8px 0; padding: 14px 16px; border-radius: 16px; background: #fff; border: 2px dashed color-mix(in srgb, var(--b-color) 55%, #fff); text-align: left; }
.compat-tip-title { margin: 0 0 4px; font-size: 14px; font-weight: 800; }
.compat-tip-text { margin: 0; font-size: 14.5px; }
.compat-pair { margin: 16px 0 8px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--a-color) 16%, #fff), color-mix(in srgb, var(--b-color) 16%, #fff)); }
.compat-pair-emoji { font-size: 32px; margin: 0; }
.compat-pair-name { font-size: 22px; margin: 4px 0 8px; }
.compat-pair-text { font-size: 14.5px; text-align: left; margin: 0; }
.compat-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 4px; }
.compat-type { display: block; background: #fff; border: 1px solid var(--border); border-bottom: 4px solid var(--type-color); border-radius: 12px; padding: 8px 6px; text-decoration: none; color: var(--text); font-size: 13px; }
.compat-type-name { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.radar-key-other { background: color-mix(in srgb, var(--c) 45%, #fff); border: 2px dashed var(--ink); margin-left: 10px; }
.compat-common { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.compat-common-title { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.compat-common .chips { justify-content: center; }
.compat-common-none { margin: 0; font-size: 14px; }

/* 投票ページの読み物 (票が集まると何がわかるか) */
.type-guide-lead { font-size: 14px; color: var(--muted); margin: 0 0 12px; }

/* 最近投票した人との相性 (app.js が中身を入れる) */
.recent-compat { margin: 4px 0; }
.card .recent-compat + .compat-entry, .compat-entry + .recent-compat { margin-top: 20px; }
.recent-list { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-item.is-disabled { opacity: 0.5; cursor: default; }
.recent-more { margin: 10px 0 0; font-size: 14px; }

/* 折りたたみ (投稿文の例・見本の画像・管理用リンク) */
.fold { margin-top: 12px; }
.fold > summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--accent-ink); }
.fold[open] > summary { margin-bottom: 8px; }

/* 持ち主が自分の投票ページを開いたとき */
.owner-card .share-row { justify-content: center; }

/* 投票完了: 自分の箱がある人を相性へ誘う */
.compat-cta .btn { margin-top: 4px; }

/* 相性ページ: 2 人に投票する */
.compat-vote-title { margin: 0 0 8px; font-weight: 800; }
.compat-more { margin: 12px 0 0; font-size: 14px; }

/* トップ: 使い方の下の一言 */
.how-plus { text-align: center; font-size: 14px; margin: 12px 0 0; }

/* タイプ同士の相性の読み物 */
.pair-links { list-style: none; padding: 0; margin: 8px 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pair-links a { display: block; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 700; }
.pair-links span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
@media (max-width: 400px) { .pair-links { grid-template-columns: 1fr; } }
.pair-name-lead { font-size: 18px; margin: 4px 0 12px; }
.pair-level { margin: 20px 0; padding: 14px 16px 6px; border-radius: 16px; background: #fff; border: 1px solid var(--border); }
.pair-level-high { border-left: 6px solid var(--a-color); }
.pair-level-mid { border-left: 6px solid color-mix(in srgb, var(--a-color) 50%, var(--b-color)); }
.pair-level-low { border-left: 6px solid var(--b-color); }
.prose .pair-level h2 { font-size: 16px; margin: 0 0 8px; }
.prose .pair-level h3 { font-size: 14px; margin: 12px 0 4px; }
.pair-scenes { margin: 8px 0 16px; }
.pair-scenes dt { font-size: 13px; font-weight: 800; color: var(--muted); margin-top: 10px; }
.pair-scenes dd { margin: 2px 0 0; font-size: 14.5px; }
