:root {
  --bg: #fbf7e8;
  --paper: #fffdf7;
  --ink: #272c36;
  --muted: #687386;
  --line: #eadfbd;
  --gold: #ffb900;
  --gold-dark: #d58a00;
  --blue: #eaf8ff;
  --green: #f1fbf4;
  --shadow: 0 18px 45px rgba(92, 68, 22, .12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, var(--blue) 0, transparent 34rem), linear-gradient(180deg, #fffdf6, var(--bg));
  color: var(--ink);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}
a { color: inherit; }
.layout { display: grid; grid-template-columns: 286px minmax(0, 1fr); min-height: 100vh; }
.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 247, .9);
  backdrop-filter: blur(12px);
  overflow: auto;
}
.brand { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; text-decoration: none; margin-bottom: 24px; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #ffc400, #ff9f00); color: white; font-size: 24px; font-weight: 900; box-shadow: var(--shadow); }
.brand b { display: block; font-size: 19px; }
.brand small { display: block; color: var(--muted); margin-top: 2px; font-size: 12px; white-space: nowrap; }
.side-links { display: grid; gap: 5px; }
.nav-label { margin: 18px 0 5px; color: #8a7a53; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.side-links a { text-decoration: none; padding: 10px 12px; border-radius: 10px; color: #5d6678; font-weight: 800; font-size: 14px; }
.side-links a:hover, .side-links a.active { background: #fff2bd; color: #2f2d24; }
.side-note { margin-top: 24px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.page { max-width: 1140px; min-width: 0; width: 100%; margin: 0 auto; padding: 54px 34px 90px; }
.page-header { margin-bottom: 28px; }
.crumb { color: var(--muted); font-size: 13px; }
h1 { font-size: 38px; line-height: 1.18; margin: 8px 0 10px; }
h2 { font-size: 26px; margin: 42px 0 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
h3 { font-size: 20px; margin: 28px 0 10px; }
p, li, td, th { font-size: 16px; line-height: 1.72; }
code { background: #fff2bd; border: 1px solid #f1d77b; border-radius: 5px; padding: 1px 6px; font-family: Consolas, monospace; }
.callout { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start; border: 1px solid var(--line); background: rgba(255,255,255,.78); border-radius: 12px; padding: 16px 18px; margin: 16px 0; box-shadow: 0 8px 22px rgba(92, 68, 22, .06); }
.callout-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: white; font-weight: 900; }
.callout.warn { background: #fff7e1; border-color: #f3cf71; }
.callout.secure { background: var(--green); border-color: #bbe7c6; }
.relation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.relation-card { display: grid; grid-template-columns: 32px 1fr; gap: 10px; text-decoration: none; padding: 14px; border-radius: 12px; background: white; border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(92, 68, 22, .06); }
.relation-card:hover { transform: translateY(-1px); border-color: #f0c544; }
.relation-card .num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff2bd; color: #6d5200; font-weight: 900; }
.relation-card strong { display: block; font-size: 15px; }
.relation-card em { display: block; grid-column: 2; color: var(--muted); font-style: normal; font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; margin: 12px 0 22px; }
th, td { border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
th { background: #fff2bd; text-align: left; }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 30px; margin: 6px 0; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: white; display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: step; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px 13px 54px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: white; display: grid; place-items: center; font-weight: 900; }
.guide-figure { margin: 18px 0 34px; }
.guide-figure img { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); cursor: zoom-in; display: block; }
.guide-figure img[src*="v3-login-modal"], .guide-figure img[src*="v3-signup-modal"] { max-width: 680px; margin: 0 auto; }
.guide-figure figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }
.guide-figure figcaption small { float: right; color: #8a7a53; }
.image-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.image-legend li { display: inline-flex; align-items: center; gap: 7px; background: #fff7dc; border: 1px solid #efcf74; border-radius: 999px; padding: 5px 10px; font-size: 13px; line-height: 1.35; }
.image-legend span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: white; font-weight: 900; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 10px 24px rgba(92, 68, 22, .06); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 44px; }
.pager a { text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font-weight: 800; }
.lightbox { position: fixed; inset: 0; background: rgba(20, 24, 33, .82); display: grid; place-items: center; z-index: 10; padding: 30px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1200px, 94vw); max-height: 88vh; border-radius: 12px; background: white; }
.lightbox button { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: white; font-size: 28px; cursor: pointer; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side-nav { position: static; height: auto; padding: 18px; overflow: hidden; }
  .brand { grid-template-columns: 38px 1fr; margin-bottom: 12px; }
  .brand-mark { width: 38px; height: 38px; font-size: 20px; }
  .side-links { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
  .nav-label { display: none; }
  .side-links a { white-space: nowrap; padding: 8px 12px; font-size: 14px; }
  .side-note { display: none; }
  .page { padding: 30px 18px 70px; }
  .relation-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
}
