/* まちの図鑑（kanri_zukan.php）… css/bouken.css の上に重ねる */
.zk-hero { min-height: 190px; }
.zk-book { background: radial-gradient(circle at 40% 35%, #fff4d0, #f4d27b 55%, #c9962c) !important; }
.zk-book svg { fill: #fffaf0 !important; stroke: #8a5a14 !important; stroke-width: 2.4 !important; }
.zk-who { margin-left: auto; padding: 12px 16px; border-radius: 14px; background: rgba(255, 250, 240, .95); box-shadow: 0 8px 18px rgba(0, 0, 0, .15); }
.zk-who label { display: grid; gap: 6px; font-weight: 800; font-size: 13px; color: #3d1f06; }
.zk-who select { height: 44px; min-width: 260px; padding: 0 10px; border-radius: 10px; border: 1.5px solid #d9dfea; font-weight: 700; font-size: 14px; }

.zk-board { position: relative; z-index: 1; padding: 20px; border-radius: 22px; background: rgba(255, 248, 232, .96); box-shadow: inset 0 0 0 3px #e9c98f, inset 0 0 0 8px #fbeed3, 0 12px 30px rgba(40, 30, 10, .2); }
.zk-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.zk-tabs a { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 4px 6px; padding: 14px 10px; border-radius: 14px; text-decoration: none; color: #3d1f06 !important;
  background: #fff; box-shadow: inset 0 0 0 2px #efe0c2, 0 4px 0 #e2cfa8; font-weight: 800; }
.zk-tabs a b { font-size: 20px; }
.zk-tabs a small { font-size: 13px; }
.zk-tabs a em { font-style: normal; font-size: 12px; padding: 1px 10px; border-radius: 999px; background: #fff1de; color: #e06a00; }
.zk-tabs a.is-on { color: #fff !important; background: linear-gradient(180deg, #ffa14a, #ff8a1f); box-shadow: 0 4px 0 #c45f00; }
.zk-tabs a.is-on em { background: rgba(255, 255, 255, .25); color: #fff; }

.zk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.zk-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 14px 16px; border-radius: 18px; background: #fff; text-align: center;
  box-shadow: inset 0 0 0 3px var(--rc, #cfe0f5), 0 6px 14px rgba(80, 50, 10, .1); }
.zk-card--initial { --rc: #9cc7ff; }
.zk-card--common  { --rc: #9fe0bb; }
.zk-card--phantom { --rc: #ffcf3f; background: linear-gradient(180deg, #fffbea, #fff); box-shadow: inset 0 0 0 3px #ffcf3f, 0 0 18px rgba(255, 200, 60, .45), 0 6px 14px rgba(80, 50, 10, .1); }
.zk-card--item { --rc: #f1d9a8; padding-top: 18px; }
.zk-rarity { position: absolute; left: 10px; top: 8px; padding: 2px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 800; color: #fff; background: #3d7bff; }
.zk-card--common .zk-rarity { background: #1fae5e; }
.zk-card--phantom .zk-rarity { background: linear-gradient(90deg, #ff8a1f, #ffcf3f); color: #5a3100; }
.zk-pic { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 14px; background: radial-gradient(circle at 50% 40%, #eaf6ff, #d6ecfb); overflow: hidden; }
.zk-card--phantom .zk-pic { background: radial-gradient(circle at 50% 40%, #fff6d8, #ffe39a); }
.zk-pic img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .2)); }
.zk-pic--item { background: radial-gradient(circle at 50% 40%, #fffaf0, #f7e6c4); }
.zk-pic--item img { width: 72%; height: 72%; }
.zk-sprite { width: 92%; aspect-ratio: var(--ratio); background: var(--img) 0 0 / calc(var(--frames) * 100%) 100% no-repeat; animation: zk-flap .7s steps(var(--frames), jump-none) infinite; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .2)); }
@keyframes zk-flap { from { background-position-x: 0%; } to { background-position-x: 100%; } }
.zk-card.is-locked .zk-pic img, .zk-card.is-locked .zk-sprite { filter: brightness(0) opacity(.18); animation: none; }
.zk-card.is-locked { box-shadow: inset 0 0 0 3px #dfe3ea, 0 6px 14px rgba(80, 50, 10, .06); background: #fafbfd; }
.zk-card.is-locked .zk-pic { background: #eef1f6; }
.zk-q { position: absolute; font-size: 64px; font-weight: 800; color: #9aa3b3; }
.zk-name { font-size: 17px; color: #1b2440; }
.zk-desc { font-size: 12.5px; font-weight: 700; color: #5a6680; line-height: 1.6; }
.zk-how { font-size: 11.5px; font-weight: 800; color: #e06a00; }

.zk-spots { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.zk-spot { overflow: hidden; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px #efe0c2, 0 6px 14px rgba(80, 50, 10, .1); }
.zk-spot-pic { position: relative; height: 170px; background-color: #cfe6c2; background-size: 380%; background-repeat: no-repeat; }
.zk-spot-cat { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(255, 255, 255, .95); font-weight: 800; font-size: 13px; }
.zk-spot-ic { width: 26px; height: 26px; object-fit: contain; }
.zk-spot-body { padding: 14px 16px 16px; }
.zk-spot-body h3 { margin: 0 0 6px; font-size: 20px; color: #3d1f06; }
.zk-spot-body p { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; line-height: 1.7; color: #3c4660; }
.zk-spot-meta { color: #6b5a3e !important; }
@media (max-width: 720px) {
  .zk-who { margin-left: 0; width: 100%; }
  .zk-who select { min-width: 0; width: 100%; }
  .zk-tabs a b { font-size: 16px; }
  .zk-tabs a small { display: none; }
  .zk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* まちの人・プロフィール */
.zk-card--people { --rc: #ffb366; }
.zk-card--people .zk-rarity { background: linear-gradient(90deg, #ff8a1f, #ff5a3c); }
.zk-card--people .zk-pic { background: radial-gradient(circle at 50% 40%, #fff3e2, #ffd9ae); }
.zk-initial { font-size: 72px; font-weight: 800; color: #e06a00; opacity: .55; }
.zk-say { position: relative; margin: 6px 0 2px; padding: 8px 12px; border-radius: 14px; background: #eef5ff; color: #2156c9; font-size: 13px; font-weight: 800; line-height: 1.45; }
.zk-say::before { content: ""; position: absolute; left: 50%; top: -7px; border: 7px solid transparent; border-bottom-color: #eef5ff; border-top: 0; transform: translateX(-50%); }
.zk-profile { width: 100%; margin-top: 4px; text-align: left; }
.zk-profile summary { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px; background: #fff4e6; color: #b75a00; font-weight: 800; font-size: 13px; cursor: pointer; list-style: none; }
.zk-profile summary::-webkit-details-marker { display: none; }
.zk-profile summary::after { content: "＋"; margin-left: 6px; }
.zk-profile[open] summary::after { content: "－"; }
.zk-profile dl { margin: 8px 0 0; display: grid; gap: 6px; }
.zk-profile dl div { display: grid; gap: 2px; }
.zk-profile dt { width: fit-content; padding: 1px 8px; border-radius: 6px; background: #ffe6e1; color: #c2410c; font-size: 11px; font-weight: 800; }
.zk-profile dd { margin: 0; font-size: 12.5px; line-height: 1.55; color: #3d4660; }

/* ===== 図鑑：キャラをクリックで ポップアップ ===== */
.zk-card.is-open { cursor: pointer; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s; }
.zk-card.is-open:hover { transform: translateY(-6px) rotate(-1deg) scale(1.03); box-shadow: 0 14px 26px rgba(80, 50, 10, .22); }
.zk-card.is-open:hover .zk-pic img { animation: zk-wiggle .6s ease-in-out; }
.zk-card.is-open::after { content: "タップで くわしく"; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%) translateY(6px); padding: 3px 10px; border-radius: 999px; background: #ff8a1f; color: #fff; font-size: 11px; font-weight: 900; white-space: nowrap; opacity: 0; transition: .2s; pointer-events: none; }
.zk-card.is-open:hover::after { opacity: 1; transform: translateX(-50%); }
@keyframes zk-wiggle { 25% { transform: rotate(-5deg) scale(1.05); } 60% { transform: rotate(4deg) scale(1.05); } }
.zk-pop { width: min(820px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 26px; background: transparent; overflow: visible; }
.zk-pop::backdrop { background: rgba(30, 20, 5, .55); backdrop-filter: blur(3px); }
.zk-pop[open] .zk-pop-in { animation: zk-pop-in .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes zk-pop-in { from { transform: scale(.6); opacity: 0; } }
.zk-pop-in { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "stage body" "thumbs body"; gap: 12px 20px; padding: 22px; border-radius: 26px; max-height: 92vh; overflow: auto;
  background: repeating-linear-gradient(178deg, rgba(90, 40, 5, .08) 0 2px, transparent 2px 10px), linear-gradient(180deg, #c98a4b, #9a5d27); box-shadow: inset 0 0 0 4px #6b3a14, 0 24px 60px rgba(0, 0, 0, .45); }
.zk-pop-x { position: absolute; right: -12px; top: -12px; z-index: 3; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fffaf0; color: #6b3a14; font-size: 18px; font-weight: 900; cursor: pointer; box-shadow: inset 0 0 0 3px #8a5222, 0 4px 8px rgba(0, 0, 0, .3); }
.zk-pop-stage { grid-area: stage; position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: radial-gradient(circle at 50% 45%, #fff 0 22%, #d9f0ff 60%, #a8d8f7); box-shadow: inset 0 0 0 4px #fff3dc; }
.zk-pop-rays { position: absolute; inset: -30%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .5) 0 10deg, transparent 10deg 20deg); animation: zk-rays 18s linear infinite; }
@keyframes zk-rays { to { transform: rotate(360deg); } }
.zk-pop-stage img { position: relative; max-width: 86%; max-height: 86%; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .25)); cursor: pointer; animation: zk-breathe 3s ease-in-out infinite; transform-origin: 50% 100%; }
.zk-pop-stage img.is-in { animation: zk-in .5s cubic-bezier(.3, 1.6, .5, 1), zk-breathe 3s ease-in-out .5s infinite; }
.zk-pop-stage img.is-hop { animation: zk-hop .6s cubic-bezier(.3, 1.4, .5, 1), zk-breathe 3s ease-in-out .6s infinite; }
@keyframes zk-in { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
@keyframes zk-breathe { 50% { transform: scale(1.02, .98); } }
@keyframes zk-hop { 30% { transform: translateY(-24px) scale(1.05, .95); } 55% { transform: translateY(0) scale(1.08, .9); } }
.zk-pop-thumbs { grid-area: thumbs; display: flex; gap: 8px; flex-wrap: wrap; }
.zk-pop-thumbs button { width: 64px; height: 64px; padding: 4px; border: 0; border-radius: 14px; background: #fffaf0; cursor: pointer; box-shadow: inset 0 0 0 2px #f1d9a8, 0 3px 0 #6b3a14; transition: transform .2s; }
.zk-pop-thumbs button:hover { transform: translateY(-3px); }
.zk-pop-thumbs button.is-on { box-shadow: inset 0 0 0 3px #ff8a1f, 0 3px 0 #c45f00; }
.zk-pop-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.zk-pop-body { grid-area: body; padding: 18px 20px; border-radius: 18px; background: linear-gradient(180deg, #fffaf0, #fbefd6); box-shadow: inset 0 0 0 2px #f1d9a8; color: #3b2a14; }
.zk-pop-rarity { display: inline-block; margin: 0; padding: 3px 12px; border-radius: 999px; background: #ff8a1f; color: #fff; font-size: 12.5px; font-weight: 900; }
.zk-pop-body h2 { margin: 8px 0 6px; font-size: clamp(26px, 3vw, 36px); font-weight: 900; color: #1b2440; letter-spacing: .04em; }
.zk-pop-desc { margin: 0 0 10px; font-weight: 800; line-height: 1.7; }
.zk-pop-say { position: relative; margin: 0 0 12px; padding: 10px 14px; border-radius: 16px; background: #eaf4ff; color: #1b4f8a; font-weight: 900; line-height: 1.6; }
.zk-pop-rows { display: grid; gap: 6px; margin: 0 0 10px; }
.zk-pop-rows div { display: grid; grid-template-columns: 7em 1fr; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px #f1e2c2; font-size: 14px; }
.zk-pop-rows dt { font-weight: 900; color: #a54d00; }
.zk-pop-rows dd { margin: 0; font-weight: 700; }
.zk-pop-line { margin: 0; padding: 8px 12px; border-radius: 12px; background: #e7f7ea; color: #1b7a44; font-size: 13px; font-weight: 800; line-height: 1.5; }
@media (max-width: 720px) {
  .zk-pop-in { grid-template-columns: 1fr; grid-template-areas: "stage" "thumbs" "body"; padding: 14px; }
  .zk-pop-stage { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) { .zk-pop-rays, .zk-pop-stage img { animation: none !important; } }
.zk-pop-in { overflow-x: hidden; align-content: start; } .zk-pop-x { right: 10px; top: 10px; } .zk-card { position: relative; }
/* 2026-09-27：見つけたキャラを先に。まだの「？？？」は 見出しの下に 小さく並べる */
.zk-lockhead { margin: 22px 0 10px; font-size: 15px; font-weight: 900; color: #6b5a3e; }
.zk-grid--locked { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; gap: 10px !important; }
.zk-grid--locked .zk-card { padding: 24px 6px 10px; gap: 2px; }
.zk-grid--locked .zk-name { font-size: 12.5px; }
.zk-grid--locked .zk-desc { font-size: 11px; line-height: 1.3; white-space: nowrap; }
.zk-grid--locked .zk-rarity { font-size: 10px; padding: 1px 7px; left: 6px; top: 6px; }
.zk-grid--locked .zk-q { font-size: 34px; }
@media (max-width: 720px) {
  .zk-grid--locked { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
  .zk-grid--locked .zk-pic { width: 70%; margin: 0 auto; }
}
