/**
 * KK カルテ — 公証役場地図モーダル（customer-detail の notary 系を転用）
 *
 * - PC / 共通レイアウトは本ファイル前半。
 * - 狭い画面（〜768px / 〜480px）の調整は末尾の @media ブロックで行う。
 *   ※ common-form.tablet.css よりも本ファイルが後に読み込まれるため（KK のアセット enqueue で
 *      'kh-kk-notary-map' として追加で読み込まれる）、モバイル上書きは必ず本ファイル内に書く。
 */

.kh-karte__notaryPick {
    display: block;
    width: 100%;
    max-width: 100%;
}

#kh-karte .kh-karte__notaryHqError {
    margin-top: 8px;
    margin-bottom: 0;
}

/* プルダウン風：他の select と同様に右端に ▼、クリックで地図
   元は input 要素だったが、スマホでフォーカス時に入力キーボードが表示される
   問題を回避するため button 要素を可視 UI とし、フォーム値とバリデーション
   連携は sr-only な hidden 風 input（.kh-karte__notaryPickInput）に任せる */
#kh-karte .kh-karte__notaryPickDisplay,
#kh-karte .kh-karte__notaryPick input.kh-karte__notaryPickDisplay,
#kh-karte .kh-karte__notaryPick button.kh-karte__notaryPickDisplay {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding: 12px 2.35rem 12px 14px;
    cursor: pointer;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M3.5 5.25L7 8.75l3.5-3.5'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 14px 14px;
    text-align: left;
}

/* button 版は input と同じ枠線・フォント・カラーで描画する（既定の button styling をリセット）
   #kh-karte input[type="text"] と揃えるため font-size / padding は共通レイヤで再宣言。
   モバイルの font-size 調整は common-form.tablet.css 内の .kh-karte__notaryPickDisplay
   セレクタが既に当たるため、本ファイルでは PC 既定のみ指定する。 */
#kh-karte button.kh-karte__notaryPickDisplay {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 400;
    font-size: 15px;
    color: var(--karte-text);
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* 未選択時のプレースホルダ表現（input 時は placeholder 属性で実現していたものを div/button 用に CSS 化） */
#kh-karte .kh-karte__notaryPickDisplay--empty::before {
    content: attr(data-kh-notary-placeholder);
    color: var(--karte-placeholder, #94a3b8);
}

/* 無効状態（プルダウンが defer / 未選択時の button は非表示にせず、JS 側で wrap を hidden にする想定） */
#kh-karte button.kh-karte__notaryPickDisplay[aria-disabled="true"],
#kh-karte button.kh-karte__notaryPickDisplay:disabled {
    background-color: #f5f7fa;
    color: #94a3b8;
    cursor: not-allowed;
}

/* 公証役場のラッパ — sr-only な input を絶対配置で重ねるための基準 */
#kh-karte .kh-karte__notaryPickBox {
    position: relative;
}

/* sr-only に近い入力欄（バリデーションと form 送信用）
   フォーカス・キーボード・タップは button が受けるため、見えない位置に縮退させる。
   ただし live-validation の feedback 要素は input の次に挿入されるため、
   normal flow を維持する観点で sibling は表示できるよう、input 側のみ
   position: absolute で flow から外す。 */
#kh-karte .kh-karte__notaryPickInput {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

#kh-karte .kh-karte__notaryPickDisplay:hover,
#kh-karte .kh-karte__notaryPick input.kh-karte__notaryPickDisplay:hover,
#kh-karte .kh-karte__notaryPick button.kh-karte__notaryPickDisplay:hover {
    border-color: #c5d0e0;
}

#kh-karte .kh-karte__notaryPickDisplay:focus,
#kh-karte .kh-karte__notaryPick input.kh-karte__notaryPickDisplay:focus,
#kh-karte .kh-karte__notaryPick button.kh-karte__notaryPickDisplay:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

/* live-validation の error / ok 状態を button にもミラーする
   （JS 側で input.classList → button.classList を MutationObserver で複製） */
#kh-karte button.kh-karte__notaryPickDisplay.kh-karte__fieldState--error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.45);
}

#kh-karte button.kh-karte__notaryPickDisplay.kh-karte__fieldState--error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2);
}

#kh-karte button.kh-karte__notaryPickDisplay.kh-karte__fieldState--ok {
    border-color: var(--karte-accent) !important;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.38);
}

#kh-karte button.kh-karte__notaryPickDisplay.kh-karte__fieldState--ok:focus {
    border-color: var(--karte-accent) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.notary-pick-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100050;
    padding: 16px;
    box-sizing: border-box;
}

.notary-pick-modal {
    position: relative;
    width: min(980px, calc(100vw - 32px));
    max-height: min(85vh, 720px);
    background: #fff;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notary-pick-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.notary-pick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.notary-pick-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.notary-pick-maximize {
    border: 1px solid #0284c7;
    background: #e0f2fe;
    color: #075985;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.notary-pick-maximize:hover {
    background: #bae6fd;
}

.notary-pick-maximize:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.notary-pick-close {
    border: 1px solid #9ca3af;
    background: #f8fafc;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
}

.notary-pick-modal.is-maximized {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
}

.notary-pick-modal.is-maximized .notary-pick-body {
    padding: 12px 16px 16px;
}

.notary-pick-modal.is-maximized .notary-map-wrap {
    min-height: min(72vh, calc(100vh - 220px));
}

.notary-pick-modal.is-maximized .notary-map-canvas,
.notary-pick-modal.is-maximized .notary-map-wrap .leaflet-container {
    min-height: min(72vh, calc(100vh - 220px));
}

.notary-pick-body {
    position: relative;
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    gap: 10px;
}

.notary-pick-body-top {
    flex: 0 0 auto;
    max-height: 38vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.notary-pick-hq-alert {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

.notary-map-wrap.notary-map-wrap--hq-blocked {
    opacity: 0.38;
    pointer-events: none;
    filter: grayscale(0.15);
}

.notary-pick-note {
    margin: 0 0 8px;
    font-size: 12px;
    color: #b45309;
    font-weight: 600;
}

.notary-pick-address-disclaimer {
    margin: 0 0 10px;
    font-size: 12px;
    color: #0f172a;
    font-weight: 400;
    line-height: 1.55;
}

.notary-map-summary {
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 12px;
    color: #334155;
    line-height: 1.55;
}

.notary-map-summary strong {
    color: #0f172a;
}

.notary-map-summary-line {
    margin: 0 0 5px;
    word-break: break-word;
}

.notary-map-summary-line:last-child {
    margin-bottom: 0;
}

.notary-map-scope {
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background: #f0f9ff;
    font-size: 12px;
    color: #0c4a6e;
    line-height: 1.55;
    word-break: break-word;
}

.notary-map-scope--warn {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #78350f;
}

.notary-pick-modal-notes {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 12px;
    line-height: 1.65;
    color: #334155;
}

.notary-pick-modal-notes p {
    margin: 0 0 6px;
}

.notary-pick-modal-notes p:last-child {
    margin-bottom: 0;
}

.notary-pick-modal-notes strong {
    font-weight: 700;
    color: #0f172a;
}

.notary-pick-note-red {
    color: #b91c1c;
    font-weight: 700;
}

.notary-pick-congestion-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    margin: 0;
}

.notary-pick-congestion-intro {
    flex: 1 1 200px;
    min-width: 0;
}

.notary-congestion-details {
    flex: 0 0 auto;
}

.notary-congestion-summary {
    cursor: pointer;
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
    list-style: none;
}

.notary-congestion-summary::-webkit-details-marker {
    display: none;
}

.notary-congestion-summary::marker {
    content: '';
}

.notary-congestion-summary:focus {
    outline: none;
}

.notary-congestion-summary:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}

.notary-congestion-panel {
    margin: 8px 0 0;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    max-width: min(100%, 360px);
}

.notary-congestion-line {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.55;
    color: #334155;
}

.notary-congestion-line:last-child {
    margin-bottom: 0;
}

#kh-karte .kh-karte__notaryPickMode {
    margin-bottom: 10px;
}

#kh-karte .kh-karte__notaryPickMapWrap {
    margin-top: 4px;
}

.leaflet-div-icon.notary-person-pin-icon {
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
}

.leaflet-div-icon.notary-person-pin-icon > .notary-person-pos-root {
    width: 22px;
    height: 28px;
    position: relative;
    box-sizing: border-box;
}

.leaflet-div-icon.notary-person-pin-icon .notary-person-anchor-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    box-sizing: border-box;
}

.leaflet-div-icon.notary-person-pin-icon .notary-map-pin-bubble.notary-hq .line1,
.leaflet-div-icon.notary-person-pin-icon .notary-map-pin-bubble.notary-visitor .line1 {
    color: #ffffff;
    font-weight: 800;
}

.notary-map-wrap {
    flex: 1 1 auto;
    min-height: 280px;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

.notary-map-canvas {
    width: 100%;
    flex: 1;
    min-height: 320px;
    height: 100%;
}

.notary-map-wrap .leaflet-container {
    width: 100% !important;
    height: 100% !important;
    min-height: 320px;
    font: inherit;
}

.notary-detail[hidden] {
    display: none;
}

.notary-detail {
    position: absolute;
    inset: 0;
    z-index: 100060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    pointer-events: none;
}

.notary-detail-card {
    width: min(440px, calc(100% - 32px));
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.38);
    padding: 14px 14px 12px;
    pointer-events: auto;
}

.notary-detail-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    word-break: break-word;
}

.notary-detail-meta {
    font-size: 13px;
    color: #334155;
    line-height: 1.55;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.notary-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.notary-detail-btn {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid transparent;
}

.notary-detail-btn-primary {
    background: #0ea5e9;
    border-color: #0284c7;
    color: #fff;
}

.notary-detail-btn-primary:hover {
    background: #0284c7;
}

.notary-detail-btn-secondary {
    background: #f8fafc;
    border-color: #9ca3af;
    color: #111827;
}

.notary-detail-btn-secondary:hover {
    background: #f1f5f9;
}

.notary-detail-btn:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.leaflet-div-icon.notary-map-pin-icon {
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
}

.leaflet-div-icon.notary-map-pin-icon > .notary-office-pos-root {
    width: 20px;
    height: 28px;
    position: relative;
    box-sizing: border-box;
}

.notary-office-fly {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(340px, 92vw);
}

.leaflet-div-icon.notary-map-pin-icon .notary-office-anchor-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    max-width: min(340px, 92vw);
    width: max-content;
    text-align: center;
    box-sizing: border-box;
}

.leaflet-div-icon.notary-map-pin-icon .notary-office-anchor-stack .notary-map-pin-bubble.notary-office {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    text-align: left;
}

.leaflet-div-icon.notary-map-pin-icon .notary-office-anchor-stack .notary-map-pin-bubble.notary-office .line1 {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 16em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.leaflet-div-icon.notary-map-pin-icon .notary-office-anchor-stack .notary-map-pin-bubble.notary-office .line2 {
    display: block;
    margin-top: 0;
    flex-shrink: 0;
}

.leaflet-div-icon.notary-map-pin-icon .notary-office-anchor-stack .notary-cong-badge {
    margin-top: 0;
}

.notary-map-pin-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 220px;
    text-align: center;
}

.notary-map-pin-wrap--office {
    cursor: pointer;
}

.notary-map-pin-bubble {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
    font-size: 11px;
    line-height: 1.35;
    color: #0f172a;
    white-space: nowrap;
}

.notary-map-pin-bubble.notary-office.notary-office--cong-low {
    border-color: #2563eb;
    background: rgba(239, 246, 255, 0.98);
}

.notary-map-pin-bubble.notary-office.notary-office--cong-mid {
    border-color: #ea580c;
    background: rgba(255, 247, 237, 0.98);
}

.notary-map-pin-bubble.notary-office.notary-office--cong-high {
    border-color: #dc2626;
    background: rgba(254, 242, 242, 0.98);
}

.notary-map-pin-bubble.notary-office.notary-office--cong-unknown {
    border-color: #94a3b8;
    background: rgba(241, 245, 249, 0.98);
}

/* 混雑状況なし（非表示扱い・ピンは役場名のみ） */
.notary-map-pin-bubble.notary-office.notary-office--cong-none {
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, 0.95);
}

.notary-map-pin-bubble.notary-office.selected {
    border-color: #f59e0b !important;
    background: rgba(255, 251, 235, 0.98) !important;
}

/* 公証役場ピン: ホバー解除時もスムーズに戻す */
.leaflet-div-icon.notary-map-pin-icon .notary-office-fly {
    transition: transform 0.24s cubic-bezier(0.33, 1, 0.68, 1);
}

.leaflet-div-icon.notary-map-pin-icon .notary-map-pin-bubble.notary-office {
    transition: box-shadow 0.22s ease;
}

/* 重なり対策: 選択中の役場を前面（JS の zIndexOffset と併用）・その他を薄く（filter は重ね順を壊しやすいので opacity のみ） */
.leaflet-div-icon.notary-map-pin-icon.notary-map-pin-icon--dimmed {
    opacity: 0.4;
    transition: opacity 0.16s ease;
}

/* ホバー: 手前に出すのは JS。少し拡大＋薄いオレンジの枠（フォーカス感） */
.leaflet-div-icon.notary-map-pin-icon.notary-map-pin-icon--hover .notary-office-fly {
    transform: scale(1.1);
    transform-origin: center bottom;
}

.leaflet-div-icon.notary-map-pin-icon.notary-map-pin-icon--hover .notary-map-pin-bubble.notary-office {
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.92),
        0 0 0 4px rgba(254, 215, 170, 0.85),
        0 0 0 6px rgba(251, 191, 36, 0.45),
        0 6px 18px rgba(245, 158, 11, 0.28);
}

.leaflet-div-icon.notary-map-pin-icon.notary-map-pin-icon--active {
    opacity: 1;
    filter: drop-shadow(0 6px 14px rgba(245, 158, 11, 0.55));
    /* z-index は Leaflet（緯度＋setZIndexOffset）に任せ、!important で潰さない */
}

.leaflet-div-icon.notary-map-pin-icon.notary-map-pin-icon--active .notary-map-pin-bubble.notary-office {
    border-width: 3px !important;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.95),
        0 0 14px 3px rgba(245, 158, 11, 0.55),
        0 0 28px 8px rgba(245, 158, 11, 0.28);
    position: relative;
    z-index: 1;
}

.leaflet-div-icon.notary-map-pin-icon.notary-map-pin-icon--active .notary-office-fly {
    z-index: 2;
}

.notary-cong-badge {
    display: inline-block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.notary-cong-badge--low {
    background: #dbeafe;
    color: #1e3a8a;
    border-color: #93c5fd;
}

.notary-cong-badge--mid {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fdba74;
}

.notary-cong-badge--high {
    background: #fecaca;
    color: #7f1d1d;
    border-color: #f87171;
}

.notary-cong-badge--unknown {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

.notary-map-pin-bubble.notary-hq {
    border-color: #1d4ed8;
    background: rgba(29, 78, 216, 0.98);
    color: #ffffff;
    font-weight: 800;
}

.notary-map-pin-bubble.notary-visitor {
    border-color: #b91c1c;
    background: rgba(185, 28, 28, 0.98);
    color: #ffffff;
    font-weight: 800;
}

.notary-map-pin-bubble .line1 {
    display: block;
    font-weight: 700;
    white-space: nowrap;
}

.notary-map-pin-bubble .line2 {
    display: block;
    font-size: 10px;
    color: #475569;
    margin-top: 0;
    white-space: nowrap;
    word-break: normal;
}

.notary-map-pin-arrow {
    width: 0;
    height: 0;
    margin-top: -1px;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 11px solid #94a3b8;
}

.notary-map-pin-wrap--hq .notary-map-pin-arrow {
    border-top-color: #1d4ed8;
}

.notary-map-pin-wrap--office.notary-map-pin-wrap--cong-low .notary-map-pin-arrow {
    border-top-color: #2563eb;
}

.notary-map-pin-wrap--office.notary-map-pin-wrap--cong-mid .notary-map-pin-arrow {
    border-top-color: #ea580c;
}

.notary-map-pin-wrap--office.notary-map-pin-wrap--cong-high .notary-map-pin-arrow {
    border-top-color: #dc2626;
}

.notary-map-pin-wrap--office.notary-map-pin-wrap--cong-unknown .notary-map-pin-arrow {
    border-top-color: #94a3b8;
}

.notary-map-pin-wrap--office.notary-map-pin-wrap--cong-none .notary-map-pin-arrow {
    border-top-color: #94a3b8;
}

.notary-map-pin-wrap--visitor .notary-map-pin-arrow {
    border-top-color: #b91c1c;
}

/* --------------------------------------------------------------------------
   max-width: 768px — 公証役場マップモーダル（モバイル向けレイアウト）
   - 拡大ボタンはスマホでは既に全幅のため非表示
   - モーダルを viewport 上限まで広げ、ヘッダ／本文の余白とフォントを圧縮
   - 詳細カードのボタンを縦並びに（「この公証役場にする」をスマホで押しやすく）
   - 公証役場ピンの吹き出しを小さくして地図上の重なりを軽減
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .notary-pick-backdrop {
        padding: 8px;
    }

    .notary-pick-modal {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        max-height: 92dvh;
        border-radius: 10px;
    }

    .notary-pick-header {
        padding: 10px 12px;
        gap: 8px;
    }

    .notary-pick-header h3 {
        font-size: 15px;
    }

    .notary-pick-maximize {
        display: none;
    }

    .notary-pick-close {
        padding: 7px 12px;
        font-size: 12.5px;
    }

    .notary-pick-body {
        padding: 10px 12px 12px;
        gap: 8px;
    }

    .notary-pick-body-top {
        max-height: 36vh;
    }

    .notary-pick-note,
    .notary-pick-address-disclaimer {
        font-size: 11.5px;
        line-height: 1.5;
        margin-bottom: 6px;
    }

    .notary-pick-hq-alert {
        padding: 8px 10px;
        font-size: 12.5px;
        margin-bottom: 8px;
    }

    .notary-map-summary,
    .notary-map-scope {
        padding: 7px 9px;
        font-size: 11.5px;
        line-height: 1.55;
    }

    .notary-pick-modal-notes {
        padding: 8px 10px;
        font-size: 11.5px;
        line-height: 1.6;
    }

    .notary-pick-modal-notes > p {
        margin-bottom: 5px;
    }

    .notary-pick-congestion-row {
        gap: 4px 8px;
    }

    .notary-congestion-summary {
        font-size: 12px;
    }

    .notary-congestion-panel {
        padding: 7px 9px;
        max-width: 100%;
    }

    .notary-congestion-line {
        font-size: 11.5px;
        margin-bottom: 4px;
    }

    .notary-map-wrap {
        min-height: 240px;
    }

    .notary-map-canvas,
    .notary-map-wrap .leaflet-container {
        min-height: 240px;
    }

    .notary-detail {
        padding: 10px;
    }

    .notary-detail-card {
        width: calc(100% - 20px);
        padding: 12px 14px 10px;
    }

    .notary-detail-title {
        font-size: 14.5px;
        margin-bottom: 6px;
    }

    .notary-detail-meta {
        font-size: 12.5px;
        margin-bottom: 10px;
    }

    .notary-detail-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
    }

    .notary-detail-actions .notary-detail-btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 13.5px;
    }

    .notary-map-pin-bubble {
        font-size: 10.5px;
        padding: 3px 6px;
    }

    .notary-map-pin-bubble .line2 {
        font-size: 9.5px;
    }

    .notary-cong-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* --------------------------------------------------------------------------
   max-width: 480px — 小型スマホ向けにモーダル余白／地図高さをさらに圧縮
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .notary-pick-backdrop {
        padding: 4px;
    }

    .notary-pick-modal {
        border-radius: 8px;
    }

    .notary-pick-header {
        padding: 9px 10px;
    }

    .notary-pick-header h3 {
        font-size: 14px;
    }

    .notary-pick-body {
        padding: 8px 10px 10px;
    }

    .notary-pick-body-top {
        max-height: 34vh;
    }

    .notary-map-wrap {
        min-height: 220px;
    }

    .notary-map-canvas,
    .notary-map-wrap .leaflet-container {
        min-height: 220px;
    }

    .notary-detail-card {
        padding: 10px 12px 8px;
    }

    .notary-detail-title {
        font-size: 14px;
    }

    .notary-detail-meta {
        font-size: 12px;
    }
}
