:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #5e6864;
  --line: #d9ded8;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --soft: #f0eee6;
  --green: #2f766f;
  --green-dark: #1f514c;
  --rust: #ba6235;
  --wine: #a73f52;
  --gold: #c59b45;
  --shadow: 0 18px 50px rgba(23, 33, 31, 0.08);
  font-family:
    "Pretendard",
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(47, 118, 111, 0.08), rgba(251, 250, 246, 0) 340px),
    var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.icon-reset {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

a {
  color: var(--green-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 222, 216, 0.88);
  background: rgba(251, 250, 246, 0.94);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr auto;
  gap: 18px;
  align-items: center;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(47, 118, 111, 0.35);
  border-radius: 8px;
  color: var(--green-dark);
  background:
    linear-gradient(135deg, rgba(47, 118, 111, 0.14), rgba(197, 155, 69, 0.14)),
    #fff;
  font-weight: 800;
}

.brand-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.global-search {
  position: relative;
  min-width: 0;
}

.global-search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 42px 0 16px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
}

.global-search input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 118, 111, 0.12);
}

.search-icon {
  position: absolute;
  right: 13px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav button,
.ghost-button,
.solid-button,
.danger-button,
.icon-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

.nav button {
  background: transparent;
  color: var(--muted);
}

.nav button:hover,
.nav button[aria-current="page"] {
  background: rgba(47, 118, 111, 0.1);
  color: var(--green-dark);
}

.ghost-button {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.ghost-button:hover {
  border-color: rgba(47, 118, 111, 0.45);
  text-decoration: none;
}

.solid-button {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.solid-button:hover {
  background: var(--green-dark);
  text-decoration: none;
}

.danger-button {
  border-color: rgba(167, 63, 82, 0.35);
  background: rgba(167, 63, 82, 0.08);
  color: var(--wine);
}

.icon-button {
  width: 38px;
  padding: 0;
  border-color: var(--line);
  background: var(--panel);
}

.main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 24px;
  align-items: stretch;
  min-height: clamp(520px, 68vh, 760px);
  margin-bottom: 18px;
  border: 1px solid rgba(47, 118, 111, 0.2);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 52px);
  background:
    linear-gradient(135deg, rgba(47, 118, 111, 0.14), rgba(197, 155, 69, 0.08) 48%, rgba(186, 98, 53, 0.08)),
    #fff;
  box-shadow: var(--shadow);
}

.landing-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.hero-kicker {
  width: fit-content;
  border: 1px solid rgba(47, 118, 111, 0.26);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.hero-title {
  margin: 0;
  font-size: clamp(56px, 10vw, 118px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-subtitle {
  margin: 0;
  color: var(--green-dark);
  font-size: clamp(24px, 3.4vw, 42px);
  font-weight: 800;
  line-height: 1.18;
}

.hero-copy {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.hero-actions .solid-button,
.hero-actions .ghost-button {
  min-height: 46px;
  padding-inline: 16px;
}

.prep-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  border: 1px solid rgba(217, 222, 216, 0.92);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.prep-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prep-panel-header strong {
  font-size: 20px;
}

.prep-list,
.prep-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prep-list li {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(251, 250, 246, 0.72);
  line-height: 1.35;
}

.prep-list span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(47, 118, 111, 0.12);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.notice-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(167, 63, 82, 0.22);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.notice-band h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.notice-band p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.landing-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  align-items: start;
}

.prep-steps li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.prep-steps li:last-child {
  border-bottom: 0;
}

.prep-steps strong {
  color: var(--ink);
}

.prep-steps span {
  color: var(--muted);
  line-height: 1.55;
}

.status-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(47, 118, 111, 0.2);
  border-radius: 8px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.72);
}

.status-strip strong {
  color: var(--green-dark);
}

.status-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(94, 104, 100, 0.22);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pill.safe {
  border-color: rgba(47, 118, 111, 0.26);
  color: var(--green-dark);
}

.pill.warn {
  border-color: rgba(186, 98, 53, 0.3);
  color: var(--rust);
}

.pill.stop {
  border-color: rgba(167, 63, 82, 0.32);
  color: var(--wine);
}

.grid {
  display: grid;
  gap: 16px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: start;
}

.list-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: start;
}

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

.panel-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

.panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.panel-body {
  padding: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.map-board {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(217, 222, 216, 0.34) 1px, transparent 1px),
    linear-gradient(0deg, rgba(217, 222, 216, 0.34) 1px, transparent 1px),
    linear-gradient(135deg, rgba(47, 118, 111, 0.12), rgba(197, 155, 69, 0.1) 45%, rgba(186, 98, 53, 0.08));
  background-size: 48px 48px, 48px 48px, auto;
}

.map-path {
  position: absolute;
  inset: 44px 56px 44px 56px;
  border: 2px solid rgba(47, 118, 111, 0.24);
  border-left-width: 5px;
  border-radius: 48% 42% 52% 36% / 32% 48% 43% 54%;
  transform: rotate(-7deg);
}

.court-pin {
  position: absolute;
  display: grid;
  min-width: 134px;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(47, 118, 111, 0.25);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(23, 33, 31, 0.1);
  cursor: pointer;
}

.court-pin:hover,
.court-pin:focus-visible {
  outline: none;
  border-color: var(--green);
  transform: translateY(-1px);
}

.court-pin .pin-dot {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.court-pin strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.court-pin span {
  color: var(--muted);
  font-size: 12px;
}

.pin-seoul {
  left: 18%;
  top: 17%;
}

.pin-publiclaw {
  left: 46%;
  top: 29%;
}

.pin-daejeon {
  left: 36%;
  top: 50%;
}

.pin-busan {
  left: 62%;
  top: 68%;
}

.pin-gwangju {
  left: 18%;
  top: 70%;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-bar button,
.tab-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}

.filter-bar button[aria-pressed="true"],
.tab-button[aria-selected="true"] {
  border-color: rgba(47, 118, 111, 0.35);
  background: rgba(47, 118, 111, 0.1);
  color: var(--green-dark);
}

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

.result-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--panel);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.result-card:hover {
  border-color: rgba(47, 118, 111, 0.38);
  box-shadow: 0 10px 26px rgba(23, 33, 31, 0.07);
  text-decoration: none;
}

.result-topline {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.result-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0;
}

.result-meta,
.fineprint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.fineprint {
  margin: 0;
}

.source-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list a,
.source-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(240, 238, 230, 0.52);
  color: var(--ink);
}

.source-list small {
  color: var(--muted);
}

.empty {
  border: 1px dashed rgba(94, 104, 100, 0.35);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.54);
  text-align: center;
}

.detail-hero {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(47, 118, 111, 0.13), rgba(197, 155, 69, 0.1)),
    #fff;
}

.detail-hero h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: 0;
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  border-left: 3px solid rgba(47, 118, 111, 0.25);
  padding: 0 0 0 13px;
}

.timeline strong {
  display: block;
  line-height: 1.45;
}

.timeline span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.case-summary {
  border: 1px solid rgba(47, 118, 111, 0.25);
  border-radius: 8px;
  padding: 13px;
  background: rgba(47, 118, 111, 0.06);
  line-height: 1.7;
}

.case-summary strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green-dark);
}

.policy-section {
  display: grid;
  gap: 12px;
}

.policy-section h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}

.policy-section h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.policy-section p,
.policy-section li {
  color: var(--muted);
  line-height: 1.7;
}

.policy-section ul,
.policy-section ol {
  margin: 0;
  padding-left: 21px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 118, 111, 0.12);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: 360px;
  border: 1px solid rgba(47, 118, 111, 0.24);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

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

  .nav {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .dashboard-grid,
  .landing-hero,
  .landing-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .topbar-inner,
  .main {
    width: min(100% - 22px, 1220px);
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  .notice-band,
  .prep-steps li {
    grid-template-columns: 1fr;
  }

  .metric-row,
  .list-grid {
    grid-template-columns: 1fr;
  }

  .map-board {
    min-height: 520px;
  }

  .court-pin {
    left: 16px !important;
    right: 16px;
    width: calc(100% - 32px);
  }

  .pin-seoul {
    top: 30px;
  }

  .pin-publiclaw {
    top: 120px;
  }

  .pin-daejeon {
    top: 210px;
  }

  .pin-busan {
    top: 300px;
  }

  .pin-gwangju {
    top: 390px;
  }

  .panel-header,
  .result-topline {
    flex-direction: column;
    align-items: stretch;
  }
}
