* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #172033;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: #2563eb;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-menu {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1000;
}

.app-menu-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.app-menu-button:hover {
  background: #ffffff;
}

.app-menu-panel {
  min-width: 200px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.app-menu-panel[hidden],
.app-menu-panel.is-closed {
  display: none !important;
}

.app-menu-panel.is-open {
  display: grid;
}

.app-menu-panel a {
  padding: 11px 12px;
  border-radius: 12px;
  color: #172033;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.app-menu-panel a:hover,
.app-menu-panel a:focus-visible,
.app-menu-panel a[aria-current="page"] {
  outline: none;
  background: #eff6ff;
  color: #1d4ed8;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.hero {
  padding: 36px;
  border-radius: 28px;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  color: white;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -0.05em;
}

.hero-description {
  max-width: 680px;
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.92;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 24px;
}

.map-panel,
.report-panel {
  min-height: 560px;
  padding: 24px;
  border-radius: 28px;
  background: white;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 13px;
  font-weight: 800;
}

.status-pill.ok {
  background: #dcfce7;
  color: #166534;
}

.status-pill.empty {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.error {
  background: #fee2e2;
  color: #991b1b;
}

.map-placeholder {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #dbeafe, #dcfce7);
  background-size: 36px 36px, 36px 36px, auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-weight: 800;
}

.map-pin {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #ef4444;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.map-pin {
  line-height: 1;
}

.map-pin {
  font-size: 0;
}

.map-pin::before {
  content: attr(class);
}

.pin-a {
  top: 28%;
  left: 26%;
}

.pin-b {
  top: 52%;
  left: 58%;
  background: #f97316;
}

.pin-c {
  top: 38%;
  left: 74%;
  background: #0f766e;
}

.report-list {
  display: grid;
  gap: 14px;
}

.school-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}

.school-legend span,
.school-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.school-legend span {
  padding: 6px 9px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.school-okdong-dot {
  background: #16a34a;
}

.school-hancheon-dot {
  background: #2563eb;
}

.report-card {
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-left-width: 6px;
  border-radius: 20px;
  background: #f8fafc;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.report-card:hover,
.report-card:focus-visible,
.report-card.active {
  border-color: #0f766e;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.16);
  outline: none;
}

.report-card.active {
  transform: translateY(-1px);
}

.report-card.school-okdong {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.report-card.school-hancheon {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.school-badge {
  margin-bottom: 10px;
  padding: 5px 9px;
}

.student-badge {
  max-width: 100%;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.school-okdong .school-badge {
  background: #dcfce7;
  color: #166534;
}

.school-hancheon .school-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.report-photo {
  display: block;
  width: 100%;
  max-height: 180px;
  margin: -2px 0 14px;
  border-radius: 14px;
  object-fit: cover;
  background: #e2e8f0;
}

.report-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.report-card p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.empty-card {
  color: #64748b;
  font-weight: 800;
  text-align: center;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.report-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: white;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.summary-inquiry-box {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.summary-inquiry-button {
  width: 100%;
  border-radius: 12px;
  background: #0f766e;
  line-height: 1.35;
  white-space: normal;
}

.summary-inquiry-button:hover {
  background: #115e59;
}

.summary-inquiry-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.summary-inquiry-panel {
  padding: 16px;
  border: 1px solid #99f6e4;
  border-radius: 16px;
  background: #f0fdfa;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.summary-inquiry-panel.ready {
  color: #1e293b;
}

.summary-inquiry-panel.empty {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
}

.summary-inquiry-panel.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 800;
}

.summary-inquiry-panel strong {
  display: block;
  margin-bottom: 8px;
  color: #172033;
}

.summary-inquiry-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.summary-inquiry-panel li {
  padding-left: 2px;
}

.compare-inquiry-box {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.compare-inquiry-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.compare-inquiry-button {
  width: 100%;
  border-radius: 12px;
  background: #4338ca;
  line-height: 1.35;
  white-space: normal;
}

.compare-inquiry-button:hover {
  background: #3730a3;
}

.compare-inquiry-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.compare-inquiry-panel {
  padding: 16px;
  border: 1px solid #c4b5fd;
  border-radius: 16px;
  background: #f5f3ff;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.compare-inquiry-panel.ready {
  color: #1e293b;
}

.compare-inquiry-panel.empty {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
}

.compare-inquiry-panel.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 800;
}

.compare-inquiry-panel strong {
  display: block;
  margin-bottom: 8px;
  color: #172033;
}

.compare-inquiry-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.compare-inquiry-panel li {
  padding-left: 2px;
}

.inquiry-button {
  width: 100%;
  margin-top: 14px;
  border-radius: 12px;
  background: #172033;
  text-align: center;
  line-height: 1.35;
  white-space: normal;
}

.inquiry-button:hover {
  background: #0f172a;
}

.inquiry-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.inquiry-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  background: #eef2ff;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.inquiry-panel.ready {
  color: #1e293b;
}

.inquiry-panel.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 800;
}

.inquiry-panel strong {
  display: block;
  margin-bottom: 8px;
  color: #172033;
}

.inquiry-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.inquiry-panel li {
  padding-left: 2px;
}

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

  .hero,
  .map-panel,
  .report-panel {
    border-radius: 22px;
  }

  .inquiry-button {
    padding: 11px 12px;
  }

  .summary-inquiry-button {
    padding: 11px 12px;
  }

  .compare-inquiry-actions {
    grid-template-columns: 1fr;
  }

  .compare-inquiry-button {
    padding: 11px 12px;
  }
}

.kakao-map {
  width: 100%;
  min-height: 470px;
  border-radius: 24px;
  overflow: hidden;
  background: #e2e8f0;
}

.map-error {
  display: grid;
  place-items: center;
  min-height: 470px;
  padding: 20px;
  color: #991b1b;
  font-weight: 800;
  text-align: center;
}

html.picker-mode,
body.picker-mode {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.picker-mode .app-shell {
  width: 100%;
  height: 100vh;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.picker-mode .hero,
.picker-mode .app-menu,
.picker-mode .report-panel {
  display: none !important;
}

.picker-mode .dashboard-grid {
  display: block;
  height: 100%;
  margin: 0;
}

.picker-mode .map-panel {
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.picker-mode .section-header {
  display: none;
}

.picker-mode .kakao-map {
  width: 100%;
  height: 100vh;
  min-height: 0;
  border-radius: 0;
}

.picker-mode .map-error {
  min-height: 0;
  height: 100vh;
}
