/* ============================================================
   東平山ミッションMAP（kanri_mission.php）
   左：まちの地図（assets/rpg/map/mission.webp）／右：羊皮紙の「ミッションをえらぼう」
   ============================================================ */

.app--mission { overflow: hidden; }
.app-main--mission { height: 100vh; }
.ms { display: grid; grid-template-columns: minmax(0, 1fr) clamp(350px, 28vw, 430px); gap: 0; height: calc(100vh - var(--head-h)); }

/* ---- 地図 ---- */
.ms-map { position: relative; overflow: hidden; container-type: size; background: #9fd28a; }
.ms-stage { position: absolute; left: 50%; top: 50%; width: max(100cqw, 100cqh); aspect-ratio: 1 / 1; transform: translate(-50%, -50%); background: center / cover no-repeat; }

.ms-spot { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; padding: 0; border: 0; background: none; cursor: pointer; z-index: 3; }
.ms-spot-ic { position: relative; z-index: 2; display: grid; place-items: center; width: clamp(48px, 4.6cqw, 70px); aspect-ratio: 1; border-radius: 50%; font-size: clamp(24px, 2.4cqw, 36px);
  background: #fffaf0; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--c), 0 8px 14px rgba(0, 0, 0, .3); }
.ms-spot-name { margin-left: -14px; padding: 8px 18px 8px 24px; font-weight: 800; font-size: clamp(13px, 1.3cqw, 19px); line-height: 1.15; color: #3d1f06; white-space: nowrap; text-align: left;
  background: repeating-linear-gradient(178deg, rgba(110, 60, 20, .1) 0 2px, transparent 2px 8px), linear-gradient(180deg, #fbe6bd, #e9c083);
  border-radius: 0 12px 12px 0; box-shadow: inset 0 0 0 2px #b27d3e, 0 6px 12px rgba(0, 0, 0, .25); }
.ms-spot-name small { display: block; font-size: .72em; }
.ms-spot.is-main .ms-spot-ic { width: clamp(64px, 6cqw, 92px); font-size: clamp(32px, 3.2cqw, 48px); background: linear-gradient(180deg, #ffb057, #ff8a1f); border-color: #fff4d6; }
.ms-spot.is-main .ms-spot-name { font-size: clamp(16px, 1.6cqw, 23px); }
.ms-spot:hover .ms-spot-ic, .ms-spot.is-active .ms-spot-ic { transform: scale(1.08); box-shadow: 0 0 0 3px var(--c), 0 0 0 9px rgba(255, 210, 63, .55), 0 8px 14px rgba(0, 0, 0, .3); }
.ms-spot.is-active .ms-spot-name { background: linear-gradient(180deg, #fff3cf, #ffd98a); }
.ms-spot-ic, .ms-spot-name { transition: transform .15s, box-shadow .15s; }
.ms-bang { position: absolute; top: -12px; right: -10px; z-index: 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: #e8342b; color: #fff; font-weight: 800; font-size: 19px; border: 3px solid #fff; box-shadow: 0 3px 6px rgba(0, 0, 0, .3); animation: ms-bounce 1.6s ease-in-out infinite; }
.ms-spot .ms-bang { left: clamp(34px, 3.4cqw, 52px); right: auto; top: -10px; }
@keyframes ms-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } }
.ms-char { position: absolute; transform: translate(-50%, -50%); width: clamp(80px, 9cqw, 130px); padding: 0; border: 0; background: none; cursor: pointer; z-index: 2; }
.ms-char img { width: 100%; display: block; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .3)); transition: transform .15s; }
.ms-char:hover img { transform: translateY(-4px) scale(1.04); }

.ms-title { position: absolute; left: 18px; top: 16px; z-index: 4; padding: 18px 40px 22px 110px; transform: rotate(-4deg); color: #4a2508;
  background: radial-gradient(ellipse 60% 50% at 30% 20%, rgba(255, 240, 210, .5), transparent 70%),
    repeating-linear-gradient(177deg, rgba(110, 60, 20, .12) 0 2px, transparent 2px 8px), linear-gradient(180deg, #f3d39a, #deaa66);
  border-radius: 12px; box-shadow: inset 0 0 0 4px #9a6130, 0 6px 0 #6b3d17, 0 16px 22px rgba(40, 20, 0, .35); }
.ms-title h1 { margin: 0; font-size: clamp(24px, 2.6cqw, 42px); font-weight: 800; letter-spacing: .03em; line-height: 1.1; text-shadow: 0 2px 0 rgba(255, 226, 170, .8); }
.ms-title p { margin: 6px 0 0; font-weight: 800; font-size: clamp(12px, 1.2cqw, 17px); line-height: 1.5; text-align: center; }
.ms-compass { position: absolute; left: -26px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff4d0, #f4d27b 55%, #c9962c); box-shadow: inset 0 0 0 5px #b27d22, inset 0 0 0 10px #f7e2a6, 0 8px 14px rgba(60, 30, 0, .35); }
.ms-compass svg { width: 70px; height: 70px; fill: none; stroke: #8a5a14; stroke-width: 2.4; stroke-linecap: round; }
.ms-compass .n { fill: #d8412d; stroke: #8a2c1a; }
.ms-hero { position: absolute; right: -130px; top: -18px; width: 150px; transform: rotate(4deg); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .3)); }
.ms-bubble { position: absolute; right: 22px; top: 22px; z-index: 4; margin: 0; padding: 18px 24px; border-radius: 30px; background: rgba(255, 255, 255, .96); font-weight: 800;
  font-size: clamp(13px, 1.25cqw, 17px); line-height: 1.65; color: #1b2440; box-shadow: 0 10px 22px rgba(0, 0, 0, .2); }
.ms-bubble::after { content: ""; position: absolute; left: -14px; bottom: 26px; border: 12px solid transparent; border-right: 20px solid rgba(255, 255, 255, .96); border-left: 0; }

.ms-legend { position: absolute; left: 50%; bottom: 14px; z-index: 4; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; width: max-content; max-width: calc(100% - 32px);
  margin: 0; padding: 10px 20px; list-style: none; border-radius: 14px; background: rgba(255, 252, 244, .96); box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.ms-legend li { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: #2a2014; white-space: nowrap; }
.ms-legend span { font-size: 22px; }

/* ---- 右のパネル ---- */
.ms-panel { position: relative; margin: 14px 14px 14px 0; padding: 22px 20px 20px; overflow-y: auto; border-radius: 22px; color: #1b2440;
  background: radial-gradient(ellipse at 30% 10%, #fffaf0, #fbefd6 70%, #f3dcae);
  box-shadow: inset 0 0 0 4px #d9a860, inset 0 0 0 9px #fbeed3, inset 0 0 0 11px #c98a45, 0 12px 30px rgba(0, 0, 0, .3); }
.ms-panel h2 { margin: 0; font-size: 26px; font-weight: 800; color: #3d1f06; letter-spacing: .04em; }
.ms-panel-lead { margin: 6px 0 14px; font-weight: 700; font-size: 13.5px; line-height: 1.7; color: #4c3a24; }
.ms-panel .app-flash { margin: 0 0 12px; font-size: 13px; }
.ms-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fff0dc; font-size: 12.5px; font-weight: 700; }
.ms-none { padding: 40px 10px; text-align: center; font-weight: 800; font-size: 18px; color: #6b5a3e; background: rgba(255, 255, 255, .6); border-radius: 16px; }

.ms-spotcard { padding: 14px; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px rgba(80, 50, 10, .12); }
.ms-spotcard header { display: flex; align-items: center; gap: 10px; }
.ms-card-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-size: 26px; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.ms-spotcard h3 { flex: 1; margin: 0; font-size: 22px; font-weight: 800; }
.ms-x { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: #f1f3f8; cursor: pointer; color: #1b2440; }
.ms-x .ic { width: 20px; height: 20px; }
.ms-photo { height: 130px; margin: 12px 0 10px; border-radius: 12px; background-color: #cfe6c2; background-size: 360%; background-repeat: no-repeat; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.ms-desc { margin: 0 0 12px; font-size: 13.5px; font-weight: 700; line-height: 1.7; color: #3c4660; }

.ms-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ms-tabs button { min-height: 44px; border-radius: 10px; border: 0; cursor: pointer; font-weight: 800; font-size: 15px; background: #eef1f6; color: #1b2440; }
.ms-tabs button.is-on { background: linear-gradient(180deg, #ffa14a, #ff8a1f); color: #fff; box-shadow: 0 3px 0 #c45f00; }

.ms-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ms-item { display: grid; grid-template-columns: 22px 46px minmax(0, 1fr) 54px; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 12px; cursor: pointer;
  background: #fff; box-shadow: inset 0 0 0 1.5px #ebe3d2; transition: box-shadow .12s, background .12s; }
.ms-item:hover { background: #fffaf0; }
.ms-item:has(input:checked) { background: #fff7ea; box-shadow: inset 0 0 0 2px #ff9d3d; }
.ms-item input { width: 20px; height: 20px; accent-color: #ff8a1f; margin: 0; }
.ms-item-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-size: 24px; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.ms-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-item-body b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14.5px; }
.ms-item-body b em { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 6px; background: #e8342b; color: #fff; }
.ms-item-body small { font-size: 12px; color: #5a6680; font-weight: 700; }
.ms-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 3px; }
.ms-chips i { white-space: nowrap; font-style: normal; font-size: 12px; font-weight: 800; color: #e06a00; background: #fff1de; padding: 1px 8px; border-radius: 6px; }
.ms-lv { display: grid; place-items: center; align-content: center; height: 54px; border-radius: 10px; background: #fffaf0; box-shadow: inset 0 0 0 1.5px #ebe3d2; font-weight: 800; font-size: 12px; }
.ms-lv svg { width: 24px; height: 20px; fill: #ffcf3f; stroke: #b36b00; stroke-width: 1.3; }
.ms-empty { padding: 16px; border-radius: 12px; background: #f6f8fc; font-size: 13px; font-weight: 700; line-height: 1.7; color: #4c5670; }
.ms-go { width: 100%; min-height: 56px; margin-top: 14px; border: 0; border-radius: 14px; font-weight: 800; font-size: 17px; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #ffa14a, #ff8a1f 55%, #f07400); box-shadow: 0 5px 0 #c45f00; }
.ms-go:disabled { background: #a9b0bd; box-shadow: 0 5px 0 #8a919e; cursor: not-allowed; }
.ms-go:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #c45f00; }
.ms-go-note { margin: 10px 0 0; font-size: 11.5px; font-weight: 700; color: #6b5a3e; text-align: center; }
.ms-info { margin: 0; display: grid; gap: 8px; }
.ms-info div { display: grid; grid-template-columns: 90px 1fr; padding: 10px 12px; border-radius: 10px; background: #f6f8fc; }
.ms-info dt { font-weight: 800; color: #6b5a3e; font-size: 13px; }
.ms-info dd { margin: 0; font-weight: 800; }
.ms-info-links { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---- レスポンシブ ---- */
@media (max-width: 1100px) {
  .app--mission { overflow: auto; }
  .app-main--mission { height: auto; }
  .ms { grid-template-columns: 1fr; height: auto; }
  .ms-map { height: auto; aspect-ratio: 1 / 1; max-height: none; }
  .ms-panel { margin: 12px; overflow: visible; }
  .ms-hero { display: none; }
}
@media (max-width: 720px) {
  .ms-title { left: 10px; top: 10px; padding: 12px 18px 14px 70px; }
  .ms-compass { width: 76px; height: 76px; left: -16px; }
  .ms-compass svg { width: 48px; height: 48px; }
  .ms-bubble, .ms-char, .ms-legend, .ms-title p { display: none; }
  .ms-title h1 { font-size: 20px; }
  .ms-spot-ic { width: 34px; font-size: 18px; border-width: 3px; }
  .ms-spot.is-main .ms-spot-ic { width: 44px; font-size: 24px; }
  .ms-spot-name, .ms-spot.is-main .ms-spot-name { font-size: 11px; padding: 5px 10px 5px 18px; }
  .ms-bang { width: 20px; height: 20px; font-size: 13px; border-width: 2px; }
  .ms-spot .ms-bang { left: 22px; top: -8px; }
  .ms-spot-name small { display: none; }
  .ms-legend { gap: 2px 10px; padding: 8px 10px; }
  .ms-legend li { font-size: 11px; }
  .ms-legend span { font-size: 16px; }
}

/* 3Dアイコン（assets/rpg/icons/spot-*.webp） */
.ms-spot-ic .spot-ic-img { width: 82%; height: 82%; object-fit: contain; }
.ms-spot.is-main .ms-spot-ic .spot-ic-img { width: 86%; height: 86%; }
.ms-card-ic .spot-ic-img { width: 88%; height: 88%; object-fit: contain; }
.ms-legend .spot-ic-img { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; }
.ms-spot-ic:has(.spot-ic-img) { background: #fff; }
.ms-spot.is-main .ms-spot-ic:has(.spot-ic-img) { background: radial-gradient(circle, #fff 55%, #ffe0bd); }
.ms-card-ic:has(.spot-ic-img) { background: #fff7ea; }
.ms-sky { height: 30%; }

/* 右の「ミッションをえらぼう」… 見本どおり（木の板・絵つきカード・星とコイン）※はばは そのまま */
.ms-spotcard { background: repeating-linear-gradient(178deg, rgba(0, 0, 0, .04) 0 2px, transparent 2px 12px), linear-gradient(180deg, #fff6e2, #f3e0bb) !important; box-shadow: inset 0 0 0 3px #d9ae6a, inset 0 0 0 6px #fff4dc, 0 6px 0 #a87434 !important; }
.ms-desc { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-weight: 800 !important; color: #4a2c0e !important; line-height: 1.6 !important;
  background: repeating-linear-gradient(178deg, rgba(120, 70, 20, .06) 0 2px, transparent 2px 10px), linear-gradient(180deg, #f5d9a6, #e3b877); box-shadow: inset 0 0 0 2px #b97a36, 0 3px 0 #8a5520; }
.ms-desc img { flex: none; width: 30px; height: 30px; }
.ms-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 900 !important; }
.ms-tabs button img { width: 24px; height: 24px; }
.ms-tabs button.is-on { background: linear-gradient(180deg, #ffa14a, #ff8a1f 55%, #f07400) !important; color: #fff !important; box-shadow: 0 4px 0 #c45f00 !important; }
.ms-tabs button:not(.is-on) { background: #fffaf0 !important; box-shadow: inset 0 0 0 2px #e6d6b4, 0 3px 0 #d8c29a !important; color: #3b2a14 !important; }
.ms-list { padding: 8px; border-radius: 16px; background: repeating-linear-gradient(178deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 12px), linear-gradient(180deg, #a86a32, #8a5220); box-shadow: inset 0 0 0 3px #6b3a12; }
.ms-list li + li { margin-top: 6px; }
.ms-item { background: linear-gradient(180deg, #fffaf0, #fbefd8) !important; box-shadow: inset 0 0 0 2px #f1d9a8, 0 3px 0 #6b3a12 !important; border: 0 !important; border-radius: 12px !important; }
.ms-item-ic { width: 60px !important; height: 60px !important; border-radius: 12px !important; overflow: hidden; }
.ms-item-ic.has-img { background: none !important; box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(0, 0, 0, .15); }
.ms-item-ic img { width: 100%; height: 100%; object-fit: cover; }
.ms-item-ic img.ei { width: 70%; height: 70%; object-fit: contain; }
.ms-item-body b { color: #3b2a14 !important; font-weight: 900 !important; }
.ms-chips i { display: inline-flex; align-items: center; gap: 3px; padding: 2px 10px 2px 4px !important; border-radius: 99px !important; background: #fff !important; box-shadow: inset 0 0 0 1.5px #f1d9a8; color: #e8661a !important; font-weight: 900 !important; }
.ms-chips i img { width: 18px; height: 18px; }
.ms-go-row { position: relative; display: flex; align-items: flex-end; gap: 6px; margin-top: 10px; }
.ms-go-navi { flex: none; width: 70px; height: auto; margin-bottom: -4px; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .2)); }
.ms-go-row .ms-go { flex: 1; margin: 0; }
.ms-go-note { padding: 8px 12px; border-radius: 10px; background: linear-gradient(180deg, #f5d9a6, #deb068); box-shadow: inset 0 0 0 2px #b97a36; color: #3b2a14 !important; font-weight: 800 !important; }
.ms-bang.sh { width: 32px !important; height: 32px !important; border-radius: 50%; }
@media (max-width: 720px) {
  .ms-bang.sh { width: 20px !important; height: 20px !important; }
  .ms-bang.sh img, .ms-bang.sh .ei { width: 100% !important; height: 100% !important; }
  .ms-spot .ms-bang.sh { left: auto; right: -6px; top: -10px; }
  .ms-spot-name, .ms-spot.is-main .ms-spot-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
}
/* スマホ：文字を折り返さない・カードを たてに */
.ms-tabs button, .ms-go { white-space: nowrap; }
.ms-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .9); color: #e06a00; font-size: 13px; font-weight: 900; }
.ms-tabs button:not(.is-on) .ms-n { background: #ff8a1f; color: #fff; }
@media (max-width: 720px) {
  .ms-tabs button { font-size: 14px; padding: 0 8px; gap: 4px; }
  .ms-tabs button img { width: 22px; height: 22px; }
  .ms-item { grid-template-columns: 22px 56px minmax(0, 1fr); grid-template-areas: "ck ic body" "ck ic lv"; row-gap: 4px; }
  .ms-item > input { grid-area: ck; } .ms-item-ic { grid-area: ic; } .ms-item-body { grid-area: body; } .ms-lv { grid-area: lv; justify-self: start; display: inline-flex !important; flex-direction: row !important; gap: 4px; padding: 2px 10px !important; min-height: 0 !important; }
  .ms-item-body b { font-size: 15px; } .ms-item-body small { font-size: 12px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
  .ms-chips { display: flex; flex-wrap: wrap; gap: 4px; }
  .ms-chips i { white-space: nowrap; font-size: 12px !important; }
  .ms-go { font-size: 15px; min-height: 52px; padding: 0 10px; }
  .ms-go-navi { width: 56px; }
  .ms-desc, .ms-go-note { word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
}
/* 2026-09-27 スマホ：1件を2行に（題名／ごほうび・Lv）。枠の入れ子を うすく、説明は出さない */
@media (max-width: 720px) {
  .ms-panel-lead { display: none; }
  .ms-spotcard { padding: 10px !important; }
  .ms-list { padding: 6px; }
  .ms-item { position: relative; grid-template-columns: 20px 52px minmax(0, 1fr) !important; grid-template-areas: "ck ic body" !important; gap: 8px !important; padding: 8px 8px !important; }
  .ms-item-ic { width: 52px !important; height: 52px !important; }
  .ms-item-body small { display: none; }
  .ms-item-body b { font-size: 14px; line-height: 1.35; padding-right: 44px; }
  .ms-chips { flex-wrap: nowrap; }
  .ms-chips i { padding: 1px 8px 1px 3px !important; font-size: 11.5px !important; }
  .ms-chips i img { width: 15px; height: 15px; }
  .ms-item .ms-lv { position: absolute; right: 6px; top: 6px; height: auto !important; width: auto !important; padding: 1px 7px !important; min-width: 0 !important; min-height: 0 !important; font-size: 11px !important; border-radius: 99px !important; box-shadow: inset 0 0 0 1.5px #f1d9a8 !important; background: #fff !important; }
  .ms-lv svg { width: 12px !important; height: 12px !important; }
}
@media (max-width: 720px) {
  .ms-item .ms-lv.is-lv1 { display: none !important; }
  .ms-item:has(.ms-lv:not(.is-lv1)) .ms-item-body b { padding-right: 48px !important; }
  .ms-item-body b { padding-right: 0; }
}
/* 2026-09-27：右のパネルは PC・iPadでも せまいので、スマホと同じ 2行の形に（Lvは 右上の 小さな札、説明は 1行） */
.ms-item { position: relative; grid-template-columns: 22px 56px minmax(0, 1fr) !important; grid-template-areas: "ck ic body" !important; gap: 10px !important; padding: 8px 10px !important; }
.ms-item > input { grid-area: ck; } .ms-item-ic { grid-area: ic; width: 56px !important; height: 56px !important; } .ms-item-body { grid-area: body; min-width: 0; }
.ms-item-body b { display: block !important; font-size: 14.5px; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.ms-item:has(.ms-lv:not(.is-lv1)) .ms-item-body b { padding-right: 50px; }
.ms-item-body small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.ms-chips { display: flex !important; flex-wrap: nowrap; gap: 4px; margin-top: 3px; }
.ms-chips i { white-space: nowrap; padding: 1px 8px 1px 3px !important; font-size: 11.5px !important; }
.ms-chips i img { width: 16px; height: 16px; }
.ms-item .ms-lv { position: absolute; right: 6px; top: 6px; display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 3px; width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important;
  padding: 1px 7px !important; border-radius: 99px !important; font-size: 11px !important; background: #fff !important; box-shadow: inset 0 0 0 1.5px #f1d9a8 !important; }
.ms-item .ms-lv svg { width: 12px !important; height: 12px !important; }
.ms-item .ms-lv.is-lv1 { display: none !important; }
.ms-item:not(:has(> input)) { grid-template-columns: 56px minmax(0, 1fr) !important; grid-template-areas: "ic body" !important; cursor: default; }
