:root {
  --mt-bg: #fbf4f2;
  --mt-surface: #ffffff;
  --mt-primary: #8c2f23;
  --mt-primary-dark: #4c1812;
  --mt-accent: #d9a441;
  --mt-text: #382522;
  --mt-muted: #7b625b;
  --mt-border: rgba(76, 24, 18, 0.12);
  --mt-warm: #fff8e7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mt-bg);
  color: var(--mt-text);
  font-family: "Noto Sans KR", sans-serif;
  line-height: 1.75;
  overflow-wrap: break-word;
}
a { color: var(--mt-primary); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--mt-accent); outline-offset: 3px; }
h1, h2, h3, .lead { word-break: keep-all; }
h1, h2, h3 { color: var(--mt-primary-dark); line-height: 1.35; }
h2 { margin: 2.4rem 0 .9rem; font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 800; }

.mt-nav { background: linear-gradient(135deg, var(--mt-primary-dark), var(--mt-primary)); }
.mt-nav .navbar-brand { display: inline-flex; align-items: center; padding: 0; }
.mt-nav .navbar-brand img { display: block; width: 224px; height: auto; }
.mt-nav .nav-link { color: #fff; opacity: .84; border-radius: .5rem; padding-inline: .8rem !important; }
.mt-nav .nav-link.active, .mt-nav .nav-link:hover { color: #fff; opacity: 1; background: rgba(255,255,255,.1); }
.mt-nav .navbar-toggler { border-color: rgba(255,255,255,.45); }
.mt-nav .navbar-toggler-icon { filter: invert(1); }

.mt-hero {
  background: radial-gradient(circle at 80% 10%, rgba(217,164,65,.14), transparent 32%), linear-gradient(180deg, #f5e8e4 0%, var(--mt-bg) 100%);
  padding: 2.7rem 0 3.2rem;
}
.mt-hero h1 { max-width: 900px; margin: 0; font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 800; }
.mt-hero .lead { max-width: 820px; margin: 1rem 0 0; color: var(--mt-muted); }
.mt-kicker {
  display: inline-block;
  margin: .75rem 0 1rem;
  padding: .4rem .75rem;
  border-radius: 999px;
  background: rgba(140,47,35,.1);
  color: var(--mt-primary-dark);
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.mt-breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; gap: .45rem; margin: 0; padding: 0; color: var(--mt-muted); font-size: .9rem; }
.mt-breadcrumb li + li::before { content: "/"; margin-right: .45rem; color: #a08a84; }
.mt-breadcrumb a { color: var(--mt-muted); }

.mt-content {
  max-width: 980px;
  background: var(--mt-surface);
  border: 1px solid var(--mt-border);
  border-radius: 24px;
  padding: clamp(1.25rem, 4vw, 2.8rem);
  margin: -1rem auto 2rem;
  box-shadow: 0 18px 42px rgba(76,24,18,.07);
  overflow-x: clip;
}
.mt-content p, .mt-content li { max-width: 78ch; }
.mt-meta { color: var(--mt-muted); font-size: .9rem; border-bottom: 1px solid var(--mt-border); padding-bottom: 1rem; }
.mt-notice, .mt-callout { border-left: 4px solid var(--mt-accent); background: rgba(217,164,65,.1); padding: 1rem 1.2rem; border-radius: 12px; margin: 1.3rem 0 1.8rem; }
.mt-warning { border-left-color: #d28a00; background: var(--mt-warm); }

.mt-trust-grid, .mt-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin: 1.6rem 0 2rem; }
.mt-trust-item, .mt-card { background: linear-gradient(180deg,#fff,#fff9f7); border: 1px solid var(--mt-border); border-radius: 18px; padding: 1.25rem; }
.mt-trust-label { display: block; color: var(--mt-accent); font-size: .76rem; font-weight: 800; letter-spacing: .06em; margin-bottom: .35rem; text-transform: uppercase; }
.mt-trust-item strong { display: block; color: var(--mt-primary-dark); margin-bottom: .3rem; }
.mt-trust-item p, .mt-card p { color: var(--mt-muted); margin-bottom: .4rem; font-size: .94rem; }
.mt-card a, .mt-content a, .mt-footer a { font-weight: 700; text-decoration-thickness: .08em; text-underline-offset: .15em; }

.mt-table-wrap { overflow-x: auto; margin: 1.4rem 0 1.8rem; }
.mt-table { width: 100%; min-width: 620px; border-collapse: collapse; margin: 1.5rem 0 1.75rem; }
.mt-table th, .mt-table td { border: 1px solid var(--mt-border); padding: .85rem 1rem; vertical-align: top; text-align: left; }
.mt-table th { background: var(--mt-primary-dark); color: #fff; }
.mt-table tbody tr:nth-child(even) { background: #fff9f7; }

.mt-steps { list-style: none; counter-reset: steps; padding: 0; margin: 1.5rem 0; }
.mt-steps li { counter-increment: steps; position: relative; margin: 0 0 .9rem; padding: 1rem 1rem 1rem 3.8rem; background: #fff9f7; border: 1px solid var(--mt-border); border-radius: 14px; }
.mt-steps li::before { content: counter(steps); position: absolute; left: 1rem; top: 1rem; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--mt-primary); color: #fff; font-weight: 800; }
.mt-steps strong, .mt-steps span { display: block; }
.mt-steps span { color: var(--mt-muted); margin-top: .2rem; }

.mt-checklist { padding-left: 1.2rem; }
.mt-checklist li { margin-bottom: .6rem; }
.mt-faq details { border: 1px solid var(--mt-border); border-radius: 14px; padding: 1rem 1.1rem; background: #fffcfb; margin-bottom: .8rem; }
.mt-faq summary { cursor: pointer; font-weight: 800; color: var(--mt-primary-dark); }
.mt-faq details p { margin: .75rem 0 0; }

.mt-figure { margin: 1.6rem 0 2rem; border: 1px solid var(--mt-border); border-radius: 16px; overflow: hidden; background: #fff9f7; max-width: 100%; width: 100%; min-width: 0; }
.mt-figure img { display: block; width: 100%; max-width: 100%; height: auto; max-height: 620px; object-fit: contain; object-position: top center; background: #fff; }
.mt-figure figcaption { padding: .85rem 1rem; font-size: .88rem; color: var(--mt-muted); border-top: 1px solid var(--mt-border); line-height: 1.6; }
.mt-figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.6rem 0 2rem; max-width: 100%; min-width: 0; }
.mt-figure-grid .mt-figure { margin: 0; }

.mt-sources { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--mt-border); }
.mt-sources h2 { margin-top: 0; }
.mt-sources p, .mt-sources li { font-size: .92rem; color: var(--mt-muted); }
.mt-sources li { margin-bottom: .55rem; }

.mt-guide-index { max-width: 980px; margin: 0 auto 3rem; padding: 1.4rem; background: #f5e8e4; border-radius: 20px; border: 1px solid var(--mt-border); }
.mt-guide-index h2 { margin: 0 0 1rem; font-size: 1.25rem; }
.mt-link-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .6rem; }
.mt-link-grid a { display: grid; place-items: center; min-height: 52px; padding: .6rem; background: #fff; border: 1px solid var(--mt-border); border-radius: 10px; color: var(--mt-primary-dark); font-weight: 700; text-decoration: none; text-align: center; }
.mt-link-grid a:hover, .mt-link-grid a[aria-current="page"] { border-color: var(--mt-primary); background: #fbf4f2; color: var(--mt-primary); }

.mt-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.5rem 0; }
.mt-button { display: inline-block; padding: .75rem 1rem; border-radius: 10px; background: var(--mt-primary); color: #fff !important; text-decoration: none; }
.mt-button-secondary { background: #f5e8e4; color: var(--mt-primary-dark) !important; border: 1px solid var(--mt-border); }

.mt-footer { background: var(--mt-primary-dark); color: #ecd8d4; padding: 2.8rem 0 1.6rem; }
.mt-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.mt-footer strong { color: #fff; }
.mt-footer-brand { display: inline-block; margin-bottom: .65rem; }
.mt-footer-brand img { display: block; width: 224px; max-width: 100%; height: auto; }
.mt-footer p { margin: .5rem 0; }
.mt-footer ul { list-style: none; margin: .5rem 0 0; padding: 0; }
.mt-footer li { margin-bottom: .35rem; }
.mt-footer a { color: #e8c8c0; }
.mt-disclaimer { border-top: 1px solid rgba(255,255,255,.16); margin-top: 1.8rem !important; padding-top: 1rem; font-size: .86rem; color: #c0a098; }

@media (max-width: 991px) {
  .mt-link-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mt-footer-grid { grid-template-columns: 1fr 1fr; }
  .mt-footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .mt-nav .navbar-brand img, .mt-footer-brand img { width: 196px; }
  .mt-trust-grid, .mt-card-grid, .mt-figure-grid { grid-template-columns: 1fr; }
  .mt-hero { padding: 2.2rem 0 2.4rem; }
  .mt-content { padding: 1.2rem; border-radius: 18px; }
  .mt-table { display: block; overflow-x: auto; white-space: nowrap; min-width: 0; }
}
