/* ==========================================================================
   新LP「その一匹を、県の代表に。」場面4 体験（心臓）— 実装2・朝焼け版（MORNING-SPEC.md）
   すべて .kdh-exp / .kdh-stage / .kdh-card / .kdh-pin の下だけに効かせる（他ページ・他の場面に影響させない）
   文字は濃い紺。金 #F0C000 は文字に使わない（ボタンの地・光・刻印・線・箔だけ）。明るい地なので screen/lighter は使わない
   ========================================================================== */
.kdh-exp, .kdh-stage, .kdh-card, .kdh-pin, #kdh-final-card {
  --x-navy: #104080;
  --x-ink: #0B2D5E;      /* 見出し・主な文字 */
  --x-ink-2: #213F69;    /* 本文 */
  --x-muted: #405A7E;    /* 補助・注記（12px以上） */
  --x-amber: #7A4E00;    /* 明るい地での「金の文字」 */
  --x-gold: #F0C000;
  --x-gold-l: #FFE060;
  --x-gold-d: #B37E00;
  --x-ivory: #FFFBF0;
  --x-paper: #F6F9FC;
  --x-sky: #E8F0F8;
  --x-shallow: #DDF0F8;
  --x-aqua: #BFE3F2;
  --x-chart: #D6E8F4;
  --x-line: rgba(16, 64, 128, .16);
  --x-line-2: rgba(16, 64, 128, .35);
  --x-glass: rgba(255, 255, 255, .86);
  --x-shadow: 0 14px 40px rgba(16, 64, 128, .14);
  --x-err: #B4501A;
  --x-ease: cubic-bezier(.16, 1, .3, 1);
  --x-font: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --x-head: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  --x-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
}

.kdh-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 体験の段（浅瀬の光） ---------- */
/* _experience.blade.php の小さな style が、この CSS が効くまで中身を隠している。ここで戻す（先頭に置き、下の個別の規則を優先させる） */
.kdh-exp > * { visibility: visible; }
.kdh-exp {
  --x-ready: 1; /* JS はこれが効いてから体験を出す */
  position: relative;
  /* 画面に近づくまで中身のレイアウト・描画を省く（N3）。高さの見込みは実寸に近い値 */
  content-visibility: auto; contain-intrinsic-size: auto 1650px; /* PC は下の媒体クエリで 1080px */
  padding: 72px 16px 56px;
  color: var(--x-ink);
  font-family: var(--x-font);
  font-feature-settings: "palt";
  background: linear-gradient(180deg, rgba(221, 240, 248, 0) 0%, var(--x-shallow) 10%, var(--x-aqua) 100%);
  overflow: clip;
}
/* 水面の光の網目（コースティクス）。層ごと transform だけで揺らす */
.kdh-exp::before {
  content: ""; position: absolute; inset: -40px; pointer-events: none; opacity: .55; z-index: 0;
  background:
    radial-gradient(40px 14px at 20% 30%, rgba(255, 255, 255, .9), transparent 70%),
    radial-gradient(60px 18px at 70% 20%, rgba(255, 255, 255, .8), transparent 70%),
    radial-gradient(50px 16px at 40% 70%, rgba(255, 255, 255, .8), transparent 70%),
    radial-gradient(36px 12px at 85% 60%, rgba(255, 255, 255, .85), transparent 70%);
  background-size: 220px 160px;
  animation: kdhCaustic 9s ease-in-out infinite alternate;
}
@keyframes kdhCaustic { to { transform: translate3d(30px, 18px, 0) scale(1.06); } }
.kdh-exp > * { position: relative; z-index: 1; }
.kdh-exp *, .kdh-stage *, .kdh-card * { box-sizing: border-box; }
.kdh-exp__head { max-width: 640px; margin: 0 auto 28px; text-align: left; }
.kdh-exp__eyebrow { margin: 0 0 10px; font-size: 13px; letter-spacing: .24em; color: var(--x-amber); font-weight: 700; }
.kdh-exp__title { margin: 0 0 14px; font-family: var(--x-head); font-weight: 900; font-size: clamp(30px, 8.6vw, 48px); line-height: 1.25; letter-spacing: .01em; color: var(--x-ink); }
/* 見出しを文字ごとに出す（JS が span.kdh-ch に分ける。transform＋opacity だけ） */
.kdh-exp__title .kdh-ch { display: inline-block; }
.kdh-exp__title.is-pre .kdh-ch { opacity: 0; transform: translateY(.45em); }
.kdh-exp__title.is-in .kdh-ch { opacity: 1; transform: none; transition: opacity .5s ease, transform .7s var(--x-ease); transition-delay: calc(var(--i) * 28ms); }
.kdh-exp__lead { margin: 0 0 10px; font-size: 16px; line-height: 1.8; color: var(--x-ink-2); }
.kdh-exp__micro { margin: 0; font-size: 13px; line-height: 1.7; color: var(--x-muted); }
.kdh-exp__nojs { max-width: 640px; margin: 0 auto; padding: 20px; border: 1px solid var(--x-line); border-radius: 14px; background: #fff; box-shadow: var(--x-shadow); font-size: 16px; line-height: 1.8; color: var(--x-ink-2); }
.kdh-exp__nojs p { margin: 0 0 14px; }

.kdh-exp__app { max-width: 1120px; margin: 0 auto; }
.kdh-exp__app[hidden] { display: none; }

/* 段（01 写真・02 県・03 魚種） */
.kdh-step { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.kdh-step__legend { display: flex; align-items: center; gap: 10px; padding: 0; margin: 0 0 12px; font-family: var(--x-head); font-size: 17px; font-weight: 700; color: var(--x-ink); }
.kdh-step__no { display: inline-grid; place-items: center; width: 34px; height: 26px; border-radius: 13px; background: var(--x-navy); color: #fff; font: 700 13px/1 var(--x-mono); letter-spacing: .04em; }
.kdh-step__done { width: 20px; height: 20px; border-radius: 50%; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s cubic-bezier(.2, 1.6, .4, 1); background: var(--x-gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.8' fill='none' stroke='%230B2D5E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; box-shadow: 0 0 0 1.5px #fff; }
.kdh-step.is-done .kdh-step__done { opacity: 1; transform: none; }
.kdh-step__err { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(242, 154, 84, .14); border: 1px solid rgba(180, 80, 26, .45); font-size: 14px; line-height: 1.6; color: var(--x-err); }
.kdh-step__err[hidden] { display: none; }

/* 写真の選択肢 */
.kdh-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kdh-photos .kdh-photo--sample:nth-of-type(n+4) { display: none; }
.kdh-photo {
  position: relative; display: block; min-height: 44px; aspect-ratio: 1 / 1; padding: 0; margin: 0;
  border: 2px solid #fff; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--x-aqua); color: var(--x-ink);
  box-shadow: 0 6px 16px rgba(16, 64, 128, .14); font: inherit; -webkit-tap-highlight-color: transparent;
  transition: transform .2s, border-color .2s;
}
/* 写真の候補が 70ms ずつ浮かぶ（JS が is-pre → is-in） */
.kdh-photos.is-pre .kdh-photo { opacity: 0; transform: translateY(16px) scale(.96); }
.kdh-photos.is-in .kdh-photo { opacity: 1; transform: none; transition: opacity .5s ease, transform .7s var(--x-ease), border-color .2s; transition-delay: calc(var(--i, 0) * 70ms); }
.kdh-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 写真の上の文字は白い札に載せる（暗いグラデは使わない） */
.kdh-photo__label { position: absolute; left: 4px; right: 4px; bottom: 4px; z-index: 1; padding: 3px 6px; border-radius: 7px; background: rgba(255, 255, 255, .92); font-size: 12px; font-weight: 700; line-height: 1.3; text-align: left; color: var(--x-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kdh-photo__label small { display: block; font-size: 12px; font-weight: 500; color: var(--x-muted); }
.kdh-photo__tag { position: absolute; left: 4px; top: 4px; z-index: 1; padding: 0 7px; border-radius: 999px; background: var(--x-gold); color: var(--x-ink); font-size: 12px; font-weight: 700; line-height: 1.6; }
.kdh-photo[aria-pressed="true"], .kdh-photo--own.is-on { border-color: var(--x-gold); box-shadow: 0 0 0 3px rgba(240, 192, 0, .45), 0 8px 18px rgba(214, 150, 0, .3); }
.kdh-photo[aria-pressed="true"]::before, .kdh-photo--own.is-on::before {
  content: ""; position: absolute; top: 5px; right: 5px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff;
  background: var(--x-gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.8' fill='none' stroke='%230B2D5E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.kdh-photo:active { transform: scale(.97); }
.kdh-photo--own { display: grid; place-items: center; background: #fff; border: 2px dashed var(--x-gold-d); box-shadow: none; }
.kdh-photo--own .kdh-photo__own { color: var(--x-amber); margin-top: -14px; }
.kdh-photo--own .kdh-photo__label { text-align: center; background: none; color: var(--x-ink); padding: 0; bottom: 7px; }
.kdh-photo--own.is-on { border-style: solid; }
.kdh-photo--own.is-on .kdh-photo__own { display: none; }
.kdh-photo--own.is-on .kdh-photo__label { background: rgba(255, 255, 255, .92); padding: 3px 6px; bottom: 4px; text-align: left; }
.kdh-photo--own:focus-within { outline: 3px solid var(--x-navy); outline-offset: 3px; }
.kdh-photo--own.is-busy .kdh-photo__own { animation: kdhPulse 1s ease-in-out infinite; }
@keyframes kdhPulse { 50% { opacity: .35; } }

/* チップ（地方・県・魚種）。押すと金の波紋が広がる（::after の scale・選ばれた瞬間に1回） */
.kdh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kdh-chip {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 44px; min-width: 44px; padding: 0 15px; border-radius: 22px; border: 1.5px solid var(--x-line-2);
  background: #fff; color: var(--x-ink); font: 700 15px/1 var(--x-font); font-feature-settings: "palt";
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.kdh-chip:hover { border-color: var(--x-navy); }
.kdh-chip:active { transform: scale(.96); }
.kdh-chip[aria-pressed="true"] { background: var(--x-navy); border-color: var(--x-navy); color: #fff; }
.kdh-chip[aria-pressed="true"]::after, .kdh-chip[aria-expanded="true"]::after {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: 10px; height: 10px; margin: -5px; border-radius: 50%;
  background: rgba(255, 224, 96, .75); pointer-events: none; animation: kdhTapRing .7s ease-out both;
}
@keyframes kdhTapRing { from { transform: scale(1); opacity: 1; } to { transform: scale(14); opacity: 0; } }
.kdh-chips--region .kdh-chip[aria-expanded="true"] { background: #FFF6D2; color: var(--x-ink); border-color: var(--x-gold-d); }
.kdh-chips--region .kdh-chip.has-pick::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--x-gold); box-shadow: 0 0 0 1px var(--x-gold-d); vertical-align: 2px; }
.kdh-chips--pref { margin-top: 10px; padding: 12px; min-height: 68px; border-radius: 14px; background: rgba(255, 255, 255, .55); border: 1px dashed var(--x-line-2); }
.kdh-chips--pref:empty::before { content: "地方を選ぶと、県が出ます"; align-self: center; font-size: 14px; color: var(--x-muted); }
.kdh-chip--more { border-style: dashed; color: var(--x-amber); }
.kdh-other { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.kdh-other[hidden] { display: none; }
.kdh-other__label { font-size: 14px; color: var(--x-muted); white-space: nowrap; }
.kdh-other__in { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--x-line-2); background: #fff; color: var(--x-ink); font: 16px var(--x-font); }

/* 下に貼りつく「あと◯つ」とボタン（白いガラス） */
.kdh-exp__bar {
  position: sticky; bottom: 0; z-index: 5; margin: 6px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .94); border-top: 2px solid var(--x-gold); box-shadow: 0 -10px 24px rgba(16, 64, 128, .12);
}
/* 帯の高さぶん、各段の下に余白（帯がチップを隠さない） */
.kdh-exp__form .kdh-step:last-of-type { margin-bottom: 18px; }
.kdh-exp__form { scroll-padding-bottom: 96px; }
.kdh-mini { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.kdh-mini__ph { flex: 0 0 auto; width: 46px; height: 58px; border-radius: 7px; background: var(--x-aqua) center/cover no-repeat; box-shadow: 0 0 0 1.5px var(--x-gold-d) inset; position: relative; }
.kdh-mini__ph:not(.is-on)::after { content: "写真"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--x-muted); }
.kdh-mini__ph.is-on { box-shadow: 0 0 0 2px var(--x-gold), 0 4px 10px rgba(214, 150, 0, .3); }
.kdh-mini__txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.kdh-mini__sel { display: flex; align-items: baseline; gap: 2px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kdh-mini__sel b { font-weight: 700; color: var(--x-muted); }
.kdh-mini__sel b.is-on { color: var(--x-ink); background: linear-gradient(180deg, transparent 62%, rgba(240, 192, 0, .55) 62%); }
.kdh-mini__sel i { font-style: normal; color: var(--x-muted); }
.kdh-mini__left { font-size: 12px; line-height: 1.35; color: var(--x-muted); }
.kdh-mini__left b { display: inline-block; color: var(--x-ink); font-size: 14px; font-family: var(--x-head); font-weight: 900; }
.kdh-exp__build.is-pressed { transform: translateY(2px) scale(.98); }
.kdh-exp__left { margin: 0 0 8px; font-size: 14px; text-align: center; color: var(--x-ink-2); }
.kdh-exp__left b { display: inline-block; color: var(--x-ink); font-size: 17px; font-family: var(--x-head); font-weight: 900; }
.kdh-exp__barrow { display: flex; gap: 8px; align-items: stretch; }
.kdh-exp__build { flex: 0 0 auto; min-width: 132px; padding: 10px 16px; }

/* ボタン */
.kdh-xbtn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px;
  min-height: 56px; padding: 10px 22px; border: 0; border-radius: 14px; text-decoration: none; cursor: pointer;
  font: 700 17px/1.3 var(--x-head); font-feature-settings: "palt"; letter-spacing: .03em; text-align: center;
  -webkit-tap-highlight-color: transparent; transition: transform .15s, opacity .2s;
}
.kdh-xbtn--gold { color: var(--x-ink); background: linear-gradient(180deg, #FFE680 0%, var(--x-gold) 55%, #E3AE00 100%); box-shadow: 0 2px 0 #9a6200, 0 10px 26px rgba(214, 150, 0, .32); }
.kdh-xbtn--gold:active { transform: translateY(2px); box-shadow: 0 0 0 #9a6200, 0 6px 16px rgba(214, 150, 0, .25); }
.kdh-xbtn[disabled] { cursor: not-allowed; color: var(--x-muted); background: #E1E9F2; box-shadow: 0 0 0 1px var(--x-line) inset; }
.kdh-xbtn--ghost { color: var(--x-ink); background: #fff; box-shadow: 0 0 0 1.5px var(--x-line-2) inset; min-height: 48px; font-size: 15px; }
.kdh-xbtn small { font-size: 13px; font-weight: 700; opacity: .8; letter-spacing: .04em; }
/* そろったら金の光の呼吸（::before の opacity だけ） */
.kdh-xbtn--gold::before { content: ""; position: absolute; inset: -10px; z-index: -1; border-radius: 22px; pointer-events: none; background: radial-gradient(closest-side, rgba(255, 214, 90, .8), rgba(255, 214, 90, 0)); opacity: 0; }
.kdh-xbtn.is-ready::before, .kdh-res__cta::before { animation: kdhBreath 3.2s ease-in-out infinite; }
@keyframes kdhBreath { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }

.kdh-sound {
  flex: 0 0 auto; display: inline-grid; place-items: center; width: 56px; min-height: 44px; border-radius: 14px;
  border: 1.5px solid var(--x-line-2); background: #fff; color: var(--x-ink); cursor: pointer;
}
.kdh-sound .kdh-sound__on { display: none; }
.kdh-sound[hidden] { display: none !important; }
.kdh-exp__head { position: relative; }
.kdh-sound--head { position: absolute; top: 0; right: 0; width: auto; padding: 0 12px; gap: 4px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; }
.kdh-sound__txt { font-size: 13px; }
.kdh-sound[aria-pressed="true"] { background: #FFF6D2; border-color: var(--x-gold-d); }
.kdh-sound[aria-pressed="true"] .kdh-sound__on { display: block; }
.kdh-sound[aria-pressed="true"] .kdh-sound__off { display: none; }

.kdh-exp :focus-visible, .kdh-stage :focus-visible, #kdh-final-card :focus-visible { outline: 3px solid var(--x-navy); outline-offset: 3px; }

/* プレビュー */
.kdh-exp__preview { margin-top: 26px; }
.kdh-exp__cardslot { display: flex; justify-content: center; }
.kdh-exp__cardslot .kdh-card { --w: min(84vw, 340px); }
.kdh-exp__cardnote { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--x-muted); }
.kdh-exp__done { max-width: 520px; margin: 22px auto 0; }
.kdh-exp__done[hidden] { display: none; }

@media (min-width: 900px) {
  .kdh-exp { padding: 112px 32px 96px; contain-intrinsic-size: auto 1080px; }
  .kdh-exp__head { max-width: 1120px; margin-bottom: 40px; }
  .kdh-exp__lead { max-width: 640px; }
  .kdh-exp__app { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; align-items: start; }
  .kdh-photos { grid-template-columns: repeat(5, 1fr); }
  .kdh-exp__bar { position: static; margin: 10px 0 0; padding: 0; background: none; border: 0; box-shadow: none; }
  .kdh-exp__left { text-align: left; }
  .kdh-exp__preview { position: sticky; top: 96px; margin-top: 0; }
  .kdh-exp__cardslot .kdh-card { --w: 380px; }
}
@media (min-width: 560px) {
  .kdh-photos { grid-template-columns: repeat(5, 1fr); }
  .kdh-photos .kdh-photo--sample:nth-of-type(n+4) { display: block; }
}

/* ==========================================================================
   カード（象牙の紙＋紺のインク＋金の箔）。--w でサイズが決まる。文字は最小12px
   ========================================================================== */
.kdh-card {
  --w: 320px; --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --hyp: 0; --shine: .35;
  position: relative; width: var(--w); aspect-ratio: 5 / 7; flex: 0 0 auto;
  perspective: 900px; font-family: var(--x-font); font-feature-settings: "palt"; color: var(--x-ink);
  -webkit-user-select: none; user-select: none;
}
.kdh-card__tilt {
  position: absolute; inset: 0; border-radius: calc(var(--w) * .055);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2, .8, .3, 1);
  box-shadow: 0 calc(var(--w) * .06) calc(var(--w) * .13) rgba(16, 64, 128, .22), 0 calc(var(--w) * .01) calc(var(--w) * .02) rgba(16, 64, 128, .12);
}
.kdh-card.is-touching .kdh-card__tilt { transition: transform .08s linear; }
.kdh-card.is-anim .kdh-card__tilt { transition: none; }
/* 金の額縁（箔）。明るい地でも縁が立つよう、外側に濃い金の細線 */
.kdh-card__frame {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
  background:
    linear-gradient(calc(110deg + var(--hyp) * 30deg), #8a5400 0%, #f7d35c 18%, #fff3b8 30%, #d79d00 46%, #fff0a8 62%, #b77a00 80%, #f6cf55 100%);
  background-size: 220% 220%; background-position: var(--mx) var(--my);
  box-shadow: inset 0 0 0 1px rgba(122, 78, 0, .55);
}
.kdh-card__face {
  position: absolute; inset: calc(var(--w) * .028); border-radius: calc(var(--w) * .035); overflow: hidden;
  display: flex; flex-direction: column;
  background:
    repeating-radial-gradient(circle at 78% 112%, rgba(16, 64, 128, .045) 0 1px, rgba(0, 0, 0, 0) 1px 9px),
    linear-gradient(180deg, var(--x-ivory) 0%, #FBF5E4 100%);
  box-shadow: inset 0 0 0 1px rgba(179, 126, 0, .35);
}
.kdh-card__head { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: calc(var(--w) * .035) calc(var(--w) * .045) calc(var(--w) * .025); }
.kdh-card__brand { font-family: var(--x-head); font-size: max(12px, calc(var(--w) * .042)); font-weight: 900; letter-spacing: .12em; color: var(--x-navy); white-space: nowrap; }
.kdh-card__kind { font: 700 max(12px, calc(var(--w) * .036)) / 1 var(--x-mono); letter-spacing: .08em; color: var(--x-muted); white-space: nowrap; }
.kdh-card__photo {
  position: relative; margin: 0 calc(var(--w) * .035); flex: 0 0 auto; aspect-ratio: 4 / 3.15; border-radius: calc(var(--w) * .022);
  overflow: hidden; background: var(--x-aqua); box-shadow: 0 0 0 1px rgba(179, 126, 0, .6), 0 0 0 calc(var(--w) * .01) #fff;
}
.kdh-card__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kdh-card__ph { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--x-navy); font-size: max(12px, calc(var(--w) * .042)); font-weight: 700;
  background: repeating-linear-gradient(135deg, rgba(16, 64, 128, .05) 0 10px, rgba(0, 0, 0, 0) 10px 20px); }
.kdh-card__ph svg { width: 34%; height: auto; opacity: .45; }
.kdh-card__plate { margin: calc(var(--w) * .035) calc(var(--w) * .035) 0; padding: calc(var(--w) * .02) 0 calc(var(--w) * .016); text-align: center;
  background: var(--x-ivory); border-top: 1.5px solid var(--x-navy); border-bottom: 1.5px solid var(--x-navy); }
.kdh-card__pref { display: block; font-family: var(--x-head); font-weight: 900; font-size: calc(var(--w) * .1); line-height: 1.1; letter-spacing: .06em; color: var(--x-ink); white-space: nowrap; }
.kdh-card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: calc(var(--w) * .03) calc(var(--w) * .05) 0; }
.kdh-card__fish { font-family: var(--x-head); font-weight: 900; font-size: calc(var(--w) * .088); line-height: 1.1; color: var(--x-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kdh-card__kind--row { font-size: max(12px, calc(var(--w) * .034)); }
.kdh-card__date { font: 700 max(12px, calc(var(--w) * .04)) / 1 var(--x-mono); color: var(--x-muted); letter-spacing: .04em; white-space: nowrap; }
.kdh-card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: calc(var(--w) * .028) calc(var(--w) * .05); border-top: 1px solid rgba(179, 126, 0, .45);
  font-size: max(12px, calc(var(--w) * .038)); font-weight: 700; color: var(--x-muted); letter-spacing: .06em; white-space: nowrap; }
.kdh-card__foot b { color: var(--x-amber); font-weight: 700; }
.kdh-card.is-empty .kdh-card__pref, .kdh-card .is-blank, .kdh-card .kdh-card__fish.is-blank { color: rgba(16, 64, 128, .3); }

/* ホロ（虹）とグレア。指・マウスの位置 --mx/--my で動く。明るい地向け: soft-light の虹＋通常の重ねのきらめき */
.kdh-card__holo, .kdh-card__glare, .kdh-card__sparkle, .kdh-card__sheen { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.kdh-card__holo {
  background-image:
    repeating-linear-gradient(115deg, rgba(255, 200, 120, 0) 0%, rgba(255, 200, 90, .55) 7%, rgba(255, 246, 214, .5) 12%, rgba(120, 180, 255, .45) 18%, rgba(210, 160, 255, .42) 24%, rgba(255, 200, 120, 0) 32%);
  background-size: 300% 300%;
  background-position: calc(var(--mx) * 1.6 - 30%) var(--my);
  mix-blend-mode: soft-light; opacity: calc(var(--shine) * .9 + var(--hyp) * .5);
  -webkit-mask-image: radial-gradient(130% 100% at 50% 40%, rgba(0, 0, 0, .45) 30%, #000 75%);
          mask-image: radial-gradient(130% 100% at 50% 40%, rgba(0, 0, 0, .45) 30%, #000 75%);
}
.kdh-card__sheen {
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 32%, rgba(255, 236, 170, .35) 42%, rgba(255, 255, 255, .85) 50%, rgba(255, 236, 170, .35) 58%, rgba(255, 255, 255, 0) 68%);
  background-size: 300% 300%; background-position: calc(120% - var(--mx) * 1.4) calc(120% - var(--my) * 1.4);
  opacity: calc(var(--shine) * .55 + var(--hyp) * .25);
}
.kdh-card__sparkle {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(214, 160, 0, .55) 0 1px, transparent 1.6px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .95) 0 1px, transparent 1.6px),
    radial-gradient(circle at 40% 80%, rgba(214, 160, 0, .45) 0 .8px, transparent 1.4px);
  background-size: 23px 29px, 31px 37px, 17px 19px;
  background-position: calc(var(--mx) * .3) calc(var(--my) * .3), calc(var(--mx) * -.2) 0, 0 calc(var(--my) * .4);
  opacity: calc(var(--shine) * .45 + var(--hyp) * .4);
}
.kdh-card__glare {
  background: radial-gradient(farthest-corner circle at var(--mx) var(--my), rgba(255, 255, 255, .65) 0%, rgba(255, 250, 225, .2) 20%, rgba(255, 255, 255, 0) 42%, rgba(16, 64, 128, .1) 100%);
  opacity: calc(.4 + var(--hyp) * .5);
}

/* 刻印（金の封蝋＋灯台の紋）。押されるまで隠す */
.kdh-card__seal {
  position: absolute; z-index: 3; right: calc(var(--w) * -.055); top: calc(var(--w) * .7); width: calc(var(--w) * .3); aspect-ratio: 1;
  display: grid; place-items: center; align-content: center; border-radius: 50%; transform: rotate(-10deg); opacity: 0; pointer-events: none;
  background:
    radial-gradient(circle at 35% 30%, #fff6c4 0%, #ffd94a 22%, #e2a700 52%, #a76800 80%, #7a4a00 100%);
  box-shadow: 0 0 0 calc(var(--w) * .008) #7a4a00, 0 0 0 calc(var(--w) * .018) #fff, 0 0 0 calc(var(--w) * .024) var(--x-gold-d), 0 calc(var(--w) * .02) calc(var(--w) * .05) rgba(16, 64, 128, .3), inset 0 0 calc(var(--w) * .03) rgba(122, 74, 0, .8);
  color: #5B3500; text-align: center;
}
.kdh-card__seal::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(91, 53, 0, .35) 0 2deg, rgba(255, 246, 200, .25) 2deg 4deg);
  -webkit-mask: radial-gradient(closest-side, transparent 86%, #000 88%); mask: radial-gradient(closest-side, transparent 86%, #000 88%); }
.kdh-card__seal::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 1px dashed rgba(91, 53, 0, .55); }
.kdh-card__seal svg { width: 40%; height: auto; margin-bottom: 0; }
.kdh-card__seal-pref { display: block; font-family: var(--x-head); font-weight: 900; font-size: max(12px, calc(var(--w) * var(--sealk, .07))); line-height: 1.05; letter-spacing: .02em; text-shadow: 0 1px 0 rgba(255, 246, 200, .7); white-space: nowrap; }
.kdh-card__seal-sub { display: block; margin-top: 2px; font-size: max(12px, calc(var(--w) * .04)); font-weight: 800; line-height: 1.1; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(255, 246, 200, .7); white-space: nowrap; }
.kdh-card.is-stamped .kdh-card__seal { opacity: 1; }
/* 押される前の目印：濃い金の細い点線の輪だけ（塗り・文字なし）。額縁の右の縁にまたがる */
.kdh-card__seal-spot { position: absolute; z-index: 2; right: calc(var(--w) * -.085); top: calc(var(--w) * .79); width: calc(var(--w) * .19); aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--x-gold-d); background: rgba(255, 255, 255, .35); font-size: 0; color: transparent; pointer-events: none; }
.kdh-card.is-stamped .kdh-card__seal-spot, .kdh-card.no-spot .kdh-card__seal-spot { display: none; }

.kdh-card.is-bump .kdh-card__tilt { animation: kdhBump .5s ease-out; }
@keyframes kdhBump { 0% { transform: rotateX(var(--rx)) rotateY(var(--ry)) scale(1); } 30% { transform: rotateX(var(--rx)) rotateY(var(--ry)) scale(1.025); } 100% { transform: rotateX(var(--rx)) rotateY(var(--ry)) scale(1); } }

/* 最後のCTAの枠に入れる複製 */
#kdh-final-card .kdh-card { --w: min(72vw, 300px); margin: 0 auto; }

/* ==========================================================================
   全画面ステージ（朝の光の海図）
   ========================================================================== */
.kdh-stage {
  position: fixed; inset: 0; z-index: 2147483000; overflow: hidden; color: var(--x-ink);
  font-family: var(--x-font); font-feature-settings: "palt";
  background: var(--x-chart); opacity: 0; transition: opacity .3s ease;
  overscroll-behavior: contain; touch-action: none;
}
.kdh-stage[hidden] { display: none; }
.kdh-stage:focus { outline: none; }
.kdh-stage.is-closed { visibility: hidden; pointer-events: none; transform: translateX(-300vw); } /* 画面の外へ（地図の大きさを保ったまま、地図の描画ループを止める） */
.kdh-stage.is-open { opacity: 1; }
.kdh-stage__sea {
  position: absolute; inset: -4%;
  background:
    radial-gradient(60% 45% at 50% 40%, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(90% 30% at 50% -6%, rgba(255, 226, 180, .55) 0%, rgba(255, 226, 180, 0) 70%),
    repeating-radial-gradient(circle at 70% 30%, rgba(16, 64, 128, .05) 0 1px, rgba(0, 0, 0, 0) 1px 26px),
    linear-gradient(rgba(16, 64, 128, .06) 1px, transparent 1px) 0 0 / 100% 64px,
    linear-gradient(90deg, rgba(16, 64, 128, .06) 1px, transparent 1px) 0 0 / 64px 100%,
    radial-gradient(120% 90% at 50% 40%, #E6F1F9 0%, var(--x-chart) 60%, #C5DDEE 100%);
}
.kdh-stage__sea::after {
  content: ""; position: absolute; inset: 0; opacity: .16; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}
.kdh-stage__map { position: absolute; inset: 0; opacity: 0; }
.kdh-stage__map > * { max-width: none; }
.kdh-stage__glow { position: absolute; left: 50%; top: 44%; width: 140vmax; height: 140vmax; margin: -70vmax 0 0 -70vmax; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .75), rgba(255, 236, 170, .45) 30%, rgba(255, 224, 96, 0) 70%); }
.kdh-stage__layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.kdh-stage__cardwrap { position: absolute; left: 50%; top: 47%; z-index: 4; transform: translate(-50%, -50%); }
.kdh-stage__cardwrap .kdh-card { --w: min(76vw, 340px, calc((100svh - 190px) * .7)); touch-action: none; cursor: grab; }
.kdh-stage__hint { position: relative; margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--x-muted); opacity: 0; letter-spacing: .06em; }

.kdh-stage__bar { position: absolute; left: 0; right: 0; top: 0; z-index: 8; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px 16px;
  background: linear-gradient(180deg, rgba(246, 249, 252, .92) 0%, rgba(246, 249, 252, 0) 100%); }
.kdh-stage__note { flex: 1; min-width: 0; margin: 0; font: 600 12px/1.4 var(--x-mono); letter-spacing: .06em; color: var(--x-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kdh-stage__note b { color: var(--x-ink); font-weight: 800; }
.kdh-stage__skip, .kdh-stage__close {
  flex: 0 0 auto; white-space: nowrap; min-height: 44px; min-width: 44px; border-radius: 22px; border: 1.5px solid var(--x-line-2); background: #fff;
  color: var(--x-ink); font: 700 15px/1 var(--x-font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 0 16px;
  box-shadow: 0 4px 12px rgba(16, 64, 128, .1);
}
.kdh-stage__close { padding: 0; width: 44px; }
.kdh-stage__skip[hidden] { display: none; }
.kdh-sound--stage { width: 44px; border-radius: 22px; }

/* 結果（下からせり上がる・白いガラス） */
.kdh-stage__result {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; max-height: 54%; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  padding: 20px 18px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .9) 22px, rgba(255, 255, 255, .96) 100%);
  transform: translateY(105%); visibility: hidden;
}
.kdh-stage__result.is-on { transform: none; visibility: visible; }
.kdh-stage.is-instant .kdh-stage__result { transition: none; }
.kdh-res { max-width: 520px; margin: 0 auto; }
.kdh-res__lead { margin: 0 0 4px; font-size: 13px; letter-spacing: .14em; color: var(--x-amber); font-weight: 700; }
.kdh-res__title { margin: 0 0 14px; font-family: var(--x-head); font-weight: 900; font-size: clamp(20px, 5.6vw, 26px); line-height: 1.45; color: var(--x-ink); }
.kdh-res__title em { font-style: normal; color: var(--x-ink); background: linear-gradient(180deg, transparent 60%, rgba(240, 192, 0, .6) 60%); }
.kdh-res__cta { display: flex; width: 100%; }
.kdh-res__cta { font-size: 17px; }
.kdh-res__more { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--x-muted); }
.kdh-res__more summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; cursor: pointer; color: var(--x-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--x-gold-d); }
.kdh-res__more p { margin: 0 0 8px; }
.kdh-res__how { margin: 10px 0 0; font-size: 13px; line-height: 1.65; color: var(--x-ink-2); }
.kdh-res__rules { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.kdh-res__rules li { padding: 5px 10px; border-radius: 8px; border: 1.5px solid var(--x-gold-d); background: #FFF6D2; font-size: 13px; line-height: 1.4; color: var(--x-ink); }
.kdh-res__note { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--x-muted); }
.kdh-res__trial { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: var(--x-muted); }
/* CTA のすぐ下の2行（畳まない・S2-1・N1） */
.kdh-res__keep { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.6; color: var(--x-ink-2); }
.kdh-res__keep li { position: relative; padding-left: 1.1em; }
.kdh-res__keep li + li { margin-top: 2px; }
.kdh-res__keep li::before { content: "※"; position: absolute; left: 0; color: var(--x-amber); }
/* 2回目以降は「とばす」を目立たせる（S2-9） */
.kdh-stage__skip.is-strong { background: var(--x-gold); color: var(--x-ink); border-color: #9a6200; font-weight: 800; }
.kdh-res__again { margin-top: 12px; width: 100%; }
.kdh-exp__done .kdh-res { padding: 18px; border: 1px solid var(--x-line); border-radius: 16px; background: var(--x-glass); box-shadow: var(--x-shadow); }

/* 波紋（刻印・着地）。明るい地で見える濃い金 */
.kdh-ripple { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2.5px solid rgba(179, 126, 0, .75); pointer-events: none; opacity: 0; z-index: 6; }
/* 着地の祝い（柱・波紋・粒）は map.css / map.js だけが出す（4周目） */

/* 地図なし（読込失敗）のときの光（明るい地なので通常の重ねで濃いめの金） */
.kdh-stage.no-map .kdh-stage__beam { display: block; }
.kdh-stage__beam { display: none; position: absolute; left: 50%; top: 30%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; pointer-events: none; opacity: 0;
  background: conic-gradient(from 0deg, rgba(240, 192, 0, 0) 0deg, rgba(240, 192, 0, .28) 10deg, rgba(240, 192, 0, 0) 24deg, rgba(240, 192, 0, 0) 360deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 100%); mask-image: radial-gradient(closest-side, #000 20%, transparent 100%); }

@media (min-width: 900px) {
  .kdh-stage__result { left: 0; right: auto; top: 0; bottom: 0; width: 36%; max-height: none; display: flex; align-items: center; padding: 96px 40px 40px 56px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .9) 80%, rgba(255, 255, 255, 0) 100%); transform: translateX(-105%); }
  .kdh-stage__result.is-on { transform: none; }
  .kdh-stage__cardwrap .kdh-card { --w: min(460px, calc(70vh * .714)); }
  .kdh-stage__bar { padding: 16px 24px; }
  .kdh-stage__note { font-size: 13px; }
  .kdh-res__title { font-size: 28px; }
}

/* 動きを減らす設定：遷移はフェードのみ・全部見えている最後の状態 */
@media (prefers-reduced-motion: reduce) {
  .kdh-exp::before { animation: none; }
  .kdh-card__tilt, .kdh-photo, .kdh-chip, .kdh-step__done { transition: none !important; }
  .kdh-photos.is-pre .kdh-photo, .kdh-exp__title.is-pre .kdh-ch { opacity: 1; transform: none; }
  .kdh-chip::after, .kdh-xbtn--gold::before { animation: none !important; }
  .kdh-xbtn.is-ready::before { opacity: .5; }
  .kdh-card.is-bump .kdh-card__tilt { animation: none !important; }
  .kdh-stage__result { transform: none !important; opacity: 0; transition: opacity .3s ease; }
  .kdh-stage__result.is-on { opacity: 1; }
}
