@font-face{font-family:"Dela Gothic One";font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/dela-400.woff2?v=b74b4f0385") format("woff2");}
@font-face{font-family:"Zen Kaku Gothic New";font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/zen-400.woff2?v=b74b4f0385") format("woff2");}
@font-face{font-family:"Zen Kaku Gothic New";font-style:normal;font-weight:700;font-display:swap;src:url("/fonts/zen-700.woff2?v=b74b4f0385") format("woff2");}
/* くっつきぐせ診断：文房具の売り場の値札と方眼紙（指示書 7節） */
:root {
  --bg: #F5F0E6;
  --grid: #E8E0D0;
  --ink: #1E2A44;
  --ink-soft: #4A5570;
  --paper: #FFFDF8;
  --line: #1E2A44;
  --accent: #F2A93B;
  --accent-ink: #1E2A44;
  --font-head: "Dela Gothic One", "Hiragino Kaku Gothic StdN", "Hiragino Sans", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}
/* 改行は <wbr> の所だけ（tools/build.mjs の tx）。収まらない時だけ、どこでも折る */
a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; }

.wrap { max-width: 520px; margin: 0 auto; padding: 0 16px 40px; }
.site-head { max-width: 520px; margin: 0 auto; padding: 12px 16px 0; }
.site-head a { font-family: var(--font-head); font-size: 14px; text-decoration: none; letter-spacing: .02em; }

.center { text-align: center; }
.small { font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
.lead { font-size: 14px; font-weight: 700; margin: 0; }
.head { font-family: var(--font-head); font-weight: 400; letter-spacing: .02em; line-height: 1.35; }

/* 札（値札・品札） */
.tag {
  position: relative;
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: 10px;
  margin: 18px 0;
  overflow: hidden;
}
.tag__band { height: 30px; background: var(--accent); border-bottom: 2.5px solid var(--line); position: relative; }
.tag__band::before {
  content: ""; position: absolute; left: 14px; top: 8px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2.5px solid var(--line);
}
.tag__body { padding: 18px 18px 20px; }

/* ボタン */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 10px 16px;
  border: 2.5px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-weight: 700; font-size: 16px; line-height: 1.4;
  text-decoration: none; text-align: center; cursor: pointer;
  box-shadow: 0 4px 0 var(--line);
  transition: transform .08s, box-shadow .08s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn--main { background: var(--accent); color: var(--accent-ink); font-size: 17px; min-height: 60px; }
.btn--sub { min-height: 46px; font-size: 15px; box-shadow: 0 3px 0 var(--line); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.btn-row .btn--wide { grid-column: 1 / -1; }
.stack > * + * { margin-top: 12px; }
.textlink { display: inline-block; padding: 8px 4px; font-weight: 700; text-underline-offset: 4px; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin: 18px 0; }

[hidden] { display: none !important; }
.reveal { margin-top: 12px; }

/* キャラクター */
.ch-stage { display: flex; justify-content: center; margin: 4px 0; }
.ch-stage .ch { width: 200px; height: 200px; }
.typename { font-family: var(--font-head); font-size: 40px; line-height: 1.25; margin: 4px 0 6px; text-align: center; letter-spacing: .02em; }
.typename--long { font-size: 33px; }
.oneline { font-weight: 700; font-size: 17px; text-align: center; margin: 0 0 4px; }

/* 数字 */
.stick { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 10px 0 6px; }
.stick__label { font-weight: 700; font-size: 16px; }
.stick__num { font-family: var(--font-head); font-size: 52px; line-height: 1; }
.stick__num small { font-size: 26px; }
.bar { margin: 10px 0; }
.bar__head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; }
.bar__track { height: 14px; border: 2px solid var(--line); border-radius: 7px; background: var(--bg); overflow: hidden; }
.bar__fill { height: 100%; background: var(--accent); border-right: 2px solid var(--line); }

/* 本文 */
.section h2 { font-family: var(--font-head); font-weight: 400; font-size: 20px; margin: 22px 0 6px; line-height: 1.4; }
.section h2:first-child { margin-top: 0; }
.section p { margin: 0; }
.section .dokitto { background: var(--bg); border-left: 6px solid var(--accent); padding: 10px 12px; border-radius: 0 8px 8px 0; }

.note { font-size: 13px; color: var(--ink-soft); text-align: center; margin: 14px 0; }
.disclaimer { font-size: 12px; line-height: 1.75; color: var(--ink-soft); border-top: 1.5px dashed #B9B0A0; margin-top: 28px; padding-top: 14px; }

/* トップ */
.hero { text-align: center; padding-top: 18px; }
.hero h1 { font-family: var(--font-head); font-weight: 400; font-size: 38px; line-height: 1.25; margin: 6px 0 8px; letter-spacing: .02em; }
.hero .sub { font-weight: 700; margin: 0 0 6px; }
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 14px 0 18px; }
.shelf .ch { width: 100%; height: auto; aspect-ratio: 1; }
.desc p { margin: 0; }

/* 一覧（ほかのタイプ・図鑑） */
.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 4px; margin: 10px 0; }
.mini a { text-decoration: none; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.35; }
.mini .ch { width: 100%; height: auto; aspect-ratio: 1; }
.zukan { list-style: none; padding: 0; margin: 0; }
.zukan li + li { margin-top: 12px; }
.zukan a { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; text-decoration: none; background: var(--paper); border: 2.5px solid var(--line); border-radius: 10px; padding: 8px 12px 8px 6px; border-left: 12px solid var(--c); }
.zukan .ch { width: 92px; height: 92px; }
.zukan .nm { font-family: var(--font-head); font-size: 20px; line-height: 1.3; }
.zukan .ln { font-size: 14px; line-height: 1.6; margin-top: 2px; }
.axes p { margin: 0; font-size: 14px; }

/* 質問 */
.quiz-top { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 0 8px; }
.quiz-top__row { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.back { border: 0; background: none; padding: 8px 8px 8px 0; font-weight: 700; font-size: 15px; cursor: pointer; }
.back::before { content: "‹ "; }
.count { font-family: var(--font-head); font-size: 16px; letter-spacing: .04em; }
.progress { height: 8px; border: 2px solid var(--line); border-radius: 5px; background: var(--paper); overflow: hidden; margin-top: 6px; }
.progress__fill { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.vsnote { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin: 4px 0 0; }
.qhead { margin: 18px 0 16px; }
.qscene { font-size: 15px; font-weight: 400; line-height: 1.7; margin: 0 0 6px; color: var(--ink-soft); }
.qask { font-family: var(--font-body); font-weight: 700; font-size: 22px; line-height: 1.5; margin: 0; }
.opts { display: grid; gap: 12px; }
.opt {
  display: block; width: 100%; min-height: 58px; padding: 12px 16px; text-align: left;
  background: var(--paper); border: 2.5px solid var(--line); border-radius: 10px;
  font-size: 16.5px; font-weight: 700; line-height: 1.45; cursor: pointer;
  box-shadow: 0 3px 0 var(--line); -webkit-tap-highlight-color: transparent;
}
.opt:active, .opt.is-picked { background: var(--accent); transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.intro-text { font-size: 17px; font-weight: 700; line-height: 1.9; margin: 22px 0 24px; }
.intro-text p { margin: 0 0 12px; }

/* 組み合わせ */
.duo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; margin-top: 8px; }
.duo .ch { width: 100%; height: auto; aspect-ratio: 1; max-width: 170px; margin: 0 auto; }
.duo__x { font-family: var(--font-head); font-size: 30px; }
.duo__who { text-align: center; font-size: 13px; font-weight: 700; min-height: 1.6em; }
.duo__who span { display: inline-block; border: 2px solid var(--line); border-radius: 999px; padding: 0 10px; background: var(--paper); }
.pairnames { font-family: var(--font-head); font-size: 22px; text-align: center; line-height: 1.4; margin: 8px 0 2px; }
.pairtitle { font-family: var(--font-head); font-size: 28px; text-align: center; line-height: 1.35; margin: 4px 0 0; }

/* 重ね画面（画像を開く） */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(30,42,68,.82); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 12px; }
.sheet[hidden] { display: none; }
.sheet img { max-width: min(78vw, 360px); max-height: 68vh; width: auto; height: auto; border-radius: 8px; border: 2px solid var(--paper); -webkit-touch-callout: default; }
.sheet p { color: var(--paper); font-weight: 700; margin: 0; text-align: center; }
.sheet .btn { max-width: 240px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.is-on { opacity: 1; }

.pending main { visibility: hidden; }

@media (min-width: 720px) {
  .hero h1 { font-size: 46px; }
  .typename { font-size: 46px; }
}

/* キャラクターの動き（止めずに繰り返す） */
.ch-drop, .ch-lean, .ch-peel, .ch-fallshadow, .ch-stretch, .ch-float, .ch-floatshadow, .ch-spark, .ch-flag, .ch-settle, .ch-strip, .ch-curl { transform-box: fill-box; }
.ch-drop { transform-origin: 50% 0%; animation: k-drop 2.6s ease-in infinite; }
.ch-lean { transform-origin: 50% 100%; animation: k-lean 2.6s ease-in-out infinite; }
.ch-peel { transform-origin: 0% 50%; animation: k-peel 3.2s ease-in-out infinite; }
.ch-fallshadow { transform-origin: 50% 50%; animation: k-fallshadow 3.2s ease-in-out infinite; }
.ch-stretch { transform-origin: 50% 50%; animation: k-stretch 1.6s ease-in-out infinite; }
.ch-float { animation: k-float 2.4s ease-in-out infinite; }
.ch-floatshadow { transform-origin: 50% 50%; animation: k-floatshadow 2.4s ease-in-out infinite; }
.ch-spark { animation: k-spark 1.2s steps(2, jump-none) infinite; }
.ch-flag { transform-origin: 0% 100%; animation: k-flag 1.8s ease-in-out infinite; }
.ch-settle { transform-origin: 50% 100%; animation: k-settle 2.8s ease-in-out infinite; }
.ch-strip { transform-origin: 0% 50%; animation: k-strip 2.4s ease-in-out infinite; }
.ch-curl { transform-origin: 50% 50%; animation: k-curl 2.2s ease-in-out infinite; }

@keyframes k-drop { 0%, 30% { transform: scale(.4); opacity: 1; } 70% { transform: scale(1); opacity: 1; } 90% { transform: translateY(18px) scale(1); opacity: 0; } 100% { transform: scale(.4); opacity: 0; } }
@keyframes k-lean { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(3deg); } }
@keyframes k-peel { 0%, 55%, 100% { transform: rotate(0deg) translateY(0); } 70% { transform: rotate(5deg) translateY(4px); } 80% { transform: rotate(-1deg) translateY(0); } }
@keyframes k-fallshadow { 0%, 55%, 100% { transform: scale(1); } 70% { transform: scale(1.25); } }
@keyframes k-stretch { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.09, .88); } }
@keyframes k-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes k-floatshadow { 0%, 100% { transform: scale(1); } 50% { transform: scale(.8); } }
@keyframes k-spark { 0% { opacity: 1; } 100% { opacity: .25; } }
@keyframes k-flag { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(9deg); } }
@keyframes k-settle { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, .965); } }
@keyframes k-strip { 0%, 100% { transform: scaleX(.82); } 50% { transform: scaleX(1); } }
@keyframes k-curl { 0%, 100% { transform: scale(.55); } 50% { transform: scale(1.08); } }

.ch--still *, .ch--still { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .ch, .ch * { animation: none !important; }
  .progress__fill { transition: none; }
}
