/**
 * FFXIV マップ座標ビューア スタイル (map.css)
 */

:root {
  --map-max-size: 640px;
  --ruler-size: 28px;
  --map-content-width: calc(var(--map-max-size) + var(--ruler-size));
  --circle-primary: #0284c7;
  --circle-fill: rgba(2, 132, 199, 0.22);
  --circle-center: #0369a1;
  --card-bg: #f8f6ee;
  --card-border: #dcd8c8;
}

/* 全体コンテナ */
.map-page-wrapper {
  width: 100%;
  max-width: calc(var(--map-content-width) + 32px);
  margin: 0 auto;
  padding: 16px 16px 60px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #222;
}

.map-page-header {
  width: 100%;
  max-width: var(--map-content-width);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
  box-sizing: border-box;
}

.map-page-header h1 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-title-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.15s;
}

.map-title-link:hover {
  opacity: 0.8;
}

/* ==========================================================================
   マップ上部セレクター (拡張パスタブ + マップ選択ドロップダウン)
   ========================================================================== */
.map-selector-top {
  width: 100%;
  max-width: var(--map-content-width);
  margin: 0 auto 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}

.exp-tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #cbd5e1;
}

.exp-tab-btn {
  padding: 6px 14px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.exp-tab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.exp-tab-btn.active {
  background: #ffffff;
  color: #2563eb;
  font-weight: 700;
  border-color: #cbd5e1;
  border-bottom: 1px solid #ffffff;
  position: relative;
  bottom: -1px;
}

.map-dropdown-container {
  width: 100%;
}

.map-select-dropdown {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.map-select-dropdown:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.map-select-dropdown optgroup {
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
}

.map-select-dropdown option {
  font-weight: 500;
  color: #1e293b;
  background: #ffffff;
}

/* ==========================================================================
   マップ表示エリア (ルーラー + 640px画像)
   ========================================================================== */
.map-view-section {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.map-composite-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: calc(var(--map-max-size) + var(--ruler-size));
  user-select: none;
  margin: 0 auto;
}

/* 上部ルーラー行 (左上角 + X軸ルーラー) */
.ruler-top-row {
  display: flex;
  width: 100%;
  height: var(--ruler-size);
}

.ruler-corner {
  width: var(--ruler-size);
  height: var(--ruler-size);
  flex-shrink: 0;
  background: #fafaf8;
}

.ruler-top {
  flex: 1;
  position: relative;
  height: var(--ruler-size);
  background: #fdfdfb;
  border-bottom: 1px solid #b8b29e;
  overflow: hidden;
}

/* マップ本体行 (左部Y軸ルーラー + 1:1キャンバス) */
.map-main-row {
  display: flex;
  width: 100%;
  align-items: stretch;
}

/* 左部ルーラー (Y軸) */
.ruler-left {
  width: var(--ruler-size);
  flex-shrink: 0;
  position: relative;
  background: #fdfdfb;
  border-right: 1px solid #b8b29e;
  overflow: hidden;
}

/* ルーラー目盛りテキスト */
.ruler-mark-x {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #444;
  pointer-events: none;
}

.ruler-mark-y {
  position: absolute;
  left: 6px;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #444;
  pointer-events: none;
}

/* マップ本体キャンバスラッパー */
.map-canvas-wrap {
  flex: 1;
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: #2b2721;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border: 1px solid #8c826b;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.map-canvas-wrap.is-panning {
  cursor: grabbing !important;
}

/* 拡大縮小・パン移動用トランスフォームレイヤー */
.map-transform-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
}

.map-base-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* SVGオーバーレイレイヤー */
.map-svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* 円の描画スタイル */
.overlay-circle {
  transition: stroke 0.2s, fill 0.2s;
  pointer-events: none;
}

/* 円の内側ドラッグ移動用ヒットエリア (透明) */
.circle-drag-hitarea {
  fill: rgba(0, 0, 0, 0.001);
  stroke: none;
  cursor: move;
  pointer-events: all;
}

.circle-drag-hitarea.is-dragging {
  cursor: grabbing !important;
}

/* 円周ドラッグリサイズ用ヒットエリア (透明で掴みやすい太線) */
.circle-resize-hitarea {
  fill: none;
  stroke: rgba(0, 0, 0, 0.001);
  stroke-width: 18px;
  cursor: ew-resize;
  pointer-events: stroke;
}

/* リサイズ中・ホバー時の円強調 */
.overlay-circle.resizing-active {
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.8));
}

/* 円・中心のぼわーっとにじんで戻るアニメーション (ラベルクリック時) */
@keyframes circleGlowPulse {
  0% {
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 0px currentColor);
  }
  45% {
    stroke-width: 6px;
    filter: drop-shadow(0 0 12px currentColor);
  }
  100% {
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 0px currentColor);
  }
}

@keyframes circleCenterGlowPulse {
  0% {
    filter: drop-shadow(0 0 0px currentColor);
  }
  45% {
    filter: drop-shadow(0 0 8px currentColor);
  }
  100% {
    filter: drop-shadow(0 0 0px currentColor);
  }
}

.overlay-circle.is-flashing {
  animation: circleGlowPulse 0.75s ease-in-out;
}

.circle-center-dot.is-flashing {
  animation: circleCenterGlowPulse 0.75s ease-in-out;
}

/* エーテライト用コンテナ */
#aetheryteContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
}

/* エーテライトのアンカーピン */
.aetheryte-anchor {
  position: absolute;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  background-color: transparent;
  border: 2px solid #2563eb;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
  pointer-events: auto;
  cursor: default;
}

/* エーテライトのドラッグ可能テキストラベル */
.aetheryte-label {
  position: absolute;
  padding: 3px 8px;
  background-color: rgba(23, 37, 84, 0.88);
  color: #ffffff;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: move;
  pointer-events: auto;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: background-color 0.15s, border-color 0.15s;
}

.aetheryte-label:hover {
  background-color: rgba(30, 58, 138, 0.95);
  border-color: #60a5fa;
  z-index: 35;
}

.aetheryte-label.dragging {
  opacity: 0.85;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  cursor: grabbing;
  z-index: 50;
}

/* 座標情報テキストラベル (円中心座標 + 編集可能テキストエリア) */
.coord-circle-label {
  position: absolute;
  padding: 4px 6px;
  background-color: #0284c7;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  z-index: 30;
  transform-origin: 0 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-width: 145px;
  max-width: 230px;
  box-sizing: border-box;
  pointer-events: auto;
  user-select: none;
}

.coord-circle-label:hover {
  filter: brightness(1.05);
  z-index: 45;
}

.coord-circle-label.dragging {
  opacity: 0.85;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  cursor: grabbing !important;
  z-index: 50;
}

/* ラベルヘッダー (座標表示 + ドラッグ用グリップ) */
.coord-label-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 1px 2px 3px;
  cursor: move;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 3px;
}

.coord-label-coords {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.coord-label-grip {
  font-size: 12px;
  opacity: 0.75;
  cursor: move;
  user-select: none;
}

/* 編集可能テキストエリア */
.coord-label-body {
  width: 100%;
}

.coord-label-textarea {
  width: 100%;
  min-height: 24px;
  max-height: 90px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  box-sizing: border-box;
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.35;
  display: block;
  user-select: text;
  cursor: text;
  transition: background 0.15s, box-shadow 0.15s;
}

.coord-label-textarea:focus {
  background: #ffffff;
  box-shadow: 0 0 0 2px #ffffff;
}

.coord-label-textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* マップ読み込み中ローディングオーバーレイ */
.map-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 60;
  user-select: none;
  pointer-events: all;
  transition: opacity 0.2s ease;
}

.map-loading-spinner {
  width: 38px;
  height: 38px;
  border: 3.5px solid rgba(255, 255, 255, 0.25);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: mapSpin 0.75s linear infinite;
}

@keyframes mapSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.map-loading-text {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ズーム操作コントロールUI */
.map-zoom-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  z-index: 50;
  overflow: hidden;
  user-select: none;
}

.zoom-btn {
  width: 32px;
  height: 30px;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.zoom-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.zoom-btn:active {
  background: #e2e8f0;
}

.zoom-btn.reset-btn {
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
}

.zoom-level-badge {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  padding: 2px 4px;
  min-width: 32px;
  text-align: center;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #fafaf9;
}

/* ==========================================================================
   4. 操作案内エリア (.map-instructions-banner)
   ========================================================================== */
.map-instructions-banner {
  width: 100%;
  max-width: var(--map-content-width);
  margin: 14px auto 12px;
  padding: 10px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0369a1;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
}

.instructions-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.instructions-text {
  line-height: 1.4;
}

/* ==========================================================================
   5. 円・ラベルカードエリア (.map-cards-section)
   ========================================================================== */
.map-cards-section,
.map-controls-panel {
  width: 100%;
  max-width: var(--map-content-width);
  margin: 0 auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 12px 14px;
  box-sizing: border-box;
}

.circle-sets-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 各円セットカード */
.circle-set-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.circle-set-card.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 1.5px #2563eb, 0 2px 8px rgba(37, 99, 235, 0.12);
}

/* セットカードヘッダー */
.circle-set-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.circle-set-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.circle-set-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.circle-set-color-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.1);
}

.btn-delete-set {
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-delete-set:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

/* 円追加行 */
.add-circle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 4px;
  padding: 2px 0;
}

.btn-add-circle {
  flex: 1;
  height: 38px;
  background: #eff6ff;
  border: 1.5px dashed #60a5fa;
  border-radius: 6px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-add-circle:hover:not(:disabled) {
  background: #dbeafe;
  border-color: #2563eb;
  transform: translateY(-1px);
}

.btn-add-circle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
  border-style: solid;
}

.circle-count-badge {
  margin-left: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #ffffff;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 0;
}

.controls-row:not(:last-child) {
  border-bottom: 1px dashed #f1f5f9;
  padding-bottom: 8px;
  margin-bottom: 6px;
}

.controls-row.row-color-fill {
  gap: 18px;
}

.control-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.control-label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  min-width: 62px;
}

.row-color-fill .fill-control-item .control-label {
  min-width: auto;
}

/* 半径クイック選択ボタングループ */
.radius-quick-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}

.radius-quick-btn {
  height: 28px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.radius-quick-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.radius-quick-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

/* バッジ付き入力グループ */
.input-badge-group {
  display: inline-flex;
  align-items: center;
}

.input-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #64748b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  width: 24px;
  height: 30px;
  border-radius: 4px 0 0 4px;
  border: 1px solid #475569;
  border-right: none;
}

.coord-num-input {
  width: 64px;
  height: 30px;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 0 4px 4px 0;
  background: #ffffff;
  color: #0f172a;
}

.coord-num-input:focus {
  outline: 2px solid #2563eb;
  border-color: #2563eb;
}

.radius-num-input {
  width: 52px;
  height: 30px;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 0 4px 4px 0;
  background: #ffffff;
  color: #0f172a;
}

.radius-num-input:focus {
  outline: 2px solid #2563eb;
  border-color: #2563eb;
}

.input-unit {
  font-size: 12px;
  color: #64748b;
  margin-left: 4px;
  white-space: nowrap;
}

/* 3行目: メモ・名称コントロール */
.memo-controls-row {
  padding-top: 4px;
}

.label-memo-control-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.label-memo-control-item .control-label {
  padding-top: 5px;
}

.label-memo-textarea {
  flex: 1;
  min-height: 32px;
  max-height: 90px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.4;
  resize: none;
  outline: none;
  transition: border-color 0.15s, height 0.1s ease;
}

.label-memo-textarea:focus {
  outline: 2px solid #2563eb;
  border-color: #2563eb;
}

.label-memo-textarea::placeholder {
  color: #94a3b8;
  font-size: 12px;
}

/* グラフィカルな塗りつぶし選択ボタン */
.fill-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.graphical-btn.fill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s;
}

.graphical-btn.fill-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.graphical-btn.fill-btn input[type="radio"] {
  display: none;
}

.graphical-btn.fill-btn:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1.5px #2563eb;
}

.fill-circle-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.15s;
}

.fill-circle-icon.icon-none {
  border: 2px solid #0284c7;
  background: #ffffff;
}

.fill-circle-icon.icon-fill {
  border: 2px solid #0284c7;
  background: rgba(2, 132, 199, 0.35);
}

/* グラフィカルな表示色パレット */
.color-palette-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.color-circle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.15s;
}

.color-circle-label input[type="radio"] {
  display: none;
}

.color-circle-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transition: all 0.15s;
  display: block;
}

.color-circle-label:hover .color-circle-dot {
  transform: scale(1.1);
}

.color-circle-label:has(input:checked) .color-circle-dot {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0f172a;
}

/* ==========================================================================
   6. URL表示エリア (.map-url-section)
   ========================================================================== */
.map-url-section {
  width: 100%;
  max-width: var(--map-content-width);
  margin: 14px auto 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 12px 14px;
  box-sizing: border-box;
}

.url-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.url-section-title::before {
  content: '🔗';
  font-size: 13px;
}

.share-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.share-url-input {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.share-url-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.btn-copy-url {
  height: 36px;
  padding: 0 16px;
  background: #2563eb;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
  transition: all 0.15s;
}

.btn-copy-url:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-copy-url:active {
  transform: translateY(0);
}

.copy-toast {
  position: absolute;
  right: 110px;
  top: 50%;
  transform: translateY(-50%);
  background: #15803d;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  animation: fadeInToast 0.2s ease;
}

@keyframes fadeInToast {
  from { opacity: 0; transform: translateY(-30%); }
  to { opacity: 1; transform: translateY(-50%); }
}

/* ==========================================================================
   7. フッターエリア (.map-page-footer)
   ========================================================================== */
.map-page-footer {
  width: 100%;
  max-width: var(--map-content-width);
  margin: 30px auto 0;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  box-sizing: border-box;
}

.map-page-footer .copyright-text {
  font-size: 11px;
  color: #64748b;
  margin: 0 0 4px;
}

.map-page-footer .copyright-sub {
  font-size: 10px;
  color: #94a3b8;
  margin: 0;
}

/* レスポンシブ対応 */
@media (max-width: 700px) {
  .map-page-wrapper {
    padding: 10px 8px 40px;
  }
  .exp-tab-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  .map-controls-panel {
    padding: 12px 10px;
  }
  .controls-row {
    gap: 8px;
  }
  .control-label {
    font-size: 12px;
  }
  .coord-num-input {
    width: 54px;
  }
  .radius-num-input {
    width: 44px;
  }
  .ruler-mark-x, .ruler-mark-y {
    font-size: 11px;
  }
  .copy-toast {
    right: 90px;
    font-size: 11px;
    padding: 3px 6px;
  }
}
