/* ============================================================
   よその家の決め方（/kimekata/）
   モチーフ：丸（＝ひとつの選択肢）が集まって、ひとつに決まる。サイト共通の丸とものさし。
   動きは上乗せ。html.km-js（「動きを減らす」設定でないとき）かつ .km-live の中でだけ、
   最初に隠して、画面に入ったら（.is-in）出す。JavaScript がなくても、すべて読める。
   文字の大きさは cqi（入れ物の幅）で決める。書く画面のプレビューでも同じ見た目になるように。
   ============================================================ */
@view-transition { navigation: auto; }
@property --g { syntax: '<number>'; inherits: true; initial-value: 1; }

body.km-body { transition: background-color 1.1s var(--inout); }
.km-page { padding: 0; overflow-x: clip; }
.km-in { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.km-page a:focus-visible, .km-page button:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.km-page .pc { display: none; }
@media (max-width: 640px) { .km-hero { min-height: 500px; padding: 40px 16px 96px; } .km-in { padding: 0 16px; } }
@media (min-width: 760px) { .km-page .pc { display: inline; } }

/* ---------- ひらき（問いと、候補の丸） ---------- */
.km-hero { position: relative; isolation: isolate; display: grid; place-items: center; min-height: clamp(540px, calc(100svh - 120px), 920px); padding: 64px 20px 120px; text-align: center; overflow: clip; }
.km-hero.is-short { min-height: min(78svh, 680px); }
.km-hero-in { position: relative; z-index: 2; max-width: 1080px; }
.km-q { margin: 0 auto; max-width: 13.5em; font-weight: 900; font-size: clamp(40px, 11.6cqi, 124px); line-height: 1.14; letter-spacing: 0; text-wrap: balance; }
.km-hub-hero .km-q { font-size: clamp(44px, 11.5cqi, 156px); }
.km-who { margin: 28px auto 0; font-weight: 700; font-size: clamp(14px, 1.9cqi, 18px); line-height: 1.85; color: var(--mute); }
.km-who span { display: block; font-size: 0.86em; font-weight: 500; }
.km-hint { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; z-index: 2; display: grid; justify-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.32em; color: var(--mute); }
.km-hint i { width: 1.5px; height: 46px; background: linear-gradient(var(--ink), transparent); animation: km-drip 2.4s var(--inout) infinite; }

.km-orbit { --rx: min(44cqi, 540px); --ry: min(31svh, 300px, 40cqi); --oy: 0px; position: absolute; inset: 0; pointer-events: none; }
.km-orbit::before { content: ''; position: absolute; left: 50%; top: 50%; width: calc(var(--rx) * 2); height: calc(var(--ry) * 2); translate: -50% calc(-50% + var(--oy)); border: 1.5px dashed rgba(74, 63, 53, 0.16); border-radius: 50%; }
.km-hub-hero .km-orbit::before { border-style: solid; border-color: rgba(74, 63, 53, 0.08); }
.km-planet {
  --a: calc(var(--k) / var(--n) * 360deg + 205deg);
  --size: clamp(96px, 15cqi, 196px); position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: var(--size); height: var(--size); padding: calc(var(--size) * 0.12); border-radius: 50%; text-align: center;
  background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 34%, #fff) 0, var(--c) 72%); mix-blend-mode: multiply;
  transform: translate(-50%, -50%) translate(calc(cos(var(--a)) * min(42cqi, 540px)), calc(sin(var(--a)) * min(31svh, 300px)));
}
.km-planet b { font-size: clamp(12px, 1.4cqi, 16px); font-weight: 700; line-height: 1.35; color: var(--ink); }
.km-hub-hero .km-planet:nth-child(1) { --size: clamp(64px, 10cqi, 132px); }
.km-hub-hero .km-planet:nth-child(2) { --size: clamp(40px, 6cqi, 84px); }
.km-hub-hero .km-planet:nth-child(3) { --size: clamp(52px, 8cqi, 110px); }
.km-hub-hero .km-planet:nth-child(4) { --size: clamp(34px, 5cqi, 70px); }

.km-split .ph { display: inline-block; }

/* ---------- 章 ---------- */
.km-sec { position: relative; padding: clamp(76px, 13svh, 156px) 0; }
.km-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 clamp(28px, 5svh, 50px); font-weight: 900; font-size: clamp(28px, 5.2cqi, 56px); line-height: 1.2; letter-spacing: 0.01em; }
.km-h-sm { margin: 60px 0 18px; font-size: clamp(20px, 3.1cqi, 28px); }
.km-num { display: inline-grid; place-items: center; height: 30px; padding: 0 12px; border: 1.5px solid currentColor; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--mute); }
.km-lead { margin: calc(-1 * clamp(14px, 3svh, 30px)) 0 26px; font-size: 14px; color: var(--mute); }

/* ---------- わが家のこと（家族の丸） ---------- */
.km-const { --lx: 0; --ly: 0; position: relative; display: grid; justify-items: center; gap: clamp(44px, 8svh, 76px); padding: 8px 0 54px; }
.km-const-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: clamp(40px, 9cqi, 90px); }
.km-const-row:empty { display: none; }
.km-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.km-knot { fill: var(--coral); transform-box: fill-box; transform-origin: center; transition: scale 0.8s var(--spring) 0.5s; }
.km-lines path { fill: none; stroke: var(--ink); stroke-opacity: 0.3; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s var(--inout) calc(0.6s + var(--k, 0) * 0.14s); }
.km-person { --pc: var(--honey); position: relative; z-index: 1; display: grid; justify-items: center; gap: 0; text-align: center; transition: opacity 0.6s var(--out), transform 1s var(--spring); transition-delay: calc(var(--k) * 0.1s); }
.km-person.adult + .km-person.adult { --pc: var(--sky); }
.km-person.kid { --pc: var(--leaf); }
.km-person.kid.is-subject { --pc: var(--coral); }
.km-person i { position: relative; display: block; width: clamp(80px, 13cqi, 118px); aspect-ratio: 1; margin-bottom: 10px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--pc) 36%, #fff), var(--pc) 72%); }
.km-person.kid i { width: clamp(56px, 8.6cqi, 78px); }
.km-person i::before, .km-person i::after { content: ''; position: absolute; top: 43%; width: 8%; height: 11%; border-radius: 50%; background: var(--ink); translate: calc(var(--lx) * 3px) calc(var(--ly) * 2.5px); transition: translate 0.25s var(--out); animation: km-blink 6.5s infinite; animation-delay: calc(var(--k) * -1.7s); }
.km-person i::before { left: 32%; }
.km-person i::after { right: 32%; }
.km-person.is-subject i { animation: km-ring 2.6s ease-out infinite; }
.km-person b { font-size: 14px; line-height: 1.4; }
.km-person small { font-size: 12px; line-height: 1.4; color: var(--mute); }
.km-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 0; }
.km-facts > div { padding: 16px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; transition: opacity 0.6s var(--out), transform 0.8s var(--out); }
.km-facts > div:nth-child(2) { transition-delay: 0.08s; }
.km-facts > div:nth-child(3) { transition-delay: 0.16s; }
.km-facts > div:nth-child(4) { transition-delay: 0.24s; }
.km-facts dt { font-size: 12px; font-weight: 700; color: var(--mute); }
.km-facts dd { margin: 4px 0 0; font-weight: 700; line-height: 1.65; }

/* ---------- 候補 ---------- */
.km-cand-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.km-cand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(14px, 3cqi, 26px); padding: 12px clamp(18px, 3cqi, 32px) 12px 12px; background: var(--paper); border-radius: 999px 34px 34px 999px; box-shadow: 0 1px 0 var(--line), 0 16px 34px -28px rgba(74, 63, 53, 0.5); transition: opacity 0.6s var(--out), transform 0.9s var(--out); transition-delay: calc(var(--k) * 0.12s); }
.km-ball { width: clamp(58px, 9.4cqi, 86px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 34%, #fff), var(--c) 72%); }
.km-cand strong { display: block; font-weight: 900; font-size: clamp(18px, 2.7cqi, 25px); line-height: 1.4; }
.km-cand p { margin: 4px 0 0; font-size: 14px; line-height: 1.75; color: var(--mute); }

/* ---------- 決め手（大事さの丸） ---------- */
.km-bubbles { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: clamp(4px, 1.2cqi, 14px); max-width: 840px; margin: 0 auto clamp(40px, 7svh, 70px); }
.km-bubble { --c: var(--honey); --d: calc(var(--s) * clamp(90px, 21cqi, 214px)); display: grid; place-items: center; width: var(--d); height: var(--d); padding: calc(var(--d) * 0.11); border-radius: 50%; text-align: center; background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 30%, #fff), var(--c) 76%); animation: km-bob calc(4.6s + var(--k) * 0.7s) ease-in-out infinite alternate; animation-delay: calc(var(--k) * -1.3s); transition: scale 1.1s var(--spring) calc(0.15s + var(--k) * 0.13s), transform 0.6s var(--out); }
.km-bubble:nth-child(even) { margin-top: clamp(26px, 6cqi, 64px); }
.km-bubble:nth-child(4n + 2) { --c: var(--coral); }
.km-bubble:nth-child(4n + 3) { --c: var(--sky); }
.km-bubble:nth-child(4n + 4) { --c: var(--leaf); }
.km-bubble b, .km-planet b, .km-mote b { text-wrap: balance; }
.km-bubble b { font-weight: 900; font-size: calc(clamp(12px, 1.9cqi, 18px) * (0.78 + 0.22 * var(--s))); line-height: 1.35; }
.km-factor-list { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.km-factor-list li { display: grid; grid-template-columns: auto 1fr; gap: 2px 18px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.km-weight { grid-row: span 2; padding-top: 5px; font-size: 13px; letter-spacing: 2px; white-space: nowrap; color: var(--coral); }
.km-weight i { font-style: normal; color: var(--line); }
.km-factor-list strong { font-weight: 900; font-size: 19px; line-height: 1.5; }
.km-factor-list p { grid-column: 2; margin: 0; font-size: 14px; line-height: 1.8; color: var(--mute); }

/* ---------- 決めたこと（いちばんの見せ場） ---------- */
.km-chosen { padding: 0; }
.km-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 86svh; padding: 64px 20px; overflow: hidden; text-align: center; color: var(--cream); background: #2b241e; }
.km-stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; background: radial-gradient(circle at 50% 42%, rgba(251, 247, 240, 0.08), transparent 60%), radial-gradient(circle at 12% 88%, rgba(226, 176, 79, 0.1), transparent 40%); }
.km-merge { position: relative; width: 100%; height: clamp(230px, 50svh, 480px); }
.km-chosen-text { position: relative; }
.km-thinking { display: none; }
.km-core { position: absolute; left: 50%; top: 50%; z-index: 2; width: clamp(150px, 30svh, 300px); aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 30%, #fff), var(--c) 72%); }
.km-core::before { content: ''; position: absolute; inset: -16%; border-radius: 50%; background: repeating-conic-gradient(rgba(251, 247, 240, 0.55) 0 0.7deg, transparent 0.7deg 7.5deg); -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 12px), #000 calc(100% - 12px)); mask: radial-gradient(closest-side, transparent calc(100% - 12px), #000 calc(100% - 12px)); animation: km-spin 60s linear infinite; }
.km-core::after { content: ''; position: absolute; inset: -55%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 50%, transparent), transparent); }
.km-mote, .km-other, .km-spark { display: none; }
.km-pre { margin: 0; font-weight: 700; font-size: clamp(15px, 2.1cqi, 20px); opacity: 0.8; }
.km-answer { margin: 6px 0 0; font-weight: 900; font-size: clamp(40px, 9cqi, 116px); line-height: 1.16; color: var(--cream); text-wrap: balance; }
.km-chosen-note { max-width: 34em; margin: 18px auto 0; text-wrap: pretty; font-size: 15px; line-height: 1.95; opacity: 0.86; transition: opacity 0.8s var(--out) 0.7s, transform 1s var(--out) 0.7s; }

/* ---------- 迷ったこと（付せん） ---------- */
.km-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: clamp(18px, 3cqi, 30px); margin: 0; padding: 14px 0 0; list-style: none; }
.km-note-card { --r: -1.6deg; position: relative; padding: 32px 24px 26px; background: var(--paper); border-radius: 6px 26px 26px 26px; box-shadow: 0 1px 0 var(--line), 0 22px 40px -28px rgba(74, 63, 53, 0.55); rotate: var(--r); transition: rotate 0.6s var(--spring), opacity 0.5s var(--out), transform 1.1s var(--spring); transition-delay: 0s, calc(var(--k) * 0.15s), calc(var(--k) * 0.15s); }
.km-note-card:nth-child(2n) { --r: 1.9deg; }
.km-note-card:nth-child(3n) { --r: -0.6deg; }
.km-note-card::before { content: ''; position: absolute; top: -11px; left: 50%; width: 76px; height: 22px; translate: -50% 0; rotate: -4deg; border-radius: 3px; background: color-mix(in srgb, var(--coral) 38%, transparent); }
.km-note-card:hover { rotate: 0deg; }
.km-note-card p { margin: 0; text-wrap: pretty; font-weight: 700; line-height: 1.9; }

/* ---------- 決めるまでの流れ（ものさし） ---------- */
.km-ruler { --rp: 1; position: relative; padding-left: clamp(58px, 9.5cqi, 80px); }
.km-ruler-bar { position: absolute; left: clamp(12px, 3cqi, 24px); top: 6px; bottom: 6px; width: 24px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.km-ruler-bar::before { content: ''; position: absolute; inset: 8px 0; background: repeating-linear-gradient(to bottom, rgba(74, 63, 53, 0.3) 0 1.5px, transparent 1.5px 50px) left top / 62% 100% no-repeat, repeating-linear-gradient(to bottom, rgba(74, 63, 53, 0.18) 0 1px, transparent 1px 10px) left top / 34% 100% no-repeat; }
.km-ruler-bar::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--rp) * 100%); border-radius: 12px; background: linear-gradient(var(--coral-soft), color-mix(in srgb, var(--coral) 50%, transparent)); mix-blend-mode: multiply; }
.km-runner { position: absolute; left: 50%; top: calc(var(--rp) * 100%); z-index: 1; width: 32px; height: 32px; border-radius: 50%; translate: -50% -50%; background: var(--coral); box-shadow: 0 0 0 7px rgba(227, 158, 134, 0.25); }
.km-steps { margin: 0; padding: 0; list-style: none; }
.km-steps li { position: relative; padding: 0 0 clamp(30px, 5.5svh, 52px); transition: opacity 0.5s var(--out), transform 0.7s var(--out); }
.km-steps li::before { content: ''; position: absolute; left: -28px; top: 0.95em; width: 18px; height: 2px; border-radius: 1px; background: var(--coral); }
.km-when { display: inline-block; font-weight: 900; font-size: clamp(18px, 2.7cqi, 25px); line-height: 1.45; }
.km-steps p { margin: 4px 0 0; line-height: 1.9; }

/* ---------- いまの満足度（ものさし） ---------- */
.km-score { transition: --g 1.7s var(--spring) 0.25s; }
.km-gauge { position: relative; margin: 8px 0 28px; padding-top: 70px; }
.km-scale { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); height: 68px; overflow: hidden; border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.km-scale::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: calc((var(--score) - 0.5) / 5 * 100% * var(--g)); background: linear-gradient(90deg, var(--leaf-soft), var(--leaf)); }
.km-scale span { position: relative; display: grid; place-items: end center; padding-bottom: 8px; font-weight: 900; font-size: 15px; background: repeating-linear-gradient(90deg, rgba(74, 63, 53, 0.16) 0 1px, transparent 1px 20%) 10% 0 / 100% 26% no-repeat; }
.km-scale span + span { box-shadow: inset 1.5px 0 0 rgba(74, 63, 53, 0.22); }
.km-scale i { position: absolute; left: 50%; top: 0; width: 1.5px; height: 44%; background: rgba(74, 63, 53, 0.4); }
.km-marker { position: absolute; top: 0; left: calc((var(--score) - 0.5) / 5 * 100% * var(--g)); z-index: 1; display: grid; justify-items: center; translate: -50% 0; }
.km-marker b { padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; color: var(--paper); background: var(--ink); }
.km-marker::after { content: ''; width: 3px; height: 40px; margin-top: 2px; border-radius: 2px; background: var(--ink); }
.km-scale-words { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--mute); }
.km-again { margin: 0; font-size: 17px; }
.km-again strong { font-weight: 900; font-size: 1.15em; background: linear-gradient(transparent 58%, var(--leaf-soft) 58%); }

/* ---------- 次に決める人へ ---------- */
.km-quote { position: relative; margin: 0; padding: 18px 0 0 clamp(0px, 4cqi, 44px); }
.km-quote::before { content: '“'; position: absolute; left: -0.06em; top: -0.36em; font-family: Georgia, serif; font-weight: 900; font-size: clamp(120px, 20cqi, 230px); line-height: 1; color: var(--honey); opacity: 0.45; }
.km-quote p { position: relative; margin: 0; text-wrap: pretty; font-weight: 900; font-size: clamp(22px, 3.9cqi, 40px); line-height: 1.75; }
.km-quote p span { transition: opacity 0.35s var(--out); }
.km-quote cite { display: block; margin-top: 22px; font-style: normal; font-weight: 700; font-size: 14px; color: var(--mute); }
.km-quote cite::before { content: '— '; }

/* ---------- 役に立つページ・共有・あなたの家は？ ---------- */
.km-related { padding-top: 0; }
.km-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.km-links a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 22px; font-weight: 700; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; transition: transform 0.45s var(--spring), background-color 0.2s; }
.km-links a:hover { color: var(--ink); background: var(--sand); transform: translateY(-2px); }
.km-links span, .km-themes-go { display: inline-block; transition: transform 0.35s var(--spring); }
.km-links a:hover span { transform: translateX(5px); }

.km-ask { position: relative; padding: clamp(90px, 16svh, 170px) 20px; overflow: clip; text-align: center; }
.km-ask-dots { display: inline-flex; gap: 9px; margin-bottom: 22px; }
.km-ask-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--honey); animation: km-typing 1.4s ease-in-out infinite; }
.km-ask-dots i:nth-child(2) { background: var(--sky); animation-delay: 0.16s; }
.km-ask-dots i:nth-child(3) { background: var(--coral); animation-delay: 0.32s; }
.km-ask-h { margin: 0 0 24px; font-weight: 900; font-size: clamp(36px, 8.4cqi, 88px); line-height: 1.18; }
.km-ask p { max-width: 34em; text-wrap: pretty; margin: 0 auto 32px; line-height: 1.95; color: var(--mute); }
.km-ask .km-ask-note { margin: 20px auto 0; font-size: 13px; }

.km-tail { padding-bottom: 70px; }
.km-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.km-share a { padding: 10px 22px; font-weight: 700; font-size: 14px; text-decoration: none; border: 1.5px solid var(--ink); border-radius: 999px; transition: background-color 0.2s, color 0.2s; }
.km-share a:hover { color: var(--paper); background: var(--ink); }
.km-back { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 30px 0; font-weight: 700; }
.km-fine { max-width: 42em; margin: 0 auto; font-size: 12px; line-height: 1.8; text-align: center; color: var(--mute); }
.km-banner { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: calc(100% - 32px); margin: 16px auto 0; padding: 8px 18px 8px 8px; font-size: 13px; font-weight: 700; line-height: 1.6; color: var(--paper); background: var(--ink); border-radius: 999px; }
.km-banner span { flex: none; padding: 0 10px; color: var(--ink); background: var(--honey); border-radius: 999px; }

.km-progress { position: fixed; inset: 0 0 auto; z-index: 70; height: 3px; pointer-events: none; }
.km-progress i { display: block; height: 100%; transform: scaleX(var(--sp, 0)); transform-origin: 0 50%; background: linear-gradient(90deg, var(--honey), var(--coral)); }
.km-body .site-header { transition: transform 0.5s var(--out), background-color 0.6s; }
.km-immersive .site-header { transform: translateY(-110%); }
.km-body .wagaya-nudge { display: none; }

/* ---------- 一覧（集まった数・しぼりこみ・決めごと） ---------- */
.km-meter { position: relative; margin: 0 0 34px; padding: clamp(20px, 4cqi, 34px); background: var(--paper); border: 1px solid var(--line); border-radius: 30px; transition: --g 1.9s var(--out) 0.2s; }
.km-meter-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; font-weight: 700; }
.km-meter-top strong { font-size: 18px; }
.km-meter-top b { margin-right: 4px; font-weight: 900; font-size: clamp(52px, 8.6cqi, 84px); line-height: 1; font-variant-numeric: tabular-nums; }
.km-meter-bar { position: relative; height: 22px; margin: 18px 0 30px; border-radius: 999px; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1.5px), rgba(74, 63, 53, 0.16) calc(10% - 1.5px) 10%), var(--sand); }
.km-meter-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: max(22px, calc(var(--count) / var(--goal) * 100% * var(--g))); border-radius: 999px; background: linear-gradient(90deg, var(--honey), var(--coral)); }
.km-meter-goal { position: absolute; right: 0; top: calc(100% + 6px); font-size: 12px; font-weight: 700; color: var(--mute); }
.km-meter p { margin: 0; font-size: 13px; color: var(--mute); }
.km-founding { margin: 0 0 10px; padding: clamp(22px, 4cqi, 34px); text-align: center; background: var(--honey-soft); border-radius: 30px; }
.km-slots { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(6px, 1.6cqi, 12px); margin: 0 0 18px; }
.km-slots i { width: clamp(22px, 5cqi, 40px); aspect-ratio: 1; border: 2px dashed rgba(74, 63, 53, 0.3); border-radius: 50%; transition: scale 0.8s var(--spring), opacity 0.4s; transition-delay: calc(var(--k) * 0.06s); }
.km-slots i.is-on { border: 0; background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 34%, #fff), var(--c) 72%); }
.km-slots i:not(.is-on):first-of-type, .km-slots i.is-on + i:not(.is-on) { border-color: var(--coral); animation: km-wait 1.8s ease-in-out infinite; }
@keyframes km-wait { 50% { scale: 1.15; } }
.km-founding p { max-width: 30em; margin: 0 auto 20px; line-height: 1.9; text-wrap: pretty; }
.km-founding strong { display: block; font-weight: 900; font-size: clamp(18px, 2.6cqi, 22px); }
.km-js .km-live .km-founding:not(.is-in) .km-slots i { scale: 0; opacity: 0; }
.km-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.km-filter button { padding: 8px 16px; font: inherit; font-weight: 700; font-size: 14px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.km-filter button.is-on { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.km-empty { margin: 0 0 8px; text-align: center; color: var(--mute); }
.km-themes { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.km-themes a { position: relative; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 18px 6px; overflow: hidden; font-weight: 900; font-size: clamp(17px, 2.6cqi, 24px); line-height: 1.45; text-decoration: none; border-bottom: 1px solid var(--line); isolation: isolate; }
.km-themes a::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--honey-soft); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.55s var(--out); }
.km-themes a:hover { color: var(--ink); }
.km-themes a:hover::before { transform: scaleX(1); }
.km-themes a:hover .km-themes-go { transform: translateX(6px); }
.km-themes-n { font-size: 13px; font-weight: 700; color: var(--mute); }
.km-first { margin: 0 0 10px; padding: 40px 22px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 34px; }
.km-first-n { margin: 0; font-weight: 900; font-size: clamp(84px, 17cqi, 170px); line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--ink); }
.km-first-n small { font-size: 0.2em; color: var(--ink); -webkit-text-stroke: 0; }
.km-first p { margin: 10px auto 24px; line-height: 1.95; }

/* ============================================================
   動き：.km-js .km-live の中でだけ、最初は隠す
   ============================================================ */
.km-js .km-live .km-split .ch { display: inline-block; transition: transform 1s var(--spring), opacity 0.5s var(--out); transition-delay: calc(var(--i) * 42ms + var(--d, 0.1s)); }
.km-js .km-live [data-km]:not(.is-in) .km-split .ch { opacity: 0; transform: translateY(0.55em) rotate(10deg) scale(0.55); }
.km-js .km-live :is(.km-kicker, .km-who, .km-h, .km-lead, .km-ask-h, .km-ask > p, .km-ask .km-btn, .km-pre, .km-first > p) { transition: opacity 0.8s var(--out), transform 1s var(--out); }
.km-js .km-live .km-ask > p { transition-delay: 0.15s; }
.km-js .km-live .km-ask .km-btn { transition: opacity 0.8s var(--out) 0.3s, transform 1s var(--spring) 0.3s, box-shadow 0.3s; }
.km-js .km-live .km-who { transition-delay: 0.7s; }
.km-js .km-live [data-km]:not(.is-in) :is(.km-kicker, .km-who, .km-h, .km-lead, .km-ask-h, .km-ask > p, .km-ask .km-btn, .km-pre, .km-first > p) { opacity: 0; transform: translateY(26px); }
.km-js .km-live .km-hero-in { transform: translateY(calc(var(--hp, 0) * -70px)); opacity: calc(1 - var(--hp, 0) * 1.4); }
.km-js .km-live .km-planet { animation: km-pop 1.2s var(--spring) both; animation-delay: calc(0.3s + var(--k) * 0.12s); }
.km-js .km-live [data-km]:not(.is-in) .km-person { opacity: 0; transform: translateY(40px) scale(0.6); }
.km-js .km-live [data-km]:not(.is-in) .km-lines path { stroke-dashoffset: 1; }
.km-js .km-live [data-km]:not(.is-in) .km-knot { scale: 0; }
.km-js .km-live [data-km]:not(.is-in) .km-facts > div { opacity: 0; transform: translateY(20px); }
.km-js .km-live [data-km]:not(.is-in) .km-cand { opacity: 0; transform: translateX(70px); }
.km-js .km-live [data-km]:not(.is-in) .km-ball { opacity: 0; }
.km-js .km-live .is-in .km-ball { animation: km-drop 1.2s both; animation-delay: calc(0.2s + var(--k) * 0.12s); }
.km-js .km-live [data-km]:not(.is-in) .km-bubble { scale: 0; }
.km-js .km-live [data-km]:not(.is-in) .km-factor-list li { opacity: 0; transform: translateY(16px); }
.km-js .km-live .km-factor-list li { transition: opacity 0.6s var(--out), transform 0.8s var(--out); }
.km-js .km-live .km-factor-list li:nth-child(2) { transition-delay: 0.08s; }
.km-js .km-live .km-factor-list li:nth-child(3) { transition-delay: 0.16s; }
.km-js .km-live .km-factor-list li:nth-child(n + 4) { transition-delay: 0.24s; }
.km-js .km-live [data-km]:not(.is-in) .km-note-card { opacity: 0; transform: translateY(-90px) rotate(-14deg); }
.km-js .km-live .km-steps li:not(.is-on) { opacity: 0.25; transform: translateX(12px); }
.km-js .km-live .km-score:not(.is-in) { --g: 0; }
.km-js .km-live .km-advice .km-quote p span { transition-delay: calc(min(var(--i) * 26ms, 3.2s) + 0.2s); }
.km-js .km-live .km-advice:not(.is-in) .km-quote p span { opacity: 0.1; }
.km-js .km-live .km-meter:not(.is-in) { --g: 0; }

/* 決めたこと：スクロールに合わせて、決め手の丸が真ん中に集まる（--m は 0〜1。kimekata.js が入れる） */
.km-js .km-live .km-chosen { height: 280svh; }
.km-js .km-live .km-stage { position: sticky; top: 0; height: 100svh; min-height: 0; border-radius: calc((1 - var(--ent, 1)) * 72px); transform: scale(calc(0.9 + 0.1 * var(--ent, 1))); transform-origin: 50% 0; }
.km-js .km-live .km-mote { position: absolute; left: 50%; top: 50%; z-index: 3; --w: calc(var(--s) * clamp(76px, 12cqi, 124px)); display: grid; place-items: center; width: var(--w); height: var(--w); padding: calc(var(--w) * 0.08); border-radius: 50%; text-align: center; color: var(--ink); background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 30%, #fff), var(--c) 72%); translate: -50% -50%; transform: translate(calc(var(--x0, 0px) * (1 - var(--m, 0))), calc(var(--y0, 0px) * (1 - var(--m, 0)))) scale(calc(1 - 0.75 * var(--m, 0))); opacity: calc(1.2 - var(--m, 0) * 1.2); animation: km-float calc(3.6s + var(--k) * 0.6s) ease-in-out infinite alternate; }
.km-js .km-live .km-mote b { font-size: clamp(11px, 1.45cqi, 14px); font-weight: 700; line-height: 1.3; }
.km-js .km-live .km-other { position: absolute; left: 50%; top: 50%; display: block; padding: 8px 16px; font-size: 14px; white-space: nowrap; color: rgba(251, 247, 240, 0.75); border: 1.5px dashed rgba(251, 247, 240, 0.4); border-radius: 999px; translate: -50% -50%; transform: translate(calc(var(--x0, 0px) * (1 + 0.6 * var(--m, 0))), var(--y0, 0px)); opacity: calc(1 - var(--m, 0) * 1.7); }
.km-js .km-live .km-core { scale: calc(0.2 + 0.8 * var(--m, 0)); }
.km-js .km-live .km-core::after, .km-js .km-live .km-core::before { opacity: var(--m, 0); }
.km-js .km-live .km-chosen.is-done .km-core { animation: km-boom 1s var(--out); }
.km-js .km-live .km-spark { position: absolute; left: 50%; top: 50%; z-index: 1; display: block; width: 11px; height: 11px; margin: -5.5px; border-radius: 50%; background: var(--honey); opacity: 0; }
.km-js .km-live .km-spark:nth-child(4n + 1) { background: var(--coral); }
.km-js .km-live .km-spark:nth-child(4n + 2) { background: var(--sky); }
.km-js .km-live .km-spark:nth-child(4n + 3) { background: var(--leaf); width: 7px; height: 7px; }
.km-js .km-live .km-chosen.is-done .km-spark { animation: km-spark 1.5s var(--out) both; animation-delay: calc(var(--k) * 14ms); }
.km-js .km-live .km-merge::after { content: ''; position: absolute; left: 50%; top: 50%; width: clamp(150px, 30svh, 300px); aspect-ratio: 1; border: 2px solid rgba(251, 247, 240, 0.55); border-radius: 50%; translate: -50% -50%; opacity: 0; pointer-events: none; }
.km-js .km-live .km-chosen.is-done .km-merge::after { animation: km-ripple 1.5s var(--out) both; }
.km-js .km-live .km-chosen .km-answer .ch { transition-delay: calc(var(--i) * 55ms + 0.18s); }
.km-js .km-live .km-chosen:not(.is-done) .km-split .ch { opacity: 0; transform: translateY(0.6em) scale(0.5); }
.km-js .km-live .km-chosen:not(.is-done) .km-chosen-note { opacity: 0; transform: translateY(18px); }
.km-js .km-live .km-thinking { position: absolute; left: 50%; top: 3.4em; display: flex; gap: 12px; translate: -50% 0; transition: opacity 0.3s, scale 0.4s var(--out); }
.km-js .km-live .km-thinking i { width: 16px; height: 16px; border-radius: 50%; background: rgba(251, 247, 240, 0.7); animation: km-typing 1.3s ease-in-out infinite; }
.km-js .km-live .km-thinking i:nth-child(2) { animation-delay: 0.15s; }
.km-js .km-live .km-thinking i:nth-child(3) { animation-delay: 0.3s; }
.km-js .km-live .km-chosen.is-done .km-thinking { opacity: 0; scale: 0.4; }

@keyframes km-spin { to { rotate: 360deg; } }
@keyframes km-pop { from { scale: 0; opacity: 0; } }
@keyframes km-drip { 0% { transform: scaleY(0); transform-origin: 50% 0; } 50% { transform: scaleY(1); transform-origin: 50% 0; } 51% { transform-origin: 50% 100%; } 100% { transform: scaleY(0); transform-origin: 50% 100%; } }
@keyframes km-blink { 0%, 93%, 100% { scale: 1 1; } 96% { scale: 1 0.1; } }
@keyframes km-ring { 0% { box-shadow: 0 0 0 0 rgba(227, 158, 134, 0.55); } 100% { box-shadow: 0 0 0 24px rgba(227, 158, 134, 0); } }
@keyframes km-drop {
  0% { opacity: 0; transform: translateY(-150px) scale(0.5); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  45% { opacity: 1; transform: translateY(0) scale(1.18, 0.8); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
  66% { transform: translateY(-24px) scale(0.94, 1.06); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  82% { transform: translateY(0) scale(1.06, 0.94); }
  100% { opacity: 1; transform: none; }
}
@keyframes km-bob { to { translate: 0 -12px; } }
@keyframes km-float { to { translate: -50% calc(-50% - 14px); } }
@keyframes km-boom { 0% { transform: scale(1); } 22% { transform: scale(1.24, 0.82); } 48% { transform: scale(0.9, 1.1); } 72% { transform: scale(1.05, 0.96); } 100% { transform: scale(1); } }
@keyframes km-spark {
  0% { opacity: 1; transform: rotate(calc(var(--k) * 25.7deg)) translateX(40px) scale(1.5); }
  100% { opacity: 0; transform: rotate(calc(var(--k) * 25.7deg + 24deg)) translateX(calc(clamp(150px, 36svh, 360px) * (0.7 + 0.3 * mod(var(--k), 3)))) scale(0.2); }
}
@keyframes km-ripple { from { opacity: 0.9; scale: 1; } to { opacity: 0; scale: 2.6; } }
@keyframes km-typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } }

/* ページの移り変わり（対応ブラウザだけ） */
::view-transition-old(root) { animation: km-vt-out 0.32s var(--inout) both; }
::view-transition-new(root) { animation: km-vt-in 0.6s var(--out) both; }
@keyframes km-vt-out { to { opacity: 0; transform: translateY(-20px) scale(0.99); } }
@keyframes km-vt-in { from { opacity: 0; transform: translateY(34px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .km-page *, .km-page *::before, .km-page *::after { animation: none !important; transition: none !important; }
  body.km-body { transition: none; }
}

/* ============================================================
   書く画面（/kimekata/kaku/）
   ============================================================ */
.km-kaku .km-in { max-width: 1200px; }
.km-kaku-head { max-width: 640px; padding: 46px 0 6px; }
.km-kaku-title { margin: 0 0 14px; font-weight: 900; font-size: clamp(34px, 6.4cqi, 66px); line-height: 1.2; }
.km-kaku-head p { margin: 0; color: var(--mute); }
.km-steps-bar { position: sticky; top: 60px; z-index: 5; height: 6px; margin: 24px 0 30px; overflow: hidden; border-radius: 3px; background: var(--sand); }
.km-steps-bar i { display: block; width: calc(var(--step-p, 0) * 100%); height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--honey), var(--coral)); transition: width 0.7s var(--out); }
.km-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
@media (min-width: 1000px) { .km-form { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 56px; } }
.km-step { display: none; }
.km-step.is-now { display: block; animation: km-step-in 0.6s var(--out); }
.km-step.is-back { animation-name: km-step-back; }
.km-step-n { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: var(--mute); }
.km-step h2 { margin: 6px 0 8px; font-weight: 900; font-size: clamp(26px, 4.2cqi, 40px); line-height: 1.3; }
.km-help { margin: 0 0 24px; font-size: 14px; line-height: 1.85; color: var(--mute); }
.km-field { margin: 0 0 24px; padding: 0; border: 0; }
.km-field > label, .km-field > legend { display: block; margin-bottom: 8px; padding: 0; font-weight: 700; font-size: 15px; }
.km-field small { font-weight: 500; color: var(--mute); }
.km-form input[type="text"], .km-form input[type="email"], .km-form select, .km-form textarea { width: 100%; padding: 13px 16px; font: inherit; font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 16px; transition: border-color 0.2s, box-shadow 0.2s; }
.km-form textarea { min-height: 96px; resize: vertical; }
.km-form :is(input, select, textarea):focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--honey-soft); }
.km-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.km-choice { position: relative; }
.km-choice input { position: absolute; opacity: 0; pointer-events: none; }
.km-choice span { display: inline-block; padding: 10px 18px; font-weight: 700; line-height: 1.5; background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.4s var(--spring); }
.km-choice span:hover { border-color: var(--ink); }
.km-choice input:checked + span { color: var(--paper); background: var(--ink); border-color: var(--ink); transform: scale(1.04); }
.km-choice input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.km-choices.is-big span { padding: 14px 22px; font-size: 17px; }
.km-rows { display: grid; gap: 10px; margin-bottom: 12px; }
.km-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; gap: 8px; align-items: start; padding: 12px; background: var(--sand); border-radius: 20px; animation: km-row-in 0.5s var(--spring); }
.km-row.is-1 { grid-template-columns: minmax(0, 1fr) 40px; }
.km-row .is-full { grid-column: 1 / -2; }
.km-row label.km-check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.km-x { width: 40px; height: 40px; padding: 0; font-size: 18px; color: var(--mute); background: var(--paper); border: 0; border-radius: 50%; cursor: pointer; }
.km-x:hover { color: var(--paper); background: var(--coral); }
.km-add { padding: 10px 18px; font: inherit; font-weight: 700; color: var(--ink); background: transparent; border: 1.5px dashed var(--mute); border-radius: 999px; cursor: pointer; }
.km-add:hover { background: var(--paper); border-style: solid; }
.km-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.km-suggest button { padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--honey-soft); border: 0; border-radius: 999px; cursor: pointer; transition: transform 0.3s var(--spring); }
.km-suggest button:hover { transform: translateY(-2px); }
.km-suggest button[disabled] { opacity: 0.35; cursor: default; transform: none; }
.km-dots { display: inline-flex; align-items: center; gap: 5px; }
.km-dots button { width: 26px; height: 26px; padding: 0; background: var(--paper); border: 1.5px solid var(--coral); border-radius: 50%; cursor: pointer; transition: background-color 0.2s, transform 0.35s var(--spring); }
.km-dots button.is-on { background: var(--coral); }
.km-dots button:hover { transform: scale(1.15); }
.km-dots small { margin-left: 6px; }
.km-scorepick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.km-scorepick label { position: relative; }
.km-scorepick input { position: absolute; opacity: 0; }
.km-scorepick span { display: grid; place-items: center; gap: 4px; padding: 12px 4px; font-size: 12px; font-weight: 700; line-height: 1.4; text-align: center; background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; cursor: pointer; transition: transform 0.4s var(--spring), background-color 0.2s, border-color 0.2s; }
.km-scorepick span b { font-weight: 900; font-size: 22px; }
.km-scorepick input:checked + span { background: var(--leaf-soft); border-color: var(--leaf); transform: translateY(-4px); }
.km-scorepick input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.km-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 34px; }
.km-ghost { padding: 14px 22px; font: inherit; font-weight: 700; color: var(--ink); background: transparent; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; }
.km-ghost:hover { border-color: var(--ink); }
.km-form .km-btn { font: inherit; font-weight: 700; border: 0; cursor: pointer; }
.km-label { display: block; margin: 0 0 8px; padding: 0; font-weight: 700; font-size: 15px; }
.km-check { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.km-check input { width: 20px; height: 20px; accent-color: var(--ink); }
.km-link-btn { padding: 0; font: inherit; color: var(--mute); text-decoration: underline; background: none; border: 0; cursor: pointer; }
.km-warn { margin: 0 0 18px; padding: 14px 18px; font-size: 14px; line-height: 1.8; background: var(--coral-soft); border-radius: 18px; }
.km-warn ul { margin: 6px 0 0; padding-left: 1.2em; }
.km-ok { margin: 0 0 18px; padding: 14px 18px; font-size: 14px; background: var(--leaf-soft); border-radius: 18px; }
.km-send { display: grid; gap: 10px; }
.km-send .km-btn { justify-content: center; }
.km-send-note { font-size: 13px; line-height: 1.8; color: var(--mute); }
.km-pv { display: none; }
@media (min-width: 1000px) {
  .km-pv { position: sticky; top: 84px; display: block; height: calc(100svh - 110px); }
}
.km-pv-label { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--mute); }
.km-pv-label button { padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; color: var(--paper); background: var(--ink); border: 0; border-radius: 999px; cursor: pointer; }
.km-pv-frame { height: calc(100% - 36px); overflow: auto; overscroll-behavior: contain; background: var(--cream); border: 10px solid var(--ink); border-radius: 36px; box-shadow: 0 34px 60px -34px rgba(74, 63, 53, 0.6); container-type: inline-size; }
.km-pv-frame .km-hero { min-height: 0; padding: 56px 18px 70px; }
.km-pv-frame .km-sec { padding: 56px 0; }
.km-pv-frame .km-hint { display: none; }
.km-pv-open { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; font: inherit; font-weight: 700; color: var(--paper); background: var(--ink); border: 0; border-radius: 999px; box-shadow: 4px 4px 0 var(--coral); cursor: pointer; }
@media (min-width: 1000px) { .km-pv-open { display: none; } }
.km-overlay { position: fixed; inset: 0; z-index: 80; overflow: auto; overscroll-behavior: contain; background: var(--cream); container-type: inline-size; transition: background-color 1s var(--inout); animation: km-step-in 0.5s var(--out); }
.km-overlay-close { position: fixed; top: 14px; right: 14px; z-index: 81; padding: 10px 18px; font: inherit; font-weight: 700; color: var(--paper); background: var(--ink); border: 0; border-radius: 999px; cursor: pointer; }
.km-toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; max-width: calc(100% - 32px); padding: 12px 22px; font-size: 14px; font-weight: 700; color: var(--paper); background: var(--ink); border-radius: 999px; translate: -50% 0; animation: km-toast 4.2s var(--out) both; }
@keyframes km-step-in { from { opacity: 0; transform: translateY(26px); } }
@keyframes km-step-back { from { opacity: 0; transform: translateY(-26px); } }
@keyframes km-row-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
@keyframes km-toast { 0% { opacity: 0; translate: -50% 20px; } 8%, 88% { opacity: 1; translate: -50% 0; } 100% { opacity: 0; translate: -50% 10px; } }
@media (max-width: 560px) {
  .km-row { grid-template-columns: minmax(0, 1fr) 40px; }
  .km-row > :nth-child(2):not(.km-x) { grid-column: 1 / 2; grid-row: 2; }
  .km-scorepick span { font-size: 10px; padding: 10px 2px; }
}

/* ============================================================
   よその家のひとこと（/hitokoto/）：お題に答える・みんなの答えの丸・ひとこと
   ============================================================ */
.hk-in { max-width: 940px; }
.hk-hero .km-q { max-width: 15em; font-size: clamp(32px, 7.6cqi, 96px); }
.hk-hero .km-who b { font-weight: 900; font-size: 1.25em; color: var(--ink); }
.hk-notice { margin: 0 0 24px; padding: 14px 18px; font-size: 14px; line-height: 1.85; background: var(--sky-soft); border-radius: 18px; }
.hk-form { position: relative; margin: 0 0 clamp(52px, 9svh, 90px); padding: clamp(22px, 4cqi, 38px); background: var(--paper); border: 1px solid var(--line); border-radius: 34px; box-shadow: 0 34px 60px -44px rgba(74, 63, 53, 0.5); }
.hk-form .hk-legend { margin: 0 0 14px; padding: 0; font-weight: 900; font-size: clamp(22px, 3.6cqi, 32px); }
.hk-form .km-field { margin-bottom: 20px; }
.km-choice.is-sm span { padding: 6px 14px; font-size: 14px; }
.hk-form input[type="text"], .hk-form textarea { width: 100%; padding: 12px 16px; font: inherit; font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--cream); border: 1.5px solid var(--line); border-radius: 16px; transition: border-color 0.2s, box-shadow 0.2s; }
.hk-form textarea { resize: vertical; }
.hk-form :is(input, textarea):focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--honey-soft); }
.hk-other { margin-top: 12px; }
.hk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.hk-withcity { margin: 0 0 14px; font-size: 14px; }
.hk-withcity small { font-weight: 500; color: var(--mute); }
.hk-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.hk-send .km-btn { font: inherit; font-weight: 700; border: 0; cursor: pointer; }
.hk-send .km-btn:disabled { opacity: 0.55; cursor: default; }
.hk-send p { flex: 1 1 260px; margin: 0; font-size: 12px; line-height: 1.8; color: var(--mute); }
.hk-msg { min-height: 1.4em; margin: 12px 0 0; font-size: 14px; font-weight: 700; }
.hk-msg.is-err { color: #b8623f; }
.hk-msg.is-wait { color: var(--mute); }
.hk-form.is-done { padding: 22px 28px; animation: km-step-in 0.6s var(--out); }
.hk-done { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 18px; }
.hk-done strong { font-weight: 900; }
.hk-done-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--leaf); animation: km-ring 2.6s ease-out infinite; }
.hk-done-note { margin: 8px 0 0; font-size: 14px; color: var(--mute); }

.hk-result { margin: 0 0 clamp(48px, 8svh, 80px); }
.hk-ages { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.hk-ages button { padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.hk-ages button.is-on { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.hk-field { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; min-height: 200px; }
.hk-field.is-packed { display: block; height: clamp(340px, 54cqi, 500px); }
.hk-bub { --d: calc(var(--r) * 180px); position: relative; width: var(--d); height: var(--d); padding: 0; font: inherit; color: var(--ink); border: 0; border-radius: 50%; background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 30%, #fff), var(--c) 74%); cursor: pointer; transition: transform 1.1s var(--spring), width 0.9s var(--out), height 0.9s var(--out), opacity 0.3s, scale 0.9s var(--spring) calc(var(--k) * 0.08s); }
.hk-field.is-packed .hk-bub { position: absolute; left: 0; top: 0; }
.hk-bub-in { display: grid; place-items: center; align-content: center; gap: 2px; width: 100%; height: 100%; padding: 13%; text-align: center; animation: km-bob calc(4s + var(--k) * 0.6s) ease-in-out infinite alternate; animation-delay: calc(var(--k) * -0.9s); }
.hk-bub b { font-weight: 900; font-size: clamp(11px, calc(var(--d) * 0.095), 18px); line-height: 1.3; text-wrap: balance; }
.hk-bub-in > span { font-size: clamp(10px, calc(var(--d) * 0.075), 14px); font-weight: 700; }
.hk-bub em { font-style: normal; font-weight: 900; font-size: 1.3em; }
.hk-bub.is-zero { background: transparent; border: 2px dashed color-mix(in srgb, var(--c) 75%, transparent); }
.hk-bub.is-dim { opacity: 0.3; }
.hk-bub[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--ink); }
.hk-bub.is-mine::after { content: "あなた"; position: absolute; top: 2%; right: 2%; padding: 1px 8px; font-size: 11px; font-weight: 700; color: var(--paper); background: var(--ink); border-radius: 999px; }
.hk-bub.is-bump { animation: hk-bump 0.9s var(--out); }
@keyframes hk-bump { 25% { scale: 1.18 0.86; } 50% { scale: 0.93 1.07; } 75% { scale: 1.04 0.97; } }
.hk-field.is-empty::after { content: "この中の答えは、まだありません"; position: absolute; left: 50%; bottom: 0; font-size: 13px; color: var(--mute); translate: -50% 0; }
.hk-bars { display: grid; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.hk-bars li { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px; }
.hk-bar-label { font-weight: 700; line-height: 1.5; }
.hk-bar { height: 10px; overflow: hidden; background: var(--sand); border-radius: 999px; }
.hk-bar i { display: block; width: calc(var(--p) * 100%); height: 100%; background: var(--c); border-radius: 999px; transition: width 0.9s var(--out); }
.hk-bar-n { font-size: 13px; white-space: nowrap; color: var(--mute); }
.hk-bar-n em, .hk-bar-n i { font-style: normal; }
.hk-fine { margin-top: 14px; text-align: left; }
@media (max-width: 560px) { .hk-bars li { grid-template-columns: minmax(0, 1fr) auto; } .hk-bar { grid-column: 1 / -1; grid-row: 2; } }

.hk-voices-sec { margin: 0 0 30px; }
.hk-voices { margin: 0; padding: 0; list-style: none; columns: 2 280px; column-gap: 14px; }
.hk-voice { margin: 0 0 14px; padding: 16px 18px; break-inside: avoid; background: var(--paper); border-radius: 6px 22px 22px 22px; box-shadow: 0 1px 0 var(--line), 0 16px 30px -26px rgba(74, 63, 53, 0.5); }
.hk-voice p { margin: 0 0 6px; font-weight: 700; line-height: 1.85; text-wrap: pretty; }
.hk-voice span { font-size: 12px; color: var(--mute); }
.hk-voice.is-empty { background: transparent; border: 1.5px dashed var(--line); box-shadow: none; }
.hk-voice.is-empty p { margin: 0; font-weight: 500; color: var(--mute); }

.hk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 0 0 18px; }
.hk-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 172px; padding: 18px 18px 16px; overflow: hidden; color: var(--ink); text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 26px; transition: transform 0.5s var(--spring), box-shadow 0.4s; }
.hk-card:hover { color: var(--ink); transform: translateY(-5px) rotate(0.4deg); box-shadow: 0 22px 40px -26px rgba(74, 63, 53, 0.45); }
.hk-card:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.hk-card-art { display: flex; align-items: center; gap: 4px; height: 44px; margin-bottom: 4px; }
.hk-card-art i { width: calc(var(--r) * 38px); height: calc(var(--r) * 38px); border-radius: 50%; background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 34%, #fff), var(--c) 72%); transition: transform 0.6s var(--spring); }
.hk-card-art i:nth-child(2) { transition-delay: 0.04s; }
.hk-card-art i:nth-child(3) { transition-delay: 0.08s; }
.hk-card-art i:nth-child(4) { transition-delay: 0.12s; }
.hk-card:hover .hk-card-art i { transform: translateY(-5px); }
.hk-card-cat { font-size: 11px; font-weight: 700; color: var(--mute); }
.hk-card strong { font-weight: 900; font-size: 18px; line-height: 1.45; text-wrap: pretty; }
.hk-card-top { margin-top: auto; padding-top: 8px; font-size: 12px; line-height: 1.6; color: var(--mute); }
.hk-lead { margin: -8px 0 16px; }

.hk-today { position: relative; margin: 0 0 44px; padding: clamp(26px, 5cqi, 46px); overflow: hidden; color: var(--cream); background: #2b241e; border-radius: 36px; isolation: isolate; }
.hk-today::before, .hk-today::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; animation: km-bob 6s ease-in-out infinite alternate; }
.hk-today::before { right: -40px; top: -50px; width: 200px; height: 200px; background: var(--honey); opacity: 0.9; }
.hk-today::after { right: 120px; bottom: -40px; width: 90px; height: 90px; background: var(--sky); opacity: 0.8; animation-delay: -2s; }
.hk-today .km-kicker { color: rgba(251, 247, 240, 0.7); }
.hk-today h2 { max-width: 15em; margin: 0 0 12px; font-weight: 900; font-size: clamp(26px, 5cqi, 48px); line-height: 1.3; }
.hk-today h2 a { color: inherit; text-decoration: none; }
.hk-today-top { margin: 0 0 22px; font-size: 14px; color: rgba(251, 247, 240, 0.75); }
.hk-today .km-btn { color: var(--ink); background: var(--honey); }
.hk-today .km-btn span { background: var(--paper); }
.hk-jikkuri { margin: 40px 0 70px; padding: 26px; background: var(--coral-soft); border-radius: 30px; }
.hk-jikkuri p { margin: 0 0 16px; line-height: 1.9; }
.hk-jikkuri strong { display: block; font-weight: 900; font-size: 18px; }
.hk-fly { position: fixed; z-index: 95; width: 24px; height: 24px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7); pointer-events: none; }
.km-js .km-live [data-km]:not(.is-in) .hk-bub { scale: 0; }
.hk-bub b, .km-planet b, .km-mote b, .km-bubble b, .hk-card strong, .yoso-item strong { word-break: auto-phrase; }
.hk-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 14px; }
.hk-share span { color: var(--mute); }
.hk-share a { padding: 8px 18px; font-weight: 700; text-decoration: none; border: 1.5px solid var(--ink); border-radius: 999px; }
.hk-share a:hover { color: var(--paper); background: var(--ink); }

/* 国の調査の枠（お題のページ） */
.hk-survey { margin: 0 0 22px; padding: 16px 20px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px; }
.hk-survey p { margin: 0; line-height: 1.8; }
.hk-survey-h { font-size: 13px; font-weight: 700; color: var(--mute); }
.hk-survey .hk-survey-src { margin-top: 6px; font-size: 11px; color: var(--mute); }
/* ひとことのカードの小さな横棒（hitokoto-pages.js の bars。2026-11-13） */
.hk-cbars { display: grid; gap: 5px; margin-top: auto; padding-top: 10px; }
.hk-cb { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(40px, 1fr) auto; align-items: center; gap: 8px; font-size: 12px; line-height: 1.3; }
.hk-cb-l { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.hk-cb-t { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--mute) 16%, transparent); overflow: hidden; }
.hk-cb-t i { display: block; height: 100%; width: calc(var(--p) * 100%); border-radius: inherit; background: var(--honey, #e2b04f); }
.hk-cb b { min-width: 3.4em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.hk-cbars + .hk-card-top { margin-top: 4px; padding-top: 0; }
