:root {
  --navy-950: #050b15;
  --navy-900: #071426;
  --navy-850: #0a1b31;
  --navy-800: #10243f;
  --navy-700: #173354;
  --gold-300: #ffe89a;
  --gold-400: #f7d575;
  --gold-500: #f3c759;
  --gold-600: #d9a932;
  --cream: #fff9e9;
  --text: #edf3fb;
  --muted: #9fb0c6;
  --line: rgba(255, 232, 154, 0.14);
  --panel: rgba(12, 31, 54, 0.78);
  --sidebar-width: 272px;
  --content-gap: 16px;
  --theme-color: var(--gold-500);
}

* { box-sizing: border-box; }

html {
  background: var(--navy-950);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 78% -10%, rgba(31, 104, 171, 0.18), transparent 34rem),
    radial-gradient(circle at 18% 24%, rgba(243, 199, 89, 0.06), transparent 28rem),
    var(--navy-950);
  font-family: "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

::selection {
  color: var(--navy-950);
  background: var(--gold-400);
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  color: var(--navy-950);
  background: var(--gold-400);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.loading-shell {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
}

.loading-shell img {
  width: 108px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.loading-shell strong {
  color: var(--cream);
  font: 800 24px/1.2 "Outfit", sans-serif;
}

.app-nav {
  top: 18px;
  right: 32px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 11, 21, 0.76);
  backdrop-filter: blur(14px);
}

.app-nav a {
  margin: 0 5px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.app-nav a:hover { color: var(--gold-300); }

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 22px 18px 28px !important;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(16, 36, 63, 0.96), rgba(5, 11, 21, 0.98)),
    var(--navy-900);
  border-right: 1px solid var(--line);
  transform: translateX(0);
}

body.close .sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); }
body.close .content { left: 0; }

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 180px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0, rgba(243, 199, 89, 0.11), transparent 72%);
}

.sidebar .app-name {
  order: 1;
  position: relative;
  margin: 4px 0 18px;
  padding: 0 14px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar .app-name-link {
  color: var(--cream);
  font: 800 18px/1.2 "Outfit", sans-serif;
  letter-spacing: 0.02em;
}

.sidebar .app-name-link img {
  display: block;
  width: 92px;
  max-width: 92px;
  margin: 0 auto 10px;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.42));
}

.sidebar-nav > ul > li {
  margin: 18px 0;
}

.sidebar-nav > ul > li > strong {
  display: block;
  margin: 0 8px 7px;
  color: var(--gold-300);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.sidebar ul li a {
  display: block;
  margin: 2px 0;
  padding: 7px 10px;
  color: var(--muted);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.sidebar ul li a:hover,
.sidebar ul li.active > a {
  color: var(--cream);
  background: rgba(243, 199, 89, 0.10);
  transform: translateX(2px);
}

.sidebar ul li.active > a {
  box-shadow: inset 2px 0 var(--gold-500);
}

.search {
  order: 2;
  margin: 0 2px 18px !important;
  padding: 0 !important;
  border: 0 !important;
}

.search input {
  width: 100%;
  padding: 11px 13px !important;
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid var(--line) !important;
  border-radius: 11px !important;
}

.search input:focus {
  border-color: rgba(243, 199, 89, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(243, 199, 89, 0.08);
}

.search .matching-post {
  border-bottom-color: var(--line) !important;
}

.sidebar-nav {
  order: 3;
  flex: 0 0 auto;
}

.content {
  left: calc(var(--sidebar-width) + var(--content-gap));
  right: 0;
  padding-top: 76px;
}

.markdown-section {
  width: 100%;
  max-width: 1080px;
  margin: 0;
  padding: 40px 48px 80px;
  color: var(--text);
}

.markdown-section > main > h1:first-child,
.markdown-section > h1:first-child {
  margin-top: 0;
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
  color: var(--cream);
  font-family: "Outfit", "Noto Sans KR", sans-serif;
  letter-spacing: -0.025em;
}

.markdown-section h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.16;
}

.markdown-section h2 {
  margin-top: 2.8rem;
  padding-bottom: 10px;
  font-size: 1.65rem;
  border-bottom: 1px solid var(--line);
}

.markdown-section h3 {
  margin-top: 2rem;
  color: var(--gold-300);
  font-size: 1.18rem;
}

.markdown-section p,
.markdown-section li { color: #cdd8e6; }

.markdown-section a {
  color: var(--gold-400);
  font-weight: 700;
  text-decoration-color: rgba(243, 199, 89, 0.35);
  text-underline-offset: 3px;
}

.markdown-section hr {
  margin: 2.4rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.markdown-section blockquote {
  margin: 1.6rem 0;
  padding: 16px 18px;
  color: #d9e4f0;
  background: linear-gradient(90deg, rgba(243, 199, 89, 0.10), rgba(243, 199, 89, 0.025));
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-500);
  border-radius: 0 12px 12px 0;
}

.markdown-section blockquote p { margin: 0; }

.markdown-section code {
  padding: .18em .42em;
  color: var(--gold-300);
  background: rgba(243, 199, 89, 0.10);
  border: 1px solid rgba(243, 199, 89, 0.14);
  border-radius: 6px;
  font-family: Consolas, monospace;
}

.markdown-section pre {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #050c16 !important;
}

.markdown-section img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.35rem auto;
  border: 1px solid rgba(255, 232, 154, 0.18);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.markdown-section table {
  display: table;
  width: 100%;
  margin: 1.4rem 0;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.markdown-section th,
.markdown-section td {
  padding: 12px 14px;
  color: #d7e1ec;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.markdown-section th {
  color: var(--gold-300);
  background: rgba(243, 199, 89, 0.075);
}

.markdown-section tr:last-child td { border-bottom: 0; }
.markdown-section tr:nth-child(2n) { background: rgba(255, 255, 255, 0.018); }

.hero {
  position: relative;
  min-height: 510px;
  margin: 0 0 42px;
  padding: 64px 56px 52px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, .85fr);
  align-items: center;
  gap: 38px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(7, 20, 38, 0.98), rgba(12, 40, 67, 0.90)),
    var(--navy-900);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  top: -140px;
  border: 1px solid rgba(243, 199, 89, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(243, 199, 89, 0.035),
    0 0 0 94px rgba(243, 199, 89, 0.018);
}

.hero-copy,
.hero-mark { position: relative; z-index: 1; }

.hero-eyebrow {
  margin-bottom: 15px;
  color: var(--gold-400);
  font: 800 12px/1.2 "Outfit", sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: clamp(2.35rem, 6vw, 4.45rem);
}

.hero h1 span { color: var(--gold-400); }

.hero-lead {
  max-width: 610px;
  margin: 0 0 26px !important;
  color: #bdcbda !important;
  font-size: 1.05rem;
}

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

.hero-actions a,
.copy-address {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 11px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.hero-actions a:first-child {
  color: #071426;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 10px 28px rgba(243, 199, 89, 0.18);
}

.copy-address {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  font: 700 14px/1 "Noto Sans KR", sans-serif;
}

.copy-address:hover { border-color: rgba(243, 199, 89, 0.45); }

.hero-mark {
  display: grid;
  place-items: center;
}

.hero-mark img {
  width: min(100%, 340px);
  margin: 0;
  border: 0;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.45));
  box-shadow: none;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 42px;
}

.info-strip > div {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.info-strip small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.info-strip strong { color: var(--cream); }

.quick-grid,
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 1.2rem 0 2.5rem;
}

.quick-card,
.showcase-card {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 150px;
  padding: 20px;
  color: var(--text) !important;
  text-decoration: none !important;
  background: linear-gradient(145deg, rgba(16, 43, 73, .92), rgba(8, 23, 42, .92));
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform .2s ease, border-color .2s ease;
}

.quick-card:hover,
.showcase-card:hover {
  transform: translateY(-3px);
  border-color: rgba(243, 199, 89, 0.42);
}

.quick-card b {
  display: block;
  margin: 12px 0 5px;
  color: var(--cream);
  font-size: 1.05rem;
}

.quick-card span,
.showcase-card span {
  color: var(--muted);
  font-size: 13px;
}

.card-icon {
  color: var(--gold-400);
  font: 800 12px/1 "Outfit", sans-serif;
  letter-spacing: .1em;
}

.showcase-card {
  min-height: 250px;
  padding: 0;
}

.showcase-card img {
  width: 100%;
  height: 155px;
  margin: 0;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.showcase-card div { padding: 16px 18px 18px; }
.showcase-card b { display: block; margin-bottom: 4px; color: var(--cream); }

.step-list {
  display: grid;
  gap: 10px;
  counter-reset: steps;
  margin: 1.2rem 0 2.4rem;
}

.step-list > div {
  position: relative;
  padding: 16px 18px 16px 62px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.step-list > div::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  top: 14px;
  left: 17px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--navy-950);
  background: var(--gold-400);
  border-radius: 9px;
  font: 800 13px/1 "Outfit", sans-serif;
}

.step-list b { display: block; color: var(--cream); }
.step-list span { color: var(--muted); font-size: 14px; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 1.4rem 0 2rem;
}

.media-grid img {
  width: 100%;
  height: 240px;
  margin: 0;
  object-fit: cover;
}

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

.media-grid.compact img { height: 180px; }

.callout {
  margin: 1.4rem 0;
  padding: 16px 18px;
  background: rgba(69, 157, 219, 0.08);
  border: 1px solid rgba(90, 178, 237, 0.22);
  border-radius: 13px;
}

.callout strong { color: #a8d9fa; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 72px;
  padding-top: 22px;
  color: #72849a;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.pagination-item {
  border-top-color: var(--line) !important;
}

.sidebar-toggle {
  position: fixed;
  top: 18px;
  bottom: auto;
  left: calc(var(--sidebar-width) - 1px);
  width: 42px;
  height: 42px;
  padding: 13px;
  background: rgba(5, 11, 21, 0.85);
  border-radius: 0 12px 12px 0;
  transition: left .25s ease, background .2s ease;
}

.sidebar-toggle span { background-color: var(--gold-400); }
body.close .sidebar-toggle { left: 0; width: 42px; }

@media (min-width: 769px) {
  .sidebar-toggle { display: none; }
  body.close .sidebar { transform: none; }
  body.close .content { left: calc(var(--sidebar-width) + var(--content-gap)); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 34px;
  }

  .hero-mark {
    position: absolute;
    right: -40px;
    bottom: -50px;
    opacity: .16;
  }

  .hero-mark img { width: 300px; }
  .quick-grid, .showcase-grid { grid-template-columns: repeat(2, 1fr); }
  .info-strip { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app-nav { display: none; }
  .content { left: 0; padding-top: 20px; }
  .markdown-section { width: 100%; margin: 0; padding: 28px 20px 64px; }
  .hero { margin: -10px 0 32px; padding: 40px 24px; border-radius: 19px; }
  .quick-grid, .showcase-grid, .media-grid, .media-grid.compact { grid-template-columns: 1fr; }
  .media-grid img, .media-grid.compact img { height: auto; }
  .site-footer { flex-direction: column; }
  .sidebar {
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    transform: translateX(0);
  }
  body.close .sidebar { transform: translateX(var(--sidebar-width)); }
  body.close .content { left: 0; transform: none; }
  .sidebar-toggle,
  body.close .sidebar-toggle {
    top: 14px;
    left: 0;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 430px) {
  .hero h1 { font-size: 2.25rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions a, .copy-address { width: 100%; }
}

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