:root {
  color-scheme: light;
  --bg: #fff9f2;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-2: #f3fbff;
  --surface-3: #fff6dc;
  --soft: #fffdf8;
  --text: #151c37;
  --text-2: #334056;
  --muted: #6f7890;
  --line: #e6dfee;
  --line-strong: #cfc4de;
  --primary: #3157d5;
  --primary-2: #128f91;
  --primary-soft: #e9f0ff;
  --coral: #ef6257;
  --coral-soft: #fff0ed;
  --amber: #f3b331;
  --amber-soft: #fff5d8;
  --green: #5caf55;
  --green-soft: #edfae8;
  --blue: #3c7be8;
  --blue-soft: #edf5ff;
  --purple: #8c69da;
  --mint-soft: #ecfbf3;
  --teal: #128f91;
  --gray-soft: #f8f5fb;
  --shadow: 0 18px 46px rgba(48, 42, 77, 0.12);
  --shadow-soft: 0 10px 28px rgba(48, 42, 77, 0.08);
  --radius: 8px;
  --header: 72px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgba(255, 246, 214, 0.92) 0%, rgba(255, 231, 239, 0.9) 28%, rgba(229, 241, 255, 0.92) 62%, rgba(229, 250, 235, 0.88) 100%),
    var(--bg);
}

.seo-static {
  position: relative;
  overflow: hidden;
  width: min(960px, calc(100vw - 32px));
  margin: 28px auto;
  padding: clamp(32px, 6vw, 62px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 225, 0.84) 42%, rgba(232, 244, 255, 0.86)),
    var(--surface);
  box-shadow: var(--shadow);
}

.seo-static::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(49, 87, 213, 0.08) 36.2% 37.1%, transparent 37.3% 100%),
    linear-gradient(22deg, transparent 0 48%, rgba(239, 98, 87, 0.08) 48.2% 49%, transparent 49.2% 100%),
    linear-gradient(90deg, rgba(21, 28, 55, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(21, 28, 55, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  content: "";
}

.seo-static::after {
  position: absolute;
  top: 42px;
  right: 38px;
  z-index: 0;
  width: min(280px, 34vw);
  height: 190px;
  opacity: 0.42;
  background:
    linear-gradient(145deg, #ff8177, #ee5d53) 0 28px / 86px 86px no-repeat,
    linear-gradient(145deg, #b9e878, #69be5c) 108px 0 / 92px 92px no-repeat,
    linear-gradient(145deg, #86b6ff, #4c7ff0) 72px 92px / 102px 102px no-repeat,
    linear-gradient(145deg, #ffe783, #f4bd35) 188px 82px / 78px 78px no-repeat;
  border-radius: var(--radius);
  filter: drop-shadow(0 18px 18px rgba(38, 48, 86, 0.18));
  transform: rotate(-4deg);
  content: "";
}

.seo-static > * {
  position: relative;
  z-index: 1;
}

.seo-static h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.2;
}

.seo-static p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.seo-static ul {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--text-2);
  font-weight: 700;
}

.seo-static section {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.seo-static h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.3;
}

.seo-static h3 {
  margin: 14px 0 6px;
  color: var(--text-2);
  font-size: 18px;
  font-weight: 950;
}

.seo-static article p {
  font-size: 15px;
}

.seo-static nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.seo-static a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.86);
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  overflow-x: clip;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(255, 247, 233, 0.96), rgba(238, 247, 255, 0.94) 320px, rgba(255, 251, 245, 0.96)),
    var(--bg);
}

.app-shell::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 30%, rgba(239, 98, 87, 0.07) 30.2% 31%, transparent 31.2% 100%),
    linear-gradient(24deg, transparent 0 57%, rgba(49, 87, 213, 0.07) 57.2% 58%, transparent 58.2% 100%),
    linear-gradient(90deg, rgba(21, 28, 55, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(21, 28, 55, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 84px 84px, 84px 84px;
  content: "";
}

.page,
.app-footer {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 248px minmax(360px, 1fr) auto;
  align-items: stretch;
  min-height: var(--header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(48, 42, 77, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 22px;
  border-right: 1px solid rgba(230, 223, 238, 0.9);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.44), transparent 38%),
    linear-gradient(145deg, #67c16b 0 30%, #4c7ff0 30% 58%, #ffe079 58% 76%, #ef6257 76%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 14px 24px rgba(49, 87, 213, 0.18);
}

.brand h1 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.nav-tabs {
  display: flex;
  gap: 6px;
  align-items: stretch;
  min-width: 0;
  padding: 0 16px;
  overflow-x: auto;
}

.nav-tab {
  position: relative;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 750;
}

.nav-tab svg {
  width: 17px;
  height: 17px;
}

.nav-tab.is-active {
  color: var(--text);
}

.nav-tab.is-active::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--coral), var(--blue), var(--green), var(--amber));
  content: "";
}

.top-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 20px;
}

.mode-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.mode-switch span {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 750;
}

.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.segmented button,
.chip-button {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.segmented button {
  min-height: 34px;
  padding: 0 13px;
}

.segmented button.is-active,
.chip-button.is-active {
  border-color: rgba(49, 87, 213, 0.12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(135deg, var(--blue), var(--primary));
  color: #ffffff;
}

.ghost-button,
.primary-button,
.danger-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.primary-button {
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(49, 87, 213, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.25), transparent 44%),
    linear-gradient(135deg, var(--blue), var(--primary));
  color: #ffffff;
  box-shadow: 0 13px 22px rgba(49, 87, 213, 0.22);
}

.ghost-button {
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(230, 223, 238, 0.92);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-2);
}

.danger-button {
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #f7c8c1;
  background: var(--coral-soft);
  color: #b9342a;
}

.icon-button {
  width: 38px;
  padding: 0;
  border: 1px solid rgba(230, 223, 238, 0.92);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-2);
}

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

.primary-button svg,
.ghost-button svg,
.danger-button svg,
.icon-button svg {
  width: 17px;
  height: 17px;
}

.page {
  padding: 18px 18px calc(80px + env(safe-area-inset-bottom));
}

.region-launcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.region-launcher-copy {
  min-width: 0;
}

.region-kicker {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.region-kicker svg {
  width: 15px;
  height: 15px;
}

.region-launcher h2 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.2;
}

.region-launcher p {
  margin: 6px 0 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.region-launcher-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.location-pick-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  max-width: 360px;
  padding: 0 16px;
  border: 1px solid rgba(11, 120, 128, 0.22);
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  box-shadow: 0 12px 22px rgba(11, 120, 128, 0.18);
}

.location-pick-button svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.region-status,
.region-notice {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.region-status.is-ready {
  color: var(--green);
}

.region-status.is-pending {
  color: #b7791f;
}

.region-notice {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid #f7ddb0;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #8a5a07;
}

.seo-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(223, 244, 244, 0.78), rgba(255, 255, 255, 0.95) 46%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.seo-intro-copy {
  display: grid;
  align-content: center;
  min-width: 0;
}

.seo-intro h2 {
  max-width: 920px;
  margin: 7px 0 0;
  color: #0b1c2f;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.22;
}

.seo-intro p {
  max-width: 900px;
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.58;
}

.seo-keyword-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.seo-keyword {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 88px;
  padding: 13px;
  border: 1px solid rgba(11, 120, 128, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-2);
  text-align: left;
  box-shadow: 0 8px 18px rgba(22, 72, 82, 0.05);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.seo-keyword:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 120, 128, 0.36);
  background: #ffffff;
}

.seo-keyword strong {
  color: var(--primary);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
}

.seo-keyword span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.decision-tools {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.tools-page {
  display: grid;
  gap: 16px;
}

.tools-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(223, 244, 244, 0.82), rgba(255, 255, 255, 0.96) 52%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.tools-page-hero h2 {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 950;
  line-height: 1.22;
}

.tools-page-hero p {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.58;
}

.tools-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tools-link-row a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.tools-page .decision-tools {
  margin-bottom: 0;
}

.decision-tools .panel-head {
  margin: 0;
  padding: 0;
  border: 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tool-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(11, 120, 128, 0.15);
  border-radius: 8px;
  background: #fff;
}

.tool-card.wide {
  grid-column: 1 / -1;
}

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

.tool-head strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.25;
}

.tool-head span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

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

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

.tool-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.tool-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.tool-field select,
.unit-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.tool-field select {
  padding: 0 10px;
}

.unit-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
}

.unit-input input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: 0;
}

.unit-input em {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.tool-result {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.tool-result strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.3;
}

.tool-result p {
  margin: 6px 0 0;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.tool-result.good {
  border-color: rgba(44, 155, 100, 0.28);
  background: rgba(44, 155, 100, 0.08);
}

.tool-result.warning {
  border-color: rgba(183, 121, 31, 0.28);
  background: rgba(255, 248, 232, 0.95);
}

.tool-result.danger {
  border-color: rgba(232, 93, 79, 0.28);
  background: rgba(232, 93, 79, 0.08);
}

.score-grid,
.compare-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.score-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.score-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.score-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 950;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-action {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 900;
}

.mini-action:hover {
  border-color: rgba(11, 120, 128, 0.36);
  color: var(--primary);
}

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

.compare-column {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.compare-column h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
}

.compare-metrics {
  display: grid;
  gap: 6px;
  margin: 0;
}

.compare-metrics div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  font-size: 12px;
  font-weight: 850;
}

.compare-metrics dt {
  color: var(--muted);
}

.compare-metrics dd {
  margin: 0;
  color: var(--primary);
  text-align: right;
}

.mini-bars {
  display: grid;
  gap: 6px;
}

.mini-bars strong {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 950;
}

.mini-bars span,
.empty-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  margin: 0 4px 4px 0;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 850;
}

.mini-bars b {
  color: var(--primary);
  font-weight: 950;
}

.goal-hub {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.goal-copy {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

.goal-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.2;
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.goal-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 8px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fcfc);
  color: var(--text-2);
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.goal-card:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 120, 128, 0.28);
  box-shadow: var(--shadow-soft);
}

.goal-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 950;
}

.goal-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  word-break: keep-all;
}

.goal-card em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.map-layout {
  display: grid;
  grid-template-columns: 248px minmax(560px, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.finder-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.filter-panel,
.insight-panel,
.work-panel,
.list-panel,
.report-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.filter-panel,
.insight-panel {
  position: sticky;
  top: calc(var(--header) + 18px);
  max-height: calc(100dvh - var(--header) - 36px - env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.panel-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  color: #102033;
  font-size: 17px;
  font-weight: 850;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.filter-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.filter-section:last-child {
  border-bottom: 0;
}

.filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.filter-title strong {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 850;
}

.filter-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

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

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

.chip-grid .wide {
  grid-column: span 2;
}

.chip-button {
  min-height: 36px;
  padding: 0 8px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.2;
}

.chip-button.with-count {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.chip-button.with-count span {
  min-width: 0;
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: normal;
}

.chip-button.with-count em {
  flex: 0 0 auto;
  min-width: 22px;
  padding: 3px 5px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.chip-button.with-count.is-active em {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

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

.check-item {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
}

.check-item label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.check-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.check-item span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.select-row {
  display: grid;
  gap: 8px;
}

select,
input[type="number"],
input[type="text"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  outline: 0;
  padding: 0 11px;
}

select:focus,
input[type="number"]:focus,
input[type="text"]:focus {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px rgba(14, 146, 152, 0.12);
}

.range-control {
  display: grid;
  gap: 8px;
}

.range-control input {
  width: 100%;
  accent-color: var(--primary);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.filter-summary {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), var(--surface) 40%);
}

.filter-summary span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.filter-summary .ghost-button {
  flex: 0 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.badge.warning {
  background: var(--amber-soft);
  color: #a86100;
}

.badge.danger {
  background: var(--coral-soft);
  color: #bb3328;
}

.badge.green {
  background: var(--green-soft);
  color: #167648;
}

.badge.gray {
  background: var(--gray-soft);
  color: var(--muted);
}

.map-area {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.map-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.layer-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.layer-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
}

.layer-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.map-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.map-search-box {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  width: min(320px, 42vw);
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.map-search-box svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
}

.map-search-box input {
  min-height: 34px;
  padding: 0;
  border: 0;
  box-shadow: none;
  font-size: 12px;
}

.map-search-box input:focus {
  border: 0;
  box-shadow: none;
}

.map-shell {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(12, 104, 110, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(12, 104, 110, 0.04) 1px, transparent 1px),
    #eef5f2;
  background-size: 56px 56px;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.kakao-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 240ms ease;
}

.map-shell.is-kakao-ready .kakao-map {
  opacity: 0.92;
}

.map-shell.is-kakao-ready {
  background: #eef5f2;
}

.map-shell.is-kakao-ready .map-river,
.map-shell.is-kakao-ready .map-road {
  display: none;
}

.map-shell.is-kakao-ready .heat-region,
.map-shell.is-kakao-ready .district-label {
  display: none;
}

.kakao-map-error {
  position: absolute;
  z-index: 30;
  right: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  display: grid;
  max-width: min(420px, calc(100% - 32px));
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #f4b8a5;
  border-radius: 8px;
  background: rgba(255, 247, 242, 0.96);
  color: var(--text);
  box-shadow: 0 18px 40px rgba(91, 42, 17, 0.16);
}

.kakao-map-error[hidden] {
  display: none;
}

.kakao-map-error strong {
  color: #b42318;
  font-size: 14px;
  font-weight: 950;
}

.kakao-map-error span,
.kakao-map-error small {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.kakao-map-error code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  overflow-wrap: anywhere;
  border-radius: 5px;
  background: #fff;
  color: #8a2b12;
}

.kakao-dot {
  position: relative;
  z-index: 11;
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--dot);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(16, 32, 51, 0.24);
}

.kakao-dot.is-selected {
  min-width: 34px;
  height: 34px;
  border-width: 3px;
  font-size: 12px;
}

.kakao-school-dot {
  position: relative;
  z-index: 10;
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 7px;
  background: var(--dot);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(16, 32, 51, 0.22);
}

.kakao-school-dot.is-selected {
  min-width: 30px;
  height: 30px;
  border-width: 3px;
}

.kakao-detail-bubble {
  display: grid;
  gap: 3px;
  max-width: 220px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: rgba(17, 31, 47, 0.92);
  color: #fff;
  box-shadow: 0 12px 24px rgba(16, 32, 51, 0.24);
}

.kakao-detail-bubble strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kakao-detail-bubble span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 750;
}

.map-river {
  position: absolute;
  top: -8%;
  right: 18%;
  width: 72px;
  height: 118%;
  border-right: 4px solid rgba(47, 114, 201, 0.22);
  border-left: 14px solid rgba(47, 114, 201, 0.08);
  transform: rotate(-8deg);
}

.map-road {
  position: absolute;
  border-radius: 999px;
  background: rgba(246, 166, 47, 0.38);
}

.map-road.primary {
  top: 12%;
  left: -6%;
  width: 108%;
  height: 12px;
  transform: rotate(18deg);
}

.map-road.secondary {
  top: 54%;
  left: 3%;
  width: 93%;
  height: 9px;
  transform: rotate(-13deg);
  background: rgba(11, 120, 128, 0.18);
}

.map-road.third {
  top: 6%;
  left: 66%;
  width: 8px;
  height: 88%;
  background: rgba(246, 166, 47, 0.24);
  transform: rotate(5deg);
}

.district-label {
  position: absolute;
  z-index: 9;
  border: 0;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.68);
  color: #22334a;
  font-size: 14px;
  font-weight: 850;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.district-label.is-selected {
  color: #0b7880;
  box-shadow: 0 0 0 2px rgba(11, 120, 128, 0.18);
}

.heat-region {
  position: absolute;
  z-index: 2;
  width: var(--size);
  height: var(--size);
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(232, 93, 79, 0.48) 0 18%, rgba(246, 166, 47, 0.38) 35%, rgba(64, 172, 116, 0.22) 62%, rgba(64, 172, 116, 0) 72%),
    rgba(255, 255, 255, 0.01);
  transform: translate(-50%, -50%);
  opacity: var(--opacity);
}

.heat-region.is-selected {
  outline: 2px solid rgba(11, 120, 128, 0.34);
}

.map-empty-state {
  position: absolute;
  inset: 24px;
  z-index: 9;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(11, 120, 128, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-2);
  text-align: center;
  backdrop-filter: blur(10px);
}

.map-empty-state strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

.map-empty-state span {
  max-width: 440px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.academy-pin {
  position: absolute;
  z-index: 11;
  display: grid;
  place-items: center;
  width: 22px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--pin);
  transform: translate(-50%, -100%);
}

.academy-pin svg {
  width: 24px;
  height: 30px;
  filter: drop-shadow(0 4px 6px rgba(16, 32, 51, 0.18));
}

.academy-pin.is-selected svg {
  transform: scale(1.2);
  filter: drop-shadow(0 8px 14px rgba(16, 32, 51, 0.28));
}

.school-pin {
  position: absolute;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 7px;
  background: var(--pin);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 5px 12px rgba(16, 32, 51, 0.2);
  transform: translate(-50%, -50%);
}

.school-pin.is-selected {
  z-index: 12;
  width: 28px;
  height: 28px;
  outline: 3px solid rgba(11, 120, 128, 0.24);
}

.map-shell.is-kakao-ready .academy-pin,
.map-shell.is-kakao-ready .school-pin {
  display: none;
}

.map-popover {
  position: absolute;
  z-index: 12;
  top: var(--top);
  left: var(--left);
  width: 228px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(17, 31, 47, 0.92);
  color: #ffffff;
  box-shadow: 0 18px 32px rgba(10, 24, 38, 0.26);
  pointer-events: none;
}

.map-popover.has-detail {
  width: 282px;
}

.map-popover h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.map-popover p {
  margin: 4px 0 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.popover-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.popover-row strong {
  color: #ffffff;
  font-size: 13px;
}

.popover-button {
  width: 100%;
  min-height: 34px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  pointer-events: auto;
}

.popover-note,
.nearby-empty {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

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

.nearby-mini-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  pointer-events: auto;
}

.nearby-mini-row em {
  color: rgba(255, 255, 255, 0.74);
  font-style: normal;
}

.map-zoom {
  position: absolute;
  right: 14px;
  bottom: calc(98px + env(safe-area-inset-bottom));
  z-index: 10;
  display: grid;
  gap: 8px;
}

.map-zoom .icon-button {
  background: rgba(255, 255, 255, 0.92);
}

.map-legend {
  position: absolute;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 9;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.legend-item {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--dot);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 14px;
}

.workspace-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.quick-calc,
.compare-preview {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.module-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.module-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
}

.module-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.module-head .ghost-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.calc-metric {
  min-height: 94px;
  padding: 15px 14px;
  border-right: 1px solid var(--line);
}

.calc-metric:last-child {
  border-right: 0;
}

.calc-metric span,
.metric-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.calc-metric strong,
.metric-tile strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.05;
}

.calc-metric strong.accent {
  color: #e07800;
}

.ramp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px;
}

.ramp-cell {
  min-height: 72px;
  padding: 10px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.ramp-cell:last-child {
  border-right: 0;
}

.ramp-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ramp-cell strong {
  display: block;
  margin-top: 6px;
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
}

.fine-print {
  margin: 0;
  padding: 10px 14px 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.55;
}

.rent-hint {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 14px 16px 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.rent-hint strong,
.rent-hint span {
  display: block;
}

.rent-hint strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.rent-hint span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

tr.is-selected-row td {
  background: var(--primary-soft);
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

td {
  color: var(--text-2);
  font-weight: 700;
}

.rent-value {
  display: block;
  color: var(--text);
  font-weight: 900;
}

.profit-value {
  display: block;
  color: var(--teal);
  font-weight: 950;
  white-space: nowrap;
}

.profit-value.is-negative {
  color: #b54708;
}

.rent-basis {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.estimate-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fffaf0;
}

.tab-page > .estimate-notice {
  margin-bottom: 16px;
  border: 1px solid #efd39f;
  border-radius: var(--radius);
}

.estimate-notice strong {
  flex: 0 0 auto;
  color: #8a4d00;
  font-size: 13px;
  font-weight: 950;
}

.estimate-notice span {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

tbody tr:hover {
  background: #fbfdfd;
}

.status-text {
  color: var(--primary);
  font-weight: 900;
}

.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.insight-panel {
  overflow: hidden;
}

.insight-body {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.selected-title {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.selected-title h2 {
  margin: 0;
  color: #102033;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.15;
}

.selected-title small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.market-status {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #f2d5ad;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff8ec, #fffdf8);
}

.market-status.danger {
  border-color: #f7c8c1;
  background: linear-gradient(180deg, #fff2ef, #fffafa);
}

.market-status.green {
  border-color: #bfe8cf;
  background: linear-gradient(180deg, #effaf3, #fbfffc);
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-line strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.market-status p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.metric-tile {
  min-height: 92px;
  padding: 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.metric-tile:nth-child(2n) {
  border-right: 0;
}

.metric-tile:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.metric-tile strong {
  font-size: 22px;
}

.metric-tile small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.risk-list,
.plain-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-list li,
.plain-list li {
  position: relative;
  padding-left: 15px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.risk-list li::before,
.plain-list li::before {
  position: absolute;
  top: 0.66em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--primary);
  content: "";
}

.subject-distribution-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.insight-section.is-secondary {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.academy-switcher {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(11, 120, 128, 0.16);
  border-radius: var(--radius);
  background: #f8fcfb;
}

.academy-switcher-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}

.academy-detail {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.academy-detail > .primary-button {
  margin-bottom: env(safe-area-inset-bottom);
}

.academy-detail h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.academy-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.academy-info-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.academy-info-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  min-height: 38px;
  border-top: 1px solid var(--line);
}

.academy-info-row:first-child {
  border-top: 0;
}

.academy-info-row span,
.academy-info-row strong {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  line-height: 1.35;
}

.academy-info-row span {
  background: var(--gray-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.academy-info-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.detail-item {
  padding: 10px;
  border: 1px solid rgba(11, 120, 128, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.detail-item strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.source-detail {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--gray-soft);
}

.source-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.source-line.wide {
  display: grid;
  gap: 4px;
  justify-content: stretch;
}

.source-line span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.source-line strong {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
  text-align: right;
}

.source-line.wide strong {
  text-align: left;
}

.detail-disclaimer {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #efd39f;
  border-radius: var(--radius);
  background: #fffaf0;
  color: #76510d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.grade-fee-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(11, 120, 128, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.grade-fee-list {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
}

.grade-fee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.grade-fee-row strong,
.grade-fee-row span {
  display: block;
}

.grade-fee-row strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.grade-fee-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.grade-fee-row em {
  color: var(--primary);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.grade-fee-price {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 116px;
}

.grade-fee-price small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.school-nearby-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.nearby-school-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.nearby-school-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
}

.nearby-academy-list {
  display: grid;
  gap: 8px;
}

.nearby-academy-card {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 68px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.nearby-academy-card:hover {
  border-color: var(--line-strong);
  background: #fbfdfd;
}

.nearby-academy-card strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.nearby-academy-card span,
.nearby-academy-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}

.tab-page {
  display: grid;
  gap: 16px;
}

.hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-strip h2 {
  margin: 0;
  color: var(--text);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.2;
}

.hero-strip p {
  max-width: 820px;
  margin: 7px 0 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.compare-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.content-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.content-grid.three {
  grid-template-columns: 330px minmax(0, 1fr) 360px;
}

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

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

.field label {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 850;
}

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

.toggle-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 800;
}

.toggle-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.result-tile {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.result-tile.emphasis {
  border-color: rgba(246, 166, 47, 0.42);
  background: linear-gradient(180deg, #fff8eb, #ffffff);
}

.result-tile strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.result-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.result-tile p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.bar-chart {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 70px;
  gap: 12px;
  align-items: center;
}

.bar-label,
.bar-value {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 850;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--gray-soft);
}

.bar-fill {
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: var(--bar);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.scenario {
  min-height: 138px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.scenario strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.scenario em {
  display: block;
  margin-top: 8px;
  color: var(--primary);
  font-size: 21px;
  font-style: normal;
  font-weight: 950;
}

.scenario p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.explain-box {
  margin: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.explain-box h3,
.explain-box h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.explain-box p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.academy-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.result-more-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 16px;
}

.result-more-bar > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.result-more-bar .ghost-button {
  min-width: 132px;
}

.result-complete {
  color: var(--primary);
}

.academy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.academy-row:hover,
.academy-row.is-selected {
  border-color: rgba(11, 120, 128, 0.36);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.academy-row:hover {
  transform: translateY(-1px);
}

.academy-row.is-selected {
  background: linear-gradient(0deg, rgba(11, 120, 128, 0.05), rgba(11, 120, 128, 0.05)), var(--surface);
}

.academy-row h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.academy-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--gray-soft);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 800;
}

.mini-pill.warning {
  background: #fff4dd;
  color: #9a5b00;
}

.compare-empty {
  padding: 30px 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.empty-recovery {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
}

.empty-recovery strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.empty-recovery p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.empty-recovery div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checklist-grid {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.checklist-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.checklist-item svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: var(--primary);
  transform: translateY(1px);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.report-tile {
  display: grid;
  gap: 10px;
  min-height: 130px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.report-tile h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.report-tile strong {
  color: var(--primary);
  font-size: 24px;
  font-weight: 950;
}

.report-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.matrix {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.matrix-row {
  display: grid;
  grid-template-columns: 78px repeat(5, minmax(110px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.matrix-cell {
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.matrix-cell.head {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.matrix-cell strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.matrix-cell span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}


.source-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 80px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.source-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.source-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.issue-row td:first-child {
  font-weight: 900;
}

.app-footer {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 0 18px;
}

.footer-note {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.footer-note svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.footer-links button {
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-modal {
  display: grid;
  width: min(760px, 100%);
  max-height: min(86dvh, 900px);
  grid-template-rows: auto minmax(0, 1fr);
}

.legal-body {
  gap: 14px;
  max-height: calc(86dvh - 88px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 10px;
}

.legal-body p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

.legal-updated {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.legal-summary {
  padding: 12px 14px;
  border: 1px solid rgba(38, 160, 150, 0.18);
  border-radius: 8px;
  background: rgba(38, 160, 150, 0.08);
  color: var(--text-1);
  font-weight: 850;
}

.legal-section {
  display: grid;
  gap: 8px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(30, 48, 72, 0.1);
}

.legal-section h3 {
  margin: 0;
  color: var(--text-1);
  font-size: 15px;
  font-weight: 950;
}

.legal-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.legal-section li::marker {
  color: var(--primary);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 30, 44, 0.36);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(10, 24, 38, 0.24);
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.region-modal {
  width: min(760px, 100%);
}

.region-select-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.region-field {
  display: grid;
  gap: 7px;
}

.region-field span {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 850;
}

.region-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.region-field select:disabled {
  background: var(--gray-soft);
  color: var(--muted);
}

.region-current-box {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.region-current-box strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.region-current-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.price-option {
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.price-option h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.price-option strong {
  display: block;
  margin-top: 10px;
  color: var(--primary);
  font-size: 21px;
  font-weight: 950;
}

.price-option p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.42;
}

.mobile-filter-toggle {
  display: none;
}

/* Pastel 3D product theme */
.region-launcher,
.seo-intro,
.tools-page-hero,
.hero-strip {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 224, 0.78) 42%, rgba(232, 244, 255, 0.82)),
    var(--surface);
  box-shadow: var(--shadow);
}

.region-launcher::before,
.seo-intro::before,
.tools-page-hero::before,
.hero-strip::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(116deg, transparent 0 36%, rgba(49, 87, 213, 0.08) 36.2% 37%, transparent 37.2% 100%),
    linear-gradient(28deg, transparent 0 58%, rgba(18, 143, 145, 0.08) 58.2% 59%, transparent 59.2% 100%);
  content: "";
}

.region-launcher::after,
.seo-intro::after,
.tools-page-hero::after,
.hero-strip::after {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 0;
  width: 190px;
  height: 132px;
  opacity: 0.34;
  background:
    linear-gradient(145deg, #ff8177, #ef6257) 0 18px / 62px 62px no-repeat,
    linear-gradient(145deg, #b9e878, #67c16b) 74px 0 / 68px 68px no-repeat,
    linear-gradient(145deg, #86b6ff, #4c7ff0) 46px 62px / 78px 78px no-repeat,
    linear-gradient(145deg, #ffe783, #f3b331) 132px 56px / 58px 58px no-repeat;
  border-radius: var(--radius);
  filter: drop-shadow(0 16px 16px rgba(49, 46, 86, 0.16));
  transform: rotate(-5deg);
  content: "";
}

.region-launcher > *,
.seo-intro > *,
.tools-page-hero > *,
.hero-strip > * {
  position: relative;
  z-index: 1;
}

.seo-intro h2,
.tools-page-hero h2,
.hero-strip h2,
.region-launcher h2,
.selected-title h2,
.panel-head h2,
.panel-head h3,
.module-head h3 {
  color: var(--text);
}

.seo-keyword,
.tool-card,
.goal-card,
.filter-panel,
.insight-panel,
.work-panel,
.list-panel,
.report-panel,
.quick-calc,
.compare-preview,
.metric-tile,
.result-tile,
.scenario,
.report-tile,
.matrix-cell,
.price-option,
.academy-row,
.source-row,
.modal,
.region-current-box {
  border-color: rgba(230, 223, 238, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 253, 248, 0.86)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.filter-panel,
.insight-panel,
.work-panel,
.list-panel,
.report-panel,
.quick-calc,
.compare-preview {
  backdrop-filter: blur(12px);
}

.tool-card,
.goal-card,
.academy-row,
.result-tile,
.scenario,
.report-tile,
.price-option {
  position: relative;
  overflow: hidden;
}

.tool-card::before,
.goal-card::before,
.academy-row::before,
.result-tile::before,
.scenario::before,
.report-tile::before,
.price-option::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--green), var(--blue));
  opacity: 0.78;
  content: "";
}

.tool-head span,
.badge,
.nearby-school-meta span,
.mini-pill,
.chip-button.with-count em {
  background: var(--primary-soft);
  color: var(--primary);
}

.chip-button,
.layer-toggle,
.map-search-box,
select,
input[type="number"],
input[type="text"],
.unit-input,
.mini-action,
.tools-link-row a,
.grade-fee-row,
.nearby-academy-card {
  border-color: rgba(230, 223, 238, 0.92);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.chip-button:hover,
.mini-action:hover,
.tools-link-row a:hover,
.nearby-academy-card:hover {
  border-color: rgba(49, 87, 213, 0.28);
  background: #ffffff;
}

.chip-button.with-count span {
  color: var(--text-2);
}

.chip-button.with-count.is-active span {
  color: #ffffff;
}

.goal-index {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.32), transparent 42%),
    linear-gradient(135deg, var(--amber), var(--coral));
  color: #ffffff;
}

.filter-summary,
.panel-head,
.module-head {
  border-color: rgba(230, 223, 238, 0.82);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(10px);
}

.map-toolbar {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
}

.map-shell {
  border-color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(115deg, transparent 0 30%, rgba(239, 98, 87, 0.12) 30.2% 31.2%, transparent 31.4% 100%),
    linear-gradient(28deg, transparent 0 54%, rgba(49, 87, 213, 0.11) 54.2% 55.2%, transparent 55.4% 100%),
    linear-gradient(90deg, rgba(21, 28, 55, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(21, 28, 55, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, #fff7e1, #eaf5ff 50%, #edf9ee);
  background-size: auto, auto, 58px 58px, 58px 58px, auto;
  box-shadow: var(--shadow);
}

.map-shell.is-kakao-ready {
  background: #edf5ef;
}

.map-legend {
  border-color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(48, 42, 77, 0.12);
}

.kakao-dot,
.academy-pin svg,
.school-pin,
.kakao-school-dot {
  filter: drop-shadow(0 7px 12px rgba(21, 28, 55, 0.2));
}

.kakao-detail-bubble,
.map-popover {
  border-color: rgba(255, 255, 255, 0.3);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), transparent 36%),
    rgba(21, 28, 55, 0.93);
  box-shadow: 0 18px 34px rgba(21, 28, 55, 0.28);
}

.map-empty-state,
.academy-switcher,
.academy-detail,
.source-detail,
.grade-fee-panel,
.school-nearby-panel,
.rent-hint,
.explain-box,
.empty-recovery,
.market-status {
  border-color: rgba(230, 223, 238, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 251, 255, 0.82)),
    var(--surface-2);
  box-shadow: var(--shadow-soft);
}

.academy-info-row span,
.matrix-cell.head {
  background: linear-gradient(135deg, var(--primary-soft), #fff7e6);
  color: var(--text-2);
}

.detail-disclaimer,
.estimate-notice,
.tab-page > .estimate-notice {
  border-color: rgba(243, 179, 49, 0.34);
  background: linear-gradient(135deg, rgba(255, 245, 216, 0.98), rgba(255, 255, 255, 0.9));
}

tbody tr:hover {
  background: rgba(255, 246, 214, 0.38);
}

tr.is-selected-row td,
.academy-row.is-selected {
  background:
    linear-gradient(0deg, rgba(49, 87, 213, 0.08), rgba(49, 87, 213, 0.08)),
    var(--surface);
}

.academy-row:hover,
.academy-row.is-selected {
  border-color: rgba(49, 87, 213, 0.32);
  box-shadow: 0 16px 34px rgba(48, 42, 77, 0.12);
}

.bar-track {
  background: rgba(49, 87, 213, 0.08);
}

.bar-fill {
  background: linear-gradient(90deg, var(--blue), var(--green), var(--amber));
}

.result-tile.emphasis {
  border-color: rgba(243, 179, 49, 0.42);
  background: linear-gradient(180deg, rgba(255, 245, 216, 0.94), rgba(255, 255, 255, 0.92));
}

.market-status.danger {
  border-color: rgba(239, 98, 87, 0.28);
  background: linear-gradient(180deg, rgba(255, 240, 237, 0.96), rgba(255, 255, 255, 0.9));
}

.market-status.green {
  border-color: rgba(92, 175, 85, 0.26);
  background: linear-gradient(180deg, rgba(237, 250, 232, 0.96), rgba(255, 255, 255, 0.9));
}

.app-footer {
  color: var(--text-2);
}

.modal-backdrop {
  background:
    linear-gradient(135deg, rgba(21, 28, 55, 0.36), rgba(49, 87, 213, 0.16)),
    rgba(21, 28, 55, 0.28);
}

@media (max-width: 880px) {
  .region-launcher::after,
  .seo-intro::after,
  .tools-page-hero::after,
  .hero-strip::after {
    top: auto;
    right: -24px;
    bottom: -34px;
    width: 150px;
    height: 105px;
    opacity: 0.22;
  }
}

@media (max-width: 560px) {
  .seo-static::after {
    opacity: 0.18;
  }
}

@media (max-width: 1260px) {
  .topbar {
    grid-template-columns: 230px minmax(260px, 1fr);
  }

  .goal-hub {
    grid-template-columns: 1fr;
  }

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

  .top-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    border-top: 1px solid var(--line);
  }

  .map-layout,
  .finder-layout,
  .content-grid.three {
    grid-template-columns: 232px minmax(520px, 1fr);
  }

  .insight-panel,
  .finder-layout > .work-panel,
  .content-grid.three > .work-panel:last-child {
    grid-column: 1 / -1;
    position: static;
  }

  .workspace-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  :root {
    --header: 66px;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .brand {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-tabs {
    min-height: 58px;
  }

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

  .page {
    padding: 12px;
  }

  .estimate-notice {
    display: grid;
    gap: 5px;
  }

  .estimate-notice span {
    text-align: left;
  }

  .region-launcher {
    grid-template-columns: 1fr;
  }

  .seo-intro {
    grid-template-columns: 1fr;
  }

  .tools-page-hero {
    grid-template-columns: 1fr;
  }

  .tools-link-row {
    justify-content: flex-start;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

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

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

  .region-launcher-actions {
    justify-items: stretch;
  }

  .seo-keyword-grid {
    grid-template-columns: 1fr;
  }

  .location-pick-button {
    width: 100%;
    max-width: none;
  }

  .region-select-grid {
    grid-template-columns: 1fr;
  }

  .mobile-filter-toggle {
    display: inline-flex;
  }

  .map-layout,
  .finder-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    display: none;
  }

  .filter-panel.is-mobile-open {
    display: block;
  }

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

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

  .map-actions,
  .map-search-box {
    width: 100%;
  }

  .map-actions {
    flex-wrap: wrap;
  }

  .workspace-grid,
  .calc-grid,
  .result-grid,
  .scenario-grid,
  .report-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .calc-metric,
  .ramp-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .calc-metric:last-child,
  .ramp-cell:last-child {
    border-bottom: 0;
  }

  .hero-strip,
  .finder-layout,
  .compare-layout,
  .content-grid,
  .content-grid.three {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .rent-hint {
    align-items: stretch;
    flex-direction: column;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .matrix {
    overflow-x: auto;
  }

  .matrix-row {
    min-width: 760px;
  }
}

@media (max-width: 560px) {
  .brand h1 {
    font-size: 17px;
  }

  .goal-grid {
    grid-template-columns: 1fr;
  }

  .goal-card {
    min-height: 58px;
  }

  .selected-title h2,
  .hero-strip h2,
  .seo-intro h2 {
    font-size: 22px;
  }

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

  .tool-fields,
  .tool-fields.two,
  .compare-summary-grid {
    grid-template-columns: 1fr;
  }

  .metric-tile {
    border-right: 0;
  }

  .metric-tile:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .metric-tile:last-child {
    border-bottom: 0;
  }

  .source-row,
  .academy-row {
    grid-template-columns: 1fr;
  }

  .map-popover {
    right: 14px;
    left: 14px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
