:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --primary: #1f4ea3;
  --primary-dark: #183d80;
  --text: #1b2b3d;
  --subtext: #556b86;
  --border: #d6e0ee;
  --chip: #e8effa;
  --shadow: 0 10px 24px rgba(17, 41, 75, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --success-bg: #e9f8ef;
  --success-text: #1c7a44;
  --warning-bg: #fff1f1;
  --warning-text: #b33939;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: linear-gradient(180deg, #f7f9fd 0%, #f3f7fc 50%, #f7f9fd 100%);
}

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

img {
  max-width: 100%;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.section {
  padding: 3.8rem 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 10px 10px;
  z-index: 300;
}

.skip-link:focus {
  left: 1rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(8px);
  background: rgba(248, 251, 255, 0.94);
  border-bottom: 1px solid rgba(31, 78, 163, 0.14);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
}

.logo-icon {
  flex-shrink: 0;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.2rem;
  font-weight: 600;
  font-size: 0.96rem;
  color: #29405f;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--primary);
  border-color: rgba(31, 78, 163, 0.48);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 99px;
  background: #1b355b;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.page-hero {
  padding: 2.5rem 0 1.2rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #557194;
}

.breadcrumb a {
  color: #42658f;
  font-weight: 600;
}

.breadcrumb .sep {
  color: #8098b7;
}

.page-title {
  margin: 0.9rem 0 0;
  font-size: clamp(1.8rem, 3.8vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #132745;
}

.page-description {
  max-width: 860px;
  margin: 0.9rem 0 0;
  color: var(--subtext);
}

.budget-subcopy {
  margin-top: 0.45rem;
  font-weight: 700;
  color: #2d4f78;
}

.meta-inline {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  font-size: 0.92rem;
  color: #587397;
}

.ad-wrap {
  padding: 0.5rem 0;
}

.ad-placeholder {
  min-height: 92px;
  border-radius: 14px;
  border: 1px dashed #9ab2cf;
  background: rgba(224, 234, 247, 0.5);
  color: #4d688c;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.content-section {
  padding: 1.6rem 0 2.3rem;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.2rem;
  align-items: start;
}

.content-main,
.content-sidebar {
  min-width: 0;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.content-card + .content-card {
  margin-top: 1rem;
}

.content-card h2,
.content-card h3 {
  margin-top: 0;
  color: #173050;
}

.card-text {
  color: var(--subtext);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.form-group {
  display: grid;
  gap: 0.4rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 700;
  color: #284467;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 0.85rem;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
}

.form-group textarea {
  min-height: 120px;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid rgba(31, 78, 163, 0.26);
  border-color: var(--primary);
}

.input-hint {
  margin: 0;
  font-size: 0.85rem;
  color: #7089a7;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  min-height: 44px;
  padding: 0.2rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #214e9f 0%, #1a3f81 100%);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: #2c4a70;
  border-color: #bdd0e8;
}

.form-message {
  margin: 0.8rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #2d5688;
}

.form-message.error {
  color: #b33a3a;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.result-card {
  border-radius: 12px;
  border: 1px solid #d5e0ee;
  background: #f9fbff;
  padding: 0.9rem;
}

.result-card .label {
  display: block;
  font-size: 0.85rem;
  color: #5d7697;
}

.result-card .value {
  margin-top: 0.4rem;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #13294a;
  word-break: keep-all;
}

.result-note {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: #58749a;
}

.status-card {
  border-radius: 12px;
  padding: 0.85rem;
  margin-top: 0.85rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-card.neutral {
  background: #edf3fb;
  color: #2c4f7b;
  border-color: #d4e1f2;
}

.status-card.positive {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #b6e5c8;
}

.status-card.negative {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-color: #f1c0c0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.info-box {
  border: 1px solid #d5e1ef;
  border-radius: 12px;
  padding: 0.85rem;
  background: #fff;
}

.info-box h3 {
  margin: 0;
  font-size: 1rem;
}

.info-box p {
  margin: 0.45rem 0 0;
  color: var(--subtext);
  font-size: 0.92rem;
}

.notice-box {
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: #eef4ff;
  border: 1px solid #cddcf3;
  color: #2b4f7c;
  font-size: 0.92rem;
}

.notice-box.warning {
  background: #fff6ee;
  border-color: #f2d2b1;
  color: #8a4d1f;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.breakdown-table th,
.breakdown-table td {
  border-bottom: 1px solid #dce6f1;
  text-align: left;
  padding: 0.7rem 0.5rem;
}

.breakdown-table th {
  font-size: 0.88rem;
  color: #48668d;
  background: #f3f7fd;
}

.breakdown-table td:last-child,
.breakdown-table th:last-child {
  text-align: right;
}

.summary-highlight {
  margin-top: 0.9rem;
  border: 1px solid #c9d9f0;
  background: linear-gradient(135deg, #eef4ff 0%, #f7faff 100%);
  border-radius: 14px;
  padding: 1rem;
}

.summary-highlight .title {
  margin: 0;
  font-size: 0.92rem;
  color: #456a97;
}

.summary-highlight .big {
  margin: 0.35rem 0 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #143059;
}

.scenario-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.scenario-chip {
  border: 1px solid #c5d6ec;
  background: #f4f8ff;
  color: #2f537d;
  border-radius: 999px;
  min-height: 38px;
  padding: 0.2rem 0.9rem;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.scenario-chip:hover,
.scenario-chip:focus-visible {
  background: #e9f1fe;
  border-color: #a6bfdf;
  transform: translateY(-1px);
}

.summary-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

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

.summary-card {
  border: 1px solid #d5e2f1;
  background: #f9fbff;
  border-radius: 12px;
  padding: 0.85rem;
}

.summary-card .label {
  display: block;
  font-size: 0.84rem;
  color: #5f7898;
}

.summary-card .value {
  display: block;
  margin-top: 0.4rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 800;
  color: #173153;
}

.summary-card .value.emphasis {
  color: #1e4c98;
}

.summary-card .value.is-success {
  color: #1c7a44;
}

.summary-card .value.is-warning {
  color: #8b5a12;
}

.summary-card .value.is-danger {
  color: #b33939;
}

.plan-tabs {
  margin-top: 1rem;
  display: inline-flex;
  background: #eef4ff;
  border: 1px solid #d2e0f4;
  border-radius: 12px;
  padding: 0.2rem;
  gap: 0.2rem;
}

.plan-tab {
  border: 0;
  background: transparent;
  color: #355a85;
  min-height: 38px;
  padding: 0 0.9rem;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.plan-tab.active {
  background: #fff;
  color: #214e9f;
  box-shadow: 0 1px 3px rgba(20, 44, 76, 0.08);
}

.plan-tab:hover,
.plan-tab:focus-visible {
  background: rgba(255, 255, 255, 0.76);
}

.plan-compare-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.recommend-plan-card {
  border: 1px solid #d5e2f1;
  border-radius: 12px;
  background: #fff;
  padding: 0.9rem;
}

.recommend-plan-card.active {
  border-color: #6f98d1;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  box-shadow: 0 8px 18px rgba(24, 63, 128, 0.08);
}

.plan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.plan-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.plan-desc {
  margin: 0.55rem 0 0;
  color: var(--subtext);
  font-size: 0.9rem;
}

.plan-metrics {
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.plan-metrics div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.plan-metrics dt {
  margin: 0;
  color: #5f7898;
  font-size: 0.82rem;
  font-weight: 600;
}

.plan-metrics dd {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: #193354;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid #d4e1f2;
  background: #eef3fb;
  color: #3b577d;
}

.status-badge.is-success {
  border-color: #b6e4c8;
  background: #e9f8ef;
  color: #1c7a44;
}

.status-badge.is-warning {
  border-color: #ecd3aa;
  background: #fff6e7;
  color: #8b5a12;
}

.status-badge.is-danger {
  border-color: #f0c2c2;
  background: #fff1f1;
  color: #b33939;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.chart-card {
  border: 1px solid #d7e3f2;
  border-radius: 12px;
  background: #fbfdff;
  padding: 0.85rem;
}

.chart-card h3 {
  margin: 0 0 0.6rem;
  font-size: 0.98rem;
}

.chart-canvas {
  width: 100%;
  height: 300px;
  display: block;
}

.chart-legend {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.8rem;
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: #365377;
}

.chart-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
}

.chart-legend .dot.food {
  background: #3b82f6;
}

.chart-legend .dot.living {
  background: #14b8a6;
}

.chart-legend .dot.saving {
  background: #4f46e5;
}

.chart-legend .dot.investment {
  background: #8b5cf6;
}

.chart-legend .dot.emergency {
  background: #f59e0b;
}

.chart-legend .dot.flex {
  background: #64748b;
}

.advice-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #355174;
  display: grid;
  gap: 0.45rem;
}

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

.allocation-visual {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.ratio-chart {
  --chart-gradient: conic-gradient(#3b82f6 0 25%, #14b8a6 25% 50%, #f59e0b 50% 75%, #4f46e5 75% 100%);
  width: min(260px, 70vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--chart-gradient);
  border: 1px solid #d6e1f0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  display: grid;
  place-items: center;
  position: relative;
}

.ratio-chart::before {
  content: "";
  position: absolute;
  width: 56%;
  height: 56%;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #dbe6f4;
}

.ratio-chart span {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.95rem;
  color: #244066;
  font-weight: 800;
  line-height: 1.4;
  padding: 0 0.5rem;
}

.ratio-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.ratio-legend li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: #345376;
}

.ratio-legend .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: 0 0 11px;
}

.ratio-legend .dot.food {
  background: #3b82f6;
}

.ratio-legend .dot.living {
  background: #14b8a6;
}

.ratio-legend .dot.emergency {
  background: #f59e0b;
}

.ratio-legend .dot.saving {
  background: #4f46e5;
}

.rent-compare-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-top: 0.9rem;
}

.rent-input-panel {
  border: 1px solid #d5e1ef;
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
}

.rent-input-group + .rent-input-group {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dbe5f3;
}

.rent-input-group h3 {
  margin: 0 0 0.65rem;
  font-size: 1.45rem;
  color: #112742;
}

.rent-output-panel {
  border: 1px solid #d5e1ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
  padding: 1rem;
}

.rent-output-panel h3 {
  margin: 0;
  font-size: 1.45rem;
}

.rent-output-panel h4 {
  margin: 1.2rem 0 0.55rem;
  font-size: 1.35rem;
  color: #1c3559;
}

.rent-decision-title {
  margin: 0.75rem 0 0;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 800;
  color: #112742;
  line-height: 1.3;
}

.rent-decision-sub {
  margin: 0.4rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: #1a3457;
  font-weight: 800;
  line-height: 1.45;
}

.rent-decision-sub strong {
  color: #5247e4;
}

.rent-compare-table th[scope="rowgroup"] {
  width: 84px;
  color: #1a3457;
  font-weight: 800;
  vertical-align: middle;
}

.rent-compare-table td:last-child {
  font-weight: 800;
  color: #122945;
}

.rent-diff-row th {
  background: #f3f7fd;
  color: #304f78;
}

.rent-diff-row td:last-child {
  color: #204a95;
}

.scenario-grid,
.card-grid,
.related-grid {
  display: grid;
  gap: 0.8rem;
}

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

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

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

.mini-card {
  border: 1px solid #d5e1ee;
  border-radius: 12px;
  padding: 0.9rem;
  background: #fff;
}

.mini-card h3 {
  margin: 0;
  font-size: 1rem;
}

.mini-card p {
  margin: 0.5rem 0 0;
  color: var(--subtext);
  font-size: 0.92rem;
}

.text-link,
.mini-card a {
  display: inline-flex;
  margin-top: 0.65rem;
  color: var(--primary);
  font-weight: 700;
}

.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.sidebar-card + .sidebar-card {
  margin-top: 0.8rem;
}

.sidebar-card h2,
.sidebar-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.02rem;
  color: #1d365a;
}

.sidebar-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.sidebar-list a {
  font-weight: 600;
  color: #365882;
}

.sidebar-list a:hover,
.sidebar-list a:focus-visible {
  color: var(--primary);
}

.faq-section {
  padding: 2.8rem 0;
}

.section-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.7vw, 1.95rem);
  color: #173050;
}

.section-desc {
  margin: 0.55rem 0 0;
  color: var(--subtext);
}

.faq-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.faq-item h3 {
  margin: 0;
}

.faq-question {
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 0.95rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1f385a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  color: #3e6392;
}

.faq-question[aria-expanded="true"]::after {
  content: "−";
}

.faq-answer {
  padding: 0 1rem 1rem;
  color: var(--subtext);
}

.related-section {
  padding: 2.8rem 0;
}

.related-card {
  border: 1px solid #d5e2f0;
  border-radius: 12px;
  background: #fff;
  padding: 0.95rem;
}

.related-card h3 {
  margin: 0;
  font-size: 1rem;
}

.related-card p {
  margin: 0.5rem 0 0;
  color: var(--subtext);
  font-size: 0.92rem;
}

.related-card a {
  display: inline-flex;
  margin-top: 0.65rem;
  color: var(--primary);
  font-weight: 700;
}

.guide-summary {
  border: 1px solid #cfdbed;
  background: #f3f8ff;
  border-radius: 12px;
  padding: 1rem;
}

.guide-summary h2 {
  margin-top: 0;
}

.guide-summary p,
.guide-content p,
.guide-content li {
  color: #344f70;
}

/* 가이드 목록 페이지 */
.guide-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.guide-list-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.guide-list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(17, 41, 75, 0.1);
  border-color: rgba(31, 78, 163, 0.3);
}

.guide-list-card .card-tag {
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--chip);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.6rem;
}

.guide-list-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  color: var(--text);
  line-height: 1.4;
}

.guide-list-card p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--subtext);
  line-height: 1.65;
  flex: 1;
}

.guide-list-card .card-meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: #8aa0ba;
}

.guide-list-card .read-more {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

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

.toc-box {
  border: 1px solid #d3dfef;
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
  margin-top: 1rem;
}

.toc-box h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.toc-box ol {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.35rem;
}

.toc-box a {
  color: #305780;
  font-weight: 600;
}

.guide-content {
  margin-top: 1rem;
}

.guide-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  font-size: 1.35rem;
  color: #163050;
}

.guide-content h3 {
  margin-top: 1.3rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.guide-content ul,
.guide-content ol {
  padding-left: 1.2rem;
}

.cta-box {
  margin-top: 1.2rem;
  border: 1px solid #bed0eb;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #f9fbff 100%);
  padding: 1rem;
}

.cta-box p {
  margin: 0;
  color: #355780;
}

.cta-box a {
  display: inline-flex;
  margin-top: 0.7rem;
}

.site-footer {
  margin-top: 2rem;
  background: #10223b;
  color: #d8e4f6;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.8rem 0 1.2rem;
}

.footer-about {
  max-width: 640px;
}

.footer-about strong {
  color: #fff;
}

.footer-about p {
  margin: 0.65rem 0 0;
  color: #bbcee8;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-content: flex-start;
}

.footer-links a {
  color: #d9e7fb;
  font-weight: 600;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
}

.copyright {
  margin: 0;
  padding: 0.95rem 0 1.2rem;
  text-align: center;
  color: #abc2df;
  font-size: 0.91rem;
  border-top: 1px solid rgba(194, 213, 240, 0.25);
}

@media (max-width: 1080px) {
  .content-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc-box {
    position: static;
  }

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

@media (max-width: 900px) {
  .header-inner {
    position: relative;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    width: min(330px, 92vw);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #fff;
    padding: 0.8rem;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .site-nav a {
    width: 100%;
    border-bottom: 0;
    border-radius: 8px;
    padding: 0.55rem 0.5rem;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background: #edf3fc;
  }

  .form-grid,
  .result-grid,
  .scenario-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .summary-card-grid,
  .summary-card-grid.compact,
  .plan-compare-grid,
  .chart-grid,
  .chart-legend,
  .rent-compare-layout,
  .info-grid.two-col {
    grid-template-columns: 1fr;
  }

  .allocation-visual {
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: start;
  }

  .ratio-legend {
    width: 100%;
  }
}

/* ── Share section ─────────────────────────────── */
.share-card {
  border-color: #d4e4f7;
  background: linear-gradient(135deg, #f5f9ff 0%, #fff 100%);
}

.share-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.share-label {
  margin: 0;
  font-size: 0.92rem;
  color: #4a6585;
  font-weight: 600;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.25rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-share:hover,
.btn-share:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
}

.btn-kakao {
  background: #fee500;
  color: #191919;
  border-color: #f0d900;
}

.btn-copy-url {
  background: #fff;
  color: #2c4a70;
  border-color: #bdd0e8;
}

.share-toast {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.share-toast.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #b6e5c8;
}

.share-toast.error {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid #f1c0c0;
}

@media (max-width: 760px) {
  .section {
    padding: 3.1rem 0;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .btn-share {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
