/* 採集画面の見本（sampling_mock.php / js/sampling_mock.js。2026-09-26） */
.sm-stage { position: relative; height: calc(100dvh - var(--navbar-h, 60px)); overflow: hidden; background: #0b3a5a; }
#page-1 .sm-stage { height: 100%; z-index: 0; } /* sampling.php に組み込んだとき（採集方法を選ぶ画面の入れ物いっぱい）。z-index: 0 で地図の中の重なり（Leaflet は 400〜）を閉じこめ、海の画面へ移るときの幕（z-index 99）の下に隠さない */
.sm-map { position: absolute; inset: 0; }
/* 地図をすこしゲームっぽく（彩度・明るさ）。タイルそのものは OpenStreetMap */
.sm-map .leaflet-tile-pane { filter: saturate(1.35) contrast(1.05) brightness(1.03); }
/* ドット絵の地図（js/sampling_mock.js の PixelLayer）。小さなキャンバスを引き伸ばす */
.sm-map.is-pixel { background: #4aa3d4; }
.sm-map.is-pixel .leaflet-tile-pane { filter: none; }
.sm-pixel-tile { image-rendering: pixelated; image-rendering: crisp-edges; }
.sm-base { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.sm-base button { padding: 5px 12px; border: 0; border-radius: 999px; background: none; color: #06293a; font-weight: 800; font-size: 13px; cursor: pointer; }
.sm-base button[aria-pressed="true"] { background: #06293a; color: #fff; }

.sm-top { position: absolute; z-index: 500; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; }
.sm-top > * { pointer-events: auto; }
.sm-zoom { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.sm-zoom button { padding: 6px 14px; border: 0; border-radius: 999px; background: none; color: #06293a; font-weight: 800; font-size: 14px; cursor: pointer; }
.sm-zoom button:hover { background: #e3f3f6; }
.sm-edit { display: flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(255, 246, 224, .95); color: #6b4a00; font-weight: 800; font-size: 13px; text-transform: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); cursor: pointer; }
.sm-edit[hidden], .sm-others[hidden], .sm-legend[hidden], .sm-actions[hidden], .sm-viewonly[hidden], .sm-class[hidden] { display: none; }
.sm-others { display: flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #06293a; font-weight: 800; font-size: 13px; text-transform: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); cursor: pointer; }
.sm-others input { margin: 0; }
/* クラスごとの色（印のふち・札・説明のカード）。--pin は JS が入れる */
.sm-legend { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; } /* .sm-top の中の1段（ボタンが折り返しても重ならない） */
.sm-chip { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 8px; border: 2px solid var(--pin); border-radius: 999px; background: rgba(255, 255, 255, .95); }
.sm-chip input { width: 15px; height: 15px; margin: 0; accent-color: var(--pin); cursor: pointer; }
.sm-chip button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; border: 0; background: none; color: #06293a; font-weight: 800; font-size: 12px; cursor: pointer; }
.sm-chip.is-off { border-style: dashed; opacity: .6; }
.sm-legend i { display: inline-block; width: 12px; height: 12px; background: var(--pin); }
.sm-edit input { margin: 0; }
.sm-badge { position: absolute; z-index: 500; left: 12px; bottom: 96px; padding: 3px 10px; border-radius: 999px; background: #f0a500; color: #fff; font-size: 12px; font-weight: 900; }
.sm-hint { position: absolute; z-index: 500; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; padding: 8px 16px; border-radius: 999px; background: rgba(6, 41, 58, .85); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; transition: opacity .3s; }
.sm-hint.is-hidden { opacity: 0; pointer-events: none; }

/* 採集方法の印（ドット絵っぽい四角い枠に写真） */
.sm-pin { position: relative; width: 56px; height: 70px; }
.sm-pin-photo { position: absolute; left: 4px; top: 0; width: 48px; height: 48px; border: 3px solid #fff; outline: 3px solid var(--pin, #06293a); background: #cfe6ee center / cover no-repeat; image-rendering: pixelated; box-shadow: 4px 4px 0 rgba(6, 41, 58, .45); }
.sm-pin-tail { position: absolute; left: 22px; top: 50px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid var(--pin, #06293a); }
.sm-pin-label { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); padding: 1px 7px; border: 2px solid var(--pin, #06293a); background: #fff; color: var(--pin, #06293a); font: 800 12px/1.4 "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; white-space: nowrap; box-shadow: 2px 2px 0 rgba(6, 41, 58, .45); }
.sm-pin.is-temp .sm-pin-photo { border-style: dashed; }
/* 引いたときのまとまり（何か所あるか） */
.sm-group .sm-pin-photo b { position: absolute; right: -12px; top: -12px; min-width: 24px; height: 24px; padding: 0 5px; border: 2px solid #06293a; border-radius: 12px; background: #f0a500; color: #fff; font: 900 13px/20px sans-serif; text-align: center; }
.sm-pin.is-active .sm-pin-photo { outline-color: #f0a500; box-shadow: 0 0 0 4px rgba(240, 165, 0, .5), 4px 4px 0 rgba(6, 41, 58, .45); }
.sm-pin.is-active .sm-pin-label { background: #f0a500; color: #fff; border-color: #a36a00; }
.leaflet-marker-draggable .sm-pin-photo { cursor: move; outline-color: #d99a00; }

/* ぶいちゃん（ドット絵）。歩くあいだは上下に小さく跳ねる */
.sm-vee { position: relative; width: 48px; height: 56px; pointer-events: none; }
.sm-vee img { position: absolute; left: 0; bottom: 6px; width: 48px; height: 48px; image-rendering: pixelated; transform-origin: 50% 100%; }
.sm-vee.is-left img { transform: scaleX(-1); }
.sm-vee::after { content: ""; position: absolute; left: 10px; bottom: 2px; width: 28px; height: 7px; border-radius: 50%; background: rgba(0, 0, 0, .28); }
.sm-vee.is-walking img { animation: sm-hop .28s steps(2) infinite; }
.sm-vee.is-left.is-walking img { animation-name: sm-hop-left; }
@keyframes sm-hop { 0% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sm-hop-left { 0% { transform: scaleX(-1) translateY(0); } 50% { transform: scaleX(-1) translateY(-5px); } }
.sm-vee.is-idle img { animation: sm-breathe 1.6s steps(2) infinite; }
.sm-vee.is-left.is-idle img { animation-name: sm-breathe-left; } /* 左向きの反転も入れておかないと、向きの変わり目で幅0になって消えた */
@keyframes sm-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes sm-breathe-left { 0%, 100% { transform: scaleX(-1) translateY(0); } 50% { transform: scaleX(-1) translateY(-2px); } }
/* 上（北）へ 歩く ときの 後ろ姿（40×40 の 2コマを 横に。2026-10-05）: 歩きの 跳ねと いっしょに 足ぶみ */
.leaflet-container .sm-vee img { width: 48px; height: 48px; } /* Leaflet の「地図の 中の 画像は 幅 auto」に 負けて、2コマの 後ろ姿が 横に 2人 ならんで 見えた */
.sm-vee.is-back img { object-fit: cover; object-position: 0 0; }
.sm-vee.is-back.is-walking img { animation: sm-hop .28s steps(2) infinite, sm-back-step .28s step-end infinite; }
.sm-vee.is-back.is-left.is-walking img { animation: sm-hop-left .28s steps(2) infinite, sm-back-step .28s step-end infinite; }
@keyframes sm-back-step { 0% { object-position: 0 0; } 50% { object-position: 100% 0; } 100% { object-position: 100% 0; } }
.sm-trail { stroke-dasharray: 2 10; stroke-linecap: square; }

/* 下からの説明。小さい写真を題名の横に、数は1行に（2026-09-26 に縦を短くした） */
.sm-sheet { position: absolute; z-index: 600; left: 12px; right: 12px; bottom: 12px; max-height: 60%; padding: 12px 14px; border: 3px solid var(--pin, #06293a); border-radius: 14px; background: #fffdf6; box-shadow: 6px 6px 0 rgba(6, 41, 58, .35); transform: translateY(130%); transition: transform .35s cubic-bezier(.2, .9, .3, 1.2); overflow-y: auto; overscroll-behavior: contain; }
.sm-sheet.is-open { transform: translateY(0); }
@media (min-width: 900px) { .sm-sheet { left: auto; width: 440px; } }
.sm-sheet-close { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #e9eef0; color: #06293a; font-size: 17px; font-weight: 900; cursor: pointer; }
/* 横長の写真。名前は写真の下のほうに重ねる（写真の上に暗いぼかしを敷いて読めるように） */
.sm-head { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; height: 104px; margin: -2px 0 6px; padding: 8px 12px; border: 3px solid var(--pin, #06293a); border-radius: 10px; background: #cfe6ee center / cover no-repeat; overflow: hidden; }
.sm-head::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0) 65%); }
.sm-head > * { position: relative; }
.sm-sheet h2 { margin: 0; color: #fff; font-size: 22px; font-weight: 900; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.sm-class { position: absolute; top: 8px; left: 10px; margin: 0; padding: 0 8px; border-radius: 999px; background: var(--pin, #06293a); color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.sm-sheet-close { z-index: 2; }
.sm-stats { margin: 0 0 4px; color: #06293a; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-stats b { margin-right: 6px; padding: 0 6px; border-radius: 4px; background: #fff0c7; color: #a36a00; }
.sm-stats i { margin-left: 8px; font-style: normal; color: #55646b; }
.sm-comp { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; vertical-align: middle; } /* 集めた 12 / 61 ▰▱ 20%（2026-09-28） */
.sm-comp-lab { color: #55646b; }
.sm-comp-bar { position: relative; display: inline-block; width: 56px; height: 7px; border-radius: 999px; background: #dfe7eb; overflow: hidden; }
.sm-comp-bar i { position: absolute; top: 0; left: 0; bottom: 0; margin: 0; border-radius: inherit; background: #f28c1e; } /* margin: 0 … 上の .sm-stats i（以前のレア度の数字用）の左の余白 8px がかかり、棒がずれていた（2026-09-28） */
.sm-comp-pct { color: #c0660a; }
.sm-comp.is-full .sm-comp-bar i { background: #2ea44f; }
.sm-comp.is-full .sm-comp-pct { color: #1d7a3a; }
.sm-text { margin: 0 0 4px; color: #06293a; font-size: 13px; font-weight: 700; line-height: 1.45; }
.sm-text2 { margin: 0 0 6px; color: #55646b; font-size: 12px; }
.sm-text2:empty { display: none; }
.sm-viewonly { margin: 0 0 6px; padding: 4px 10px; border-radius: 8px; background: #f1f4f6; color: #55646b; font-size: 12px; font-weight: 700; }
.sm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.sm-collect { display: inline-flex; gap: 8px; }
.sm-btn { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 16px; border: 3px solid #06293a; border-radius: 10px; background: #fff; color: #06293a; font-weight: 900; font-size: 15px; box-shadow: 3px 3px 0 #06293a; text-decoration: none; }
.sm-btn:hover { color: #06293a; text-decoration: none; transform: translate(1px, 1px); box-shadow: 2px 2px 0 #06293a; }
.sm-btn small { font-size: 12px; font-weight: 900; }
.sm-btn-main { background: #1aa6b7; color: #fff; }
.sm-btn-main:hover { color: #fff; }
.sm-btn[hidden] { display: none; }
.sm-goworld-busy { opacity: .6; pointer-events: none; }
.sm-btn-main small { font-size: 11px; opacity: .8; }
.sm-actions .sm-spots-btn { margin: 0 0 0 auto; }
/* 説明のカードが出ているあいだ、スマホでは左下の拡大ボタンを隠す（カードに重なった） */
@media (max-width: 899px) { .sm-map.is-sheet-open .leaflet-bottom.leaflet-left { display: none; } }

/* 撮影場所を見る（参考）。採集していない写真は黒いシルエットに「?」 */
.sm-spots-btn { display: inline-block; padding: 6px 12px; border: 2px solid var(--pin, #06293a); border-radius: 999px; background: #fff; color: var(--pin, #06293a); font-weight: 800; font-size: 13px; cursor: pointer; }
.sm-spots-btn[hidden], .sm-spots-bar[hidden] { display: none; }
.sm-spots-bar { position: absolute; z-index: 650; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; max-width: calc(100% - 24px); padding: 8px 10px 8px 16px; border: 3px solid #06293a; border-radius: 14px; background: #fffdf6; color: #06293a; font-weight: 800; font-size: 14px; box-shadow: 4px 4px 0 rgba(6, 41, 58, .35); }
.sm-spots-bar button { padding: 5px 16px; border: 0; border-radius: 999px; background: #1aa6b7; color: #fff; font-weight: 900; cursor: pointer; }
.sm-spots-legend { display: inline-flex; align-items: center; gap: 4px; color: #55646b; font-size: 12px; }
.sm-spots-legend i { display: inline-block; width: 14px; height: 14px; border: 2px solid #06293a; background: #9fd3dd; }
.sm-spots-legend i.u { background: #111; }
.sm-spot { position: relative; width: var(--s, 34px); height: calc(var(--s, 34px) + 8px); } /* 下の尖りの先が撮影場所（js/sampling_mock.js の spotMarker。2026-09-28） */
.sm-spot-photo { position: relative; z-index: 1; width: var(--s, 34px); height: var(--s, 34px); box-sizing: border-box; border: 2px solid #fff; border-radius: 50%; outline: 2px solid var(--pin, #06293a); background: #cfe6ee center / cover no-repeat; box-shadow: 2px 2px 0 rgba(6, 41, 58, .4); }
.sm-spot::after { content: ""; position: absolute; left: 50%; bottom: 0; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top: 10px solid var(--pin, #06293a); }
.sm-spot.is-unknown .sm-spot-photo { filter: brightness(0); border-color: #333; }
.sm-spot b { position: absolute; z-index: 2; top: 0; left: 0; width: var(--s, 34px); height: var(--s, 34px); display: flex; align-items: center; justify-content: center; color: #fff; font: 900 15px/1 sans-serif; pointer-events: none; }
.sm-spot-n { position: absolute; z-index: 3; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: #f28c1e; color: #fff; border: 2px solid #fff; font: 900 12px/16px sans-serif; text-align: center; box-shadow: 1px 1px 0 rgba(6, 41, 58, .4); }
.sm-spot-many { width: 210px; }
.sm-spot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 6px 0; }
.sm-spot-cell { aspect-ratio: 1 / 1; border-radius: 6px; background: #cfe6ee center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: #fff; font: 900 14px/1 sans-serif; position: relative; }
.sm-spot-cell.is-unknown { background-image: none !important; background: #111; }
.sm-spot-pop { width: 150px; text-align: center; }
.sm-spot-pop-photo { width: 150px; height: 110px; margin-bottom: 6px; border-radius: 8px; background: #cfe6ee center / cover no-repeat; }
.sm-spot-pop.is-unknown .sm-spot-pop-photo { filter: brightness(0); }
.sm-spot-pop b { display: block; font-size: 15px; color: #06293a; }
.sm-spot-pop small { color: #6b7a82; }
@media (max-width: 600px) {
    /* スマホでは上のボタンを小さく（4つ＋色の見本が並ぶと地図が隠れる） */
    .sm-top { top: 6px; left: 6px; right: 6px; gap: 5px; }
    .sm-zoom, .sm-base { padding: 2px; }
    .sm-zoom button, .sm-base button { padding: 4px 9px; font-size: 12px; }
    .sm-others, .sm-edit { padding: 4px 9px; font-size: 12px; }
    .sm-legend { gap: 4px; }
    .sm-chip button { padding: 3px 4px; font-size: 11px; gap: 4px; }
    .sm-hint { font-size: 12px; }
    .sm-head { height: 92px; }
}

/* まだ行けない場所（1つの世界のとき。js/sampling_mock.js の makeMarker） */
.sm-pin.is-locked .sm-pin-photo { filter: grayscale(1) brightness(.75); }
.sm-pin.is-locked .sm-pin-label { background: #e9edef; color: #55646b; }
.sm-lock { position: absolute; z-index: 2; left: 50%; top: 18px; transform: translateX(-50%); font-size: 20px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); pointer-events: none; }

/* 今週のピックアップ（js/pickup.js。2026-10-02）: ピンの上の札と、説明のカードの一言 */
.sm-pin .sm-pk { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 3; padding: 1px 6px; border: 2px solid #1d2b53; border-radius: 999px; background: #ffd84d; color: #1d2b53; font-size: 11px; font-weight: 900; white-space: nowrap; animation: sm-pk-bob 1.6s ease-in-out infinite; }
@keyframes sm-pk-bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -3px); } }
.sm-pin.is-pickup .sm-pin-photo { box-shadow: 0 0 0 3px #ffd84d, 0 0 12px 4px rgba(255, 216, 77, .7); }
.sm-pk-line { display: block; margin: 0 0 4px; color: #d18a00; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .sm-pin .sm-pk { animation: none; } }
/* 地図の 拡大・縮小の ボタンを 押しやすく（2026-10-05。Leaflet の 既定は 30px） */
.sm-stage .leaflet-control-zoom a { width: 40px; height: 40px; line-height: 40px; font-size: 20px; }
