:root {
  --bg: #eef0f4;
  --paper: #fff;
  --ink: #111;
  --muted: #6e7378;
  --line: #ddddda;
  --accent: #b7ff00;
  --article-media-width: 620px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.article-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.brand-logo {
  width: 33px;
  height: 30px;
  color: #111;
  display: block;
}

.back-link {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.back-link:hover { color: var(--ink); }

.post-list-menu {
  position: relative;
}

.post-list-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 30;
  width: min(360px, calc(100vw - 36px));
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
}

.post-list-panel[hidden] {
  display: none;
}

.post-list-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 13px 12px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid #ededed;
}

.post-list-item:last-child {
  border-bottom: 0;
}

.post-list-item:hover,
.post-list-item.is-active {
  background: #f5f5f0;
}

.post-list-item__number {
  color: #8bbf00;
  font-weight: 900;
  line-height: 1.45;
}

.post-list-item__title {
  min-width: 0;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.45;
  word-break: keep-all;
}

.article-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 0 18px;
}

.article-card {
  width: min(100%, 860px);
  margin: 0 auto;
  min-height: calc(100vh - 68px);
  padding: clamp(50px, 5vw, 70px) clamp(42px, 6vw, 76px) 0;
  background: var(--paper);
  border-right: 1px solid #deded8;
  border-left: 1px solid #deded8;
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.04);
}

.article-kicker {
  max-width: 100%;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
  text-align: center;
}

h1 {
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(2.08rem, 3.15vw, 2.62rem);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-align: left;
  word-break: keep-all;
}

.article-meta {
  display: flex;
  align-items: center;
  max-width: 100%;
  margin: 30px auto 36px;
  gap: 13px;
  color: #4b4f54;
  font-size: 1.02rem;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e0dc;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author {
  color: var(--ink);
  font-weight: 700;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b8b8b8;
}

.article-card > hr {
  max-width: 100%;
  margin: 0 auto 42px;
  border: 0;
  border-top: 1px solid #bdbdb8;
}

.article-body {
  width: 100%;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.8;
  word-break: keep-all;
}

.article-body .se-text-paragraph {
  margin: 0 0 16px;
}

.article-body .se-text-paragraph-align-center {
  text-align: center;
}

.article-body .se-text-paragraph-align-left {
  text-align: left;
}

.article-body .se-text-paragraph-align-right {
  text-align: right;
}

.loading {
  padding: 80px 0;
  color: var(--muted);
  text-align: center;
}

.naver-post .article-cover {
  width: min(100%, var(--article-media-width));
  max-width: var(--article-media-width);
  margin: 0 auto 38px;
}

.naver-post .article-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.article-footer {
  max-width: 620px;
  margin: clamp(54px, 7vw, 82px) auto 0;
  padding: 36px 0 58px;
  border-top: 1px solid #deded8;
  text-align: center;
}

.article-footer__logo {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 22px;
  object-fit: cover;
}

.article-footer__eyebrow {
  margin: 0 0 8px;
  color: #111;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.article-footer__copy {
  max-width: 25em;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.72;
  word-break: keep-all;
}

.post-bottom-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: min(calc(100% - 36px), 320px);
  margin: 26px auto 38px;
  padding: 0;
  background: #fff;
  border: 1px solid #d8d8d3;
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(12, 16, 24, 0.16);
}

.post-bottom-nav__link {
  flex: 1;
  min-width: 0;
  padding: 16px 10px;
  color: #111;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.post-bottom-nav__link:hover {
  color: #6a9700;
}

.post-bottom-nav__divider {
  color: #d1d1cc;
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1;
}

@media (max-width: 720px) {
  .article-header { min-height: 62px; }
  .brand span { font-size: 0.86rem; }
  .article-shell { padding: 0 10px 0; }
  .article-card {
    min-height: calc(100vh - 62px);
    padding: 28px 18px 0;
    border-right: 1px solid #e2e2dc;
    border-left: 1px solid #e2e2dc;
  }
  .article-kicker { margin-bottom: 18px; font-size: 0.92rem; }
  h1 { font-size: 1.7rem; line-height: 1.32; letter-spacing: -0.035em; }
  .article-meta { margin: 24px auto 28px; gap: 10px; font-size: 0.92rem; }
  .avatar { width: 38px; height: 38px; }
  .article-card > hr { margin-bottom: 32px; }
  .article-body { font-size: 1rem; line-height: 1.8; }

  .post-list-panel {
    position: fixed;
    top: 70px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
  }

  .article-footer {
    margin-top: 62px;
    padding: 34px 0 48px;
  }

  .article-footer__logo {
    width: 84px;
    height: 84px;
    border-radius: 20px;
  }

  .article-footer__copy {
    max-width: 19em;
    margin-bottom: 22px;
    font-size: 0.94rem;
  }

  .post-bottom-nav {
    width: calc(100% - 28px);
    max-width: 320px;
    margin: 20px auto 26px;
  }

  .post-bottom-nav__link {
    padding: 15px 4px;
    font-size: 0.96rem;
  }
}
