@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;600;700&family=Space+Grotesk:wght@500&display=swap');

:root {
  font-family: 'Noto Sans JP', 'Space Grotesk', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  font-weight: 400;
  color: #0f172a;
  background-color: #f6f7fb;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, #f1f5f9, #f8fafc 42%, #eef2ff 65%, #f8fafc 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input {
  font-family: inherit;
}

#root,
.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 4px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: #0ea5e9;
  margin: 0 0 4px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
}

.lede {
  margin: 0;
  color: #475569;
  max-width: 780px;
}

.meta-badge {
  background: #0ea5e9;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  align-self: flex-start;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.radius-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.label {
  font-weight: 600;
  color: #0f172a;
}

.radius-buttons {
  display: flex;
  gap: 8px;
}

.chip {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.chip.active {
  background: linear-gradient(135deg, #0ea5e9, #0f766e);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.3);
}

.filters {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 480px;
}

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

.field.compact {
  max-width: 140px;
}

.field span {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
}

.field input,
.field select {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  font-size: 14px;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus {
  border-color: #0ea5e9;
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice.info {
  background: #e0f2fe;
  color: #0f172a;
  border: 1px solid #bae6fd;
}

.notice.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 16px 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}

.map-card,
.list-card {
  min-height: 320px;
}

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

.card-head h2 {
  margin: 0;
  font-size: 20px;
}

.pill {
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  background: #0ea5e9;
  color: #ffffff;
  border: 1px solid transparent;
}

.pill.muted {
  background: #e2e8f0;
  color: #334155;
}

.pill.success {
  background: #0f766e;
  color: #ffffff;
}

.list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-shell {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  position: relative;
}

.map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #475569;
  background: repeating-linear-gradient(
      -45deg,
      #f8fafc,
      #f8fafc 12px,
      #eef2ff 12px,
      #eef2ff 24px
    )
    center / 40px 40px;
  z-index: 1;
}

.map-container {
  width: 100%;
  height: 620px;
}

.footnote {
  margin: 10px 0 4px;
  color: #94a3b8;
  font-size: 13px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
}

.list-row {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  background: #ffffff;
  transition: border 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.list-row:hover {
  border-color: #0ea5e9;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.12);
}

.list-row.active {
  border-color: #0f766e;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.12);
}

.row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.row-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.row-workplace {
  color: #0f172a;
  font-weight: 600;
  font-size: 14px;
}

.row-specialty {
  color: #475569;
  font-weight: 600;
  font-size: 13px;
}

.row-specialty.muted {
  color: #64748b;
}

.row-distance {
  font-weight: 700;
  color: #0ea5e9;
}

.row-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tag {
  background: #f1f5f9;
  color: #334155;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

.tag.strong {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0ea5e9;
}

.row-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.ghost.compact {
  padding: 8px 10px;
  font-size: 13px;
  background: #f8fafc;
}

.empty {
  padding: 12px;
  color: #94a3b8;
  font-weight: 600;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.pagination button {
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
}

.pagination button:hover:not(:disabled) {
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-status {
  font-weight: 700;
  color: #334155;
}

.detail-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 14px;
}

.detail-grid-2col {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.detail-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.detail-block.full-row {
  grid-column: 1 / -1;
}

.detail-label {
  margin: 0 0 6px;
  font-weight: 700;
  color: #0f172a;
}

.detail-text {
  margin: 0;
  color: #475569;
}

.detail-text strong {
  color: #0f172a;
}

.form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #0f172a;
}

.result-text {
  white-space: pre-wrap;
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  overflow-wrap: anywhere;
}

.result-text.slim {
  font-size: 12px;
  line-height: 1.4;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.result-block {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.2);
}

.input-echo {
  margin-top: 8px;
  color: #475569;
}

.result-body.small {
  font-size: 13px;
}

.result-block.full-row {
  grid-column: 1 / -1;
}

.result-label {
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #a5f3fc;
  font-size: 13px;
}

.result-body {
  margin: 0;
  white-space: pre-wrap;
  font-size: 14px;
}

.result-panel {
  margin-bottom: 12px;
}

.result-sep {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 10px 0;
}

.raw-debug {
  margin-top: 10px;
  font-size: 13px;
}

.raw-debug summary {
  cursor: pointer;
  font-weight: 700;
  color: #0ea5e9;
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0ea5e9, #0f766e);
  transition: width 0.35s ease;
}

.progress-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.progress-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 14px 12px;
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.08), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(15, 118, 110, 0.12), transparent 40%),
    linear-gradient(135deg, #ffffff, #f8fafc 55%, #f1f5f9);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.progress-card.error {
  border-color: #fecaca;
  background: #fef2f2;
}

.progress-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #0ea5e9, #0f766e);
  opacity: 0.75;
}

.progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.progress-name {
  margin: 4px 0 2px;
  font-size: 18px;
  color: #0f172a;
}

.progress-workplace {
  margin: 0;
  color: #475569;
  font-weight: 600;
}

.progress-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.progress-body {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
}

.progress-label {
  margin: 0 0 4px;
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
}

.progress-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.progress-text.small {
  font-size: 13px;
}

.progress-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 90%, rgba(14, 165, 233, 0.12), transparent 35%);
  pointer-events: none;
}

.progress-input {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px;
}

.status-pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pill.pending {
  background: #e2e8f0;
  color: #475569;
}

.status-pill.running {
  background: #0ea5e9;
  color: #ffffff;
}

.status-pill.done {
  background: #0f766e;
  color: #ffffff;
}

.status-pill.error {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.pill.subtle {
  background: #e2e8f0;
  color: #0f172a;
  border-color: transparent;
}

.progress-note {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.progress-result {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.progress-result.error {
  background: #fef2f2;
  border-color: #fecaca;
}

.progress-result-label {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.progress-result-body {
  font-weight: 700;
  color: #0f172a;
}

.progress-result-reason {
  margin-top: 4px;
  color: #475569;
  font-size: 13px;
}

.pill.error {
  background: #b91c1c;
  color: #ffffff;
}

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

.detail-actions-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost,
.primary {
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.ghost {
  background: #f8fafc;
  color: #0f172a;
  border-color: #e2e8f0;
}

.primary {
  background: linear-gradient(135deg, #0f766e, #0ea5e9);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.25);
}

.ghost:hover,
.primary:hover {
  transform: translateY(-1px);
}

.info-window {
  font-family: 'Noto Sans JP', Arial, sans-serif;
  color: #0f172a;
}
.info-name {
  font-weight: 700;
  margin-bottom: 4px;
}
.info-specialty {
  color: #475569;
}
.info-workplace {
  color: #0f172a;
  font-weight: 600;
}
.info-distance {
  color: #0ea5e9;
  font-weight: 700;
  margin-top: 4px;
}

.map-container:focus {
  outline: none;
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .map-container {
    height: 520px;
  }

  .filters {
    min-width: 100%;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 22px 18px 36px;
  }

  .hero {
    flex-direction: column;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .filters {
    flex-direction: column;
    min-width: 100%;
  }

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