/* =========================================================
   童貞の妄想ノート
   方眼ノートに、マーカーと蛍光ペンで書いた落書き帳。
   色はキャラから取っている：太い黒線・ラベンダーの影・ほっぺのピンク「〃」
   ========================================================= */
:root {
  --paper: #fffdf5;
  --grid: rgba(96, 140, 210, 0.14);
  --margin-line: rgba(232, 88, 104, 0.4);
  --ink: #1d1d22;
  --sub: #6b6a75;
  --lav: #e4e6ff;
  --lav-deep: #b7bdf4;
  --cheek: #ff8fb1;
  --cheek-soft: #ffd3e1;
  --hl: #fff066;
  --hl-blue: #c4e4ff;
  --pen-red: #e2434b;
  --pen-blue: #2d5fd6;
  --good: #1f9d6b;
  --tape: rgba(255, 233, 140, 0.78);
  --tape-lav: rgba(196, 203, 255, 0.78);
  --tape-pink: rgba(255, 196, 214, 0.8);
  /* 手描き風のいびつな角丸 */
  --wobble: 255px 14px 225px 16px / 16px 225px 14px 255px;
  --wobble-2: 14px 225px 16px 255px / 225px 16px 255px 14px;
  --hand: "Yusei Magic", "Zen Maru Gothic", sans-serif;
  --pencil: "Klee One", "Zen Maru Gothic", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Zen Maru Gothic", system-ui, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--pen-blue); font-weight: 700; text-underline-offset: 3px; }
img { max-width: 100%; }

/* ノート左の赤い余白線（広い画面だけ） */
@media (min-width: 900px) {
  body::before {
    content: ""; position: fixed; top: 0; bottom: 0; left: calc(50% - 430px);
    border-left: 2px solid var(--margin-line); pointer-events: none; z-index: 0;
  }
}

/* ===== 共通の部品 ===== */
.hl { background: linear-gradient(transparent 58%, var(--hl) 58%, var(--hl) 92%, transparent 92%); padding: 0 .15em; }
.hl-pink { background: linear-gradient(transparent 58%, var(--cheek-soft) 58%, var(--cheek-soft) 92%, transparent 92%); }
.pencil { font-family: var(--pencil); font-weight: 600; }
.small { font-size: 12px; color: var(--sub); }

.chara {
  display: block; height: auto; user-select: none; -webkit-user-drag: none;
  /* シールっぽい白フチ */
  filter:
    drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff)
    drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff)
    drop-shadow(2px 5px 5px rgba(40, 40, 80, .18));
}
.bubble {
  position: relative; display: inline-block; font-family: var(--pencil); font-weight: 600;
  font-size: 14px; line-height: 1.5; background: #fff; border: 2.5px solid var(--ink);
  border-radius: var(--wobble); padding: 6px 12px; white-space: nowrap;
}
.bubble::after {
  content: ""; position: absolute; left: 18px; bottom: -9px; width: 14px; height: 14px;
  background: #fff; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: rotate(40deg) skew(10deg);
}
.bubble.r::after { left: auto; right: 18px; }
/* しっぽが左（キャラのいる方）を向くふきだし */
.bubble.tail-left::after { left: -8px; top: 50%; bottom: auto; margin-top: -7px; transform: rotate(135deg) skew(10deg); }

.doodle { display: inline-block; width: 40px; color: var(--ink); pointer-events: none; }
.doodle svg { display: block; width: 100%; height: auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.doodle-cheek { color: var(--cheek); }
.doodle-heart { color: var(--cheek); }
.doodle-star, .doodle-sparkle { color: #f5b301; }

/* マスキングテープ */
.tape::before {
  content: ""; position: absolute; top: -13px; left: 50%; width: 96px; height: 26px;
  transform: translateX(-50%) rotate(-3deg); background: var(--tape);
  -webkit-mask: linear-gradient(90deg, transparent 0 3px, #000 3px calc(100% - 3px), transparent calc(100% - 3px)),
    repeating-linear-gradient(0deg, #000 0 4px, transparent 4px 6px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

/* ===== ヘッダー ===== */
.site-header {
  /* main と同じ重なり順にして、結果発表の演出（main の中）がヘッダーの上を覆えるようにする */
  position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  max-width: 860px; margin: 0 auto; padding: 14px 16px 6px;
}
.logo { font-family: var(--hand); font-size: 19px; text-decoration: none; color: var(--ink); }
.logo span { color: var(--pen-red); }
.site-header nav a {
  font-family: var(--hand); font-weight: 400; text-decoration: none; font-size: 14px; color: var(--ink);
  background: var(--lav); border: 2.5px solid var(--ink); border-radius: 10px 10px 4px 4px;
  padding: 3px 12px; display: inline-block; transform: rotate(2deg);
}

main { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }

/* ===== ボタン ===== */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none; font-family: var(--hand); font-weight: 400;
  font-size: 21px; line-height: 1.3; padding: 14px 38px; color: var(--ink); background: var(--cheek);
  border: 3px solid var(--ink); border-radius: var(--wobble); box-shadow: 4px 5px 0 var(--ink);
  transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translate(-1px, -2px) rotate(-1deg); box-shadow: 5px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { background: #e6e6ea; color: #9a9aa3; cursor: default; transform: none; box-shadow: 4px 5px 0 #c9c9cf; border-color: #c9c9cf; }
.btn.ghost { background: #fff; }
.btn.lav { background: var(--lav); }

/* ===== トップ：表紙 ===== */
.cover { position: relative; text-align: center; padding: 26px 0 10px; }
.cover .label {
  position: relative; display: inline-block; font-family: var(--pencil); font-weight: 600; font-size: 13px;
  padding: 3px 18px; background: var(--tape); transform: rotate(-2deg);
}
.cover .kicker { font-family: var(--pencil); font-weight: 600; font-size: clamp(18px, 4.6vw, 24px); margin: 18px 0 0; }
.cover h1 {
  position: relative; display: inline-block; margin: 4px 0 0; font-family: var(--hand); font-weight: 400;
  font-size: clamp(38px, 10.5vw, 72px); line-height: 1.2; letter-spacing: .02em;
}
.cover h1 .hl { padding: 0 .1em; }
.cover .kicker .doodle-cheek { width: 1.3em; margin: 0 .35em; vertical-align: -.15em; }
.cover .lead-text { margin: 10px 0 0; font-weight: 700; }

.cover-stage { position: relative; height: 230px; margin: 4px auto 0; max-width: 520px; }
.cover-stage .main-a { position: absolute; left: 50%; bottom: 0; width: 190px; transform: translateX(-50%); animation: bob 2.6s ease-in-out infinite; }
.cover-stage .bubble { position: absolute; left: calc(50% + 70px); top: 6px; transform: rotate(3deg); }
.cover-stage .doodle-sparkle { position: absolute; left: calc(50% - 150px); top: 40px; width: 34px; }
.cover-stage .doodle-star { position: absolute; left: calc(50% + 120px); bottom: 30px; width: 30px; transform: rotate(14deg); }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10px); } }
@media (max-width: 520px) {
  .cover-stage { height: 200px; }
  .cover-stage .main-a { width: 160px; }
  .cover-stage .bubble { left: auto; right: 0; top: 0; }
}

/* トップの表紙：真ん中に跳ねるA、左右にふたり組のシール */
.cover-stage.home { max-width: 760px; height: 280px; }
.cover-stage.home .main-a { width: 170px; bottom: 34px; z-index: 2; }
.cover-stage.home .pair-l { position: absolute; left: -2%; bottom: 0; width: 36%; transform: rotate(-4deg); }
.cover-stage.home .pair-r { position: absolute; right: -2%; bottom: 0; width: 33%; transform: rotate(4deg); }
.cover-stage.home .bubble { left: calc(50% + 62px); top: 0; z-index: 3; }
.cover-stage.home .doodle-sparkle { left: 14%; top: 18px; }
.cover-stage.home .doodle-star { left: auto; right: 12%; bottom: auto; top: 96px; }
@media (max-width: 560px) {
  .cover-stage.home { height: 278px; }
  .cover-stage.home .main-a { width: 132px; bottom: auto; top: 6px; }
  .cover-stage.home .pair-l { width: 54%; left: -4%; bottom: 0; }
  .cover-stage.home .pair-r { width: 50%; right: -4%; bottom: 10px; }
  .cover-stage.home .bubble { left: auto; right: 0; top: 0; font-size: 12px; }
  .cover-stage.home .doodle-sparkle { left: 4%; top: 30px; }
  .cover-stage.home .doodle-star { right: 4%; top: 120px; }
}

/* 番長 VS 侍 */
.vs-scene { position: relative; max-width: 520px; margin: 56px auto 0; text-align: center; }
.vs-scene .chara { width: 100%; }
.vs-scene .vs-mark {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%) rotate(-8deg);
  font-family: var(--hand); font-size: clamp(30px, 8vw, 46px); color: var(--pen-red);
  -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 #fff;
}
.vs-scene .bubble { position: absolute; left: 50%; top: -14px; transform: translateX(-50%) rotate(-2deg); white-space: normal; max-width: 90%; }
.vs-scene .bubble::after { left: 50%; margin-left: -7px; }

.name-field { display: block; max-width: 340px; margin: 18px auto 22px; text-align: left; }
.name-field > span { display: block; font-family: var(--pencil); font-weight: 600; font-size: 15px; }
.name-field small { font-weight: 600; font-size: 11px; color: var(--sub); margin-left: 4px; }
.name-field input {
  width: 100%; font-family: var(--hand); font-size: 22px; color: var(--ink); background: transparent;
  border: 0; border-bottom: 3px solid var(--ink); border-radius: 0; padding: 6px 4px 4px; outline: none;
}
.name-field input::placeholder { color: #b9b8c2; }
.name-field input:focus { border-bottom-color: var(--cheek); background: linear-gradient(transparent 60%, var(--cheek-soft) 60%); }

/* ===== 見出し ===== */
.section-title {
  font-family: var(--hand); font-weight: 400; font-size: clamp(22px, 5.4vw, 28px); line-height: 1.3;
  margin: 44px 0 14px; text-align: center;
}
.section-title .doodle { width: 28px; vertical-align: -4px; margin: 0 6px; }

/* ===== キャラ図鑑（トップ） ===== */
.member-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 10px; }
.member { display: block; text-align: center; text-decoration: none; color: var(--ink); }
.member .chara { width: 100%; max-width: 132px; margin: 0 auto; transition: transform .15s; }
.member:nth-child(odd) .chara { transform: rotate(-4deg); }
.member:nth-child(even) .chara { transform: rotate(4deg); }
.member:hover .chara { transform: rotate(0) scale(1.06); }
.member span { display: inline-block; margin-top: 2px; font-family: var(--hand); font-size: 15px; }
@media (max-width: 520px) { .member span { font-size: 12px; } }

/* ===== 童貞たちの日常（キャラ同士が戯れる場所） ===== */
.daily {
  position: relative; height: 300px; margin: 8px 0 0; background: rgba(228, 230, 255, .45);
  border: 3px solid var(--ink); border-radius: var(--wobble-2); overflow: hidden;
}
.daily .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: repeating-linear-gradient(90deg, #f3e3c6 0 46px, #ead6b2 46px 48px); border-top: 3px solid var(--ink); }
.daily .chara { position: absolute; }
.daily .bubble { position: absolute; font-size: 13px; }
.d-phone { width: 230px; left: 4%; bottom: 26px; }
.d-hamster { width: 92px; left: 30%; bottom: 82px; transform: rotate(-6deg); }
.d-dog { width: 118px; right: 30%; bottom: 40px; transform: scaleX(-1); }
.d-back { width: 110px; right: 4%; bottom: 40px; }
.b-phone { left: 6%; top: 34px; }
.b-dog { right: 26%; top: 48px; transform: rotate(-3deg); }
.b-back { right: 2%; top: 108px; }
@media (max-width: 560px) {
  .daily { height: 250px; }
  .d-phone { width: 170px; left: -2%; }
  .d-hamster { width: 70px; left: 33%; bottom: 70px; }
  .d-dog { width: 90px; right: 26%; }
  .d-back { width: 84px; right: 0; }
  .b-phone { left: 2%; top: 26px; }
  .b-dog { right: 18%; top: 40px; }
  .b-back { right: 1%; top: 92px; }
}
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; margin-top: 22px; }
.polaroid { position: relative; margin: 0; background: #fff; padding: 10px 10px 8px; box-shadow: 0 3px 10px rgba(0, 0, 0, .12); }
.polaroid:nth-child(odd) { transform: rotate(-2deg); }
.polaroid:nth-child(even) { transform: rotate(2deg); }
.polaroid img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.polaroid figcaption { font-family: var(--pencil); font-weight: 600; font-size: 14px; text-align: center; margin-top: 6px; }

/* 6つの軸 */
.axes-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.axes-list li { font-weight: 700; padding: 4px 0; border-bottom: 1.5px dashed #c9cbe8; }
.axes-list li b { font-family: var(--hand); font-weight: 400; display: inline-block; min-width: 5em; }
@media (max-width: 520px) { .axes-list { grid-template-columns: 1fr; } }

/* ===== カード（テープで留めたメモ用紙） ===== */
.card {
  position: relative; background: #fff; border: 2.5px solid var(--ink); border-radius: 6px 4px 8px 5px;
  padding: 26px 22px 20px; margin: 40px 0; box-shadow: 3px 4px 0 rgba(29, 29, 34, .9);
}
.card::before {
  content: ""; position: absolute; top: -14px; left: 50%; width: 100px; height: 26px;
  transform: translateX(-50%) rotate(-3deg); background: var(--tape);
}
.card:nth-of-type(3n+1)::before { background: var(--tape-lav); transform: translateX(-50%) rotate(2deg); left: 30%; }
.card:nth-of-type(3n+2)::before { background: var(--tape-pink); left: 70%; transform: translateX(-50%) rotate(-4deg); }
.card h2 {
  display: inline-block; margin: 0 0 10px; font-family: var(--hand); font-weight: 400; font-size: 22px; line-height: 1.3;
  background: linear-gradient(transparent 58%, var(--hl) 58%, var(--hl) 94%, transparent 94%); padding: 0 .2em;
}
.card:nth-of-type(3n+1) h2 { background: linear-gradient(transparent 58%, var(--hl-blue) 58%, var(--hl-blue) 94%, transparent 94%); }
.card:nth-of-type(3n+2) h2 { background: linear-gradient(transparent 58%, var(--cheek-soft) 58%, var(--cheek-soft) 94%, transparent 94%); }
.card > p:first-of-type, .card > ul:first-of-type { margin-top: 2px; }
.card .deco { position: absolute; right: -10px; top: -30px; width: 86px; transform: rotate(8deg); pointer-events: none; }
.card .deco.wide { width: 130px; top: -26px; }
@media (max-width: 520px) { .card .deco { width: 66px; right: -4px; top: -26px; } .card .deco.wide { width: 100px; } }

/* ===== 広告枠 ===== */
.ad-slot {
  margin: 30px 0; min-height: 100px; border: 2px dashed #c9c9d2; border-radius: 6px;
  display: grid; place-items: center; color: #b2b2bb; font-size: 12px; background: rgba(255, 255, 255, .6);
}

/* ===== 診断の質問 ===== */
.progress { position: sticky; top: 0; z-index: 5; padding: 12px 0 10px; background: var(--paper); }
.progress-track { position: relative; height: 18px; margin: 34px 26px 0 6px; }
.progress-bar { height: 14px; background: #fff; border: 2.5px solid var(--ink); border-radius: var(--wobble); overflow: hidden; }
.progress-bar div { height: 100%; background: repeating-linear-gradient(-45deg, var(--cheek) 0 8px, #ffa9c3 8px 16px); transition: width .3s; }
.progress-walker { position: absolute; bottom: 8px; width: 46px; transform: translateX(-50%); transition: left .3s; }
.progress-label { font-family: var(--hand); font-size: 14px; text-align: right; margin-top: 4px; }

.question {
  position: relative; background: #fff; border: 2.5px solid var(--ink); border-radius: 5px 7px 4px 8px;
  box-shadow: 3px 4px 0 rgba(29, 29, 34, .9); padding: 20px 14px 18px; margin: 18px 0; text-align: center; transition: opacity .2s;
  background-image: repeating-linear-gradient(transparent 0 31px, #eef0fb 31px 32px);
}
.question.answered { opacity: .45; }
.question .qno {
  display: inline-grid; place-items: center; min-width: 46px; height: 34px; padding: 0 8px; font-family: var(--hand); font-size: 17px;
  border: 2.5px solid var(--ink); border-radius: 50% 45% 55% 48%; background: var(--hl);
}
.question p { font-weight: 700; font-size: 18px; margin: 10px 0 14px; }
.scale { display: flex; align-items: center; justify-content: center; gap: 8px; }
.scale .lbl { font-family: var(--hand); font-size: 13px; width: 84px; white-space: nowrap; }
.scale .lbl.agree { color: var(--pen-red); text-align: right; }
.scale .lbl.disagree { color: var(--pen-blue); text-align: left; }
.scale button { border-radius: 50% 46% 52% 48%; cursor: pointer; background: #fff; padding: 0; transition: transform .1s, background .1s; }
.scale button:hover { transform: scale(1.12) rotate(-6deg); }
.scale button[data-v="7"], .scale button[data-v="1"] { width: 46px; height: 46px; }
.scale button[data-v="6"], .scale button[data-v="2"] { width: 38px; height: 38px; }
.scale button[data-v="5"], .scale button[data-v="3"] { width: 30px; height: 30px; }
.scale button[data-v="4"] { width: 24px; height: 24px; border: 2.5px solid #9d9ca6; }
.scale button[data-v="5"], .scale button[data-v="6"], .scale button[data-v="7"] { border: 2.5px solid var(--pen-red); }
.scale button[data-v="1"], .scale button[data-v="2"], .scale button[data-v="3"] { border: 2.5px solid var(--pen-blue); }
.scale button.on[data-v="5"], .scale button.on[data-v="6"], .scale button.on[data-v="7"] { background: var(--cheek); }
.scale button.on[data-v="1"], .scale button.on[data-v="2"], .scale button.on[data-v="3"] { background: var(--hl-blue); }
.scale button.on[data-v="4"] { background: #d6d5dc; }
@media (max-width: 560px) {
  .scale { flex-wrap: wrap; }
  .scale .lbl { order: 1; width: 45%; margin-top: 4px; }
  .scale .lbl.agree { text-align: left; }
  .scale .lbl.disagree { text-align: right; }
}
.quiz-nav { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.cheer { display: flex; align-items: flex-start; justify-content: center; gap: 14px; margin-top: 20px; }
.cheer .chara { width: 86px; }
.cheer .bubble { margin-top: 22px; }
.cheer + .ad-slot { margin-top: 40px; }

/* ===== 丸アイコン（64タイプ別の顔） ===== */
.visual {
  position: relative; display: grid; place-items: center; overflow: hidden; background: #fff;
  border: 2.5px solid var(--ink); border-radius: 50%; box-shadow: 0 0 0 3px #fff, 2px 3px 6px rgba(40, 40, 80, .2);
}
.visual img { width: 100%; height: 100%; object-fit: cover; }
.visual .emoji { display: none; }
.visual.no-img img { display: none; }
.visual.no-img .emoji { display: block; }

/* ===== 結果発表の演出 ===== */
.reveal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  animation: revealOut .35s ease-in 2.1s forwards;
}
.reveal .chara { width: 150px; margin: 0 auto 10px; animation: shake .12s infinite; }
.reveal .drum { font-family: var(--hand); font-size: clamp(26px, 7vw, 38px); }
.reveal .drum small { display: block; font-family: var(--pencil); font-weight: 600; font-size: 15px; color: var(--sub); }
@keyframes shake { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(2px, -2px) rotate(2deg); } }
@keyframes revealOut { to { opacity: 0; visibility: hidden; } }

.pop { animation: pop .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.pop-1 { animation-delay: 2.3s; }
.pop-2 { animation-delay: 2.5s; }
.pop-3 { animation-delay: 2.7s; }
.no-anim .pop { animation-delay: 0s; }
@keyframes pop { from { opacity: 0; transform: scale(.3) rotate(-8deg); } to { opacity: 1; transform: none; } }

/* ===== 結果ページ ===== */
.result-hero { position: relative; text-align: center; padding: 24px 0 6px; }
.result-hero .lead { display: inline-block; font-family: var(--pencil); font-weight: 600; font-size: 18px; margin: 0; }
.hero-visual { margin: 22px auto 18px; }
/* シーンイラストは、テープで貼ったポラロイド写真 */
.scene {
  position: relative; max-width: 640px; margin: 0 auto; background: #fff; padding: 10px 10px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .16); transform: rotate(-1.2deg);
}
.scene::before, .scene::after {
  content: ""; position: absolute; top: -12px; width: 90px; height: 26px; background: var(--tape); z-index: 1;
}
.scene::before { left: -18px; transform: rotate(-28deg); }
.scene::after { right: -18px; transform: rotate(28deg); background: var(--tape-lav); }
.scene img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-visual > .visual { display: none; width: 170px; height: 170px; font-size: 96px; }
.hero-visual.no-scene .scene { display: none; }
.hero-visual.no-scene > .visual { display: grid; margin: 0 auto; }

.type-code {
  display: inline-block; font-family: var(--hand); letter-spacing: 5px; font-size: 18px; color: var(--ink);
  padding: 0 12px; border: 2.5px solid var(--ink); border-radius: var(--wobble); background: #fff;
}
.type-title { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 10px; }
.type-title .chara { width: 120px; flex: none; transform: rotate(-6deg); }
.type-title .names { text-align: left; }
.type-prefix { display: block; font-family: var(--pencil); font-weight: 700; font-size: clamp(16px, 4.4vw, 21px); margin: 0; }
.type-name {
  font-family: var(--hand); font-weight: 400; font-size: clamp(42px, 11vw, 66px); line-height: 1.15; margin: 0; letter-spacing: .03em;
}
.type-name .hl-type { padding: 0 .08em; }
.type-catch { font-family: var(--pencil); font-weight: 600; font-size: 16px; margin: 12px 0 0; }
@media (max-width: 520px) { .type-title .chara { width: 92px; } }

.bars .bar-row { margin: 14px 0; }
.bar-labels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.bar-labels .t { font-family: var(--hand); color: var(--sub); font-weight: 400; }
.bar-track { position: relative; height: 16px; background: #f1f1f6; border: 2.5px solid var(--ink); border-radius: var(--wobble); overflow: hidden; }
.bar-fill { position: absolute; top: 0; bottom: 0; opacity: .85; }

.power { text-align: center; }
.power .num { font-family: var(--hand); font-size: 76px; line-height: 1.1; color: var(--pen-red); }
.power .num small { font-size: 24px; color: var(--ink); }
.power .comment { font-weight: 700; margin: 8px 0 0; }
.meter { height: 20px; border: 2.5px solid var(--ink); border-radius: var(--wobble); overflow: hidden; background: #f1f1f6; margin: 12px 0; }
.meter div { height: 100%; background: repeating-linear-gradient(-45deg, var(--cheek) 0 9px, #ffa9c3 9px 18px); }

ul.list { padding-left: 1.5em; margin: 0; }
ul.list li { margin: 8px 0; font-weight: 600; }
.good li::marker { content: "◎ "; color: var(--good); }
.bad li::marker { content: "✕ "; color: var(--pen-red); }
.advice li::marker { content: "→ "; color: var(--pen-blue); }
.aru { list-style: none; padding: 0 !important; }
.aru li { position: relative; padding: 4px 0 4px 1.6em; border-bottom: 1.5px dashed #d7d9ee; }
.aru li::before { content: "わかる"; position: absolute; left: 0; top: 7px; font-family: var(--hand); font-size: 10px; color: var(--pen-red); writing-mode: vertical-rl; }

.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .match-grid { grid-template-columns: 1fr; } }
.match-grid .tag { font-family: var(--hand); font-size: 15px; margin: 0 0 6px; }
.mini-type {
  display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink);
  background: #fff; border: 2.5px solid var(--ink); border-radius: var(--wobble); padding: 10px 12px;
  box-shadow: 2px 3px 0 var(--ink); transition: transform .1s;
}
.mini-type:hover { transform: translate(-1px, -2px) rotate(-.6deg); }
.mini-type .visual { width: 54px; height: 54px; flex: none; font-size: 28px; }
.mini-type .k { font-family: var(--hand); font-size: 12px; letter-spacing: 1.5px; color: var(--sub); }
.mini-type .n { font-weight: 700; font-size: 14px; line-height: 1.45; }

.share { text-align: center; }
.share-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-buttons a, .share-buttons button {
  font-family: var(--hand); font-weight: 400; font-size: 16px; cursor: pointer; padding: 9px 20px;
  color: #fff; text-decoration: none; border: 2.5px solid var(--ink); border-radius: var(--wobble); box-shadow: 2px 3px 0 var(--ink);
}
.sh-x { background: #111; }
.sh-line { background: #06c755; }
.sh-copy { background: var(--pen-blue); }

.cta { text-align: center; }
.cta .row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.cta .chara { width: 110px; flex: none; }
.cta .row p { text-align: left; margin: 0; }
@media (max-width: 520px) { .cta .row { flex-direction: column; } .cta .row p { text-align: center; } .cta .chara { width: 96px; } }
.cta .btn { margin-top: 14px; }

/* ===== 自分を診断／あの人を診断 ===== */
.mode-switch {
  display: inline-flex; margin: 16px auto 0; border: 2.5px solid var(--ink); border-radius: var(--wobble);
  background: #fff; box-shadow: 2px 3px 0 var(--ink); overflow: hidden;
}
.mode-switch button {
  font-family: var(--hand); font-size: 17px; line-height: 1.25; color: var(--ink); background: transparent;
  border: 0; padding: 9px 18px; cursor: pointer;
}
.mode-switch button + button { border-left: 2.5px solid var(--ink); }
.mode-switch button small { display: block; font-family: var(--pencil); font-weight: 600; font-size: 10px; color: var(--pen-red); }
.mode-switch button.on { background: var(--cheek); }
.mode-switch button:not(.on):hover { background: var(--cheek-soft); }
@media (max-width: 520px) { .mode-switch button { font-size: 15px; padding: 8px 12px; } }

.other-note { text-align: center; font-family: var(--pencil); font-weight: 600; margin: 4px 0 0; }
.other-note b { font-family: var(--hand); font-weight: 400; color: var(--pen-red); }
.other-note .doodle { width: 18px; vertical-align: -2px; margin: 0 4px; }

/* 友達から届いた挑戦状 */
.vs-banner {
  position: relative; display: flex; align-items: center; gap: 12px; max-width: 520px; margin: 4px auto 22px;
  padding: 14px 16px; text-align: left; background: #fff; border: 2.5px solid var(--ink); border-radius: 6px;
  box-shadow: 3px 4px 0 var(--cheek); transform: rotate(-1deg);
}
.vs-banner .chara { width: 76px; flex: none; }
.vs-banner p { margin: 0; font-weight: 700; font-size: 14px; line-height: 1.7; }
.vs-banner b { font-family: var(--hand); font-weight: 400; font-size: 16px; }

/* 相性診断の結果 */
.compare { text-align: center; }
.cmp-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; }
.cmp-side { flex: 1; max-width: 220px; }
.cmp-side .chara { width: 96px; margin: 0 auto; }
.cmp-who { margin: 4px 0 0; font-family: var(--hand); font-size: 17px; }
.cmp-type { margin: 0; font-weight: 700; font-size: 14px; }
.cmp-code { margin: 4px 0 0; display: flex; justify-content: center; gap: 2px; }
.cmp-code span { width: 22px; height: 26px; display: grid; place-items: center; font-family: var(--hand); font-size: 15px; border: 1.5px solid #c9cbe8; border-radius: 4px; }
.cmp-code span.same { background: var(--hl); border-color: var(--ink); }
.cmp-x { font-family: var(--hand); font-size: 30px; color: var(--pen-red); }
.cmp-rate { margin: 8px 0 0; font-family: var(--hand); font-size: 64px; line-height: 1.1; color: var(--pen-red); }
.cmp-rate small { font-size: 24px; color: var(--ink); }
.cmp-label { margin: 2px 0 6px; font-family: var(--hand); font-size: 22px; }
@media (max-width: 520px) { .cmp-side .chara { width: 76px; } .cmp-code span { width: 18px; height: 22px; font-size: 13px; } }

/* 友達にも診断してもらう */
.invite { text-align: center; }
.invite p { margin: 4px 0 14px; }

/* ===== 童貞脱出ゲームへの案内（結果ページ） ===== */
.game-teaser {
  display: inline-block; margin-top: 14px; font-family: var(--pencil); font-weight: 600; font-size: 14px;
  color: var(--ink); text-decoration: none; background: var(--hl); padding: 4px 14px;
  border: 2px dashed var(--ink); border-radius: var(--wobble); transform: rotate(-1deg);
}
.game-teaser b { font-family: var(--hand); font-weight: 400; color: var(--pen-red); }

/* 黒地のチケット。左右のくぼみは本物のチケットの切り込み */
.game-ticket {
  position: relative; margin: 48px 0; padding: 30px 22px 22px; text-align: center; color: #fff;
  background:
    radial-gradient(circle at 0 50%, var(--paper) 0 16px, transparent 17px),
    radial-gradient(circle at 100% 50%, var(--paper) 0 16px, transparent 17px),
    var(--ink);
  border-radius: 14px; box-shadow: 0 6px 0 var(--cheek), 0 10px 22px rgba(29, 29, 34, .25);
  scroll-margin-top: 20px;
}
.game-ticket::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: 10px; bottom: 10px;
  border: 2px dashed rgba(255, 255, 255, .28); border-radius: 8px; pointer-events: none;
}
.game-ticket .stamp {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%) rotate(-4deg);
  font-family: var(--hand); font-size: 15px; letter-spacing: 2px; color: var(--ink);
  background: var(--tape); padding: 2px 18px;
}
.ticket-lead { font-family: var(--pencil); font-weight: 600; font-size: 15px; margin: 4px 0 0; color: #e8e8f0; }
.ticket-lead b { font-family: var(--hand); font-weight: 400; font-size: 26px; color: var(--cheek); }
.ticket-title { font-family: var(--hand); font-weight: 400; font-size: clamp(32px, 8.5vw, 46px); line-height: 1.2; margin: 6px 0 0; color: var(--ink); }
.ticket-title .hl { background: var(--hl); padding: 0 .3em; border-radius: 4px; }
.ticket-story { display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin: 14px 0 4px; }
.ticket-story .chara { width: 104px; }
.ticket-story .chara:first-child { filter: grayscale(.4) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff); }
.ticket-story .doodle-arrow { width: 70px; color: var(--hl); margin-bottom: 40px; }
.ticket-rule { margin: 6px 0 0; font-weight: 700; }
.ticket-rule b { color: var(--hl); }
.ticket-btn {
  position: relative; z-index: 1; margin-top: 16px; font-size: 22px; padding: 16px 30px;
  border-color: #fff; box-shadow: 4px 5px 0 #fff; animation: ticket-pulse 1.6s ease-in-out infinite;
}
.ticket-btn:hover { box-shadow: 5px 7px 0 #fff; }
.ticket-note { margin: 12px 0 0; font-size: 12px; color: #b9b9c6; }
@keyframes ticket-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .ticket-btn { animation: none; } }
@media (max-width: 520px) {
  .game-ticket { padding: 30px 16px 20px; }
  .ticket-story .chara { width: 84px; }
  .ticket-story .doodle-arrow { width: 52px; margin-bottom: 30px; }
  .ticket-btn { display: block; font-size: 19px; padding: 15px 10px; }
}

/* ===== アルファベットの意味 ===== */
.guide-code { display: flex; justify-content: center; gap: 6px; margin: 10px 0 16px; }
.guide-code span {
  width: 42px; height: 48px; display: grid; place-items: center; font-family: var(--hand); font-size: 26px;
  background: var(--hl); border: 2.5px solid var(--ink); border-radius: var(--wobble);
}
.guide-row { display: grid; grid-template-columns: 78px 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 0; border-top: 1.5px dashed #d7d9ee; }
.guide-axis { font-family: var(--hand); font-size: 14px; line-height: 1.3; }
.guide-axis em { display: block; font-style: normal; font-family: var(--pencil); font-size: 10px; color: var(--sub); }
.vs { font-family: var(--hand); color: var(--sub); }
.pole { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 2px solid #e1e2ef; border-radius: var(--wobble); background: #fff; }
.pole b { flex: none; width: 32px; height: 32px; display: grid; place-items: center; font-family: var(--hand); font-size: 19px; font-weight: 400; border: 2px solid var(--ink); border-radius: 50% 45% 55% 48%; }
.pole span { font-weight: 700; font-size: 14px; line-height: 1.2; }
.pole small { display: block; font-size: 10px; color: var(--sub); font-weight: 600; }
.pole.on { border-color: var(--ink); background: linear-gradient(transparent 40%, var(--hl) 40%); }
.pole.on b { background: var(--cheek); }
@media (max-width: 560px) {
  .guide-row { grid-template-columns: 1fr auto 1fr; }
  .guide-axis { grid-column: 1 / -1; }
  .guide-axis em { display: inline; margin-right: 6px; }
}

/* ===== 童貞脱出ゲーム ===== */
.stage-name { display: inline-block; margin: 6px 0 0; font-family: var(--hand); font-size: 16px; }
.choices { display: grid; gap: 10px; text-align: left; }
.choice {
  font-family: inherit; font-weight: 700; font-size: 16px; line-height: 1.5; color: var(--ink); background: #fff;
  border: 2.5px solid var(--ink); border-radius: var(--wobble); padding: 12px 16px; box-shadow: 2px 3px 0 var(--ink);
  cursor: pointer; text-align: left; transition: transform .1s, background .1s;
}
.choice:hover:not(:disabled) { transform: translate(-1px, -2px); background: linear-gradient(transparent 55%, var(--hl) 55%); }
.choice:disabled { cursor: default; opacity: .5; }
.choice.best { opacity: 1; background: linear-gradient(transparent 50%, #c9f1dc 50%); border-color: var(--good); }
.choice.picked { opacity: 1; outline: 3px solid var(--pen-red); outline-offset: 2px; }
.choice.picked.best { outline-color: var(--good); }
.feedback { display: flex; gap: 12px; align-items: flex-start; }
.feedback .chara { width: 92px; flex: none; margin-top: -6px; }
.feedback h2 { color: var(--pen-red); }
.feedback.good h2 { color: var(--good); }
.best-answer { background: linear-gradient(transparent 50%, #c9f1dc 50%); padding: 0 4px; display: inline; }
@media (max-width: 520px) { .feedback .chara { width: 70px; } }

.escape { text-align: center; }
.escape .chara { width: 170px; margin: 6px auto 0; }
.escape-label { display: inline-block; font-family: var(--hand); font-size: clamp(34px, 9vw, 52px); margin: 6px 0 0; transform: rotate(-3deg); }
.escape-label.ok { color: var(--pen-red); }
.escape-label.ng { color: var(--sub); }
.rank-name { font-size: clamp(32px, 9vw, 52px); }
.ranks-mini { font-family: var(--pencil); font-weight: 600; }

/* ===== タイプ一覧 ===== */
.types-group h3 { display: flex; align-items: center; gap: 8px; margin: 34px 0 12px; font-family: var(--hand); font-weight: 400; font-size: 21px; }
.types-group h3 .chara { width: 58px; }
.types-group h3 .small { font-family: var(--pencil); font-weight: 600; }
.types-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

.page-title { text-align: center; padding: 26px 0 0; }
.page-title h1 { font-family: var(--hand); font-weight: 400; font-size: clamp(30px, 8vw, 46px); margin: 0; }
.page-title p { margin: 6px 0 0; font-weight: 600; }

/* ===== フッター ===== */
.site-footer { position: relative; z-index: 1; text-align: center; padding: 26px 16px 34px; font-size: 14px; border-top: 2.5px dashed #c9cbe8; max-width: 760px; margin: 0 auto; }
.site-footer .chara { width: 76px; margin: -60px auto 6px; }
.site-footer p { margin: 4px 0; }
