:root {
  --page-bg: #f6f7f8;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --text: #20242b;
  --text-soft: #606872;
  --text-faint: #66717e;
  --line: #e4e7eb;
  --line-strong: #d5dae0;
  --accent: #3f6288;
  --accent-dark: #2d4c6d;
  --accent-soft: #edf2f7;
  --focus: #275f9b;
  --code-bg: #171b22;
  --code-text: #e6e9ee;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-soft: 0 8px 28px rgba(32, 36, 43, 0.055);
  --page-width: 1240px;
  --content-width: 790px;
  --header-height: 70px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page-bg);
  color: var(--text);
  font-family:
    "Pretendard Variable",
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans KR",
    "Malgun Gothic",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: #dbe7f2;
  color: var(--text);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

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

.site-shell {
  min-height: 100vh;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  border-bottom: 1px solid rgba(228, 231, 235, 0.95);
  background: var(--surface);
}

.header-inner {
  width: min(calc(100% - 40px), var(--page-width));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
  flex: 0 1 auto;
}

.brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand-text strong {
  max-width: 270px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-text span {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.015em;
}

.header-navigation {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tistory-menu,
.tistory-menu > ul,
.tistory-menu .blogMenu {
  margin: 0;
  padding: 0;
}

.tistory-menu > ul,
.tistory-menu .blogMenu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.tistory-menu li {
  list-style: none;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #4d5560;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.65);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.site-nav a:hover,
.site-nav a.current {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a.current::after {
  opacity: 1;
  transform: scaleX(1);
}

.all-posts-link {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.site-search {
  position: relative;
  width: 158px;
}

.site-search input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: width 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.site-search input::placeholder {
  color: var(--text-faint);
}

.site-search input:focus {
  border-color: #95adc6;
  background: var(--surface);
}

.site-search button {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.site-search svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0 11px;
  display: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  margin: 2.5px 0;
  background: var(--text);
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.menu-backdrop {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 850;
  background: rgba(20, 25, 31, 0.34);
}

/* Home */

.home-intro,
.topic-strip {
  display: none;
}

#tt-body-index .home-intro {
  display: block;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.home-intro-inner {
  width: min(calc(100% - 40px), var(--page-width));
  margin: 0 auto;
  padding: 82px 0 76px;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.home-intro-title {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: clamp(31px, 3.8vw, 44px);
  font-weight: 740;
  letter-spacing: -0.035em;
  line-height: 1.24;
}

.home-intro-description {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.8;
}

.home-intro-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 44px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
}

.button-primary {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
}

.button-primary:hover {
  background: #253f5a;
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  border-color: #aeb8c3;
  background: var(--surface-subtle);
}

#tt-body-index .topic-strip {
  display: block;
  border-bottom: 1px solid var(--line);
  background: #fbfbfa;
}

.topic-strip-inner {
  width: min(calc(100% - 40px), var(--page-width));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.topic-label {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
}

.topic-links {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.topic-links::-webkit-scrollbar {
  display: none;
}

.topic-links a {
  flex: 0 0 auto;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #59626d;
  font-size: 12px;
  font-weight: 650;
}

.topic-links a:hover {
  border-color: #b8c2cd;
  color: var(--text);
}

/* Main layout */

.page-frame {
  width: min(calc(100% - 40px), var(--page-width));
  margin: 0 auto;
  padding: 52px 0 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 52px;
}

#tt-body-page .page-frame {
  width: min(calc(100% - 40px), 1120px);
  grid-template-columns: minmax(0, 1fr);
}

#tt-body-page .site-sidebar {
  display: none;
}

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

.main-content:focus {
  outline: none;
}

.home-posts-anchor {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.section-heading {
  margin-bottom: 24px;
  padding-bottom: 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line-strong);
}

.section-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.result-count {
  margin: 0 0 4px;
  color: var(--text-faint);
  font-size: 13px;
}

.result-count strong {
  color: var(--text-soft);
}

.post-list {
  border-top: 1px solid var(--line);
}

.post-card {
  min-width: 0;
  padding: 27px 0;
  display: flex;
  align-items: center;
  gap: 26px;
  border-bottom: 1px solid var(--line);
}

.post-card-content {
  min-width: 0;
  flex: 1 1 auto;
}

.post-meta {
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-faint);
  font-size: 12px;
}

.post-meta a {
  color: var(--accent);
  font-weight: 650;
}

.post-meta a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-card h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.45;
}

.post-card h2 a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size 0.18s ease;
}

.post-card h2 a:hover {
  background-size: 100% 1px;
}

.post-card p {
  max-width: 68ch;
  margin: 11px 0 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-card-thumbnail {
  width: 154px;
  aspect-ratio: 4 / 3;
  flex: 0 0 154px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #eef0f2;
}

.post-card-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.post-card:hover .post-card-thumbnail img {
  transform: scale(1.025);
}

.notice-card {
  margin-bottom: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.empty-state,
.content-panel {
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.empty-state {
  text-align: center;
}

.empty-state h2 {
  margin: 0;
  font-size: 22px;
}

.empty-state p {
  margin: 10px 0 24px;
  color: var(--text-soft);
}

.protected-post h1 {
  margin: 0;
  font-size: 32px;
}

.protected-post > p:not(.eyebrow) {
  color: var(--text-soft);
}

.protected-form {
  max-width: 460px;
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.protected-form label {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 700;
}

.protected-form input,
.protected-form button {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.protected-form input {
  padding: 0 12px;
}

.protected-form button {
  padding: 0 18px;
  background: var(--accent-dark);
  color: #fff;
  cursor: pointer;
}

/* Sidebar */

.site-sidebar {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.sidebar-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.profile-card img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.profile-card h2 {
  margin: 16px 0 0;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.45;
}

.profile-card p {
  margin: 9px 0 14px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.profile-card > a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.profile-card > a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sidebar-heading {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
}

.sidebar-heading > a {
  color: var(--text-faint);
  font-size: 11px;
}

.category-card ul,
.category-card li,
.recent-card ul,
.recent-card li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-card .tt_category > li > a,
.category-card .link_tit {
  display: none;
}

.category-card .category_list {
  display: grid;
  gap: 2px;
}

.category-card .category_list > li > a,
.category-card .link_item {
  min-height: 38px;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: var(--radius-sm);
  color: #505963;
  font-size: 13px;
  line-height: 1.45;
}

.category-card .category_list > li > a:hover,
.category-card .link_item:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.category-card .sub_category_list {
  margin: 1px 0 7px 14px;
}

.category-card .sub_category_list a {
  display: block;
  padding: 6px 8px;
  color: var(--text-soft);
  font-size: 12px;
}

.category-card .c_cnt {
  color: var(--text-faint);
  font-size: 10px;
}

.recent-card ul {
  display: grid;
  gap: 13px;
}

.recent-card li {
  min-width: 0;
}

.recent-card li a {
  display: -webkit-box;
  overflow: hidden;
  color: #424a54;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-card li a:hover {
  color: var(--accent-dark);
}

.recent-card time {
  margin-top: 4px;
  display: block;
  color: var(--text-faint);
  font-size: 10px;
}

/* Article */

.article-panel {
  min-width: 0;
}

.article-header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 20px 0 40px;
  border-bottom: 1px solid var(--line);
}

.article-category {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

a.article-category:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-header h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(29px, 4.2vw, 43px);
  font-weight: 760;
  letter-spacing: -0.032em;
  line-height: 1.34;
}

.article-meta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-faint);
  font-size: 12px;
}

.comment-jump {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.comment-jump:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-admin {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

.article-admin a,
.article-admin button {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12px;
  cursor: pointer;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--content-width)) 210px;
  justify-content: center;
  align-items: start;
  gap: 54px;
}

.article-main {
  min-width: 0;
}

.article-body {
  min-width: 0;
  padding: 44px 0 12px;
  color: #282d34;
  font-size: 17px;
  line-height: 1.88;
  overflow-wrap: anywhere;
}

.article-body > :first-child {
  margin-top: 0 !important;
}

.article-body > :last-child {
  margin-bottom: 0 !important;
}

.article-body p,
.article-body [data-ke-size="size16"] {
  margin: 0 0 1.35em;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--text);
  font-weight: 740;
  letter-spacing: -0.025em;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.article-body h2 {
  margin: 2.6em 0 0.8em;
  padding-bottom: 0.45em;
  border-bottom: 1px solid var(--line);
  font-size: clamp(24px, 3vw, 29px);
  line-height: 1.45;
}

.article-body h3,
.article-body [data-ke-size="size23"] {
  margin: 2.2em 0 0.75em;
  font-size: clamp(20px, 2.4vw, 23px);
  line-height: 1.5;
}

.article-body h4 {
  margin: 1.9em 0 0.65em;
  font-size: 18px;
}

.article-body strong,
.article-body b {
  color: #1f242a;
  font-weight: 750;
}

.article-body a {
  color: #275b91;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: #1d466f;
  text-decoration-thickness: 2px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.45em;
  padding-left: 1.45em;
}

.article-body li {
  margin: 0.4em 0;
  padding-left: 0.15em;
}

.article-body blockquote,
.article-body blockquote[data-ke-style="style1"] {
  margin: 2em 0;
  padding: 20px 22px;
  border: 0;
  border-left: 3px solid #718da8;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #f1f4f7;
  color: #39434e;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body hr {
  height: 1px;
  margin: 3em 0;
  border: 0;
  background: var(--line);
}

.article-body img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

.article-body figure {
  max-width: 100%;
  margin: 2.1em 0;
}

.article-body figcaption {
  margin-top: 9px;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.article-body iframe {
  width: 100%;
  border: 0;
}

.article-body code {
  padding: 0.16em 0.38em;
  border: 1px solid #d9e0e7;
  border-radius: 4px;
  background: #f1f4f6;
  color: #24425e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  word-break: normal;
}

.article-body pre {
  position: relative;
  max-width: 100%;
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  border: 1px solid #252b34;
  border-radius: var(--radius-md);
  background: var(--code-bg);
  color: var(--code-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.68;
  tab-size: 2;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.code-block {
  position: relative;
  max-width: 100%;
  margin: 2em 0;
}

.code-block pre {
  padding-top: 52px;
}

.article-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  white-space: inherit;
}

.code-copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  min-height: 30px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid #39414d;
  border-radius: 5px;
  background: #222832;
  color: #b9c1cc;
  font-size: 11px;
  cursor: pointer;
}

.code-copy-button:hover {
  border-color: #596575;
  color: #fff;
}

.table-scroll {
  max-width: 100%;
  margin: 2em 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.article-body table {
  width: 100%;
  min-width: 560px;
  margin: 0;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.55;
}

.article-body > table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.table-scroll table {
  display: table;
}

.article-body th,
.article-body td {
  padding: 11px 13px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: #f1f3f5;
  color: #303740;
  font-weight: 700;
}

.article-tags {
  margin-top: 34px;
  padding-top: 22px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 12px;
}

.article-tags > span {
  margin-right: 2px;
  font-weight: 700;
}

.article-tags a {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
}

.article-tags a:hover {
  border-color: #b7c0ca;
  color: var(--text);
}

.article-toc {
  position: sticky;
  top: calc(var(--header-height) + 30px);
  margin-top: 44px;
}

.toc-panel {
  padding-left: 18px;
  border-left: 1px solid var(--line-strong);
}

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

.toc-panel > p {
  margin: 0 0 13px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

.toc-panel ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.toc-panel a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.toc-panel li[data-level="3"] {
  padding-left: 10px;
}

.toc-panel a:hover,
.toc-panel a.active {
  color: var(--accent-dark);
}

.post-navigation {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.post-nav-item {
  min-width: 0;
  min-height: 98px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.post-nav-item:hover {
  border-color: #b7c0ca;
}

.post-nav-item span {
  margin-bottom: 6px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 650;
}

.post-nav-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #39414a;
  font-size: 14px;
  font-weight: 680;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-nav-next {
  text-align: right;
}

.related-posts {
  margin-top: 54px;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.subsection-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.subsection-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 740;
}

.subsection-heading a {
  color: var(--text-faint);
  font-size: 12px;
}

.related-list {
  border-top: 1px solid var(--line);
}

.related-item {
  min-height: 48px;
  padding: 11px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  color: #444d57;
  font-size: 13px;
}

.related-item:hover span {
  color: var(--accent-dark);
}

.related-item time {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 10px;
}

.comments-section {
  margin-top: 54px;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}

/* Tistory comment / guestbook */

.tt-comment-cont {
  font-family: inherit !important;
}

.tt-comment-cont .tt-box-total {
  margin-bottom: 20px !important;
}

.tt-comment-cont .tt-area-write,
.tt-comment-cont .tt-wrap-cmt {
  border-color: var(--line) !important;
  border-radius: var(--radius-md) !important;
}

.tt-comment-cont .tt-btn_register {
  border-radius: var(--radius-sm) !important;
  background: var(--accent-dark) !important;
}

.tt-comment-cont .tt-link-user,
.tt-comment-cont .tt_txt_g,
.tt-comment-cont .tt_desc {
  font-family: inherit !important;
}

/* Standalone pages */

.page-article .article-header {
  padding-top: 10px;
}

.page-article .article-body {
  max-width: var(--content-width);
  margin: 0 auto;
}

.tag-cloud {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  list-style: none;
}

.tag-cloud li {
  list-style: none;
}

.tag-cloud a {
  padding: 7px 11px;
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-soft);
  font-size: 13px;
}

.tag-cloud a:hover {
  border-color: #b8c2cc;
  color: var(--text);
}

.guestbook-page .tt-comment-cont {
  margin-top: 18px;
}

/* Pagination */

.pagination {
  margin-top: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pagination a {
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12px;
}

.pagination a:hover,
.pagination a.selected {
  border-color: #aeb8c3;
  color: var(--text);
}

.pagination a.no-more-prev,
.pagination a.no-more-next {
  opacity: 0.38;
  pointer-events: none;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  width: min(calc(100% - 40px), var(--page-width));
  min-height: 190px;
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 30px 60px;
}

.footer-brand strong {
  font-size: 16px;
}

.footer-brand p {
  max-width: 500px;
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 20px;
}

.footer-links a {
  color: var(--text-soft);
  font-size: 12px;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copyright {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  color: var(--text-faint);
  font-size: 11px;
}

/* Responsive */

@media (max-width: 1120px) {
  .brand-text span {
    display: none;
  }

  .brand-text strong {
    max-width: 190px;
  }

  .header-inner {
    gap: 20px;
  }

  .header-navigation,
  .site-nav,
  .tistory-menu > ul,
  .tistory-menu .blogMenu {
    gap: 15px;
  }

  .site-nav a {
    font-size: 13px;
  }

  .site-search {
    width: 126px;
  }
}

@media (max-width: 980px) {
  :root {
    --header-height: 64px;
  }

  .header-inner,
  .home-intro-inner,
  .topic-strip-inner,
  .page-frame,
  #tt-body-page .page-frame,
  .footer-inner {
    width: min(calc(100% - 32px), var(--page-width));
  }

  .site-header {
    height: auto;
    min-height: var(--header-height);
  }

  .header-inner {
    height: auto;
    min-height: var(--header-height);
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: none;
  }

  .header-navigation {
    position: static;
    width: 100%;
    height: auto;
    margin-left: 0;
    padding: 0 0 10px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    border-left: 0;
    background: var(--surface);
    overflow: visible;
    transform: none;
    visibility: visible;
  }

  .js-ready .site-header {
    height: var(--header-height);
  }

  .js-ready .header-inner {
    height: 100%;
    min-height: 0;
    padding: 0;
    flex-wrap: nowrap;
  }

  .js-ready .menu-toggle {
    display: grid;
  }

  .js-ready .header-navigation {
    position: fixed;
    top: var(--header-height);
    right: 0;
    z-index: 900;
    width: min(360px, calc(100vw - 36px));
    height: calc(100vh - var(--header-height));
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    border-left: 1px solid var(--line);
    background: var(--surface);
    overflow-y: auto;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0.2s ease;
  }

  .js-ready .header-navigation.open {
    transform: translateX(0);
    visibility: visible;
  }

  .site-nav,
  .tistory-menu > ul,
  .tistory-menu .blogMenu {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav {
    gap: 2px;
  }

  .site-nav a {
    min-height: 46px;
    padding: 0 4px;
    font-size: 15px;
  }

  .site-nav a::after {
    display: none;
  }

  .all-posts-link {
    padding-left: 4px;
    border-left: 0;
  }

  .site-search {
    width: 100%;
  }

  .site-search input {
    height: 44px;
    font-size: 14px;
  }

  .site-search button {
    width: 44px;
    height: 44px;
  }

  .page-frame {
    padding-top: 40px;
    grid-template-columns: minmax(0, 1fr);
  }

  .site-sidebar {
    display: none;
  }

  .article-layout {
    grid-template-columns: minmax(0, var(--content-width));
  }

  .article-toc {
    display: none;
  }

  .article-header {
    padding-top: 8px;
  }
}

@media (max-width: 720px) {
  .home-intro-inner {
    padding: 56px 0 52px;
  }

  .home-intro-title br {
    display: none;
  }

  .home-intro-description {
    margin-top: 18px;
    font-size: 15px;
  }

  .home-intro-actions {
    margin-top: 26px;
  }

  .topic-strip-inner {
    min-height: 62px;
    gap: 14px;
  }

  .topic-label {
    display: none;
  }

  .page-frame,
  #tt-body-page .page-frame {
    padding: 34px 0 64px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  .result-count {
    margin: 0;
  }

  .post-card {
    padding: 22px 0;
    align-items: flex-start;
    gap: 16px;
  }

  .post-card-thumbnail {
    width: 104px;
    flex-basis: 104px;
  }

  .post-card p {
    margin-top: 8px;
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .article-header {
    padding-bottom: 30px;
  }

  .article-body {
    padding-top: 34px;
    font-size: 16px;
    line-height: 1.82;
  }

  .article-body .code-block {
    margin-right: -16px;
    margin-left: -16px;
  }

  .article-body .code-block pre {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .post-nav-next {
    text-align: left;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .copyright {
    grid-column: auto;
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .header-inner,
  .home-intro-inner,
  .topic-strip-inner,
  .page-frame,
  #tt-body-page .page-frame,
  .footer-inner {
    width: min(calc(100% - 28px), var(--page-width));
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .brand-text strong {
    max-width: 170px;
    font-size: 15px;
  }

  .post-card-thumbnail {
    width: 86px;
    flex-basis: 86px;
  }

  .post-card p {
    -webkit-line-clamp: 1;
  }

  .article-header h1 {
    font-size: 28px;
  }

  .article-body h2 {
    font-size: 23px;
  }

  .article-body h3,
  .article-body [data-ke-size="size23"] {
    font-size: 20px;
  }

  .article-body .code-block {
    margin-right: -14px;
    margin-left: -14px;
  }

  .related-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .pagination-numbers a:nth-child(n+6) {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .home-intro,
  .topic-strip,
  .site-sidebar,
  .article-toc,
  .post-navigation,
  .related-posts,
  .comments-section,
  .site-footer,
  .pagination,
  .article-admin {
    display: none !important;
  }

  .page-frame,
  #tt-body-page .page-frame {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
  }

  .article-header,
  .article-body {
    max-width: none;
  }

  .article-body a {
    color: inherit;
  }
}