/* ==========================================================================
   ドローン飛行可否診断ツール - スタイルシート
   行政書士法人マージパートナーズ準拠デザイン
   ========================================================================== */

/* --- カラーパレット --- */
:root {
    --bg-page: #ffffff;
    --bg-dark: #f8faf9;
    --bg-mid: #f0f5f2;
    --accent: #90ee90;
    --accent-strong: #5cb85c;
    --accent-dark: #2e7d32;
    --text-main: #1a2e24;
    --text-muted: #5f7a6e;
    --border: #dce8e0;
    --border-hover: #90ee90;
    --card-bg: #ffffff;
    --card-bg-solid: #f5faf7;
    --glow: rgba(144, 238, 144, 0.1);
    --danger: #dc2626;
    --caution: #d97706;
    --info: #2e7d32;
}

/* --- リセット・ベース --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* 横スクロール根絶：どの画面でも水平方向のはみ出しを防ぐ */
    overflow-x: hidden;
}

body {
    font-family: "Inter", "Helvetica Neue", Arial,
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans",
                 Meiryo, sans-serif;
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--bg-page);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* 横スクロール禁止 */
    width: 100%;
}

a {
    color: var(--accent-dark);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-strong);
    text-decoration: none;
}

/* --- レイアウト --- */
.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ==========================================================================
   ヘッダー
   ========================================================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    /* 幅が狭い画面でヘッダーがはみ出さないよう */
    width: 100%;
    overflow: hidden;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(18px, 5vw, 56px);
    padding: 0 20px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.site-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 1;
}

.site-header .container {
    max-width: 1100px;
}

.site-title a {
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-title a:hover {
    color: var(--accent-dark);
}

.header-badge {
    font-size: 0.7rem;
    color: var(--accent-dark);
    border: 1px solid var(--border);
    background-color: rgba(144, 238, 144, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

/* ロゴ画像（ヘッダー右） */
.header-office-link {
    display:    flex;
    align-items: center;
    flex-shrink: 0;
}
.header-logo-img {
    height:      30px;
    width:       auto;
    max-width:   220px;
    object-fit:  contain;
    display:     block;
}

/* ツールサービスロゴ（ヘッダー左側） */
.tool-brand {
    display:         flex;
    align-items:     center;
    height:          100%;
    text-decoration: none;
    flex-shrink:     0;
}
.tool-brand-logo {
    display:     block;
    width:       auto;
    object-fit:  contain;
    flex-shrink: 0;
}
.tool-brand-logo-drone {
    max-height: 30px;
    max-width:  240px;
}
@media (max-width: 640px) {
    .tool-brand-logo-drone {
        max-height: 26px;
        max-width:  165px;
    }
    .header-logo-img {
        height: 24px;
        max-width: 150px;
    }
}

/* ==========================================================================
   メイン
   ========================================================================== */
main {
    flex: 1;
    padding: 48px 0;
}

/* ==========================================================================
   トップページ - ヒーロー
   ========================================================================== */
.hero {
    text-align: center;
    padding: 64px 24px;
    background: linear-gradient(
        160deg,
        #f0f9f4 0%,
        #e8f5ec 50%,
        rgba(144, 238, 144, 0.12) 100%
    );
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -30%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(144, 238, 144, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-label {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent-dark);
    border: 1px solid var(--border);
    background-color: rgba(144, 238, 144, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.hero p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* --- ボタン --- */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--accent-strong);
    color: #fff;
    box-shadow: 0 4px 16px rgba(92, 184, 92, 0.25);
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    box-shadow: 0 6px 24px rgba(46, 125, 50, 0.3);
    color: #fff;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--glow);
    color: var(--text-main);
    border-color: var(--border-hover);
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.05rem;
}

/* --- 特徴カード --- */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.feature-card:hover {
    border-color: var(--border-hover);
    background-color: rgba(144, 238, 144, 0.06);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(144, 238, 144, 0.2);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.2rem;
}

.feature-card h3 {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ==========================================================================
   フッター
   ========================================================================== */
.site-footer {
    background-color: var(--bg-mid);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 20px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   ページ共通
   ========================================================================== */
.page-title {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-desc {
    color: var(--text-muted);
    margin-bottom: 36px;
    font-size: 0.95rem;
}

/* ==========================================================================
   診断フォーム
   ========================================================================== */
.form-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.form-section:hover {
    border-color: var(--border-hover);
}

.form-section legend {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0 4px;
}

.required {
    color: var(--danger);
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 6px;
}

.optional {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 400;
    margin-left: 6px;
}

/* --- ラジオボタン --- */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: transparent;
}

.radio-label:hover {
    border-color: var(--border-hover);
    background-color: var(--glow);
    color: var(--text-main);
}

.radio-label input[type="radio"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--accent-dark);
}

.radio-label:has(input:checked) {
    border-color: var(--accent-strong);
    background-color: rgba(144, 238, 144, 0.12);
}

/* --- セレクトボックス --- */
select {
    width: 100%;
    max-width: 320px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: #ffffff;
    margin-top: 14px;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px rgba(144, 238, 144, 0.2);
}

/* --- テキスト入力・テキストエリア --- */
.text-input {
    width: 100%;
    max-width: 480px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: #ffffff;
    margin-top: 14px;
    font-family: inherit;
}

textarea.text-input {
    max-width: 100%;
    resize: vertical;
    min-height: 100px;
}

.text-input:focus {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px rgba(144, 238, 144, 0.2);
}

.text-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}

/* --- フォーム送信エリア --- */
.form-actions {
    text-align: center;
    margin-top: 36px;
    margin-bottom: 16px;
}

/* --- バリデーションエラー --- */
.form-section.has-error {
    border-color: var(--danger);
}

.form-section.has-error legend {
    color: var(--danger);
}

.error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 8px;
    display: none;
}

.form-section.has-error .error-message {
    display: block;
}

/* ==========================================================================
   結果画面 - 判定カード
   ========================================================================== */
.diagnosis-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 28px;
}

.diagnosis-card-header {
    padding: 32px 28px;
    text-align: center;
    position: relative;
}

.diagnosis-card-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: var(--border);
}

.diagnosis-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.diagnosis-label {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.diagnosis-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
}

.diagnosis-card-body {
    padding: 24px 28px;
}

.diagnosis-details-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.diagnosis-details-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.diagnosis-details-list li {
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid;
}

/* 判定レベル: 許可申請が必要の可能性が高い */
.result-level-warning .diagnosis-card-header {
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.05) 0%, #ffffff 100%);
}

.result-level-warning .diagnosis-icon-wrap {
    background-color: var(--danger);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
}

.result-level-warning .diagnosis-label {
    color: #b91c1c;
}

.result-level-warning .diagnosis-details-list li {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.15);
    color: #b91c1c;
}

/* 判定レベル: 個別確認が必要 */
.result-level-caution .diagnosis-card-header {
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.05) 0%, #ffffff 100%);
}

.result-level-caution .diagnosis-icon-wrap {
    background-color: var(--caution);
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.2);
}

.result-level-caution .diagnosis-label {
    color: #92400e;
}

.result-level-caution .diagnosis-details-list li {
    background: rgba(217, 119, 6, 0.06);
    border-color: rgba(217, 119, 6, 0.15);
    color: #92400e;
}

/* 判定レベル: 申請不要の可能性（最終確認必要） */
.result-level-info .diagnosis-card-header {
    background: linear-gradient(180deg, rgba(144, 238, 144, 0.1) 0%, #ffffff 100%);
}

.result-level-info .diagnosis-icon-wrap {
    background-color: var(--accent-strong);
    box-shadow: 0 4px 16px rgba(92, 184, 92, 0.2);
}

.result-level-info .diagnosis-label {
    color: var(--accent-dark);
}

/* --- 免責注意文 --- */
.disclaimer-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 36px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* 補足・確認事項ボックス */
.supplementary-notes-box {
    background: rgba(96, 165, 250, 0.06);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-left: 3px solid #60a5fa;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.supplementary-notes-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #93c5fd;
    margin: 0 0 10px;
}

.supplementary-notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.supplementary-notes-list li {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
    padding-left: 1.2em;
    position: relative;
}

.supplementary-notes-list li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: #60a5fa;
    font-weight: 700;
}

/* --- セクション小見出し --- */
.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* --- 結果テーブル --- */
.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table th,
.result-table td {
    padding: 13px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.result-table thead th {
    background-color: var(--bg-mid);
    color: var(--accent-dark);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.result-table .col-label {
    width: 40%;
    font-weight: 500;
    color: var(--text-muted);
    background-color: var(--bg-mid);
    font-size: 0.9rem;
}

.result-table .col-value {
    width: 60%;
    font-size: 0.9rem;
}

.result-table tbody tr {
    transition: background-color 0.15s;
}

.result-table tbody tr:hover {
    background-color: var(--glow);
}

.result-table tbody tr:last-child td {
    border-bottom: none;
}

.no-answer {
    color: var(--text-muted);
    opacity: 0.5;
    font-style: italic;
}

.memo-text {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

/* --- 結果アクション --- */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

/* ==========================================================================
   ステップインジケーター
   ========================================================================== */
.step-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    padding: 0 8px;
}

.step-ind-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.step-ind-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

.step-ind-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    transition: color 0.25s;
}

.step-ind-item.active .step-ind-number {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: #fff;
    box-shadow: 0 2px 10px rgba(92, 184, 92, 0.35);
}

.step-ind-item.active .step-ind-label {
    color: var(--accent-dark);
    font-weight: 600;
}

.step-ind-item.done .step-ind-number {
    background: var(--bg-mid);
    border-color: var(--accent-strong);
    color: var(--accent-dark);
}

.step-ind-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 6px;
    margin-bottom: 22px;
    transition: background 0.25s;
}

.step-ind-line.done {
    background: var(--accent-strong);
}

/* ==========================================================================
   地図セクション
   ========================================================================== */
.map-section {
    margin-bottom: 0;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-bottom: none;
}

.map-canvas {
    width: 100%;
    height: 400px;
    background: var(--bg-mid);
    display: block;
}

.map-fallback-msg {
    width: 100%;
    height: 160px;
    background: var(--bg-mid);
    border: 1px dashed var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.map-fallback-msg code {
    font-family: monospace;
    background: rgba(0,0,0,0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ==========================================================================
   ステップパネル
   ========================================================================== */
.step-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0 0 12px 12px;
    padding: 24px;
    margin-bottom: 24px;
}

/* Step 3 は地図なしなので rounded になる */
#stepPanel3 {
    border-radius: 12px;
    border-top: 1px solid var(--border);
}

.step-panel-header {
    margin-bottom: 20px;
}

.step-panel-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.step-panel-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* --- ステップナビゲーション --- */
.step-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.step-nav-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-right: auto;
}

.step-error {
    color: var(--danger);
    font-size: 0.83rem;
    background: rgba(220, 38, 38, 0.05);
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: 6px;
    padding: 8px 14px;
    margin-top: 12px;
}

/* ==========================================================================
   住所入力
   ========================================================================== */
.address-input-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.address-input {
    flex: 1;
    min-width: 200px;
    max-width: 100%;
    margin-top: 0;
}

.address-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.6;
}

.address-result {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(144, 238, 144, 0.1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 14px;
    font-size: 0.88rem;
}

.address-result .addr-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.address-result .addr-text {
    font-weight: 500;
    color: var(--text-main);
    word-break: break-all;
}

.address-result .addr-coord {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 3px;
    font-family: monospace;
}

/* ==========================================================================
   エリア種別選択
   ========================================================================== */
.area-type-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.area-type-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.area-type-btn:hover {
    border-color: var(--border-hover);
    background: var(--glow);
    color: var(--text-main);
}

.area-type-btn.active {
    border-color: var(--accent-strong);
    background: rgba(144, 238, 144, 0.12);
    color: var(--accent-dark);
    font-weight: 600;
}

.area-icon {
    font-size: 1rem;
}

/* --- 円指定オプション --- */
.circle-panel {
    background: var(--bg-mid);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.circle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.radius-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.radius-btn {
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    font-weight: 500;
}

.radius-btn:hover {
    border-color: var(--accent-strong);
    color: var(--accent-dark);
}

.radius-btn.active {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: #fff;
    font-weight: 600;
}

.radius-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.radius-custom-input {
    width: 80px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.88rem;
    text-align: right;
    font-family: inherit;
}

.radius-custom-input:focus {
    outline: none;
    border-color: var(--accent-strong);
}

.radius-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* --- エリアサマリー --- */
.area-summary-box {
    background: var(--card-bg-solid);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 4px;
}

.area-summary-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   結果画面 - 地図サマリーカード
   ========================================================================== */
.map-summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.map-summary-card-header {
    background: var(--bg-mid);
    padding: 14px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-dark);
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}

/* --- ミニマップ本体 --- */
.result-mini-map {
    width: 100%;
    height: 240px;
    border-bottom: 1px solid var(--border);
    background: #eee;
}

.map-summary-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-summary-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 0.88rem;
}

.map-summary-key {
    color: var(--text-muted);
    font-weight: 500;
    width: 120px;
    flex-shrink: 0;
    font-size: 0.82rem;
}

.map-summary-val {
    color: var(--text-main);
    word-break: break-all;
    font-family: inherit;
}

.map-summary-val.coord {
    font-family: monospace;
    font-size: 0.83rem;
    color: var(--text-muted);
}

/* --- 地図関連注意文 --- */
.map-notice-box {
    background: rgba(144, 238, 144, 0.06);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent-strong);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 28px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.map-notice-box strong {
    display: block;
    margin-bottom: 4px;
    color: var(--accent-dark);
    font-size: 0.85rem;
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    main {
        padding: 32px 0;
    }

    .hero {
        padding: 48px 20px;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 20px 16px;
    }
}

@media (max-width: 600px) {
    .site-title {
        font-size: 0.95rem;
    }

    .header-badge {
        display: none;
    }

    .hero h2 {
        font-size: 1.3rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    /* フォーム */
    .form-section {
        padding: 18px 16px;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-label {
        width: 100%;
    }

    select {
        max-width: 100%;
    }

    .text-input {
        max-width: 100%;
    }

    .btn-large {
        width: 100%;
        padding: 14px 24px;
    }

    /* 結果 */
    .diagnosis-card-header {
        padding: 24px 20px;
    }

    .diagnosis-card-body {
        padding: 18px 20px;
    }

    .diagnosis-label {
        font-size: 1.05rem;
    }

    .result-table .col-label,
    .result-table .col-value {
        width: auto;
    }

    .result-table th,
    .result-table td {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .result-actions .btn {
        text-align: center;
    }
}

/* ==========================================================================
   2カラム診断レイアウト
   ========================================================================== */

/* 診断フォームページ専用ワイドコンテナ */
.diagnosis-wide-container {
    width: min(96vw, 1500px);
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px 32px;
}

.diagnosis-layout {
    display: grid;
    grid-template-columns: minmax(520px, 0.95fr) minmax(620px, 1.05fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 32px;
}

/* ---- 左カラム: 地図パネル ---- */
.map-panel {
    position: sticky;
    top: 80px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.map-panel-header {
    padding: 20px 20px 12px;
}

.map-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.map-panel-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* 住所入力ラップ（左パネル内） */
.map-panel .address-input-wrap {
    padding: 0 16px;
}

.map-panel .address-hint {
    padding: 0 16px;
    margin-bottom: 8px;
}

/* 地図キャンバス — PCで 500px */
.map-canvas {
    width: 100%;
    height: 500px;
    background: var(--bg-mid);
    display: block;
}

/* エリア種別・半径コントロール */
.map-controls {
    padding: 16px 16px 0;
    background: var(--card-bg);
}

.map-controls .circle-label {
    margin-bottom: 8px;
}

.map-controls .circle-panel {
    margin-top: 0;
    margin-bottom: 12px;
}

/* ---- 選択地点サマリーボックス ---- */
.location-summary-box {
    margin: 12px 16px 16px;
    background: rgba(144, 238, 144, 0.08);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-strong);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.85rem;
}

.loc-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.loc-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.loc-key {
    flex-shrink: 0;
    width: 80px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.loc-val {
    flex: 1;
    color: var(--text-main);
    font-weight: 500;
    word-break: break-all;
}

.loc-coords {
    font-family: monospace;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* エラー表示（左パネル内） */
.map-panel .step-error {
    margin: 0 16px 16px;
}

/* ---- 右カラム: フォームパネル ---- */
.form-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-panel .form-section {
    margin-bottom: 16px;
}

/* 送信ボタン行 */
.form-submit-row {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.btn-submit-diag {
    min-width: 160px;
    font-size: 1rem;
    padding: 14px 40px;
}

/* 結果ページ: map-summary に都道府県行対応 */
.map-summary-val.coord {
    font-family: monospace;
    font-size: 0.85rem;
}


/* DID レイヤー切り替えコントロール */
.did-layer-control {
    margin: 12px 16px 16px;
    padding: 10px 14px;
    background: rgba(255, 105, 180, 0.05);
    border: 1px solid rgba(233, 30, 140, 0.2);
    border-radius: 8px;
}

.did-layer-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.did-layer-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #E91E8C;
    cursor: pointer;
}

.did-layer-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.did-layer-notice {
    margin-top: 6px;
    font-size: 0.78rem;
    color: #fb923c;
}

/* ==========================================================================
   DID 自動チェックセクション
   ========================================================================== */

.did-check-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.did-check-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- 判定カード --- */
.did-check-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.did-check-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.did-check-headline {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.did-check-message {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.7;
}

/* did_possible（可能性あり・オレンジ） */
.did-check-card.did-possible {
    background: rgba(251, 146, 60, 0.08);
    border: 1px solid rgba(251, 146, 60, 0.4);
}
.did-check-card.did-possible .did-check-icon {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}
.did-check-card.did-possible .did-check-headline {
    color: #fb923c;
}

/* did_not_detected（検出なし・グリーン） */
.did-check-card.did-not-detected {
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.3);
}
.did-check-card.did-not-detected .did-check-icon {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}
.did-check-card.did-not-detected .did-check-headline {
    color: #4ade80;
}

/* did_data_missing（データなし・グレー） */
.did-check-card.did-data-missing {
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.25);
}
.did-check-card.did-data-missing .did-check-icon {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}
.did-check-card.did-data-missing .did-check-headline {
    color: var(--text-muted);
}

/* did_check_error（エラー・レッド） */
.did-check-card.did-check-error {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.3);
}
.did-check-card.did-check-error .did-check-icon {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}
.did-check-card.did-check-error .did-check-headline {
    color: #f87171;
}

/* --- 詳細行 --- */
.did-check-details {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.did-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
}

.did-detail-key {
    flex-shrink: 0;
    width: 120px;
    color: var(--text-muted);
    font-weight: 600;
}

.did-detail-val {
    color: var(--text-primary);
}

/* バッジ */
.did-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.did-badge-hit {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}
.did-badge-clear {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}
.did-badge-na {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
}

/* --- 注意書き --- */
.did-check-notice {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.7;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   空港等周辺空域チェック（kokuarea）カード - DIDカードをベースに配色変更
   ========================================================================== */

.kokuarea-check-section {
    margin-top: 16px;
}

.did-check-card.kokuarea-possible {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.07);
}
.did-check-card.kokuarea-possible .did-check-icon {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}
.did-check-card.kokuarea-possible .did-check-headline {
    color: #f97316;
}

.did-check-card.kokuarea-not-detected {
    border-color: #16a34a;
    background: rgba(22, 163, 74, 0.06);
}
.did-check-card.kokuarea-not-detected .did-check-icon {
    background: rgba(22, 163, 74, 0.14);
    color: #16a34a;
}
.did-check-card.kokuarea-not-detected .did-check-headline {
    color: #16a34a;
}

/* 複数チェックセクションが並ぶ時の区切り */
.kokuarea-layer-control {
    margin-top: 6px;
}

/* 地図レイヤーコントロールまとめ枠 */
.map-layer-controls {
    margin-bottom: 10px;
}

/* ==========================================================================
   地図メインレイアウト（/diagnosis — DIPS2.0 スタイル）
   ========================================================================== */

/* main要素をviewport高へ追従させ、低い画面では最小操作高を確保する */
.dmap-main {
    padding: 0;
    height: calc(100vh - 51px);
    height: calc(100dvh - 51px);
    min-height: 724px;
    flex: 0 0 calc(100vh - 51px);
    flex: 0 0 calc(100dvh - 51px);
    overflow: visible;
    display: block;
}
/* フッターを非表示（全画面地図レイアウト時） */
.dmap-main ~ footer { display: none; }

/* --- 2 カラム レイアウト本体 --- */
.dmap-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* ================================================================
   左カラム：地図エリア
   ================================================================ */
.dmap-col-map {
    flex: 1 1 0;       /* 残り幅すべてを使う */
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid var(--border);
    background: var(--bg-mid);
}

/* 上部バー（住所検索 + 現在地ボタン） */
.dmap-top-bar {
    flex-shrink: 0;
    padding: 10px 14px 6px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.dmap-search-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dmap-search-row .address-input {
    flex: 1;
    margin-bottom: 0;
    font-size: 0.9rem;
    padding: 9px 12px;
}

/* 住所検索ボタン（Leaflet版） */
.dmap-search-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    background: var(--accent-strong, #2e7d32);
    border: 1px solid transparent;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1;
}
.dmap-search-btn:hover {
    background: var(--accent-dark, #1b5e20);
}
.dmap-search-btn:active {
    opacity: 0.85;
}

/* 現在地ボタン */
.dmap-geolocate-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1;
}
.dmap-geolocate-btn:hover {
    background: rgba(144, 238, 144, 0.14);
    border-color: var(--accent-strong);
    color: var(--accent-dark);
}
.dmap-geolocate-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.dmap-geolocate-btn svg {
    flex-shrink: 0;
}

.dmap-address-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 5px 0 0;
    line-height: 1.5;
}

.dmap-no-api-msg {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 6px 0;
}

/* 地図キャンバス（残り高さ全部を埋める） */
.dmap-canvas {
    flex: 1 1 0;
    width: 100%;
    min-height: 320px;
    max-height: 620px;
    display: block;
    background: var(--bg-mid);
}

/* 地図下コントロールフッター */
.dmap-map-footer {
    flex-shrink: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 10px 14px 12px;
    overflow-y: auto;
    max-height: 36vh;
}

/* レイヤー切り替え行 */
.dmap-layer-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.dmap-layer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    line-height: 1;
}
.dmap-layer-toggle input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--accent-strong);
    width: 14px;
    height: 14px;
}
.dmap-layer-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* レイヤー凡例ドット */
.dmap-layer-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 3px;
    flex-shrink: 0;
}
.did-dot { background: rgba(233, 30, 140, 0.45); border: 1.5px solid #E91E8C; }
.kok-dot { background: rgba(46, 204, 113, 0.40); border: 1.5px solid #16a34a; }

/* 指定方法行 */
.dmap-area-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.dmap-area-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.dmap-area-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.dmap-area-btns .area-type-btn {
    padding: 5px 12px;
    font-size: 0.78rem;
}

/* 半径パネル（circle 時） */
.dmap-circle-panel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 6px;
}

.dmap-circle-panel .radius-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dmap-circle-panel .radius-btn {
    padding: 4px 10px;
    font-size: 0.76rem;
}

/* 選択地点サマリー（コンパクト版） */
.dmap-summary {
    margin: 8px 0 0;
    font-size: 0.8rem;
}
.dmap-summary .loc-key { width: 72px; font-size: 0.72rem; }
.dmap-summary .loc-val { font-size: 0.8rem; }

/* ================================================================
   右カラム：診断フォーム（サイドパネル）
   ================================================================ */
.dmap-col-form {
    flex: 0 0 370px;
    min-width: 280px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--card-bg);
}

/* フォームヘッダー */
.dmap-form-header {
    flex-shrink: 0;
    padding: 12px 18px 10px;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
}

.dmap-form-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.dmap-form-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* スクロール可能なフォーム本体 */
.dmap-form-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 12px 18px 8px;
    display: flex;
    flex-direction: column;
    /* scrollbar をスリムに */
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.dmap-form-scroll::-webkit-scrollbar { width: 5px; }
.dmap-form-scroll::-webkit-scrollbar-track { background: transparent; }
.dmap-form-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* フォーム内の fieldset をコンパクトに */
.dmap-form-scroll .form-section {
    margin-bottom: 10px;
    padding: 10px 12px;
}
.dmap-form-scroll .form-section legend {
    font-size: 0.8rem;
    padding: 0 6px;
}
.dmap-form-scroll .radio-group {
    gap: 5px;
    margin-top: 8px;
}
.dmap-form-scroll .radio-label {
    padding: 5px 10px;
    font-size: 0.8rem;
}
.dmap-form-scroll .radio-label input[type="radio"] {
    width: 13px;
    height: 13px;
}
.dmap-form-scroll .text-input {
    font-size: 0.85rem;
    padding: 8px 10px;
}
.dmap-form-scroll textarea.text-input {
    rows: 3;
    resize: vertical;
    min-height: 60px;
}

/* 注意文（コンパクト） */
.dmap-notice {
    font-size: 0.72rem;
    padding: 10px 12px;
    margin-top: 4px;
    margin-bottom: 8px;
}

/* 送信ボタン固定フッター */
.dmap-form-footer {
    flex-shrink: 0;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}

.dmap-form-footer .btn-submit-diag {
    width: 100%;
    text-align: center;
    padding: 13px 20px;
    font-size: 0.93rem;
    letter-spacing: 0.04em;
}

/* ======================================================================
   レスポンシブ OVERHAUL：スマートフォン・タブレット対応
   ブレークポイント: 1023px（タブレット）/ 767px（スマホ）/ 480px（小型スマホ）
   ====================================================================== */

/* ---- 横スクロール根絶 -------------------------------------------------- */
.dmap-main,
.dmap-layout,
.dmap-col-map,
.dmap-col-form,
.dmap-top-bar,
.dmap-map-footer {
    max-width: 100%;
    box-sizing: border-box;
}

/* ======================================================================
   タブレット (〜1023px) ：2カラム → 1カラム縦積みに切り替え
   ====================================================================== */
@media (max-width: 1023px) {
    /* dmap メインエリア：viewport固定高を解除 */
    .dmap-main {
        height: auto !important;
        min-height: 0 !important;
        flex: none !important;
        overflow: visible !important;
    }
    .dmap-main ~ footer { display: block !important; }

    /* 2カラムを縦積みに */
    .dmap-layout {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* 地図カラム：適切な高さを確保 */
    .dmap-col-map {
        flex: none;
        height: auto;
        min-height: 0;
        max-height: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        overflow: hidden;
    }

    .dmap-canvas {
        flex: none;
        height: clamp(420px, 52vh, 600px);
        min-height: 420px;
    }

    .dmap-map-footer {
        max-height: none !important;
        overflow: visible;
    }

    /* フォームカラム：フル幅・自然な高さ */
    .dmap-col-form {
        flex: none !important;
        max-width: none !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    .dmap-form-scroll {
        overflow: visible !important;
        flex: none !important;
        padding: 14px 18px 20px;
    }

    /* フォーム内調整 */
    .dmap-form-footer .btn-submit-diag { font-size: 1rem; }
    .dmap-form-scroll .form-section    { margin-bottom: 14px; }
    .dmap-form-scroll .radio-label     { padding: 8px 12px; font-size: 0.85rem; }

    /* 旧diagnosis-layout（互換） */
    .diagnosis-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .map-panel   { position: static; }
    .map-canvas  { height: 320px; }
    .form-submit-row { justify-content: stretch; }
    .btn-submit-diag { width: 100%; text-align: center; }
}

/* ======================================================================
   スマホ (〜767px) ：地図・UI・フォームを縦1列に最適化
   ====================================================================== */
@media (max-width: 767px) {
    /* ---- ヘッダー ---- */
    .site-header { padding: 7px 0; }
    .site-title  { font-size: 0.95rem; }
    .header-inner { gap: 12px; padding: 0 12px; }
    .header-badge { font-size: 0.65rem; }

    /* ---- コンテナ ---- */
    .container { padding: 0 12px; }

    /* ---- 地図カラム ---- */
    .dmap-col-map {
        height: auto;
        min-height: 0;
        max-height: none;
    }
    .dmap-canvas {
        height: clamp(360px, 56svh, 560px);
        min-height: 360px;
    }

    /* ---- 住所検索バー：折り返し ---- */
    .dmap-top-bar { padding: 8px 12px 5px; }

    .dmap-search-row {
        flex-wrap: wrap;
        gap: 5px;
    }
    .dmap-search-row .address-input {
        flex: 1 1 100%;   /* 1行目を占有 */
        min-width: 0;
        width: 100%;
        font-size: 16px;  /* iOS ズーム防止 */
    }
    .dmap-geolocate-btn {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 0.78rem;
    }
    .dmap-address-hint { font-size: 0.68rem; margin-top: 4px; }

    /* ---- 地図フッター：コントロール群 ---- */
    .dmap-map-footer { padding: 8px 12px 10px; }

    .dmap-layer-row {
        flex-wrap: wrap;
        gap: 5px 10px;
        margin-bottom: 6px;
    }
    .dmap-layer-toggle { font-size: 0.76rem; }
    .dmap-layer-hint   { font-size: 0.68rem; }

    .dmap-area-row  { flex-wrap: wrap; gap: 6px; }
    .dmap-area-label { font-size: 0.74rem; }
    .dmap-area-btns  { flex-wrap: wrap; gap: 5px; }
    .dmap-area-btns .area-type-btn {
        padding: 7px 11px;
        font-size: 0.78rem;
    }

    .dmap-circle-panel {
        flex-wrap: wrap;
        gap: 6px;
        padding: 6px 0 0;
    }
    .dmap-circle-panel .radius-presets { flex-wrap: wrap; gap: 4px; }
    .dmap-circle-panel .radius-btn {
        padding: 6px 9px;
        font-size: 0.76rem;
    }
    #radiusCustomWrap input { width: 70px; font-size: 14px; }

    /* 選択地点サマリー */
    .dmap-summary .loc-key { width: 62px; font-size: 0.68rem; }
    .dmap-summary .loc-val { font-size: 0.76rem; }

    /* ---- フォームパネル ---- */
    .dmap-form-header { padding: 10px 14px 8px; }
    .dmap-form-title  { font-size: 0.88rem; }
    .dmap-form-desc   { font-size: 0.7rem; }

    .dmap-form-scroll { padding: 10px 12px 14px !important; }

    .dmap-form-scroll .form-section        { margin-bottom: 10px; padding: 10px 12px; }
    .dmap-form-scroll .form-section legend { font-size: 0.8rem; }
    .dmap-form-scroll .radio-group         { gap: 5px; margin-top: 7px; }
    .dmap-form-scroll .radio-label {
        padding: 9px 12px;
        font-size: 0.82rem;
        min-height: 40px;   /* タップしやすいサイズ */
    }
    .dmap-form-scroll .text-input   { font-size: 16px; } /* iOS ズーム防止 */
    .dmap-form-scroll textarea.text-input { font-size: 15px; }

    /* 区切り線 */
    .form-section-divider { margin: 10px 0; font-size: 0.75rem; }

    /* 注意文 */
    .dmap-notice { font-size: 0.7rem; padding: 8px 10px; }

    /* ---- 診断ボタン：画面下に sticky ---- */
    .dmap-form-footer {
        position: sticky;
        bottom: 0;
        z-index: 50;
        background: var(--card-bg);
        border-top: 2px solid var(--border);
        box-shadow: 0 -3px 10px rgba(0,0,0,0.10);
        padding: 10px 14px;
    }
    .dmap-form-footer .btn-submit-diag {
        font-size: 1rem;
        padding: 13px 20px;
    }

    /* ---- ヘルプツールチップ：モバイル幅調整 ---- */
    .help-tooltip { max-width: calc(100vw - 20px) !important; }

    /* ---- 飛行予定日時入力 ---- */
    .schedule-input-wrap { padding: 10px 12px; }
    .schedule-field {
        flex-direction: column;
        align-items: flex-start;
    }
    .schedule-field label { min-width: unset; }
    .schedule-field input[type="datetime-local"] {
        width: 100%;
        font-size: 16px; /* iOS ズーム防止 */
    }

    /* ---- 結果画面 ---- */
    .result-table { font-size: 0.82rem; }
    .col-label    { width: 40%; font-size: 0.78rem; }
    .did-check-details .did-detail-row { flex-wrap: wrap; gap: 3px; }
    .comp-result-card { padding: 12px 14px; }
}

/* ======================================================================
   小型スマホ (〜480px) ：さらにコンパクトに
   ====================================================================== */
@media (max-width: 480px) {
    /* ヘッダー */
    .site-title   { font-size: 0.88rem; }
    .header-badge { display: none; }

    /* 地図カラムを内容高に追従させ、キャンバスを親要素で切り取らない */
    .dmap-col-map {
        height: auto;
        min-height: 0;
    }
    .dmap-canvas {
        height: clamp(360px, 56dvh, 520px);
        min-height: 360px;
    }
    .dmap-top-bar { padding: 7px 10px 4px; }

    /* レイヤーヒント非表示（省スペース） */
    .dmap-layer-hint { display: none; }

    /* フォーム */
    .dmap-form-scroll { padding: 8px 10px 12px !important; }
    .dmap-form-scroll .form-section        { padding: 8px 10px; margin-bottom: 8px; }
    .dmap-form-scroll .form-section legend { font-size: 0.76rem; }
    .dmap-form-scroll .radio-label {
        padding: 8px 10px;
        font-size: 0.8rem;
        min-height: 38px;
    }
    .dmap-form-footer .btn-submit-diag {
        font-size: 0.95rem;
        padding: 12px 16px;
    }

    /* ヘルプボタン */
    .help-btn { width: 16px; height: 16px; font-size: 10px; }
}

/* ==========================================================================
   包括申請適性セクション
   ========================================================================== */
.comp-result-section {
    margin: 24px 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.comp-result-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 18px;
    margin: 0;
}

.comp-result-card {
    padding: 16px 18px;
    border-left: 5px solid #64748b;
}
.comp-result-card.comp-possible {
    border-left-color: #16a34a;
    background: #f0fdf4;
}
.comp-result-card.comp-with-check {
    border-left-color: #d97706;
    background: #fffbeb;
}
.comp-result-card.comp-individual {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.comp-result-label {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: inherit;
}
.comp-result-card.comp-possible   .comp-result-label { color: #15803d; }
.comp-result-card.comp-with-check .comp-result-label { color: #b45309; }
.comp-result-card.comp-individual .comp-result-label { color: #b91c1c; }

.comp-result-message {
    font-size: .875rem;
    color: #374151;
    margin: 0;
    line-height: 1.6;
}

/* 高度飛行形態の注意項目 */
.advanced-flight-warnings {
    background: #fff7ed;
    border-top: 1px solid #fed7aa;
    padding: 14px 18px;
}
.advanced-flight-warnings-title {
    font-size: .875rem;
    font-weight: 700;
    color: #c2410c;
    margin: 0 0 8px;
}
.advanced-flight-warnings-list {
    margin: 0;
    padding-left: 1.2em;
    font-size: .875rem;
    color: #374151;
    line-height: 1.7;
}

.comp-result-notice {
    font-size: .8rem;
    color: #64748b;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 10px 18px;
    line-height: 1.6;
}

/* フォーム区切り線 */
.form-section-divider {
    display: flex;
    align-items: center;
    margin: 16px 0 8px;
    font-size: .75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.form-section-divider::before,
.form-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.form-section-divider::before { margin-right: 8px; }
.form-section-divider::after  { margin-left:  8px; }


/* ==========================================================================
   ヘルプボタン＆ツールチップ（form_help.js）
   ========================================================================== */

/* ヘルプボタン：legend の inline ボタン */
.help-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:           18px;
    height:          18px;
    margin-left:     6px;
    padding:         0;
    border:          1.5px solid var(--color-primary, #1a56db);
    border-radius:   50%;
    background:      transparent;
    color:           var(--color-primary, #1a56db);
    font-size:       11px;
    font-weight:     700;
    line-height:     1;
    cursor:          pointer;
    vertical-align:  middle;
    transition:      background 0.15s, color 0.15s;
    flex-shrink:     0;
}
.help-btn:hover,
.help-btn:focus {
    background: var(--color-primary, #1a56db);
    color:      #fff;
    outline:    none;
}

/* ツールチップ本体 */
.help-tooltip-wrap {
    display: inline-block;  /* fixed 配置のため relative 不要 */
}

.help-tooltip {
    display:        none;
    position:       fixed;   /* overflow クリップを回避するため fixed を使用 */
    top:            0;
    left:           0;
    z-index:        9999;    /* 地図・フォームスクロールより必ず前面に */
    min-width:      220px;
    max-width:      300px;
    padding:        10px 12px;
    border:         1px solid #c7d2fe;
    border-radius:  8px;
    background:     #eef2ff;
    color:          #1e3a8a;
    font-size:      12px;
    line-height:    1.6;
    box-shadow:     0 4px 16px rgba(0,0,0,0.18);
    pointer-events: none;
    overflow-wrap:  break-word;
}
.help-tooltip.visible {
    display: block;
}
.help-tooltip strong {
    display:       block;
    margin-bottom: 4px;
    font-size:     12px;
    color:         #1e3a8a;
}

/* legend 内に help-btn を含む場合のレイアウト */
.form-section legend {
    display:     flex;
    align-items: center;
    flex-wrap:   wrap;
    gap:         4px;
}

/* ==========================================================================
   飛行予定日時入力（Q13 はい → 表示）
   ========================================================================== */

.schedule-input-wrap {
    margin-top:    10px;
    padding:       12px 14px;
    border:        1px solid #bfdbfe;
    border-radius: 8px;
    background:    #eff6ff;
}

.schedule-input-row {
    display:        flex;
    flex-direction: column;
    gap:            10px;
}

.schedule-field {
    display:     flex;
    align-items: center;
    gap:         8px;
    flex-wrap:   wrap;
}

.schedule-field label {
    font-size:   13px;
    color:       #1e40af;
    font-weight: 600;
    white-space: nowrap;
    min-width:   80px;
}

.schedule-field input[type="datetime-local"] {
    padding:       6px 10px;
    border:        1px solid #93c5fd;
    border-radius: 6px;
    background:    #fff;
    font-size:     14px;
    color:         #1e293b;
    cursor:        pointer;
}
.schedule-field input[type="datetime-local"]:focus {
    outline:      none;
    border-color: #3b82f6;
    box-shadow:   0 0 0 3px rgba(59,130,246,0.15);
}

.schedule-end-error {
    display:     none;
    margin-top:  4px;
    font-size:   12px;
    color:       #dc2626;
}

.schedule-note {
    margin-top: 8px;
    font-size:  11px;
    color:      #6b7280;
}

/* ==========================================================================
   結果画面：飛行予定日時・未定メモ
   ========================================================================== */

.schedule-datetime {
    font-weight: 600;
    color:       #1e40af;
}

.schedule-undecided-note {
    display:        flex;
    align-items:    flex-start;
    gap:            8px;
    margin-top:     10px;
    padding:        10px 14px;
    border:         1px solid #fed7aa;
    border-radius:  8px;
    background:     #fff7ed;
    color:          #92400e;
    font-size:      13px;
    line-height:    1.6;
}

.schedule-undecided-icon {
    flex-shrink: 0;
    font-size:   16px;
}

/* ==========================================================================
   メールアドレス認証・問い合わせ画面（auth_email / auth_verify / contact）
   ========================================================================== */

/* コンテナ */
.auth-container {
    max-width:  600px;
    margin:     0 auto;
    padding:    32px 16px 64px;
}

/* パンくず */
.auth-breadcrumb {
    display:     flex;
    align-items: center;
    gap:         6px;
    font-size:   13px;
    color:       #64748b;
    margin-bottom: 24px;
    flex-wrap:   wrap;
}
.auth-breadcrumb a {
    color:           #059669;
    text-decoration: none;
}
.auth-breadcrumb a:hover { text-decoration: underline; }
.auth-breadcrumb-sep     { color: #cbd5e1; }
.auth-breadcrumb-current { color: #1e293b; font-weight: 500; }

/* ステップインジケーター */
.auth-steps {
    display:        flex;
    align-items:    center;
    justify-content: center;
    gap:            0;
    margin-bottom:  32px;
}
.auth-step {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            6px;
    min-width:      80px;
}
.auth-step-num {
    width:           32px;
    height:          32px;
    border-radius:   50%;
    border:          2px solid #cbd5e1;
    background:      #f8fafc;
    color:           #94a3b8;
    font-size:       13px;
    font-weight:     700;
    display:         flex;
    align-items:     center;
    justify-content: center;
    transition:      all .2s;
}
.auth-step-label {
    font-size:   11px;
    color:       #94a3b8;
    text-align:  center;
    white-space: nowrap;
}
.auth-step-active .auth-step-num {
    border-color: #059669;
    background:   #059669;
    color:        #fff;
}
.auth-step-active .auth-step-label { color: #059669; font-weight: 600; }
.auth-step-done .auth-step-num {
    border-color: #059669;
    background:   #d1fae5;
    color:        #059669;
}
.auth-step-done .auth-step-label { color: #059669; }
.auth-step-line {
    flex:             1;
    height:           2px;
    background:       #e2e8f0;
    margin-bottom:    18px;
    min-width:        24px;
}
.auth-step-line-done { background: #059669; }

/* カード */
.auth-card {
    background:    #ffffff;
    border:        1px solid #e2e8f0;
    border-radius: 16px;
    padding:       32px 32px 28px;
    box-shadow:    0 2px 12px rgba(0,0,0,0.06);
}
.auth-card-header {
    text-align:    center;
    margin-bottom: 28px;
}
.auth-card-icon {
    font-size:     36px;
    margin-bottom: 12px;
}
.auth-card-title {
    font-size:     20px;
    font-weight:   700;
    color:         #0f172a;
    margin:        0 0 10px;
}
.auth-card-desc {
    font-size:   14px;
    color:       #475569;
    line-height: 1.7;
    margin:      0;
}
.auth-expire-note {
    font-size: 12px;
    color:     #94a3b8;
}

/* アラート */
.auth-alert {
    display:       flex;
    align-items:   flex-start;
    gap:           8px;
    padding:       12px 16px;
    border-radius: 10px;
    font-size:     13px;
    line-height:   1.6;
    margin-bottom: 20px;
}
.auth-alert-error {
    background: #fef2f2;
    border:     1px solid #fecaca;
    color:      #991b1b;
}
.auth-alert-dev {
    background: #fffbeb;
    border:     1px solid #fde68a;
    color:      #78350f;
}
.auth-alert-icon { flex-shrink: 0; }

/* 診断サマリーボックス */
.auth-summary-box {
    background:    #f0fdf4;
    border:        1px solid #bbf7d0;
    border-radius: 12px;
    padding:       16px 20px;
    margin-bottom: 24px;
}
.auth-summary-label {
    font-size:     11px;
    font-weight:   600;
    color:         #059669;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom:  10px;
}
.auth-summary-row {
    display:         flex;
    align-items:     baseline;
    gap:             12px;
    padding:         5px 0;
    border-bottom:   1px solid #d1fae5;
    font-size:       13px;
}
.auth-summary-row:last-child { border-bottom: none; }
.auth-summary-key {
    flex-shrink:  0;
    min-width:    90px;
    color:        #64748b;
    font-weight:  500;
}
.auth-summary-val  { color: #1e293b; }
.auth-summary-badge {
    display:       inline-block;
    padding:       2px 10px;
    border-radius: 999px;
    font-size:     12px;
    font-weight:   600;
    background:    #e2e8f0;
    color:         #1e293b;
}

/* フォーム */
.auth-form { margin-top: 8px; }
.auth-field { margin-bottom: 20px; }
.auth-label {
    display:       block;
    font-size:     13px;
    font-weight:   600;
    color:         #374151;
    margin-bottom: 6px;
}
.auth-required {
    display:       inline-block;
    font-size:     10px;
    font-weight:   600;
    color:         #fff;
    background:    #ef4444;
    padding:       1px 6px;
    border-radius: 4px;
    margin-left:   4px;
    vertical-align: middle;
}
.auth-input {
    display:       block;
    width:         100%;
    padding:       10px 14px;
    border:        1px solid #d1d5db;
    border-radius: 10px;
    font-size:     15px;
    color:         #1e293b;
    background:    #fff;
    box-sizing:    border-box;
    transition:    border-color .2s, box-shadow .2s;
}
.auth-input:focus {
    outline:      none;
    border-color: #059669;
    box-shadow:   0 0 0 3px rgba(5,150,105,0.15);
}
.auth-code-input {
    font-size:      24px;
    letter-spacing: .3em;
    text-align:     center;
    font-weight:    700;
    max-width:      220px;
}
.auth-textarea {
    display:       block;
    width:         100%;
    padding:       10px 14px;
    border:        1px solid #d1d5db;
    border-radius: 10px;
    font-size:     14px;
    color:         #1e293b;
    background:    #fff;
    box-sizing:    border-box;
    resize:        vertical;
    font-family:   inherit;
    line-height:   1.7;
    transition:    border-color .2s, box-shadow .2s;
}
.auth-textarea:focus {
    outline:      none;
    border-color: #059669;
    box-shadow:   0 0 0 3px rgba(5,150,105,0.15);
}
.auth-field-hint {
    margin-top: 5px;
    font-size:  12px;
    color:      #9ca3af;
}
.auth-readonly-field {
    padding:       10px 14px;
    border:        1px solid #e2e8f0;
    border-radius: 10px;
    font-size:     14px;
    color:         #475569;
    background:    #f8fafc;
}
.auth-submit-btn {
    width:     100%;
    font-size: 15px;
    padding:   13px 24px;
}

/* 再送リンク */
.auth-resend-wrap {
    margin-top:  20px;
    text-align:  center;
    font-size:   13px;
    color:       #64748b;
}
.auth-resend-link {
    color:           #059669;
    text-decoration: none;
    font-weight:     500;
    margin-left:     6px;
}
.auth-resend-link:hover { text-decoration: underline; }

/* フッター注記 */
.auth-footer-note {
    margin-top:  20px;
    font-size:   12px;
    color:       #94a3b8;
    text-align:  center;
    line-height: 1.7;
}
.auth-footer-note code {
    font-size:   11px;
    background:  #f1f5f9;
    padding:     1px 5px;
    border-radius: 4px;
}

/* 認証済みバッジ */
.auth-verified-badge {
    display:        flex;
    align-items:    center;
    gap:            8px;
    padding:        10px 16px;
    background:     #f0fdf4;
    border:         1px solid #bbf7d0;
    border-radius:  10px;
    font-size:      13px;
    color:          #065f46;
    font-weight:    500;
    margin-bottom:  20px;
}
.auth-verified-icon { font-size: 16px; }

/* 問い合わせ画面サマリー拡張 */
.contact-summary-box { margin-bottom: 24px; }
.contact-risk-badge {
    display:       inline-block;
    padding:       2px 10px;
    border-radius: 999px;
    font-size:     12px;
    font-weight:   600;
}
.risk-caution  { background: #fef3c7; color: #92400e; }
.risk-warning  { background: #fee2e2; color: #991b1b; }
.risk-ok       { background: #d1fae5; color: #065f46; }
.risk-info     { background: #dbeafe; color: #1e40af; }

/* 完了画面 */
.auth-complete-card {
    text-align:    center;
    padding:       48px 32px;
}
.auth-complete-icon  { font-size: 56px; margin-bottom: 20px; }
.auth-complete-title {
    font-size:     22px;
    font-weight:   700;
    color:         #0f172a;
    margin:        0 0 12px;
}
.auth-complete-desc {
    font-size:   14px;
    color:       #475569;
    line-height: 1.8;
    margin:      0 0 28px;
}
.auth-complete-info {
    background:    #f8fafc;
    border:        1px solid #e2e8f0;
    border-radius: 12px;
    padding:       16px 20px;
    text-align:    left;
    margin-bottom: 28px;
}
.auth-complete-actions {
    display:        flex;
    gap:            12px;
    justify-content: center;
    flex-wrap:      wrap;
}

/* 診断結果画面：相談CTAセクション */
.consult-cta-section {
    margin:        28px 0 8px;
}
.consult-cta-card {
    display:        flex;
    align-items:    center;
    gap:            20px;
    background:     linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border:         1.5px solid #6ee7b7;
    border-radius:  16px;
    padding:        20px 24px;
    box-shadow:     0 2px 10px rgba(5,150,105,0.08);
}
.consult-cta-icon {
    font-size:  32px;
    flex-shrink: 0;
}
.consult-cta-body { flex: 1; }
.consult-cta-title {
    font-size:   16px;
    font-weight: 700;
    color:       #065f46;
    margin:      0 0 6px;
}
.consult-cta-desc {
    font-size:   13px;
    color:       #047857;
    line-height: 1.6;
    margin:      0;
}
.btn-consult {
    flex-shrink:     0;
    display:         inline-block;
    padding:         12px 22px;
    background:      #059669;
    color:           #fff !important;
    font-size:       14px;
    font-weight:     600;
    border-radius:   10px;
    text-decoration: none;
    white-space:     nowrap;
    transition:      background .2s, transform .1s;
}
.btn-consult:hover {
    background: #047857;
    transform:  translateY(-1px);
}

/* btn-outline */
.btn-outline {
    display:         inline-block;
    padding:         10px 22px;
    border:          1.5px solid #d1d5db;
    border-radius:   10px;
    color:           #374151;
    font-size:       14px;
    font-weight:     500;
    text-decoration: none;
    background:      #fff;
    transition:      border-color .2s;
}
.btn-outline:hover { border-color: #059669; color: #059669; }

/* レスポンシブ：認証画面 */
@media (max-width: 767px) {
    .auth-card { padding: 24px 16px 20px; }
    .auth-steps { gap: 0; }
    .auth-step-label { font-size: 10px; }
    .consult-cta-card {
        flex-direction: column;
        text-align:     center;
        gap:            14px;
    }
    .btn-consult { width: 100%; text-align: center; }
}

/* ==========================================================================
   問い合わせ画面：該当項目タグ
   ========================================================================== */
.contact-triggered-row {
    align-items: flex-start !important;
}
.contact-triggered-list {
    display:   flex;
    flex-wrap: wrap;
    gap:       6px;
    margin-top: 2px;
}
.contact-triggered-tag {
    display:       inline-block;
    padding:       4px 10px;
    background:    #fff7ed;
    border:        1px solid #fed7aa;
    border-radius: 999px;
    font-size:     12px;
    color:         #92400e;
    line-height:   1.4;
}

/* ==========================================================================
   問い合わせ画面：該当項目リスト（箇条書き）
   ========================================================================== */
.contact-triggered-section {
    background:    #fff7ed;
    border:        1px solid #fed7aa;
    border-radius: 12px;
    padding:       16px 20px;
    margin-bottom: 20px;
}
.contact-triggered-title {
    font-size:     13px;
    font-weight:   700;
    color:         #92400e;
    margin-bottom: 10px;
}
.contact-triggered-ul {
    margin:  0;
    padding: 0 0 0 18px;
    list-style-type: disc;
}
.contact-triggered-li {
    font-size:   13px;
    color:       #78350f;
    line-height: 1.7;
    padding:     2px 0;
}

/* ==========================================================================
   概算料金目安セクション
   ========================================================================== */
.price-estimate-section {
    background:    #f0faf4;
    border:        1px solid #86efac;
    border-radius: 16px;
    padding:       28px 28px 20px;
    margin-bottom: 28px;
}
.price-estimate-title {
    font-size:     20px;
    font-weight:   700;
    color:         var(--accent-dark);
    margin-bottom: 6px;
    display:       flex;
    align-items:   center;
    gap:           8px;
}
.price-estimate-icon {
    font-size: 22px;
}
.price-estimate-note {
    font-size:     13px;
    color:         var(--text-muted);
    margin-bottom: 20px;
}
.price-estimate-summary {
    background:    #ffffff;
    border:        1px solid #bbf7d0;
    border-radius: 12px;
    padding:       18px 20px;
    margin-bottom: 20px;
}
.price-estimate-total {
    display:        flex;
    align-items:    baseline;
    gap:            12px;
    margin-bottom:  8px;
}
.price-label {
    font-size:  14px;
    font-weight: 600;
    color:       var(--text-muted);
    min-width:   80px;
}
.price-value {
    font-size:   28px;
    font-weight: 800;
    color:       var(--accent-dark);
}
.price-estimate-sub {
    display:  flex;
    gap:      24px;
    flex-wrap: wrap;
    font-size: 13px;
    color:     var(--text-muted);
}
.price-breakdown-title {
    font-size:     14px;
    font-weight:   700;
    color:         var(--text-main);
    margin-bottom: 10px;
}
.price-breakdown-list {
    list-style:    none;
    margin:        0;
    padding:       0;
    display:       flex;
    flex-direction: column;
    gap:           6px;
}
.price-breakdown-item {
    display:        flex;
    justify-content: space-between;
    align-items:    center;
    padding:        8px 14px;
    border-radius:  8px;
    font-size:      14px;
}
.price-base {
    background: #f0fdf4;
    border:     1px solid #bbf7d0;
    font-weight: 600;
    color:       var(--accent-dark);
}
.price-add {
    background: #fff;
    border:     1px solid #e5e7eb;
    color:      var(--text-main);
}
.price-discount {
    background: #fff7ed;
    border:     1px solid #fed7aa;
    color:      #92400e;
}
.price-item-name {
    flex: 1;
}
.price-item-amount {
    font-weight: 700;
    white-space: nowrap;
    margin-left: 12px;
}
.price-discount .price-item-amount {
    color: #16a34a;
}
.price-estimate-disclaimer {
    font-size:   12px;
    color:       var(--text-muted);
    margin-top:  16px;
    line-height: 1.6;
    border-top:  1px dashed #d1fae5;
    padding-top: 12px;
}

/* ==========================================================================
   診断フォーム：メールアドレス入力・個人情報の取扱いセクション
   ========================================================================== */

/* フィールド補足テキスト（例：「正確なアドレスをご入力ください」） */
.field-hint {
    font-size:   0.8rem;
    color:       var(--text-muted);
    margin-top:  5px;
    line-height: 1.5;
}

/* dmap スクロールエリア内でのサイズ統一 */
.dmap-form-scroll .field-hint {
    font-size: 0.78rem;
}

/* コンセントセクションの legend は他のフォームセクションと同サイズに */
.dmap-form-scroll .consent-section legend {
    font-size:   0.8rem;
    font-weight: 600;
}

/* プライバシー同意ブロック（必須） */
.required-consent {
    margin-bottom: 8px;
}

/* チェックボックスラベル共通：縦1行ずつ表示 */
.consent-checkbox-label {
    display:       flex;
    align-items:   flex-start;
    gap:           7px;
    font-size:     0.85rem;
    line-height:   1.5;
    color:         var(--text-main);
    cursor:        pointer;
    margin-bottom: 2px;
}

.consent-checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top:  3px;
    width:       15px;
    height:      15px;
    cursor:      pointer;
    accent-color: var(--accent-strong, #059669);
}

/* dmap スクロールエリア内でのサイズ統一 */
.dmap-form-scroll .consent-checkbox-label {
    font-size: 0.8rem;
}

/* "以下の情報をメールでお受け取りになりますか？（任意）" テキスト */
.consent-opt-title {
    font-size:    0.82rem;
    color:        var(--text-muted);
    margin:       10px 0 6px;
    font-weight:  500;
}

.dmap-form-scroll .consent-opt-title {
    font-size: 0.78rem;
    margin:    8px 0 5px;
}

/* マーケティングオプトイン 3項目を縦並びに */
.consent-opt-group {
    display:        flex;
    flex-direction: column;
    gap:            5px;
}

/* プライバシーポリシーリンク */
.consent-link {
    color:           var(--accent-strong, #059669);
    text-decoration: underline;
    font-weight:     500;
}
.consent-link:hover {
    color: #047857;
}

/* =====================================================
   電話問い合わせ案内ボックス（contact.html）
   ===================================================== */
.contact-tel-box {
    margin-top: 28px;
    padding: 20px 24px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    text-align: center;
}
.contact-tel-title {
    font-size: 1rem;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 6px;
}
.contact-tel-desc {
    font-size: .875rem;
    color: #374151;
    margin: 0 0 10px;
}
.contact-tel-number {
    display: inline-block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #059669;
    text-decoration: none;
    letter-spacing: .04em;
}
.contact-tel-number:hover {
    color: #047857;
    text-decoration: underline;
}
.contact-tel-hours {
    font-size: .8rem;
    color: #6b7280;
    margin: 6px 0 0;
}

/* ==========================================================================
   診断ツール 地図 v2 — ピンアイコン・操作パネル (Phase D-3)
   ========================================================================== */

/* --- ピンアイコン（Leaflet divIcon）--- */
/* Leaflet は className 指定時に leaflet-marker-icon <className> を設定する */
.leaflet-marker-icon.flight-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(45deg);
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.leaflet-marker-icon.flight-pin-departure {
    background: #1565c0;
}
.leaflet-marker-icon.flight-pin-destination {
    background: #c62828;
}
.leaflet-marker-icon.flight-pin-waypoint {
    background: #e65100;
}
.flight-pin-label {
    transform: rotate(-45deg);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: -0.5px;
}

/* --- 案内文ラベル --- */
.dmap-mode-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0d47a1;
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-left: 4px solid #1565c0;
    padding: 8px 10px;
    margin: 0 0 8px;
    border-radius: 0 4px 4px 0;
    min-height: 1.6em;
    line-height: 1.45;
}
.dmap-mode-label:empty {
    display: none;
}

/* --- 出発地・目的地 住所欄 --- */
.dmap-pin-fields {
    margin-bottom: 8px;
}
.dmap-pin-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}
.dmap-pin-dot {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 24px;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.dmap-pin-dot--departure  { background: #1565c0; }
.dmap-pin-dot--destination { background: #c62828; }
.dmap-pin-addr {
    flex: 1;
    font-size: 0.82rem;
    padding: 4px 7px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f9fafb;
    color: #374151;
    min-width: 0;
}

/* --- 操作ボタン群 --- */
.dmap-pin-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}
.dmap-pin-btn {
    font-size: 0.78rem;
    padding: 5px 9px;
    border: 1px solid #9ca3af;
    border-radius: 5px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.dmap-pin-btn:hover {
    background: #f3f4f6;
    border-color: #6b7280;
}
.dmap-pin-btn:active {
    background: #e5e7eb;
}

/* --- 飛行エリア描画説明 --- */
.dmap-area-hint {
    font-size: 0.80rem;
    color: #6b7280;
    margin: 0 0 4px;
    line-height: 1.5;
}

/* --- KML エクスポート行 --- */
.dmap-kml-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 4px;
}
.dmap-kml-btn {
    font-size: 0.82rem;
    padding: 6px 12px;
    border: 1px solid #1565c0;
    border-radius: 5px;
    background: #e3f2fd;
    color: #1565c0;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.dmap-kml-btn:hover {
    background: #bbdefb;
}
.dmap-kml-hint {
    font-size: 0.78rem;
    color: #6b7280;
}

/* 診断ツール 飛行エリア外ピン警告 */
.dmap-area-warning {
    font-size: 0.8rem;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 4px;
    padding: 6px 10px;
    margin: 4px 0 0;
}

/* 診断ツール 地図内「現在地へ移動」ボタン */
.diag-current-location-control a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 1;
    background: #fff;
    color: #1565c0;
    text-decoration: none;
}
.diag-current-location-control a:hover {
    background: #e3f2fd;
    color: #1565c0;
}

/* 診断ツール 現在地マーカー */
.diag-current-location-marker {
    stroke: #1d4ed8;
    fill: #60a5fa;
}
