:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #687386;
  --line: #dfe5ef;
  --navy: #1f3a5f;
  --navy-2: #2f5487;
  --slate: #64748b;
  --green: #1f8a5b;
  --amber: #b7791f;
  --red: #c2410c;
  --shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.app-header {
  background: linear-gradient(135deg, #172033 0%, #243b61 56%, #315989 100%);
  color: #fff;
  padding: 48px 24px 64px;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: #6f85a6;
  text-transform: uppercase;
}
.app-header .eyebrow { color: #b9c8dd; }
h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  letter-spacing: -0.04em;
}
.lead {
  margin: 14px 0 0;
  color: #d8e2f0;
  font-size: 17px;
}
.header-card {
  min-width: 240px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(10px);
}
.header-card strong { display: block; font-size: 17px; margin-bottom: 6px; }
.header-card span { color: #d8e2f0; font-size: 14px; }

.shell {
  max-width: 1200px;
  margin: -38px auto 48px;
  padding: 0 24px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}
.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
h3 { margin: 0 0 8px; font-size: 16px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
label span {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #344155;
}
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
  color: var(--ink);
  outline: none;
}
input { height: 46px; padding: 0 14px; }
textarea {
  min-height: 210px;
  padding: 16px;
  resize: vertical;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
}
input:focus, textarea:focus {
  border-color: var(--navy-2);
  box-shadow: 0 0 0 4px rgba(47, 84, 135, 0.12);
}
.notice {
  margin-top: 16px;
  border: 1px solid #e6ecf5;
  background: #f9fbff;
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--muted);
}
.notice summary { font-weight: 800; color: #344155; }
.notice p { margin: 10px 0 0; line-height: 1.6; }
.help-text { color: var(--muted); margin: 0 0 12px; line-height: 1.6; }
.flow-guide {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.flow-guide span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fbff;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}
.flow-guide b { color: var(--navy); }
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.primary-button, .secondary-button, .ghost-button {
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  min-height: 42px;
  padding: 0 16px;
}
.primary-button { background: var(--navy); color: #fff; }
.primary-button:hover { background: var(--navy-2); }
.secondary-button { background: #eef3fa; color: var(--navy); }
.step-button { display: inline-flex; align-items: center; gap: 8px; }
.step-button small {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  font-size: 11px;
  font-weight: 900;
}
.secondary-button.step-button small { background: #fff; color: var(--navy); }
.ghost-button { background: #f1f5f9; color: #344155; }
.ghost-button.danger { color: var(--red); background: #fff2ec; }
.status-text { color: var(--muted); font-size: 14px; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.summary-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.05);
}
.summary-card span { display:block; color: var(--muted); font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.summary-card strong { font-size: 24px; letter-spacing: -0.04em; }
.summary-card.target strong { color: var(--navy); }
.summary-card.good strong { color: var(--green); }
.summary-card.strong-good strong { color: #0f766e; }
.summary-card.search-before strong { color: var(--slate); font-size: 20px; }
.summary-card.warn strong { color: var(--amber); }
.summary-card.manual strong { color: #0f766e; }
.summary-card.danger strong { color: var(--red); }
.summary-card.muted strong { color: var(--slate); }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: start;
}
.table-panel, .map-panel { min-height: 520px; }
.sticky-title {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  padding-bottom: 12px;
}
.tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}
.tab {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #526172;
  padding: 8px 10px;
  font-weight: 900;
  white-space: nowrap;
}
.tab.active { background: #fff; color: var(--navy); box-shadow: 0 4px 12px rgba(23, 32, 51, 0.08); }
.table-wrap {
  max-height: 640px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  text-align: center;
  color: var(--muted);
  padding: 24px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  border-bottom: 1px solid #edf1f7;
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}
.col-date { width: 96px; }
.col-place { width: 190px; }
.col-amount { width: 120px; }
.col-action { width: 112px; }
.purpose-cell {
  max-width: 380px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}
th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-size: 12px;
  color: #526172;
  z-index: 1;
}
.table-hint {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
tr.map-row { cursor: pointer; }
tr.map-row:hover { background: #f8fafc; }
tr.row-focus { background: #eef6ff; }
tr.row-focus:hover { background: #eef6ff; }
.badge-button {
  border: 0;
  cursor: pointer;
}
.badge-button:hover { box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.1); }
.badge small { display:block; font-size: 10px; font-weight: 800; opacity: .78; margin-left: 4px; }
td.amount { text-align: right; font-weight: 900; white-space: nowrap; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  background: #eef3fa;
  color: var(--navy);
}
.badge.gray { background: #f1f5f9; color: #64748b; }
.badge.warn { background: #fff7ed; color: var(--amber); }
.badge.manual { background: #ecfdf5; color: #0f766e; }
.badge.danger { background: #fff2ec; color: var(--red); }
.status-stack {
  display: grid;
  gap: 6px;
  align-items: start;
  min-width: 170px;
}
.status-stack small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  word-break: keep-all;
}
.mini-action {
  width: fit-content;
  border: 1px solid rgba(31, 58, 95, 0.18);
  border-radius: 999px;
  background: #eef5ff;
  color: var(--navy);
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}
.mini-action.ghost { background: #f8fafc; color: #526172; }
tr.row-review { background: #fffaf2; }
tr.row-review:hover { background: #fff7ed; }
tr.row-failed { background: #fff7f2; }
tr.row-failed:hover { background: #fff2ec; }
tr.row-manual { background: #f6fffb; }
tr.row-manual:hover { background: #ecfdf5; }

.map-shell { position: relative; }
#map {
  height: 470px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #edf2f7;
}
.map-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--muted);
}
.map-placeholder strong { color: #344155; }
.map-notice {
  position: absolute;
  inset: 16px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  color: var(--muted);
  border: 1px dashed var(--line);
  pointer-events: none;
}
.map-notice strong { display:block; color: #344155; margin-bottom: 6px; }
.map-notice p { margin: 0; }
.map-notice.hidden { display: none; }
.map-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot.navy { background: var(--navy); }
.dot.amber { background: var(--amber); }
.dot.green { background: var(--green); }
.dot.gray { background: var(--slate); }
.info-window {
  min-width: 240px;
  max-width: 320px;
  padding: 14px 38px 12px 14px;
  font-size: 13px;
  position: relative;
}
.info-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}
.info-close:hover { background: #dfe7f1; }
.info-window strong { display:block; font-size: 15px; margin-bottom: 6px; }
.info-window ul { margin: 8px 0 0; padding-left: 18px; }
.info-window li { margin: 4px 0; }
.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.rule-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fbfcfe;
}
.rule-grid p { margin: 0; color: var(--muted); line-height: 1.7; }
.footer {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .header-inner, .workspace { display: block; }
  .header-card { margin-top: 22px; }
  .form-grid, .summary-grid, .rule-grid { grid-template-columns: 1fr; }
  .map-panel { margin-top: 18px; }
}

@media print {
  .app-header, .setup-panel, .paste-panel, .rules-panel, .footer, .tabs, .ghost-button, .primary-button, .secondary-button { display: none !important; }
  body { background: #fff; }
  .shell { margin: 0; max-width: none; padding: 0; }
  .panel, .summary-card { box-shadow: none; border-color: #ddd; }
  .workspace { display: block; }
  .map-panel { page-break-before: always; }
}

.auto-panel {
  border-color: #d7e3f3;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.auto-grid {
  grid-template-columns: 1.5fr 1fr;
}
.auto-panel .notice {
  margin-top: 12px;
}
@media (max-width: 920px) {
  .auto-grid { grid-template-columns: 1fr; }
}
.auto-debug pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.55;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

/* v1.1.5 layout cleanup */
.compact-panel { padding-bottom: 18px; }
.main-form-grid {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
  max-width: 720px;
}
.settings-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.setting-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d7deea;
  background: #f8fafc;
  color: #40516a;
  font-size: 12px;
  font-weight: 900;
}
.setting-pill.ready {
  border-color: rgba(31, 138, 91, 0.28);
  background: #ecfdf5;
  color: var(--green);
}
.setting-pill.seoul-only {
  border-color: rgba(31, 58, 95, 0.22);
  background: #eef5ff;
  color: var(--navy);
}
.settings-details { margin-top: 14px; }
.settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 14px;
  margin-top: 12px;
}
.primary-workflow {
  border-color: rgba(31, 58, 95, 0.16);
}
.main-action-row {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.main-action-row .status-text {
  flex: 1 1 320px;
  min-width: 220px;
}
.large-action {
  min-height: 52px;
  padding: 13px 18px;
}
.debug-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 10px 0 8px;
}
.debug-meta p { margin: 4px 0; }
.manual-panel {
  padding: 0;
  overflow: hidden;
}
.manual-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
  cursor: pointer;
}
.manual-summary::-webkit-details-marker { display: none; }
.manual-summary strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.manual-summary em {
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}
.manual-summary::after {
  content: "열기";
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef2f7;
  color: #40516a;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}
.manual-panel[open] .manual-summary::after { content: "닫기"; }
.manual-content {
  border-top: 1px solid var(--line);
  padding: 18px 22px 22px;
}
.manual-content .section-title-row { margin-bottom: 12px; }
.manual-content .help-text { margin: 0; }

@media (max-width: 820px) {
  .main-form-grid,
  .settings-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .manual-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .manual-summary em { text-align: left; }
  .manual-summary::after { align-self: flex-start; }
}

/* v1.1.6 next action CTA */
.hidden { display: none !important; }
.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(31, 58, 95, 0.18);
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 18px 46px rgba(31, 58, 95, 0.10);
}
.cta-copy {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.cta-copy h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.035em;
}
.cta-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  word-break: keep-all;
}
.cta-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--navy);
  border: 1px solid rgba(31, 58, 95, 0.16);
  font-size: 12px;
  font-weight: 900;
}
.cta-map-button {
  min-height: 54px;
  padding: 0 24px;
  border-radius: 16px;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(31, 58, 95, 0.18);
}
.cta-panel.complete {
  border-color: rgba(31, 138, 91, 0.18);
  background: linear-gradient(135deg, #ffffff 0%, #f4fffa 100%);
}
.cta-panel.complete .cta-badge {
  background: #ecfdf5;
  color: var(--green);
  border-color: rgba(31, 138, 91, 0.22);
}
.cta-panel.complete .cta-map-button {
  background: #eef3fa;
  color: var(--navy);
  box-shadow: none;
}

/* Keep manual input secondary after results */
.manual-panel {
  margin-top: 18px;
}
.manual-summary {
  background: #fff;
}
.manual-panel:not([open]) {
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.04);
}

@media (max-width: 820px) {
  .cta-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .cta-copy {
    flex-direction: column;
  }
  .cta-map-button {
    width: 100%;
    justify-content: center;
  }
}

/* v1.1.8 map setup UX */
.settings-details summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.settings-details label span em {
  margin-left: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}
.settings-details:not([open]) {
  background: #fbfdff;
}

/* v1.1.9 one-button workflow cleanup */
.field-status {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.field-status[data-tone="ready"] { color: var(--green); }
.field-status[data-tone="loading"] { color: var(--navy-2); }
.field-status[data-tone="error"] { color: var(--red); }
.main-cta-button {
  min-width: 210px;
  min-height: 56px;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(31, 58, 95, 0.18);
}
.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

/* v1.2.13 loading feedback */
.loading-dots::after,
.primary-button.is-loading::after {
  content: "...";
  display: inline-block;
  width: 0;
  min-width: 0;
  overflow: hidden;
  vertical-align: bottom;
  text-align: left;
  animation: loading-dot-reveal 1.05s steps(4, end) infinite;
}

.primary-button.is-loading::after {
  margin-left: 2px;
  color: currentColor;
  font-weight: 900;
}

.status-text.loading-dots::after,
.field-status.loading-dots::after {
  margin-left: 1px;
  color: currentColor;
  font-weight: 900;
}

.workflow-steps li.active::after {
  content: "...";
  display: inline-block;
  width: 0;
  overflow: hidden;
  margin-left: 2px;
  vertical-align: bottom;
  animation: loading-dot-reveal 1.05s steps(4, end) infinite;
}

@keyframes loading-dot-reveal {
  0% { width: 0; }
  100% { width: 1.4em; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-dots::after,
  .primary-button.is-loading::after,
  .workflow-steps li.active::after {
    animation: none;
    width: 1.4em;
  }
}
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.workflow-steps li {
  position: relative;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid #dfe7f1;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}
.workflow-steps li.done {
  border-color: rgba(31, 138, 91, 0.25);
  background: #ecfdf5;
  color: var(--green);
}
.workflow-steps li.active {
  border-color: rgba(31, 58, 95, 0.28);
  background: #eef5ff;
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(31, 58, 95, 0.08);
}
.workflow-steps li.error {
  border-color: rgba(194, 65, 12, 0.25);
  background: #fff7ed;
  color: var(--red);
}
.small-inline-button {
  min-height: 34px;
  padding: 0 12px;
  margin: 0 0 8px;
  font-size: 13px;
}
.auto-debug summary {
  cursor: pointer;
}
.primary-workflow .help-text {
  max-width: 760px;
}
@media (max-width: 920px) {
  .workflow-steps {
    grid-template-columns: 1fr;
  }
  .main-action-row {
    align-items: stretch;
  }
  .main-action-row .status-text {
    order: 2;
  }
  .main-cta-button {
    order: 1;
    width: 100%;
  }
}


/* v1.2.2 location confidence + manual correction */
.location-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}
.location-modal.hidden { display: none; }
.location-dialog {
  width: min(760px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  padding: 22px;
}
.location-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}
.icon-button {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}
.location-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 14px 0;
}
.candidate-list {
  display: grid;
  gap: 10px;
}
.candidate-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid #e5edf6;
  background: #fbfdff;
  border-radius: 16px;
  padding: 14px;
}
.candidate-card strong,
.candidate-card span,
.candidate-card em { display: block; }
.candidate-card strong { color: var(--ink); margin-bottom: 4px; }
.candidate-card span { color: #526172; font-size: 13px; line-height: 1.45; }
.candidate-card em { color: var(--muted); font-size: 12px; font-style: normal; margin-top: 5px; line-height: 1.4; }
.mini-use {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
}
.candidate-empty {
  border: 1px dashed #d7e0ec;
  border-radius: 16px;
  background: #f8fafc;
  color: var(--muted);
  padding: 18px;
  margin: 0;
  text-align: center;
  line-height: 1.5;
}
.candidate-empty.warn {
  background: #fff7ed;
  color: var(--red);
  border-color: #fed7aa;
}
@media (max-width: 640px) {
  .location-search-row { grid-template-columns: 1fr; }
  .candidate-card { align-items: stretch; flex-direction: column; }
  .mini-use { width: 100%; }
}

/* v1.2.8 UI/UX top flow + tab cleanup */
.launch-panel {
  padding: 24px;
}
.launch-title-row {
  align-items: flex-start;
}
.launch-title-row .help-text {
  margin: 8px 0 0;
}
.launch-form-grid {
  max-width: none;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 260px) auto;
  align-items: end;
  gap: 14px;
}
.main-cta-slot {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.launch-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.launch-status-row .field-status {
  margin-top: 0;
  flex: 1 1 260px;
}
.compact-settings-line {
  margin-top: 0;
  justify-content: flex-end;
}
.workflow-status-row {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #e5edf6;
  border-radius: 14px;
  background: #fbfdff;
}
tr.row-muted { background: #fafafa; }
tr.row-muted:hover { background: #f8fafc; }
@media (max-width: 920px) {
  .launch-form-grid {
    grid-template-columns: 1fr;
  }
  .main-cta-slot,
  .main-cta-button {
    width: 100%;
  }
  .compact-settings-line {
    justify-content: flex-start;
  }
}

/* v1.2.9 mobile optimization */
@media (max-width: 920px) {
  .app-header {
    padding: 28px 16px 52px;
  }
  .header-inner {
    display: block;
  }
  .lead {
    font-size: 15px;
    line-height: 1.55;
    word-break: keep-all;
  }
  .header-card {
    min-width: 0;
    margin-top: 16px;
    padding: 14px;
  }
  .shell {
    margin-top: -32px;
    padding: 0 14px;
  }
  .panel {
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 14px;
  }
  .section-title-row,
  .launch-title-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .section-title-row .ghost-button,
  .launch-title-row .ghost-button {
    align-self: flex-start;
  }
  .launch-panel {
    padding: 18px;
  }
  .launch-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .main-cta-slot {
    justify-content: stretch;
  }
  .main-cta-button {
    width: 100%;
    min-height: 54px;
    font-size: 16px;
  }
  .launch-status-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .settings-line,
  .compact-settings-line {
    justify-content: flex-start;
    width: 100%;
  }
  .setting-pill {
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
  }
  .workflow-status-row {
    margin-top: 12px;
    padding: 11px 12px;
  }
  .workflow-steps {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 2px 2px 8px;
    margin-top: 12px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .workflow-steps li {
    flex: 0 0 auto;
    min-width: 142px;
    scroll-snap-align: start;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
  }
  .summary-card {
    border-radius: 14px;
    padding: 13px;
  }
  .summary-card span {
    font-size: 12px;
    margin-bottom: 6px;
  }
  .summary-card strong {
    font-size: 18px;
    line-height: 1.25;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .map-panel {
    order: -1;
    margin-top: 0;
    min-height: 0;
  }
  .table-panel {
    min-height: 0;
  }
  .sticky-title {
    position: static;
    padding-bottom: 0;
  }
  .tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .tab {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
  }
  #map {
    height: min(62vh, 420px);
    min-height: 320px;
    border-radius: 14px;
  }
  .map-legend {
    gap: 10px;
    font-size: 12px;
  }
  .manual-summary {
    padding: 18px;
  }
  .manual-content {
    padding: 16px 18px 18px;
  }
  .action-row > button,
  .location-search-row button {
    min-height: 46px;
  }
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }
  input, textarea, button {
    font-size: 16px;
  }
  input {
    height: 48px;
  }
  .app-header h1 {
    font-size: 30px;
    line-height: 1.15;
  }
  h2 {
    font-size: 20px;
  }
  .help-text,
  .status-text,
  .table-hint {
    font-size: 13px;
    word-break: keep-all;
  }
  .table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }
  .table-wrap colgroup,
  .table-wrap thead {
    display: none;
  }
  .table-wrap tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.05);
    overflow: hidden;
  }
  .table-wrap tr.row-review { background: #fffaf2; }
  .table-wrap tr.row-failed { background: #fff7f2; }
  .table-wrap tr.row-manual { background: #f6fffb; }
  .table-wrap tr.row-muted { background: #fafafa; }
  .table-wrap td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border-bottom: 1px solid #edf1f7;
    padding: 10px 12px;
    text-align: left;
  }
  .table-wrap td:last-child {
    border-bottom: 0;
  }
  .table-wrap td::before {
    content: attr(data-label);
    color: #687386;
    font-size: 12px;
    font-weight: 900;
  }
  td.amount {
    text-align: left;
  }
  .purpose-cell {
    max-width: none;
    display: block;
    -webkit-line-clamp: initial;
    overflow: visible;
  }
  .status-stack {
    min-width: 0;
    gap: 7px;
  }
  .status-stack .mini-action {
    width: 100%;
    justify-content: center;
    min-height: 34px;
  }
  .badge {
    width: fit-content;
  }
  .location-modal {
    align-items: end;
    padding: 0;
  }
  .location-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    padding: 18px;
  }
  .location-dialog-head {
    align-items: center;
  }
  .location-search-row {
    grid-template-columns: 1fr;
  }
  .candidate-card {
    align-items: stretch;
    flex-direction: column;
  }
  .mini-use {
    width: 100%;
    min-height: 40px;
  }
  .rule-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .shell {
    padding: 0 10px;
  }
  .panel {
    padding: 15px;
  }
  .launch-panel {
    padding: 15px;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .summary-card strong {
    font-size: 16px;
  }
  .summary-card {
    padding: 11px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  #map {
    height: 360px;
    min-height: 300px;
  }
  .table-wrap td {
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 9px 10px;
  }
  .footer {
    padding: 0 12px;
  }
}

/* v1.2.10 previous-month default hint */
.month-field span em {
  margin-left: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

/* v1.2.12 result list card UI */
.place-list-wrap {
  max-height: 640px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px;
}
.place-list {
  display: grid;
  gap: 10px;
}
.place-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #e5edf6;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.04);
}
.place-card.map-card { cursor: pointer; }
.place-card.map-card:hover {
  border-color: rgba(31, 58, 95, 0.24);
  box-shadow: 0 10px 22px rgba(31, 58, 95, 0.08);
}
.place-card.card-focus {
  border-color: rgba(47, 84, 135, 0.42);
  box-shadow: 0 0 0 4px rgba(47, 84, 135, 0.11), 0 10px 22px rgba(31, 58, 95, 0.08);
}
.place-card.card-review {
  background: #fffaf2;
  border-color: #fed7aa;
}
.place-card.card-failed {
  background: #fff7f2;
  border-color: #fed7aa;
}
.place-card.card-manual {
  background: #f6fffb;
  border-color: #bbf7d0;
}
.place-card.card-muted {
  background: #fafafa;
}
.place-card-main { min-width: 0; }
.place-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.place-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.place-title {
  display: block;
  min-width: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.place-amount {
  flex: 0 0 auto;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.place-meta {
  margin: 7px 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  word-break: keep-all;
}
.place-map-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  color: #526172;
  font-size: 12px;
  line-height: 1.45;
}
.place-map-info span {
  color: #7a8ba3;
  font-weight: 900;
}
.place-map-info strong {
  color: #344155;
  font-size: 13px;
}
.place-map-info em {
  color: var(--muted);
  font-style: normal;
}
.place-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.place-card-actions .mini-action {
  min-height: 32px;
  white-space: nowrap;
}
.place-card-actions .mini-action.strong {
  background: var(--navy);
  color: #fff;
  border-color: transparent;
  padding: 0 12px;
}
.place-card-actions .mini-action.warn-action {
  background: #fff7ed;
  color: var(--amber);
  border-color: #fed7aa;
}
.place-list-wrap.empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  text-align: center;
  color: var(--muted);
  padding: 24px;
  background: #fff;
}

@media (max-width: 720px) {
  .place-list-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
    padding: 0;
  }
  .place-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 13px;
  }
  .place-card-head {
    flex-direction: column;
    gap: 8px;
  }
  .place-title-wrap {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .place-title {
    white-space: normal;
    line-height: 1.35;
  }
  .place-amount {
    font-size: 17px;
  }
  .place-card-actions {
    justify-content: stretch;
  }
  .place-card-actions .mini-action {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }
}


/* v1.3.0 design polish: simpler first screen, calmer colors, map-first results */
:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #66748a;
  --line: #e3eaf3;
  --navy: #183b63;
  --navy-2: #285a8f;
  --slate: #6b778c;
  --green: #138267;
  --amber: #b76b12;
  --red: #be4b2d;
  --shadow: 0 18px 48px rgba(24, 49, 83, 0.08);
  --radius: 22px;
}

body {
  background:
    radial-gradient(circle at 14% 0%, rgba(50, 115, 171, .12), transparent 30%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 44%, #eef3f8 100%);
}

.app-header {
  background: linear-gradient(135deg, #102b4a 0%, #173b63 58%, #2d6f91 100%);
  padding: 34px 24px 60px;
}

.header-inner { align-items: center; }
.app-header h1 { font-size: clamp(30px, 4.3vw, 48px); }
.lead { max-width: 720px; line-height: 1.55; }
.header-card {
  min-width: 230px;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}

.shell { margin-top: -34px; }
.panel { border-color: rgba(210, 221, 235, .9); }

.launch-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(24, 59, 99, .12);
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  box-shadow: 0 22px 58px rgba(24, 49, 83, 0.11);
}
.launch-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #183b63, #3f8cae, #6fd0b7);
}
.launch-title-row .eyebrow { color: #3f678c; }
.launch-title-row h2 { font-size: 24px; }
.launch-title-row .help-text { max-width: 780px; }

#sampleBtn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f5f8fc;
  color: #526172;
}

.launch-form-grid {
  padding: 16px;
  border: 1px solid #e6eef7;
  border-radius: 18px;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
label span { color: #304158; }
input, textarea { background: #fff; border-color: #dce6f1; }
input:focus, textarea:focus {
  border-color: #2d6f91;
  box-shadow: 0 0 0 4px rgba(45, 111, 145, 0.13);
}

.main-cta-button {
  background: linear-gradient(135deg, #183b63 0%, #285a8f 100%);
  min-width: 220px;
  box-shadow: 0 14px 30px rgba(24, 59, 99, .22);
}
.main-cta-button:hover { filter: brightness(1.04); }

.launch-status-row {
  padding: 0 2px;
}
.setting-pill {
  border-color: #dbe5ef;
  background: #fff;
  color: #42536a;
}
.setting-pill.ready {
  background: #ecfdf5;
  border-color: #c7f2de;
  color: #0f766e;
}
.setting-pill.seoul-only {
  background: #eef6ff;
  border-color: #d5e7fb;
  color: #183b63;
}

.workflow-status-row {
  background: #f3f8fd;
  border-color: #dce9f5;
  color: #485a70;
}
.workflow-steps li {
  background: #ffffff;
  border-color: #e1eaf3;
}
.workflow-steps li.active {
  background: #edf7ff;
  border-color: #bfdaf3;
}
.workflow-steps li.done {
  background: #edfdf7;
  border-color: #c9f2e2;
}

/* Show summary only after data exists, so the first screen stays simple */
.summary-grid:not(.has-data) { display: none; }
.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.summary-card {
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 28px rgba(24, 49, 83, 0.05);
}
.summary-card strong { font-size: 22px; }

.workspace {
  grid-template-columns: minmax(360px, .88fr) minmax(460px, 1.12fr);
}
.table-panel, .map-panel { min-height: 560px; }
.map-panel {
  position: sticky;
  top: 18px;
  border-color: rgba(24, 59, 99, .12);
}
#map { height: 520px; }
.map-legend {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
}

.tabs { background: #eef3f8; }
.tab { color: #5b6b7f; }
.tab.active { color: #183b63; }
.table-hint { color: #738096; }

.place-list-wrap {
  background: #f5f8fc;
  border-color: #e2eaf3;
}
.place-card {
  border-color: #e2eaf3;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(24, 49, 83, 0.045);
}
.place-card.map-card:hover {
  border-color: rgba(45, 111, 145, 0.35);
  box-shadow: 0 12px 26px rgba(24, 59, 99, 0.09);
}
.place-card.card-review {
  background: #fffaf3;
  border-color: #f8d6a7;
}
.place-card.card-failed {
  background: #fff8f5;
  border-color: #f3c7b5;
}
.place-card.card-manual {
  background: #f4fffb;
  border-color: #bfead9;
}
.place-title { font-size: 15.5px; }
.place-amount { color: #163b63; }
.place-map-info {
  padding-top: 2px;
}
.badge {
  padding: 4px 8px;
  font-size: 11px;
  background: #eaf2fb;
  color: #183b63;
}
.badge.warn { background: #fff4df; color: #a86106; }
.badge.manual { background: #e9fbf4; color: #0f766e; }
.badge.danger { background: #fff0e9; color: #b34722; }
.badge.gray { background: #eef2f6; color: #66748a; }

.mini-action {
  background: #f6f9fc;
  border-color: #dbe6f1;
  color: #43546b;
}
.place-card-actions .mini-action.strong {
  background: #183b63;
  color: #fff;
}
.place-card-actions .mini-action.warn-action {
  background: #fff3df;
  color: #a86106;
  border-color: #f6cc91;
}

/* Make secondary/technical blocks feel like optional support, not the main task */
.settings-details,
.auto-debug,
.manual-panel,
.rules-panel {
  box-shadow: none;
  border-color: #e5ecf4;
  background: rgba(255,255,255,.78);
}
.settings-details summary,
.auto-debug summary,
.manual-summary {
  color: #41526a;
}
.auto-debug pre { background: #fbfdff; }
.manual-summary strong { font-size: 18px; }
.manual-summary::after { background: #eef3f8; color: #526172; }
.support-details { padding: 0; overflow: hidden; }
.support-content { border-top: 1px solid var(--line); }
.rule-grid div { background: #fbfdff; }

.footer { color: #7b8798; }

@media (max-width: 920px) {
  .app-header { padding: 28px 16px 52px; }
  .header-card { display: none; }
  .launch-form-grid { padding: 12px; }
  .summary-grid.has-data { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { display: flex; flex-direction: column; }
  .map-panel { position: static; order: -1; }
  #map { height: min(58vh, 420px); min-height: 320px; }
}

@media (max-width: 720px) {
  .launch-title-row h2 { font-size: 21px; }
  .workflow-status-row { padding: 10px 12px; }
  .summary-grid.has-data { gap: 9px; }
  .place-card { border-radius: 16px; }
  .place-title { font-size: 15px; }
  .place-map-info { display: block; }
  .place-map-info span,
  .place-map-info strong,
  .place-map-info em { display: block; }
  .place-map-info span { margin-bottom: 3px; }
}

/* v1.3.2 month field alignment cleanup */
.month-field input {
  margin-bottom: 0;
}


/* v1.3.3 footer creator link */
.footer p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer strong {
  color: var(--ink);
  font-weight: 800;
}
.footer a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(32, 74, 122, 0.24);
}
.footer a:hover {
  border-bottom-color: var(--navy);
}

/* v1.4.0 color refresh + mobile layout stabilization */
:root {
  --bg: #f7f9fc;
  --panel: #ffffff;
  --ink: #1d2939;
  --muted: #667085;
  --line: #e3e9f2;
  --navy: #294b76;
  --navy-2: #3478d4;
  --blue: #3478d4;
  --blue-hover: #2868bd;
  --slate: #697586;
  --green: #168568;
  --amber: #c87820;
  --red: #c95645;
  --shadow: 0 16px 42px rgba(41, 75, 118, 0.075);
  --radius: 20px;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 12% -4%, rgba(52, 120, 212, 0.1), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 42%, #f1f5fa 100%);
}

.app-header {
  background: linear-gradient(135deg, #294b76 0%, #356391 56%, #4b7eaa 100%);
  padding: 28px 24px 52px;
}

.header-inner {
  align-items: center;
}

.app-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 750;
}

.app-header .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.lead {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
}

.shell {
  margin-top: -28px;
}

.panel {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.launch-panel {
  border-color: rgba(52, 120, 212, 0.14);
  background: #ffffff;
  box-shadow: 0 20px 52px rgba(41, 75, 118, 0.1);
}

.launch-panel::before {
  height: 4px;
  background: linear-gradient(90deg, #294b76 0%, #3478d4 60%, #67a7d8 100%);
}

.launch-title-row h2 {
  color: var(--ink);
  font-weight: 720;
}

.launch-title-row .eyebrow {
  color: #4b6f99;
}

#sampleBtn {
  background: #f3f6fa;
  color: #526172;
  font-weight: 700;
}

#sampleBtn:hover {
  background: #eaf0f7;
  color: var(--navy);
}

.launch-form-grid {
  min-width: 0;
  padding: 15px;
  border-color: #e5ecf5;
  background: #f8faff;
}

.launch-form-grid > *,
.school-field,
.month-field,
.main-cta-slot {
  min-width: 0;
  max-width: 100%;
}

label span,
.month-field span {
  color: #344054;
  font-weight: 650;
}

input,
textarea {
  min-width: 0;
  max-width: 100%;
  border-color: #d9e2ee;
  background: #ffffff;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(52, 120, 212, 0.12);
}

.month-field {
  overflow: hidden;
}

.month-field input,
input[type="month"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-inline-size: 0;
  margin: 0;
}

.primary-button,
.secondary-button,
.ghost-button,
.tab,
.setting-pill,
.badge,
.mini-action {
  font-weight: 700;
}

.primary-button,
.main-cta-button {
  background: var(--blue);
  color: #ffffff;
}

.primary-button:hover,
.main-cta-button:hover {
  background: var(--blue-hover);
  filter: none;
}

.main-cta-button {
  min-width: 220px;
  box-shadow: 0 12px 26px rgba(52, 120, 212, 0.23);
}

.field-status {
  font-weight: 600;
}

.workflow-status-row {
  border-color: #dfe8f3;
  background: #f5f8fc;
}

/* The status sentence explains the current step; the list works as a calm progress track. */
.workflow-steps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.workflow-steps:not(:has(.active, .done, .error)) {
  display: none;
}

.workflow-steps li {
  min-height: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #dfe7f1;
  color: transparent;
  font-size: 0;
  box-shadow: none;
}

.workflow-steps li.active {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(52, 120, 212, 0.12);
}

.workflow-steps li.done {
  background: #69b9a0;
}

.workflow-steps li.error {
  background: var(--red);
}

.workflow-steps li.active::after {
  display: none;
}

.settings-details {
  margin-top: 12px;
  background: #fbfcfe;
}

.settings-details summary {
  color: #526172;
  font-weight: 700;
}

.settings-details .settings-line {
  margin: 12px 0 0;
  justify-content: flex-start;
}

.setting-pill {
  background: #ffffff;
  color: #526172;
}

.setting-pill.seoul-only {
  background: #eef5ff;
  color: var(--navy);
  border-color: #d7e6f8;
}

.setting-pill.ready {
  background: #edf9f5;
  color: var(--green);
  border-color: #c9eadf;
}

/* Four primary metrics are enough for the main decision. Detailed counts remain in tabs. */
.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-card.metric-detail {
  display: none;
}

.summary-card {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(41, 75, 118, 0.05);
}

.summary-card span {
  font-weight: 650;
}

.summary-card strong {
  color: var(--ink);
  font-weight: 750;
}

.summary-card.good strong,
.summary-card.strong-good strong {
  color: var(--green);
}

.summary-card.warn strong {
  color: var(--amber);
}

.map-panel {
  border-color: rgba(52, 120, 212, 0.14);
}

#map {
  border-color: #dce5ef;
}

.dot.navy { background: var(--blue); }
.dot.amber { background: var(--amber); }
.dot.green { background: var(--green); }

.tab.active {
  color: var(--navy);
}

.place-card-actions .mini-action.strong {
  background: var(--blue);
}

.footer a {
  color: var(--blue);
}

@media (max-width: 920px) {
  .app-header {
    padding: 22px 16px 46px;
  }

  .shell {
    margin-top: -24px;
    padding-inline: 14px;
  }

  .launch-form-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    padding: 12px;
  }

  .main-cta-slot,
  .main-cta-button {
    width: 100%;
    min-width: 0;
  }

  .summary-grid.has-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #map {
    height: min(54vh, 380px);
    min-height: 310px;
  }
}

@media (max-width: 720px) {
  .app-header h1 {
    font-size: 28px;
  }

  .lead {
    font-size: 14px;
  }

  .launch-title-row .help-text {
    margin-bottom: 2px;
  }

  .launch-status-row {
    margin-top: 9px;
  }

  .workflow-steps {
    display: grid;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .workflow-steps:not(:has(.active, .done, .error)) {
    display: none;
  }

  .workflow-steps li {
    min-width: 0;
    min-height: 7px;
  }

  .summary-card {
    min-width: 0;
    padding: 13px;
  }

  .summary-card strong {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 430px) {
  .shell {
    padding-inline: 10px;
  }

  .panel,
  .launch-panel {
    padding: 15px;
  }

  .launch-form-grid {
    padding: 10px;
  }

  .summary-grid.has-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #map {
    height: 340px;
    min-height: 290px;
  }
}

/* v1.4.0 mobile status row must not keep the desktop 260px flex basis */
@media (max-width: 920px) {
  .launch-status-row .field-status {
    flex: 0 1 auto;
    width: 100%;
    min-height: 0;
  }
}


/* v1.4.1 clearer surface contrast + calmer blue-gray background */
:root {
  --bg: #edf2f7;
  --panel: #ffffff;
  --ink: #182536;
  --muted: #59677a;
  --line: #d4deea;
  --shadow: 0 14px 36px rgba(31, 58, 95, 0.105);
}

body {
  background: linear-gradient(180deg, #f2f5f9 0%, #edf2f7 44%, #e8eef5 100%);
}

.app-header {
  background: linear-gradient(135deg, #24486f 0%, #32618e 56%, #457aa8 100%);
}

.panel {
  border-color: #d5dfe9;
  box-shadow: var(--shadow);
}

.launch-panel {
  border-color: #c9d8e7;
  box-shadow: 0 18px 44px rgba(31, 58, 95, 0.135);
}

.launch-form-grid {
  border-color: #d3deea;
  background: #f1f5fa;
}

.help-text,
.status-text,
.table-hint,
.map-legend,
.manual-summary em {
  color: var(--muted);
}

.workflow-status-row {
  border-color: #d2ddea;
  background: #edf2f7;
}

.workflow-steps li {
  background: #cfd9e5;
}

.settings-details,
.auto-debug {
  border-color: #d7e1eb;
  background: #f3f6fa;
}

.setting-pill {
  border-color: #d5dfeb;
  background: #ffffff;
}

.summary-card {
  border-color: #d5dfe9;
  box-shadow: 0 8px 22px rgba(31, 58, 95, 0.075);
}

.cta-panel {
  border-color: #cad7e5;
  background: linear-gradient(135deg, #f3f7fb 0%, #edf3f8 100%);
}

.cta-panel.complete {
  border-color: #b9ddcf;
  background: linear-gradient(135deg, #eaf7f2 0%, #f1f9f6 100%);
}

.cta-panel.complete .cta-badge {
  border-color: #add8c8;
  background: #daf1e8;
}

.cta-panel.complete .cta-map-button {
  border: 1px solid #d2ddea;
  background: #e8eef6;
}

#map,
.table-wrap {
  border-color: #d3dde8;
}

@media (max-width: 920px) {
  body {
    background: #edf2f7;
  }
}


/* v1.4.2 visible Seoul-only source notice */
.scope-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid #cbddec;
  border-radius: 13px;
  background: #eef6fc;
  color: #40566d;
  font-size: 13px;
  line-height: 1.45;
}

.scope-notice strong {
  flex: 0 0 auto;
  color: #245b8e;
  font-size: 12px;
  font-weight: 800;
}

.scope-notice span {
  min-width: 0;
}

@media (max-width: 640px) {
  .scope-notice {
    width: 100%;
    align-items: flex-start;
  }
}

/* v1.4.4 map-first results + clear lookup states + aligned launcher */
.school-field {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.school-field > label {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.lookup-state-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-color: #cbd8e5;
  background: linear-gradient(135deg, #f5f8fb 0%, #eef3f8 100%);
}

.lookup-state-copy {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.lookup-state-copy h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -0.035em;
  word-break: keep-all;
}

.lookup-state-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  word-break: keep-all;
}

.lookup-state-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 29px;
  padding: 6px 10px;
  border: 1px solid #cbd8e5;
  border-radius: 999px;
  background: #e6edf4;
  color: #40566d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.lookup-state-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.lookup-state-actions button {
  min-height: 44px;
  white-space: nowrap;
}

.lookup-state-panel.no-data {
  border-color: #c8d8e8;
  background: linear-gradient(135deg, #f3f7fb 0%, #eaf1f7 100%);
}

.lookup-state-panel.no-data .lookup-state-badge {
  border-color: #bfd2e4;
  background: #e1edf7;
  color: #2f5f89;
}

.lookup-state-panel.school-warning {
  border-color: #ecd3a9;
  background: linear-gradient(135deg, #fffaf2 0%, #fbf3e5 100%);
}

.lookup-state-panel.school-warning .lookup-state-badge {
  border-color: #e8ca96;
  background: #f9e9ca;
  color: #9a5b09;
}

.lookup-state-panel.connection-error {
  border-color: #ebc5bc;
  background: linear-gradient(135deg, #fff8f6 0%, #f9eeeb 100%);
}

.lookup-state-panel.connection-error .lookup-state-badge {
  border-color: #e4b8ad;
  background: #f6ded8;
  color: #a34432;
}

.workflow-steps li.empty {
  background: #cfd9e5;
  box-shadow: none;
}

.workflow-steps li.warning {
  background: #d8a354;
  box-shadow: 0 0 0 3px rgba(200, 120, 32, 0.12);
}

.workspace {
  grid-template-columns: minmax(560px, 1.7fr) minmax(340px, 0.9fr);
  align-items: start;
}

.map-panel,
.table-panel {
  min-width: 0;
}

.map-panel {
  position: sticky;
  top: 18px;
}

#map {
  height: 610px;
  min-height: 520px;
}

.place-list-wrap {
  max-height: 700px;
}

.table-panel .section-title-row.sticky-title {
  gap: 12px;
}

.table-panel .tabs {
  max-width: 100%;
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: minmax(500px, 1.45fr) minmax(330px, 0.9fr);
  }

  #map {
    height: 570px;
    min-height: 500px;
  }
}

@media (max-width: 920px) {
  .lookup-state-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .lookup-state-copy {
    flex-direction: column;
  }

  .lookup-state-actions,
  .lookup-state-actions button {
    width: 100%;
  }

  .lookup-state-actions button {
    justify-content: center;
  }

  .workspace {
    display: flex;
    flex-direction: column;
  }

  .map-panel {
    position: static;
    order: 0;
    width: 100%;
  }

  .table-panel {
    order: 1;
    width: 100%;
  }

  #map {
    height: min(58vh, 380px);
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .lookup-state-copy h2 {
    font-size: 19px;
  }

  #map {
    height: 350px;
    min-height: 300px;
  }
}


/* v1.4.4 launcher alignment */
.launch-form-grid {
  align-items: end;
}

.school-field {
  display: block;
  align-self: end;
}

.school-field > label,
.month-field {
  display: grid;
  grid-template-rows: auto 58px;
  gap: 8px;
}

.school-field input,
.month-field input,
.main-cta-button {
  height: 58px;
  min-height: 58px;
}

.main-cta-slot {
  align-self: end;
}

@media (max-width: 920px) {
  .school-field > label,
  .month-field {
    grid-template-rows: auto 56px;
  }

  .school-field input,
  .month-field input,
  .main-cta-button {
    height: 56px;
    min-height: 56px;
  }
}

/* v1.5.0 map-first redesign + one authoritative responsive layer */
.app-header {
  padding: 24px 24px 48px;
}

.app-header h1 {
  font-size: clamp(30px, 3.6vw, 40px);
}

.lead {
  margin-top: 8px;
  font-size: 15px;
}

.shell {
  margin-top: -26px;
}

.launch-panel {
  padding: 24px;
}

.launch-title-row {
  margin-bottom: 0;
}

.launch-title-row .help-text {
  margin: 7px 0 0;
}

.scope-notice {
  gap: 6px 9px;
  margin-top: 9px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #667085;
}

.scope-notice strong {
  padding: 4px 8px;
  border: 1px solid #cbddec;
  border-radius: 999px;
  background: #eef6fc;
}

.launch-form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px) minmax(190px, 220px);
  gap: 12px;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
}

.launch-form-grid > *,
.school-field,
.school-field > label,
.month-field,
.main-cta-slot {
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
}

.school-field input,
.month-field input,
#baseMonth,
.main-cta-button {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.month-field {
  width: 100%;
  overflow: hidden;
  overflow: clip;
}

#baseMonth {
  display: block;
  inline-size: 100%;
  box-sizing: border-box;
  padding-inline: 14px 10px;
}

#baseMonth::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

#baseMonth::-webkit-calendar-picker-indicator {
  flex: 0 0 auto;
  margin: 0;
}

.launch-status-row {
  margin-top: 10px;
}

.workflow-status-row {
  margin-top: 9px;
  padding: 10px 12px;
}

.settings-details,
.auto-debug {
  margin-top: 10px;
}

.summary-grid {
  gap: 12px;
  margin: 14px 0;
}

.summary-card {
  padding: 15px 16px;
  border-radius: 16px;
}

.summary-card span {
  margin-bottom: 6px;
}

.summary-card strong {
  font-size: 21px;
}

.workspace {
  grid-template-columns: minmax(480px, 1.15fr) minmax(360px, 0.85fr);
  gap: 16px;
}

.map-panel,
.table-panel,
.map-shell,
#map,
.place-list-wrap,
.place-list,
.place-card {
  min-width: 0;
  max-width: 100%;
}

.map-panel,
.table-panel {
  min-height: 0;
}

#map {
  width: 100%;
  height: 610px;
  min-height: 520px;
}

.place-list-wrap {
  max-height: 610px;
}

.table-panel .section-title-row.sticky-title {
  position: static;
  margin-bottom: 10px;
  padding-bottom: 0;
}

.table-panel #list-title {
  white-space: nowrap;
}

.table-panel .tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  max-width: none;
  padding: 5px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #eef3f8;
  overflow: visible;
}

.table-panel .tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 7px;
  border-radius: 10px;
  color: #5b6b7f;
  font-size: 13px;
  white-space: nowrap;
}

.table-panel .tab strong {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dfe7f0;
  color: #536276;
  font-size: 11px;
  line-height: 1;
}

.table-panel .tab.active strong {
  background: #dceafa;
  color: #245b8e;
}

.table-hint {
  margin: 10px 2px 13px;
}

.place-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.place-card-main,
.place-card-head,
.place-title-wrap,
.place-title,
.place-purpose,
.place-map-info {
  min-width: 0;
  max-width: 100%;
}

.place-title-wrap {
  flex-wrap: wrap;
}

.place-title,
.place-purpose,
.place-map-info,
.field-status,
.status-text,
.lookup-state-copy p {
  overflow-wrap: anywhere;
}

.place-title-wrap .badge {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  word-break: keep-all;
}

.place-card-actions {
  align-self: center;
}

/* Keep the map first and avoid a squeezed two-column result layout on tablets. */
@media (max-width: 1040px) {
  .workspace {
    display: flex;
    flex-direction: column;
  }

  .map-panel,
  .table-panel {
    position: static;
    order: 0;
    width: 100%;
  }

  .table-panel {
    order: 1;
  }

  #map {
    height: min(58vh, 430px);
    min-height: 330px;
  }

  .place-list-wrap {
    max-height: 640px;
  }
}

@media (max-width: 920px) {
  .app-header {
    padding: 21px 16px 43px;
  }

  .shell {
    width: 100%;
    margin-top: -22px;
    padding-inline: 12px;
  }

  .launch-panel {
    padding: 18px;
  }

  .launch-form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
  }

  .main-cta-slot,
  .main-cta-button {
    width: 100%;
  }

  .summary-grid.has-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .app-header h1 {
    font-size: 28px;
  }

  .lead {
    max-width: 34ch;
    font-size: 14px;
    line-height: 1.5;
    word-break: keep-all;
  }

  .panel,
  .launch-panel,
  .lookup-state-panel,
  .cta-panel,
  .manual-panel,
  .rules-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .launch-form-grid {
    margin-top: 15px;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
  }

  .school-field > label,
  .month-field {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-inline-size: 0;
    max-inline-size: 100%;
    grid-template-rows: auto 54px;
  }

  .school-field input,
  .month-field input,
  #baseMonth,
  .main-cta-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
    height: 54px;
    min-height: 54px;
  }

  .scope-notice {
    width: auto;
    font-size: 12px;
  }

  .launch-status-row,
  .workflow-status-row {
    min-width: 0;
    max-width: 100%;
  }

  .summary-card {
    min-width: 0;
    padding: 13px;
  }

  .summary-card strong {
    font-size: 17px;
    overflow-wrap: anywhere;
  }

  #map {
    height: 350px;
    min-height: 300px;
  }

  .map-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
  }

  .table-panel .tab {
    gap: 4px;
    padding-inline: 4px;
    font-size: 12px;
  }

  .table-panel .tab strong {
    min-width: 20px;
    height: 20px;
    padding-inline: 5px;
    font-size: 10px;
  }

  .place-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }

  .place-card-actions,
  .place-card-actions .mini-action {
    width: 100%;
  }

  .place-card-actions .mini-action {
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .shell {
    padding-inline: 9px;
  }

  .panel,
  .launch-panel {
    padding: 15px;
    border-radius: 16px;
  }

  .launch-title-row h2 {
    font-size: 20px;
  }

  .scope-notice span {
    flex-basis: 100%;
    line-height: 1.45;
  }

  .summary-grid.has-data {
    gap: 8px;
  }

  .summary-card {
    padding: 11px;
  }

  .summary-card span {
    font-size: 11px;
  }

  .summary-card strong {
    font-size: 15px;
  }

  #map {
    height: 330px;
    min-height: 285px;
  }

  .table-panel .tabs {
    gap: 3px;
    padding: 4px;
  }

  .table-panel .tab {
    min-height: 38px;
    font-size: 11px;
  }

  .map-legend {
    font-size: 11px;
  }
}

/* v1.6.0 — Figma-style Seoul blue, flat surfaces, map-first layout */
:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --navy: #315b96;
  --navy-2: #274d80;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-soft: #eff6ff;
  --green: #16805f;
  --amber: #a96616;
  --red: #b5473b;
  --shadow: 0 6px 22px rgba(31, 41, 55, 0.055);
  --radius: 14px;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  background: var(--bg);
}

/* Header is a compact product bar, not a hero banner. */
.app-header {
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.header-inner {
  min-height: 92px;
  max-width: 1240px;
  padding: 18px 24px;
  align-items: center;
}

.brand-block {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.brand-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dbe8fb;
  border-radius: 12px;
  background: var(--blue-soft);
}

.brand-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-icon circle {
  fill: var(--blue);
  stroke: #fff;
  stroke-width: 1.4;
}

.brand-copy {
  min-width: 0;
}

.app-header .eyebrow {
  margin: 0 0 4px;
  color: #738198;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: none;
}

.app-header h1 {
  color: var(--ink);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 760;
  letter-spacing: -0.035em;
}

.lead {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.header-meta {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid #e6e9ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #4b5563;
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
}

.shell {
  max-width: 1240px;
  margin: 0 auto 56px;
  padding: 22px 24px 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.launch-panel {
  position: relative;
  padding: 20px;
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.launch-panel::before {
  display: none;
}

.launch-title-row h2 {
  font-size: 20px;
  font-weight: 740;
}

.launch-title-row .eyebrow {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 11px;
  letter-spacing: .04em;
}

.launch-title-row .help-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.scope-notice {
  margin-top: 9px;
  color: #667085;
  font-size: 12px;
}

.scope-notice strong {
  padding: 4px 8px;
  border-color: #dbe8fb;
  background: var(--blue-soft);
  color: var(--navy);
}

.launch-form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px) minmax(190px, 220px);
  align-items: end;
  gap: 10px;
  margin-top: 15px;
  padding: 12px;
  border: 1px solid #edf0f4;
  border-radius: 12px;
  background: #fafbfc;
}

.school-field > label,
.month-field {
  grid-template-rows: auto 46px;
  gap: 7px;
}

label span,
.month-field span {
  margin-bottom: 0;
  color: #4b5563;
  font-size: 12px;
  font-weight: 680;
}

label span em,
.month-field span em {
  color: #98a2b3;
  font-style: normal;
  font-weight: 560;
}

.school-field input,
.month-field input,
#baseMonth,
.main-cta-button {
  height: 46px;
  min-height: 46px;
}

input,
textarea {
  border-color: #dfe3e8;
  border-radius: 10px;
  background: #fff;
}

input {
  padding-inline: 13px;
}

input:hover,
textarea:hover {
  border-color: #cbd5e1;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 40px;
  border-radius: 10px;
  font-weight: 700;
}

.primary-button,
.main-cta-button {
  background: var(--blue);
}

.primary-button:hover,
.main-cta-button:hover {
  background: var(--blue-hover);
}

.main-cta-button {
  min-width: 0;
  box-shadow: none;
}

.main-cta-button small {
  display: none;
}

.launch-status-row {
  margin-top: 9px;
}

.field-status,
.status-text {
  color: #7a8494;
  font-size: 12px;
}

.workflow-status-row {
  margin-top: 8px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: #f7f9fc;
}

.workflow-steps {
  gap: 6px;
  margin-top: 8px;
}

.workflow-steps li {
  height: 5px;
  min-height: 5px;
  background: #e5eaf0;
}

.settings-details,
.auto-debug {
  border-color: #eceff3;
  border-radius: 10px;
  background: #fbfcfd;
}

.settings-details summary,
.auto-debug summary {
  font-size: 12px;
}

/* Map is the first and dominant result surface. */
.workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.map-panel,
.table-panel {
  position: static;
  width: 100%;
  min-height: 0;
  margin-bottom: 0;
  padding: 18px;
}

.map-panel {
  border-color: var(--line);
}

.map-panel .section-title-row,
.table-panel .section-title-row {
  margin-bottom: 12px;
}

.map-panel h2,
.table-panel h2 {
  font-size: 18px;
  font-weight: 740;
}

.map-panel .eyebrow,
.table-panel .eyebrow {
  margin-bottom: 4px;
  color: #8290a3;
  font-size: 10px;
  letter-spacing: .08em;
}

#map {
  height: 520px;
  min-height: 420px;
  border-color: #e3e8ef;
  border-radius: 12px;
  background: #eef2f6;
}

.ghost-button {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
}

.ghost-button:hover {
  background: #f8fafc;
  color: var(--ink);
}

.map-legend {
  margin-top: 10px;
  color: #7b8492;
  font-size: 12px;
}

/* Summary becomes a compact strip below the map. */
.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.summary-card {
  min-width: 0;
  padding: 14px 15px;
  border-color: var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.summary-card span {
  margin-bottom: 5px;
  color: #7c8797;
  font-size: 11px;
  font-weight: 650;
}

.summary-card strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 760;
}

.summary-card.good strong,
.summary-card.strong-good strong {
  color: var(--blue);
}

.summary-card.warn strong {
  color: var(--amber);
}

/* Segmented control: equal widths, one clean selected state. */
.table-panel .tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  width: min(100%, 510px);
  padding: 3px;
  border: 1px solid #e6e9ee;
  border-radius: 11px;
  background: #f4f6f8;
}

.table-panel .tab {
  min-width: 0;
  min-height: 38px;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 680;
}

.table-panel .tab.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(31, 41, 55, .08);
}

.table-panel .tab strong {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #e8ebef;
  color: #667085;
  font-size: 10px;
}

.table-panel .tab.active strong {
  background: var(--blue-soft);
  color: var(--blue);
}

.table-hint {
  margin: 9px 2px 12px;
  color: #7b8492;
  font-size: 12px;
}

.table-wrap,
.place-list-wrap {
  max-height: 620px;
  border-color: #e6e9ee;
  border-radius: 12px;
}

.place-card {
  border-color: #edf0f3;
  box-shadow: none;
}

.place-card:hover {
  border-color: #dbe4ef;
  background: #fbfcfe;
}

.lookup-state-panel,
.cta-panel {
  border-color: #e0e6ed;
  background: #fff;
  box-shadow: var(--shadow);
}

.manual-panel,
.rules-panel {
  margin-top: 14px;
  box-shadow: none;
}

.footer {
  color: #8a94a3;
}

.footer a {
  color: var(--blue);
}

@media (max-width: 920px) {
  .header-inner {
    min-height: 82px;
    padding: 14px 16px;
  }

  .shell {
    padding: 16px 14px 0;
  }

  .launch-form-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .school-field > label,
  .month-field {
    grid-template-rows: auto 44px;
  }

  .school-field input,
  .month-field input,
  #baseMonth,
  .main-cta-button {
    height: 44px;
    min-height: 44px;
  }

  #map {
    height: min(55vh, 420px);
    min-height: 320px;
  }

  .summary-grid.has-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand-block {
    width: 100%;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .brand-icon svg {
    width: 24px;
    height: 24px;
  }

  .app-header h1 {
    font-size: 22px;
  }

  .lead {
    margin-top: 4px;
    font-size: 12px;
  }

  .header-meta {
    width: 100%;
    padding-left: 54px;
  }

  .meta-pill {
    min-height: 29px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .shell {
    padding: 12px 10px 0;
  }

  .panel,
  .launch-panel,
  .map-panel,
  .table-panel {
    padding: 14px;
    border-radius: 12px;
  }

  .launch-title-row h2 {
    font-size: 18px;
  }

  .scope-notice {
    width: 100%;
  }

  .launch-form-grid {
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .school-field,
  .month-field,
  .main-cta-slot,
  .school-field input,
  .month-field input,
  #baseMonth,
  .main-cta-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
  }

  #baseMonth {
    appearance: auto;
    -webkit-appearance: auto;
    box-sizing: border-box;
    padding-inline: 12px 8px;
  }

  .workflow-status-row,
  .launch-status-row {
    overflow-wrap: anywhere;
  }

  #map {
    height: 330px;
    min-height: 280px;
    border-radius: 10px;
  }

  .map-panel .section-title-row {
    align-items: flex-start;
  }

  .map-panel .ghost-button {
    min-height: 34px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .map-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 9px;
  }

  .summary-grid.has-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .summary-card {
    padding: 11px 12px;
  }

  .summary-card strong {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .table-panel .tabs {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .table-panel .tab {
    gap: 4px;
    min-height: 36px;
    padding-inline: 4px;
    font-size: 11px;
  }

  .table-panel .tab strong {
    min-width: 18px;
    height: 18px;
    padding-inline: 4px;
    font-size: 9px;
  }

  .place-card,
  .place-card-head,
  .place-title-wrap,
  .place-purpose,
  .place-map-info {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 390px) {
  .header-meta {
    padding-left: 0;
  }

  .meta-pill {
    flex: 1 1 0;
    justify-content: center;
  }

  .summary-card strong {
    font-size: 15px;
  }

  .table-panel .tab span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


/* v1.6.1 — restore the proven 58:42 desktop map/list workflow; calm loading feedback */

/* Loading feedback: one stable status row instead of five changing bars. */
.workflow-steps {
  display: none !important;
}

.workflow-status-row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px 13px;
  overflow: hidden;
}

.workflow-status-row::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 3px;
  border-radius: 999px;
  background: #e7ebf0;
}

.workflow-status-row:has(.loading-dots)::after {
  background: #cfe0fb;
}

.workflow-status-row .status-text.loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.workflow-status-row .status-text.loading-dots::after {
  display: none !important;
}

.workflow-status-row .status-text.loading-dots::before {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border: 2px solid #cbd5e1;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: workflow-spin .75s linear infinite;
}

@keyframes workflow-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .workflow-status-row .status-text.loading-dots::before {
    animation: none;
    border-color: var(--blue);
  }
}

/* Summary returns to the compact strip above the two-column result workspace. */
.summary-grid {
  gap: 8px;
  margin: 14px 0;
}

/* Desktop: v1.5's comfortable 1.15 : .85 ratio, with v1.6 visual language. */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  align-items: start;
  gap: 14px;
  width: 100%;
}

.map-panel,
.table-panel,
.map-shell,
#map,
.place-list-wrap,
.place-list,
.place-card {
  min-width: 0;
  max-width: 100%;
}

.map-panel,
.table-panel {
  width: auto;
  min-height: 0;
  margin-bottom: 0;
  padding: 18px;
}

#map {
  width: 100%;
  height: 600px;
  min-height: 520px;
}

/* The list scrolls independently so map comparison never requires page hopping. */
.table-panel {
  overflow: hidden;
}

.place-list-wrap,
.table-wrap {
  max-height: 600px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.place-card.card-focus {
  border-color: #9fc1f7;
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

/* Two columns only where both panes have enough room. Tablets/mobile stay stacked. */
@media (max-width: 1040px) {
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .map-panel,
  .table-panel {
    position: static;
    width: 100%;
  }

  .map-panel { order: 0; }
  .table-panel { order: 1; }

  #map {
    height: min(58vh, 430px);
    min-height: 330px;
  }

  .place-list-wrap,
  .table-wrap {
    max-height: 640px;
  }
}

@media (max-width: 640px) {
  .workflow-status-row {
    min-height: 48px;
    padding-inline: 10px;
  }

  .workflow-status-row::after {
    left: 10px;
    right: 10px;
  }

  #map {
    height: 330px;
    min-height: 280px;
  }
}

/* v1.6.2 — restore map emphasis and remove visual jitter / selection noise */

/* Desktop: return to the map-first ratio used before v1.5 (about 65:35). */
@media (min-width: 1041px) {
  .workspace {
    grid-template-columns: minmax(560px, 1.7fr) minmax(340px, .9fr);
  }
}

/* Clicking a list item or marker should move/sync only, not paint the whole card blue. */
.place-card.card-focus,
.place-card.card-focus:hover,
tr.row-focus,
tr.row-focus:hover {
  border-color: #edf0f3 !important;
  background: #fff !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Review action: soft amber treatment. This intentionally outranks the generic .strong blue rule. */
.place-card-actions .mini-action.strong.warn-action {
  background: #fff7e8;
  color: #9a5a08;
  border: 1px solid #efc77d;
  box-shadow: none;
}

.place-card-actions .mini-action.strong.warn-action:hover {
  background: #ffefcf;
  color: #7f4700;
  border-color: #e4b75e;
}

/* Remove the legacy variable-width dot animation everywhere: it visibly reflows status lines. */
.loading-dots::after,
.status-text.loading-dots::after,
.field-status.loading-dots::after,
.primary-button.is-loading::after,
.workflow-steps li.active::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  animation: none !important;
}

/* Busy feedback uses a fixed-size spinner, so text width never changes. */
.status-text.loading-dots,
.field-status.loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-text.loading-dots::before,
.field-status.loading-dots::before {
  content: "";
  display: inline-block;
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  border: 2px solid #d5deea;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: stable-status-spin .75s linear infinite;
}

.primary-button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.primary-button.is-loading::before {
  content: "";
  display: inline-block;
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: stable-status-spin .75s linear infinite;
}

@keyframes stable-status-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .status-text.loading-dots::before,
  .field-status.loading-dots::before,
  .primary-button.is-loading::before {
    animation: none;
  }
}

/* v1.6.3 — compact sticky product top bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #e7eaf0;
  box-shadow: 0 1px 0 rgba(31, 41, 55, .02);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
}

.header-inner {
  min-height: 68px;
  padding: 8px 24px;
  align-items: center;
}

.brand-block {
  gap: 10px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
}

.app-header .eyebrow {
  display: none;
}

.app-header h1 {
  font-size: 19px;
  font-weight: 760;
  line-height: 1.2;
}

.app-header .lead {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.3;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.header-meta {
  display: flex;
  gap: 6px;
}

.meta-pill {
  min-height: 30px;
  padding: 0 9px;
  border-color: #e8ebef;
  background: #f8fafc;
  font-size: 11px;
}

.topbar-help {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #e2e7ee;
  border-radius: 9px;
  background: #fff;
  color: #536174;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-help:hover {
  border-color: #cfd8e6;
  background: #f8fafc;
  color: var(--blue);
}

.topbar-help:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .14);
  outline-offset: 2px;
}

/* Sticky bar should not cover sections reached by help/hash navigation. */
#resultWorkspace,
.lookup-state-panel,
.cta-panel {
  scroll-margin-top: 82px;
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 72px;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand help"
      "meta meta";
    gap: 5px 8px;
    align-items: center;
  }

  .brand-block {
    grid-area: brand;
    gap: 8px;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .brand-icon svg {
    width: 19px;
    height: 19px;
  }

  .app-header h1 {
    font-size: 17px;
  }

  .app-header .lead {
    display: none;
  }

  .header-actions {
    display: contents;
  }

  .header-meta {
    grid-area: meta;
    width: auto;
    padding-left: 40px;
    gap: 5px;
  }

  .meta-pill {
    flex: 0 0 auto;
    min-height: 24px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .topbar-help {
    grid-area: help;
    min-height: 30px;
    padding-inline: 9px;
  }
}

@media (max-width: 390px) {
  .header-inner {
    padding-inline: 10px;
  }

  .header-meta {
    padding-left: 40px;
  }

  .meta-pill {
    flex: 0 0 auto;
    justify-content: flex-start;
  }
}


/* v1.6.4 help drawer */
.modal-open { overflow: hidden; }
.help-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, .32);
  backdrop-filter: blur(3px);
}
.help-modal.hidden { display: none; }
.help-drawer {
  width: min(520px, calc(100vw - 28px));
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -24px 0 70px rgba(15, 23, 42, .16);
  padding: 24px 24px 28px;
}
.help-drawer-head {
  position: sticky;
  top: -24px;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -24px -24px 0;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #edf0f3;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
}
.help-drawer-head h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -.035em;
}
.help-close {
  flex: 0 0 auto;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #536174;
}
.help-intro {
  margin: 18px 0;
  color: #657286;
  font-size: 13.5px;
  line-height: 1.65;
  word-break: keep-all;
}
.help-section-list {
  display: grid;
  gap: 10px;
}
.help-guide-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 15px;
  border: 1px solid #e7ebf0;
  border-radius: 14px;
  background: #fff;
}
.help-guide-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  border-radius: 8px;
  background: #eff6ff;
  color: #315b96;
  font-size: 11px;
  font-weight: 900;
}
.help-guide-card h3,
.help-status-section h3 {
  margin: 1px 0 6px;
  color: #263548;
  font-size: 14px;
  letter-spacing: -.02em;
}
.help-guide-card p {
  margin: 0;
  color: #657286;
  font-size: 13px;
  line-height: 1.62;
  word-break: keep-all;
}
.help-guide-card p strong { color: #344861; }
.help-status-section {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e8edf3;
}
.help-status-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}
.help-status-list > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.help-status-list p {
  margin: 0;
  color: #657286;
  font-size: 12.5px;
  line-height: 1.45;
}
.help-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 74px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #d8e1eb;
  border-radius: 999px;
  background: #fff;
  color: #4b5d73;
  font-size: 11px;
  font-weight: 850;
}
.help-status-badge.complete {
  border-color: #cfe1f5;
  background: #eff6ff;
  color: #315b96;
}
.help-status-badge.check {
  border-color: #f2d7aa;
  background: #fff8eb;
  color: #9a620b;
}
.help-status-badge.excluded {
  border-color: #dfe4ea;
  background: #f3f4f6;
  color: #596579;
}
.help-rules-details {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #e6eaf0;
  border-radius: 14px;
  background: #fff;
}
.help-rules-details summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 14px 42px 14px 15px;
  color: #42526a;
  font-size: 13px;
  font-weight: 800;
}
.help-rules-details summary::-webkit-details-marker { display: none; }
.help-rules-details summary::after {
  content: "+";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #7b8798;
  font-size: 18px;
}
.help-rules-details[open] summary::after { content: "−"; }
.help-rules-body {
  display: grid;
  gap: 12px;
  padding: 0 15px 15px;
  border-top: 1px solid #eef1f4;
}
.help-rules-body > div { padding-top: 12px; }
.help-rules-body h4 {
  margin: 0 0 5px;
  color: #344861;
  font-size: 12.5px;
}
.help-rules-body p {
  margin: 0;
  color: #6d7888;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}
.help-source-note {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  background: #f7f8fa;
  color: #6a7585;
}
.help-source-note strong {
  display: block;
  margin-bottom: 4px;
  color: #46566d;
  font-size: 12px;
}
.help-source-note p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  word-break: keep-all;
}

@media (max-width: 760px) {
  .help-modal { align-items: flex-end; }
  .help-drawer {
    width: 100%;
    height: min(88vh, 760px);
    border-left: 0;
    border-top: 1px solid #e5e7eb;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 60px rgba(15,23,42,.18);
    padding: 20px 16px 24px;
  }
  .help-drawer-head {
    top: -20px;
    margin: -20px -16px 0;
    padding: 18px 16px 14px;
    border-radius: 22px 22px 0 0;
  }
  .help-drawer-head h2 { font-size: 18px; }
  .help-intro { margin: 14px 0; }
  .help-guide-card {
    grid-template-columns: 30px minmax(0,1fr);
    gap: 10px;
    padding: 13px;
  }
  .help-guide-number { width: 30px; height: 26px; }
  .help-status-list > div {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
  }
  .help-status-badge { min-width: 70px; }
}


/* v1.6.6 — Kakao Map link, subtle ghost style */
.kakao-map-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding: 3px 6px;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.kakao-map-link:hover {
  background: #f1f5f9;
  border-color: #d8e0e8;
  color: #315b96;
}
.kakao-map-link:focus-visible {
  outline: 2px solid rgba(49,91,150,.35);
  outline-offset: 2px;
}
.kakao-map-link span {
  font-size: 10.5px;
  opacity: .62;
}
.place-map-info .kakao-map-link { margin-left: 2px; }
.info-window-actions { margin-top: 8px; }
.info-window .kakao-map-link.compact {
  min-height: 23px;
  padding: 3px 6px;
}
@media (max-width: 640px) {
  .place-map-info .kakao-map-link { margin-left: 0; }
}

/* v1.7.0 — Figma refinement: lighter type, fewer cards, thin borders */
:root {
  --shadow: none;
  --radius: 12px;
}

/* Product chrome: almost flat, one divider, restrained weights. */
.app-header {
  box-shadow: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.app-header h1 { font-weight: 680; letter-spacing: -0.025em; }
.app-header .lead { color: #7b8492; font-weight: 400; }
.meta-pill,
.topbar-help { font-weight: 600; }
.topbar-help { border-color: #dce2e9; }

.shell { max-width: 1320px; }
.panel,
.launch-panel,
.map-panel,
.table-panel,
.summary-card,
.lookup-state-panel,
.cta-panel {
  box-shadow: none !important;
}

.launch-panel {
  padding: 18px;
  border-radius: 12px;
}
.launch-title-row h2 { font-size: 18px; font-weight: 650; }
.launch-title-row .help-text { font-weight: 400; }
.scope-notice strong { font-weight: 600; }
.launch-form-grid {
  padding: 10px;
  border-color: #e8ebef;
  border-radius: 10px;
  background: #fbfcfd;
}
label span,
.month-field span { font-weight: 600; }
.primary-button,
.secondary-button,
.ghost-button,
.main-cta-button { font-weight: 650; }

/* Compact result headers. */
.map-panel,
.table-panel { padding: 16px; border-radius: 12px; }
.map-panel .eyebrow,
.table-panel .eyebrow { display: none; }
.map-panel h2,
.table-panel h2 { font-size: 16px; font-weight: 650; letter-spacing: -0.015em; }
.map-panel .section-title-row,
.table-panel .section-title-row { margin-bottom: 10px; }
#map { border-radius: 10px; }
.map-legend { color: #87909e; font-weight: 400; }

/* Summary is a quiet metric strip, not a stack of decorated cards. */
.summary-card {
  padding: 12px 13px;
  border-radius: 10px;
}
.summary-card span { font-weight: 550; }
.summary-card strong { font-size: 18px; font-weight: 650; }

/* Figma-like tabs: no chunky segmented control, only a calm active underline. */
.table-panel .tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e8ebef;
  border-radius: 0;
  background: transparent;
}
.table-panel .tab {
  position: relative;
  min-height: 36px;
  padding: 7px 6px 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7a8493;
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}
.table-panel .tab::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}
.table-panel .tab.active {
  background: transparent;
  color: #315b96;
  box-shadow: none;
}
.table-panel .tab.active::after { background: #315b96; }
.table-panel .tab strong,
.table-panel .tab.active strong {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #f1f3f6;
  color: #7b8492;
  font-size: 10px;
  font-weight: 600;
}
.table-panel .tab.active strong {
  background: #eef4fb;
  color: #315b96;
}
.table-hint { margin: 8px 1px 10px; font-weight: 400; }

/* Desktop list: one surface with divider rows instead of repeated rounded cards. */
.place-list-wrap {
  padding: 0;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  background: #fff;
}
.place-list { display: grid; gap: 0; }
.place-card,
.place-card.card-review,
.place-card.card-failed,
.place-card.card-manual,
.place-card.card-muted,
.place-card.card-focus,
.place-card.card-focus:hover {
  border: 0 !important;
  border-bottom: 1px solid #edf0f3 !important;
  border-radius: 0;
  background: #fff !important;
  box-shadow: none !important;
  outline: none !important;
}
.place-card {
  gap: 10px;
  padding: 13px 12px;
}
.place-card:last-child { border-bottom: 0 !important; }
.place-card:hover,
.place-card.map-card:hover {
  background: #fafbfc !important;
  border-bottom-color: #e7ebf0 !important;
  box-shadow: none !important;
}
.place-card-head { gap: 10px; }
.place-title-wrap { gap: 7px; }
.place-title {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.place-amount {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.place-meta {
  margin: 5px 0 7px;
  color: #778190;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}
.place-map-info {
  gap: 5px;
  color: #657184;
  font-size: 11.5px;
  line-height: 1.5;
}
.place-map-info span {
  color: #8490a1;
  font-weight: 600;
}
.place-map-info strong {
  color: #455266;
  font-size: 12px;
  font-weight: 600;
}
.place-map-info em { color: #7d8796; }
.badge {
  min-height: 21px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  box-shadow: none;
}

/* Secondary actions: same restrained visual family as an '주소 복사' control. */
.place-card-actions .mini-action,
.place-card-actions .mini-action.strong,
.place-card-actions .mini-action.ghost {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
  color: #526174;
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: none;
}
.place-card-actions .mini-action:hover,
.place-card-actions .mini-action.strong:hover,
.place-card-actions .mini-action.ghost:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #315b96;
}
.place-card-actions .mini-action.strong.warn-action,
.place-card-actions .mini-action.strong.warn-action:hover {
  border: 1px solid #e5d4b8;
  background: #fff;
  color: #8a5a14;
  font-weight: 600;
}
.place-card-actions .mini-action.strong.warn-action:hover { background: #fffaf2; }

/* Kakao link: thin and quiet, no arrow or brand-yellow treatment. */
.kakao-map-link,
.info-window .kakao-map-link.compact {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
  color: #526174;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
}
.kakao-map-link:hover,
.info-window .kakao-map-link.compact:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #315b96;
}
.kakao-map-link span { display: none !important; }
.place-map-info .kakao-map-link { margin-left: 1px; }

/* Keep the established map-first desktop ratio. */
@media (min-width: 1041px) {
  .workspace { grid-template-columns: minmax(600px, 1.7fr) minmax(340px, .9fr); gap: 12px; }
}

/* Mobile keeps individual cards for touch separation, but uses the same quiet typography/actions. */
@media (max-width: 720px) {
  .place-list-wrap { border: 0; border-radius: 0; background: transparent; }
  .place-list { gap: 9px; }
  .place-card,
  .place-card.card-review,
  .place-card.card-failed,
  .place-card.card-manual,
  .place-card.card-muted,
  .place-card.card-focus,
  .place-card.card-focus:hover {
    border: 1px solid #e6eaf0 !important;
    border-radius: 11px;
    background: #fff !important;
    padding: 12px;
  }
  .place-card:last-child { border-bottom: 1px solid #e6eaf0 !important; }
  .place-card-actions .mini-action,
  .place-card-actions .mini-action.strong,
  .place-card-actions .mini-action.ghost {
    width: auto;
    min-height: 34px;
    padding-inline: 11px;
  }
  .place-card-actions { justify-content: flex-end; }
}


/* v1.7.1 — favicon refresh + map/list surface alignment */
.map-panel,
.table-panel {
  height: 100%;
}

.table-panel {
  display: flex;
  flex-direction: column;
}

/* The list's visible surface begins on the same horizontal line as the map. */
.list-surface {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  background: #fff;
}

.list-surface .tabs {
  flex: 0 0 auto;
  padding-inline: 8px;
}

.list-surface .table-hint {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 10px 10px;
  border-bottom: 1px solid #edf0f3;
}

.list-surface #tableWrap,
.list-surface .table-wrap,
.list-surface .place-list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
}

@media (min-width: 1041px) {
  .workspace { align-items: stretch; }
}

@media (max-width: 720px) {
  .list-surface {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }
  .list-surface .tabs { padding-inline: 0; }
  .list-surface .table-hint {
    padding-inline: 1px;
    border-bottom: 0;
    margin-bottom: 8px;
  }
}

/* v1.7.3 — fixed desktop workspace + internal list scrolling; marker clicks do not move the list */
@media (min-width: 1041px) {
  /* Result height is controlled by the workspace, never by the number of rows. */
  .workspace {
    align-items: start;
  }

  .map-panel,
  .table-panel {
    height: clamp(580px, 72vh, 660px);
    min-height: 0;
    margin-bottom: 0;
    overflow: hidden;
  }

  .map-panel {
    display: flex;
    flex-direction: column;
  }

  .map-panel .section-title-row,
  .map-panel .map-legend,
  .table-panel .section-title-row {
    flex: 0 0 auto;
  }

  /* Let the map fill only the remaining fixed panel height. */
  .map-panel .map-shell {
    flex: 1 1 auto;
    min-height: 0;
  }

  .map-panel #map {
    height: 100%;
    min-height: 0;
  }

  /* Keep tabs/help text fixed; only the actual result rows scroll. */
  .table-panel .list-surface {
    flex: 1 1 auto;
    min-height: 0;
  }

  .list-surface #tableWrap,
  .list-surface .table-wrap,
  .list-surface .place-list-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

/* v1.7.4 — Figma/Linear finishing pass: reduce chrome, clarify hierarchy */
:root {
  --ui-line-soft: #edf1f5;
  --ui-line: #e2e8f0;
  --ui-muted: #7c8797;
  --ui-subtle: #98a2b3;
  --ui-ink-soft: #455266;
  --ui-blue: #315b96;
  --ui-blue-soft: #f3f7fc;
}

/* Large result surfaces should read as one calm workspace, not two heavy cards. */
.map-panel,
.table-panel {
  border-color: var(--ui-line-soft) !important;
  border-radius: 11px;
  box-shadow: none !important;
}

.map-panel .section-title-row,
.table-panel .section-title-row {
  margin-bottom: 9px;
}
.map-panel h2,
.table-panel h2 {
  color: #202b3c;
  font-size: 15px;
  font-weight: 700;
}
.map-panel .ghost-button {
  min-height: 34px;
  padding: 6px 10px;
  border-color: #dfe5ec;
  border-radius: 8px;
  background: #fff;
  color: #536174;
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}
.map-panel .ghost-button:hover {
  border-color: #cfd8e3;
  background: #f8fafc;
  color: var(--ui-blue);
}

#map { border-radius: 9px; }

/* Legend: small footer strip, not a secondary card. */
.map-legend {
  gap: 13px;
  margin-top: 8px;
  padding: 7px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8b95a4;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.4;
}
.map-legend span { display: inline-flex; align-items: center; }
.map-legend .dot {
  width: 7px;
  height: 7px;
  margin-right: 5px;
}

/* Right list surface: almost invisible frame. */
.list-surface {
  border-color: var(--ui-line-soft);
  border-radius: 9px;
}
.list-surface .table-hint {
  padding: 7px 10px 9px;
  border-bottom-color: #f0f2f5;
  color: #8a94a3;
  font-size: 10.5px;
  line-height: 1.45;
}

/* Tabs: text + short underline, with quiet count chips. */
.table-panel .tabs {
  border-bottom-color: #eef1f4;
}
.table-panel .tab {
  min-height: 34px;
  padding: 7px 5px 8px;
  color: #8993a2;
  font-size: 11px;
  font-weight: 550;
}
.table-panel .tab::after {
  left: 30%;
  right: 30%;
  height: 2px;
}
.table-panel .tab.active {
  color: var(--ui-blue);
  font-weight: 650;
}
.table-panel .tab strong,
.table-panel .tab.active strong {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 0;
  background: #f3f5f7;
  color: #98a1ae;
  font-size: 9px;
  font-weight: 600;
}
.table-panel .tab.active strong {
  background: #f0f5fb;
  color: #5d79a1;
}

/* Divider rows: remove card-like visual weight and separate content hierarchy clearly. */
.place-card {
  display: block;
  padding: 13px 12px 12px;
  border-bottom-color: #f0f2f5 !important;
}
.place-card:hover,
.place-card.map-card:hover {
  background: #fbfcfd !important;
  border-bottom-color: #ebeff3 !important;
}
.place-card-head {
  align-items: center;
  gap: 8px;
}
.place-title-wrap {
  gap: 6px;
  min-width: 0;
}
.place-title {
  color: #263244;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.012em;
}
.place-amount {
  color: #253a5a;
  font-size: 13.5px;
  font-weight: 650;
}

/* Normal state recedes; attention states remain discoverable without shouting. */
.place-card .badge {
  min-height: 19px;
  padding: 2px 6px;
  border: 1px solid transparent;
  background: #f3f6f9;
  color: #718096;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
}
.place-card .badge.warn {
  border-color: #f0dec0;
  background: #fffaf2;
  color: #8a5a14;
}
.place-card .badge.manual {
  border-color: #d9eee8;
  background: #f4fbf9;
  color: #39796f;
}
.place-card .badge.danger {
  border-color: #edd8d2;
  background: #fdf7f5;
  color: #9a5c4b;
}
.place-card .badge.gray {
  background: #f4f5f7;
  color: #7e8794;
}

/* Date and purpose are deliberately secondary to place + amount. */
.place-meta {
  display: flex;
  gap: 5px;
  margin: 6px 0 7px;
  color: #7f8998;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}
.place-date {
  flex: 0 0 auto;
  color: #8e98a6;
  white-space: nowrap;
}
.place-purpose {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.place-purpose::before {
  content: "· ";
  color: #b3bac4;
}

/* Location block gets its own quiet hierarchy instead of one busy wrapping line. */
.place-map-info {
  display: grid;
  gap: 2px;
  color: #7d8795;
  font-size: 10.5px;
  line-height: 1.45;
}
.place-map-primary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.place-map-primary span {
  flex: 0 0 auto;
  color: #8996a7;
  font-size: 10px;
  font-weight: 600;
}
.place-map-primary strong {
  min-width: 0;
  overflow: hidden;
  color: #4d5a6c;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.place-map-info > em {
  display: block;
  overflow: hidden;
  color: #8b95a3;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Actions live together on one quiet row. Kakao stays text-only with NO arrow and NO brand yellow. */
.place-card-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 8px;
}
.place-card-actions .mini-action,
.place-card-actions .mini-action.strong,
.place-card-actions .mini-action.ghost,
.place-card-actions .kakao-map-link {
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid #dfe5ec;
  border-radius: 7px;
  background: #fff;
  color: #5b6879;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
}
.place-card-actions .mini-action:hover,
.place-card-actions .mini-action.strong:hover,
.place-card-actions .mini-action.ghost:hover,
.place-card-actions .kakao-map-link:hover {
  border-color: #cfd8e3;
  background: #f8fafc;
  color: var(--ui-blue);
}
.place-card-actions .mini-action.strong.warn-action {
  border-color: #ead5b2;
  background: #fffdf9;
  color: #865817;
}
.place-card-actions .mini-action.strong.warn-action:hover {
  border-color: #dfc38e;
  background: #fff9ef;
  color: #7b4f12;
}

/* The map info-window link follows the same restrained system. */
.info-window .kakao-map-link.compact {
  min-height: 26px;
  padding: 4px 8px;
  border-color: #dfe5ec;
  border-radius: 7px;
  background: #fff;
  color: #5b6879;
  font-size: 10.5px;
  font-weight: 600;
}

@media (max-width: 720px) {
  /* Mobile remains touch-friendly and intentionally does not inherit desktop density. */
  .place-card {
    padding: 12px !important;
    border-color: #e9edf2 !important;
    border-radius: 10px;
  }
  .place-title { font-size: 14px; }
  .place-amount { font-size: 14px; }
  .place-meta {
    flex-wrap: wrap;
    gap: 2px 5px;
    font-size: 11.5px;
  }
  .place-purpose {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .place-map-primary { align-items: flex-start; }
  .place-map-primary strong,
  .place-map-info > em {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .place-card-actions {
    gap: 7px;
    margin-top: 10px;
  }
  .place-card-actions .mini-action,
  .place-card-actions .mini-action.strong,
  .place-card-actions .mini-action.ghost,
  .place-card-actions .kakao-map-link {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 11.5px;
  }
  .map-legend {
    gap: 10px 12px;
    font-size: 10px;
  }
}


/* v1.7.5 — mobile readability + explicit map jump + iOS-safe month control */

/* Let a wrapper own month-field geometry. The native month input stays unpadded so iOS Safari
   cannot grow beyond its container or clip the lower part of the rendered value. */
.month-field {
  min-width: 0;
}
.month-input-shell {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 46px;
  min-height: 46px;
  align-items: center;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.month-input-shell:hover {
  border-color: #cbd5e1;
}
.month-input-shell:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}
.month-input-shell #baseMonth {
  display: block;
  flex: 1 1 auto;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: #344155;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  box-shadow: none !important;
  box-sizing: border-box;
  appearance: auto;
  -webkit-appearance: auto;
}
.month-input-shell #baseMonth:focus {
  outline: none;
  box-shadow: none !important;
}
.month-input-shell #baseMonth::-webkit-date-and-time-value {
  margin: 0;
  padding: 0;
  text-align: left;
  line-height: 1.25;
}
.month-input-shell #baseMonth::-webkit-calendar-picker-indicator {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

/* The whole result card is informational. Only “지도 위치” is an intentional navigation target. */
.place-card {
  cursor: default;
}
.place-map-primary.map-jump {
  appearance: none;
  -webkit-appearance: none;
  max-width: 100%;
  margin: -2px 0 0;
  padding: 2px 4px 2px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.place-map-primary.map-jump:hover {
  background: #f5f8fc;
}
.place-map-primary.map-jump:hover strong {
  color: var(--ui-blue);
}
.place-map-primary.map-jump:focus-visible {
  outline: 2px solid rgba(49, 91, 150, .28);
  outline-offset: 2px;
}

@media (max-width: 920px) {
  .month-input-shell {
    height: 44px;
    min-height: 44px;
  }
}

@media (max-width: 1040px) {
  .map-panel {
    scroll-margin-top: 84px;
  }
}

@media (max-width: 720px) {
  /* Mobile list is scan-first: one left edge for name, date, purpose, location and address. */
  .place-card,
  .place-card-main,
  .place-card-head,
  .place-title-wrap,
  .place-meta,
  .place-map-info {
    text-align: left !important;
  }
  .place-card-head {
    width: 100%;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }
  .place-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 6px;
  }
  .place-title {
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal !important;
    line-height: 1.35;
  }
  .place-amount {
    flex: 0 0 auto;
    margin-left: auto;
    padding-top: 1px;
    font-size: 14.5px !important;
    text-align: right;
    white-space: nowrap;
  }
  .place-meta {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
  }
  .place-map-primary {
    justify-content: flex-start;
    text-align: left;
  }
  .place-map-primary.map-jump {
    width: 100%;
    min-height: 36px;
    margin: -3px 0 -2px -7px;
    padding: 6px 7px;
    align-items: center;
  }
  .place-map-primary.map-jump:active {
    background: #eef4fb;
  }
  .place-card-actions {
    width: 100%;
    justify-content: flex-end !important;
  }

  /* Full-width form controls remain inside the viewport on iPhone/Safari. */
  .month-field,
  .month-input-shell,
  .month-input-shell #baseMonth {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .month-input-shell {
    padding: 0 10px;
    overflow: hidden;
  }
  .month-input-shell #baseMonth {
    padding: 0 !important;
    font-size: 16px; /* prevents Safari focus zoom and keeps the native value vertically stable */
    line-height: 1.2;
  }
  .month-input-shell #baseMonth::-webkit-date-and-time-value {
    line-height: 1.2;
  }
}


/* v1.7.6 — desktop full-card map jump + title-line version badge */
.app-header .eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #6f7f92;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.app-header .version-tag {
  display: inline-flex;
  align-items: center;
  color: #6f7f92;
  font-size: .72em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (min-width: 1041px) {
  .place-card.map-card {
    cursor: pointer;
    transition: background-color .16s ease, box-shadow .16s ease, border-color .16s ease;
  }

  .place-card.map-card:hover {
    background: #f8fafc !important;
    border-bottom-color: #e5ebf2 !important;
  }

  .place-card.map-card:focus-visible {
    outline: 3px solid rgba(49, 91, 150, .16);
    outline-offset: -1px;
  }

  .place-card.card-focus,
  .place-card.card-focus:hover {
    background: #f6f9fc !important;
    border-bottom-color: #dde7f1 !important;
    box-shadow: none !important;
  }
}

@media (max-width: 760px) {
  .app-header .eyebrow {
    margin-bottom: 2px;
    font-size: 10px;
  }

  .brand-title {
    gap: 6px;
  }

  .app-header .version-tag {
    font-size: .68em;
  }
}


/* v1.7.7 — cleaner map popup + no navy selected strip */
.info-window {
  min-width: 250px;
  max-width: 340px;
  line-height: 1.45;
}

.info-window strong {
  line-height: 1.35;
  margin-bottom: 5px;
}


/* v1.7.8 — quieter desktop map-location line + tighter info window */
@media (min-width: 1041px) {
  /* On web, the whole card already jumps to the map, so the inner location line should
     read like information, not a second button. Remove the extra hover signal. */
  .place-map-primary.map-jump,
  .place-map-primary.map-jump:hover,
  .place-map-primary.map-jump:active {
    margin: 0;
    padding: 0;
    background: transparent;
  }

  .place-map-primary.map-jump:hover strong {
    color: #4d5a6c;
  }

  .place-map-primary.map-jump {
    border-radius: 0;
  }

  /* Desktop popup should stay compact and not leave too much empty right-side space. */
  .info-window {
    min-width: 220px;
    max-width: 280px;
    padding: 12px 34px 10px 12px;
    font-size: 12.5px;
    line-height: 1.4;
  }

  .info-window strong {
    margin-bottom: 4px;
    font-size: 13.5px;
    line-height: 1.32;
  }

  .info-window ul {
    margin-top: 7px;
    padding-left: 17px;
  }

  .info-window li {
    margin: 3px 0;
  }

  .info-window-actions {
    margin-top: 7px;
  }
}
