* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

button {
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
    "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f5f5f5;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

code {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 12px;
}

.app-container {
  display: flex;
  min-height: 100vh;
  background: #f5f5f5;
}

/* サイドバー（参照元の雰囲気） */
.sidebar {
  width: 280px;
  background: white;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.sidebar-header h2 {
  color: #333;
  font-size: 20px;
  font-weight: 700;
}

.sidebar-subtitle {
  margin-top: 6px;
  color: #777;
  font-size: 12px;
}

.menu {
  flex: 1;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: none;
  border: none;
  text-align: left;
  transition: all 0.2s ease;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background: #f5f5f5;
  color: #333;
}

.menu-item.active {
  background: #e8f5e9;
  color: #2e7d32;
  border-left-color: #4caf50;
}

.menu-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid #e0e0e0;
  background: #fafafa;
}

.hint {
  color: #666;
  font-size: 12px;
  line-height: 1.6;
}

/* メインコンテンツ */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f5f5f5;
  width: calc(100% - 280px);
}

.page {
  display: none !important;
  width: 100%;
  flex: 1;
}

.page.active {
  display: flex !important;
  flex-direction: column;
  animation: fadeIn 0.25s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  padding: 24px 32px;
  width: 100%;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

h1 {
  color: #333;
  font-size: 24px;
  font-weight: 800;
}

.subtitle {
  margin-top: 6px;
  color: #666;
  font-size: 13px;
}

/* カード */
.card {
  background: white;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 18px;
  overflow: hidden;
}

.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: #0277bd;
}

.card-body {
  padding: 16px;
}

/* フォーム */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.field.grow {
  flex: 1;
  min-width: 280px;
}

.field label {
  font-size: 12px;
  color: #555;
  font-weight: 700;
}

.field input[type="text"],
.field input[type="number"],
.field select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: white;
  color: #222;
}

.field select[multiple] {
  padding: 8px;
  min-height: 160px;
}

.field select[multiple] option {
  padding: 6px 8px;
}

/* 対応表: B列チェックボックス */
.bcols-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.checkbox-box {
  border: 1px solid #eee;
  border-radius: 12px;
  background: white;
  padding: 10px;
  max-height: 220px;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
}

.checkbox-item:hover {
  background: #f5f5f5;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.checkbox-item span {
  font-size: 13px;
  font-weight: 800;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media screen and (min-width: 1024px) {
  .checkbox-box {
    grid-template-columns: 1fr 1fr;
  }
}

.field input[type="text"]:focus,
.field input[type="number"]:focus,
.field select:focus,
textarea:focus {
  border-color: #90caf9;
  box-shadow: 0 0 0 4px rgba(144, 202, 249, 0.25);
}

.field.checkbox {
  min-width: auto;
}

.field.checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #444;
}

textarea {
  resize: vertical;
}

/* ドロップゾーン */
.dropzone {
  border: 2px dashed #cfd8dc;
  border-radius: 12px;
  padding: 16px;
  background: #fafafa;
  text-align: center;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.dropzone.dragover {
  border-color: #4caf50;
  background: #f1fff3;
}

.dropzone-title {
  font-weight: 900;
  color: #333;
  margin-bottom: 6px;
}

.dropzone-sub {
  color: #777;
  font-size: 12px;
  margin-bottom: 10px;
}

.dropzone-actions input[type="file"] {
  width: 100%;
  max-width: 420px;
}

.dropzone-meta {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}

.file-list {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.file-item {
  padding: 10px 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: white;
}

.file-item-name {
  font-weight: 700;
  color: #333;
  font-size: 13px;
  flex: 1;
  min-width: 0;
}

.file-item-name > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-meta {
  font-size: 12px;
  color: #777;
  flex-shrink: 0;
}

/* マスターデータ名編集 */
.master-name-container {
  position: relative;
}

.master-name-display {
  display: inline-block;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

.master-name-display:hover {
  background: #f0f0f0;
}

.master-name-input {
  width: 100%;
  max-width: 300px;
  padding: 4px 8px;
  border: 2px solid #4caf50;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  background: white;
  outline: none;
}

.master-name-input:focus {
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* ボタン */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.btn-primary,
.btn-secondary {
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #4caf50;
  color: white;
}

.btn-primary:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #9e9e9e;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.btn-secondary:hover {
  background: #d6d6d6;
}

/* ステータス */
.status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fcfcfc;
  color: #444;
  font-size: 13px;
  line-height: 1.5;
  min-height: 18px;
}

.status.ok {
  border-color: #c8e6c9;
  background: #f1fff3;
}

.status.err {
  border-color: #ffcdd2;
  background: #fff5f5;
}

/* Toast */
#toastHost {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: none;
  min-width: 260px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
  font-weight: 900;
  font-size: 13px;
  color: #111;
  transform: translateY(0);
  opacity: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.ok {
  border-color: #c8e6c9;
}

.toast.err {
  border-color: #ffcdd2;
}

.toast.hide {
  opacity: 0;
  transform: translateY(8px);
}

/* プレビュー */
.preview {
  margin-top: 12px;
}

.preview-title {
  font-weight: 900;
  color: #333;
  margin-bottom: 8px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #eee;
  border-radius: 12px;
  background: white;
}

table.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

table.preview-table th,
table.preview-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.preview-table th {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
  font-weight: 900;
  color: #444;
}

/* フィード作成 */
.feed-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 12px;
  align-items: start;
}

.feed-right {
  position: sticky;
  top: 12px;
}

.feed-master-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.feed-master-col {
  border: 1px solid #e6edf3;
  background: #f8fbfd;
  border-radius: 12px;
  padding: 10px;
}

.feed-preset {
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fcfcfc;
  margin-bottom: 12px;
}

.feed-select-list {
  display: grid;
  gap: 10px;
}

.feed-select-item {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e6edf3;
  background: white;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
}

.feed-select-item:hover {
  border-color: #c8e6c9;
  box-shadow: 0 8px 18px rgba(46, 125, 50, 0.08);
}

.feed-select-title {
  font-weight: 900;
  font-size: 16px;
  margin-bottom: 4px;
}

.feed-select-meta {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.feed-select-actions {
  position: relative;
  flex: 0 0 auto;
}

.feed-select-btns {
  display: inline-flex;
  gap: 8px;
  margin-right: 8px;
}

.feed-select-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  z-index: 50;
}

.feed-master-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #d7dee6;
  margin-bottom: 8px;
}

.feed-master-badge.master {
  background: #e8f5e9;
  border-color: #c8e6c9;
  color: #2e7d32;
}

.feed-master-badge.sub {
  background: #e3f2fd;
  border-color: #bbdefb;
  color: #1565c0;
}

.feed-right-stack {
  display: grid;
  gap: 12px;
}

.feed-right-stack .card {
  margin-bottom: 0;
}

.feed-right-stack .card-body {
  overflow: auto;
}

.feed-preset-quick {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.feed-preset-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-preset-tab {
  border: 1px solid #e5e7eb;
  background: white;
  color: #333;
  font-weight: 900;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.feed-preset-tab.active {
  background: #e8f5e9;
  border-color: #4caf50;
  color: #2e7d32;
}

.feed-preset-more {
  position: relative;
}

.feed-preset-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  z-index: 50;
}

.feed-preset-more-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.feed-preset-more-item:hover {
  background: #f3f4f6;
}

.feed-then-row {
  display: grid;
  grid-template-columns: 240px 260px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.feed-then-row select,
.feed-then-row input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7dee6;
  border-radius: 10px;
  background: white;
}

.feed-then-value2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.feed-then-concat {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: start;
}

.feed-then-concat select[multiple] {
  height: auto;
  min-height: 140px;
}

.feed-then-overwrite {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.feed-then-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.feed-then-mapmode {
  margin-top: 8px;
}

.feed-then-mapmode select {
  width: 100%;
}

.feed-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.feed-tab {
  border: 1px solid #e5e7eb;
  background: white;
  color: #333;
  font-weight: 900;
  border-radius: 999px;
  padding: 8px 12px;
}

.feed-tab.active {
  background: #e8f5e9;
  border-color: #4caf50;
  color: #2e7d32;
}

.feed-tab-panel {
  display: none;
}

.feed-tab-panel.active {
  display: block;
}

.feed-mapping-table-wrap {
  overflow: auto;
  border: 1px solid #eee;
  border-radius: 12px;
  background: white;
  margin-top: 10px;
}

.feed-bulk-box {
  border: 1px solid #e6edf3;
  background: #f8fbfd;
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
}

.feed-bulk-title {
  font-weight: 900;
  margin-bottom: 8px;
}

.feed-bulk-box textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7dee6;
  border-radius: 10px;
  background: white;
}

table.feed-mapping-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.feed-mapping-table th,
table.feed-mapping-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

table.feed-mapping-table th {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
  font-weight: 900;
}

table.feed-mapping-table .col-check {
  width: 72px;
}

table.feed-mapping-table .col-actions {
  width: 80px;
}

.feed-mapping-table input[type="text"],
.feed-mapping-table select {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 10px;
  min-width: 240px;
}

.feed-row-del {
  border: none;
  background: #eee;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 900;
}

.feed-row-del:hover {
  background: #e0e0e0;
}

.feed-rules-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 12px;
}

.feed-rule-items {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.feed-rule-item {
  padding: 10px 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feed-rule-item.active {
  border-color: #4caf50;
  background: #f1fff3;
}

.feed-rule-name {
  font-weight: 900;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-rule-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #ddd;
  color: #666;
  flex-shrink: 0;
}

.feed-rule-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.feed-rule-section-title {
  font-weight: 900;
  color: #333;
  margin-bottom: 8px;
}

.feed-cond-box {
  margin-top: 8px;
  border: 1px solid #e6edf3;
  background: #f8fbfd;
  border-radius: 12px;
  padding: 10px;
}

.feed-cond-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.feed-cond-if {
  font-weight: 900;
  color: #3b5568;
  letter-spacing: 0.02em;
}

.feed-cond-group {
  padding: 10px;
  border-radius: 12px;
  background: white;
  border: 1px solid #e6edf3;
  margin-bottom: 10px;
}

.feed-cond-row {
  display: grid;
  grid-template-columns: 240px 220px 1fr auto;
  gap: 10px;
  align-items: center;
}

.feed-cond-row select,
.feed-cond-row input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7dee6;
  border-radius: 10px;
  background: white;
}

.feed-cond-dateopt {
  margin-top: 6px;
  font-size: 12px;
  color: #667085;
}

.feed-cond-row .feed-row-del {
  padding: 10px 12px;
}

.feed-cond-or {
  margin: 10px 0;
  color: #6b7b88;
  font-weight: 900;
}

.feed-cond-and {
  margin: 8px 0 16px;
  color: #6b7b88;
  font-weight: 900;
}

.feed-cond-add {
  display: flex;
  gap: 8px;
}

@media screen and (max-width: 1024px) {
  .feed-cond-row {
    grid-template-columns: 1fr;
  }
}

.feed-derived-item,
.feed-exclude-item {
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fcfcfc;
  padding: 10px;
  margin-top: 10px;
}

.feed-derived-grid,
.feed-exclude-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.feed-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

@media screen and (max-width: 1024px) {
  .feed-layout {
    grid-template-columns: 1fr;
  }
  .feed-right {
    position: static;
  }
  .feed-master-grid {
    grid-template-columns: 1fr;
  }
  .feed-rules-layout {
    grid-template-columns: 1fr;
  }
  .feed-then-row {
    grid-template-columns: 1fr;
  }
}

/* 対応表: 置換ルールUI */
.mapping-replace {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fcfcfc;
}

.mapping-replace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mapping-replace-title {
  font-weight: 900;
  color: #333;
}

.split-rules {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fcfcfc;
}

.split-rules-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.split-rules-title {
  font-weight: 900;
  color: #333;
}

.split-rules-hint {
  color: #666;
  font-size: 12px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.split-rule-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.split-rule-row select,
.split-rule-row input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: white;
}

.split-rule-del {
  border: none;
  background: #eee;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 900;
}

.split-rule-del:hover {
  background: #e0e0e0;
}

@media screen and (max-width: 768px) {
  .split-rule-row {
    grid-template-columns: 1fr;
  }
}

.mapping-replace-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.mapping-replace-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.mapping-replace-row input[type="text"] {
  width: 100%;
}

.mapping-replace-del {
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: #eee;
  color: #333;
  font-weight: 900;
}

.mapping-replace-del:hover {
  background: #e0e0e0;
}

@media screen and (max-width: 768px) {
  .mapping-replace-row {
    grid-template-columns: 1fr;
  }
}

/* 対応表: 新しい列選択UI */
.mapping-cols-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media screen and (max-width: 1024px) {
  .mapping-cols-section {
    grid-template-columns: 1fr;
  }
}

.mapping-col-card {
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  background: white;
  overflow: hidden;
  transition: all 0.2s;
}

.mapping-col-card:hover {
  border-color: #90caf9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mapping-col-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.mapping-col-header h3 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 900;
  color: #333;
}

.mapping-col-desc {
  margin: 0;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

.mapping-col-body {
  padding: 20px;
}

.mapping-col-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.mapping-col-select:focus {
  border-color: #90caf9;
  box-shadow: 0 0 0 4px rgba(144, 202, 249, 0.25);
  outline: none;
}

.mapping-col-select:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

/* B列チェックボックス改善 */
.mapping-col-card .checkbox-box {
  margin-top: 12px;
  max-height: 280px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}

.mapping-col-card .checkbox-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.mapping-col-card .checkbox-item:hover {
  background: #f0f7ff;
  border-color: #90caf9;
}

.mapping-col-card .checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.mapping-col-card .checkbox-item span {
  font-size: 14px;
  font-weight: 700;
}

.mapping-col-card .bcols-actions {
  margin-bottom: 12px;
}

/* B列の処理設定セクション */
.mapping-options-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.mapping-option-group {
  margin-bottom: 16px;
}

.mapping-option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  cursor: pointer;
  padding: 12px;
  border-radius: 10px;
  background: #f8f9fa;
  border: 2px solid #e5e7eb;
  transition: all 0.2s;
}

.mapping-option-label:hover {
  background: #f0f7ff;
  border-color: #90caf9;
}

.mapping-option-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.mapping-option-detail {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* モバイル */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: white;
  border-bottom: 1px solid #e0e0e0;
  z-index: 1000;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle {
  background: none;
  border: none;
  padding: 8px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

.mobile-header-title {
  font-size: 18px;
  font-weight: 800;
  color: #333;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #333;
}

.mobile-menu-close {
  background: none;
  border: none;
  padding: 8px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close svg {
  width: 24px;
  height: 24px;
}

.mobile-menu-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: none;
  border: none;
  text-align: left;
  transition: all 0.2s ease;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  border-left: 3px solid transparent;
}

.mobile-menu-item:hover {
  background: #f5f5f5;
  color: #333;
}

.mobile-menu-item.active {
  background: #e8f5e9;
  color: #2e7d32;
  border-left-color: #4caf50;
}

@media screen and (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .mobile-header {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    margin-top: 56px;
    width: 100%;
    min-height: calc(100vh - 56px);
  }
  .container {
    padding: 16px;
  }
  .field {
    min-width: 100%;
  }
}


