:root {
  --font-body: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-title: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-reader: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --bg: #f7f6f2;
  --panel: #ffffff;
  --panel-soft: #f1f0eb;
  --line: #dedbd2;
  --text: #23211d;
  --muted: #737066;
  --faint: #aaa59a;
  --shadow: 0 18px 50px rgba(35, 33, 29, 0.08);
}

[data-theme="white"] {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f6f6f6;
  --line: #e4e4e4;
  --text: #191919;
  --muted: #6f6f6f;
  --faint: #a8a8a8;
}

[data-theme="dark"] {
  --bg: #191919;
  --panel: #202020;
  --panel-soft: #2a2a2a;
  --line: #343434;
  --text: #eeeeee;
  --muted: #aaa7a1;
  --faint: #77736d;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

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

html {
  min-height: 100%;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: calc(15px * var(--font-scale, 1));
  line-height: 1.72;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.sidebar-closed {
  --sidebar-current-width: 0px;
}

body:not(.sidebar-closed) {
  --sidebar-current-width: var(--sidebar-width, 288px);
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width, 288px);
  border-right: 1px solid var(--line);
  background: var(--panel-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 12px;
  overflow: auto;
  transition: transform 0.22s ease;
}

.sidebar-closed .site-sidebar {
  transform: translateX(-100%);
}

.sidebar-top,
.mobile-topbar,
.archive-toolbar,
.post-meta,
.admin-links,
.rss-link,
.entry-line,
.entry-meta {
  display: flex;
  align-items: center;
}

.sidebar-top {
  justify-content: space-between;
  gap: 10px;
}

.sidebar-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand-icon:empty {
  display: none;
}

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

.sidebar-brand-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.blog-title {
  min-width: 0;
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-button:hover,
.icon-button.is-active {
  background: rgba(128, 128, 128, 0.12);
  color: var(--text);
}

.icon-button svg,
.icon-button i,
.admin-links svg,
.archive-search svg,
.sidebar-search svg,
.paging svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.sidebar-search {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  padding: 0 10px;
  gap: 8px;
}

[data-show-sidebar-search="block"] .sidebar-search {
  display: flex;
  align-items: center;
}

[data-show-sidebar-search="none"] .sidebar-search {
  display: none;
}

.sidebar-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.sidebar-menu ul,
.category-tree ul,
.notice-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-menu {
  border-top: 1px solid var(--line);
  padding: 10px 0 0;
}

.sidebar-menu a,
.category-tree a,
.notice-sidebar a,
.admin-links a,
.rss-link {
  min-height: 31px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

.sidebar-menu a,
.category-tree a,
.notice-sidebar a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-menu a:hover,
.category-tree a:hover,
.category-tree a.is-current,
.notice-sidebar a:hover,
.admin-links a:hover,
.rss-link:hover {
  background: rgba(128, 128, 128, 0.12);
  color: var(--text);
}

.sidebar-section-title {
  margin: 0 8px 6px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.category-tree .sub_category_list {
  margin: 2px 0 2px 12px;
  padding-left: 9px;
  border-left: 1px solid rgba(128, 128, 128, 0.22);
}

.category-tree li {
  margin: 1px 0;
}

.category-tree a::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--faint);
  flex: 0 0 auto;
  opacity: 0.72;
}

.category-tree .sub_category_list a::before {
  width: 3px;
  height: 3px;
  opacity: 0.48;
}

.category-tree .c_cnt {
  margin-left: auto;
  color: var(--faint);
  font-size: 11px;
  line-height: 1;
  padding-left: 8px;
}

.category-tree a.is-current {
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--accent);
}

.category-tree a.is-current::before {
  background: var(--accent);
  opacity: 1;
}

.notice-sidebar {
  padding-top: 6px;
  margin-bottom: 18px;
}

.notice-sidebar a::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--faint);
  flex: 0 0 auto;
  opacity: 0.72;
}

.notice-sidebar-link {
  font-weight: 400;
}

.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.admin-links {
  gap: 4px;
}

[data-show-admin-links="flex"] .admin-links {
  display: flex;
}

[data-show-admin-links="none"] .admin-links {
  display: none;
}

.admin-links a {
  justify-content: center;
  padding: 0;
}

.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-close-button {
  margin-left: auto;
}

.floating-sidebar-button {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 30;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.floating-sidebar-button[hidden] {
  display: none;
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(0, 0, 0, 0.42);
}

.sidebar-scrim[hidden] {
  display: none;
}

.site-main {
  min-height: 100vh;
  margin-left: var(--sidebar-current-width);
  transition: margin-left 0.22s ease;
}

.mobile-topbar {
  display: none;
}

.page-cover,
.archive-panel,
.paging,
.site-footer {
  width: calc(100vw - var(--sidebar-current-width) - 72px);
  max-width: var(--list-width, 780px);
  margin-inline: auto;
}

.post-view {
  width: calc(100vw - var(--sidebar-current-width) - 72px);
  max-width: var(--post-width, 760px);
  margin-inline: auto;
}

.page-cover {
  padding: 72px 0 30px;
  min-width: 0;
  overflow: hidden;
}

.page-kicker,
.page-title,
.page-description {
  padding-inline: 16px;
}

.cover-image,
.post-cover img {
  width: 100%;
  height: var(--cover-height-pc, 260px);
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.cover-image {
  margin-bottom: 32px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  max-width: 100%;
  float: none !important;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.page-cover:not(.has-cover-image) .cover-image,
.post-cover:empty,
[data-cover-height-pc="0px"] .cover-image,
[data-cover-height-pc="0px"] .post-cover {
  display: none;
}

.page-kicker {
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.page-title,
.post-title {
  margin: 10px 0 0;
  font-family: var(--font-title);
  font-size: 40px;
  line-height: 1.18;
  font-weight: 720;
  letter-spacing: 0;
}

[data-title-size="small"] .page-title,
[data-title-size="small"] .post-title {
  font-size: 30px;
}

[data-title-size="normal"] .page-title,
[data-title-size="normal"] .post-title {
  font-size: 35px;
}

[data-title-size="large"] .page-title,
[data-title-size="large"] .post-title {
  font-size: 40px;
}

.page-description {
  margin: 16px 0 0;
  max-width: 620px;
  color: var(--muted);
  white-space: pre-line;
}

.archive-panel {
  padding-bottom: 34px;
}

.archive-panel[hidden],
.paging[hidden] {
  display: none;
}

.archive-toolbar {
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.archive-search {
  flex: 1;
  min-width: 180px;
  height: 34px;
  color: var(--muted);
  gap: 8px;
}

.archive-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.view-switch {
  display: inline-flex;
  gap: 2px;
}

.source-stage {
  display: none;
}

.entry-collection {
  display: grid;
  gap: 0;
}

.entry-card {
  border-bottom: 1px solid var(--line);
}

.entry-card[hidden] {
  display: none;
}

.entry-link {
  min-height: 78px;
  display: flex;
  align-items: center;
  padding: 15px 0;
}

.entry-link:hover .entry-title {
  color: var(--accent);
}

.entry-thumb {
  width: 54px;
  height: 36px;
  flex: 0 0 54px;
  overflow: hidden;
  background: var(--panel-soft);
}

.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.1);
}

.entry-thumb.is-color-thumb {
  background: var(--panel-soft);
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 44%),
    linear-gradient(315deg, rgba(0, 0, 0, 0.08), transparent 52%);
}

.entry-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 5px;
}

.entry-line {
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.entry-side {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.entry-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.48;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-date {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 12px;
}

.entry-meta {
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.entry-category {
  flex: 0 0 auto;
  color: var(--accent);
}

.entry-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#entry-collection[data-view="list"] {
  gap: 10px;
  padding-top: 8px;
}

#entry-collection[data-view="list"] .entry-card {
  border-bottom: 1px solid rgba(128, 128, 128, 0.16);
  background: transparent;
}

#entry-collection[data-view="list"] .entry-card:last-child {
  border-bottom: 0;
}

#entry-collection[data-view="list"] .entry-link {
  min-height: 76px;
  padding: 14px 16px;
}

#entry-collection[data-view="list"] .entry-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "title thumb date"
    "meta thumb date";
  align-items: center;
  column-gap: 12px;
  row-gap: 5px;
}

#entry-collection[data-view="list"] .entry-line,
#entry-collection[data-view="list"] .entry-side {
  display: contents;
}

#entry-collection[data-view="list"] .entry-title {
  grid-area: title;
}

#entry-collection[data-view="list"] .entry-thumb {
  grid-area: thumb;
  width: 88px;
  height: 54px;
  flex-basis: 88px;
}

#entry-collection[data-view="list"] .entry-date {
  grid-area: date;
  align-self: center;
  white-space: nowrap;
}

#entry-collection[data-view="list"] .entry-meta {
  grid-area: meta;
}

#entry-collection[data-view="list"] .entry-thumb.is-default-thumb {
  display: none;
}

#entry-collection[data-view="list"] .entry-card.no-thumb .entry-main,
#entry-collection[data-view="list"] .entry-card.no-real-thumb .entry-main,
[data-list-thumb="hide"] #entry-collection[data-view="list"] .entry-main {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title date"
    "meta date";
}

[data-list-thumb="hide"] #entry-collection[data-view="list"] .entry-thumb {
  display: none;
}

[data-show-list-date="hide"] .entry-date {
  display: none !important;
}

[data-show-post-date="hide"] .post-date {
  display: none !important;
}

[data-show-summary="none"] .entry-summary {
  display: none !important;
}

#entry-collection[data-view="gallery"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  padding-top: 18px;
}

#entry-collection[data-view="gallery"] .entry-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  overflow: hidden;
}

#entry-collection[data-view="gallery"] .entry-link {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
}

#entry-collection[data-view="gallery"] .entry-thumb {
  order: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  flex-basis: auto;
}

#entry-collection[data-view="gallery"] .entry-main,
#entry-collection[data-view="gallery"] .entry-side,
#entry-collection[data-view="gallery"] .entry-line {
  display: contents;
}

#entry-collection[data-view="gallery"] .entry-title {
  order: 2;
  margin: 13px 13px 0;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#entry-collection[data-view="gallery"] .entry-date {
  order: 4;
  display: block;
  margin: 8px 13px 15px;
  padding-top: 10px;
  border-top: 1px solid rgba(128, 128, 128, 0.14);
}

#entry-collection[data-view="gallery"] .entry-meta {
  order: 3;
  display: block;
  margin: 5px 13px 0;
  padding-bottom: 2px;
}

#entry-collection[data-view="gallery"] .entry-category {
  display: inline-block;
  padding-bottom: 2px;
}

[data-show-list-date="hide"] #entry-collection[data-view="gallery"] .entry-meta {
  margin-bottom: 15px;
}

#entry-collection[data-view="gallery"] .entry-summary {
  display: -webkit-box;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#entry-collection[data-view="gallery"] .entry-card.no-thumb .entry-link {
  min-height: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
}

#entry-collection[data-view="gallery"] .entry-card.no-thumb .entry-main,
#entry-collection[data-view="gallery"] .entry-card.no-thumb .entry-side,
#entry-collection[data-view="gallery"] .entry-card.no-thumb .entry-line,
[data-gallery-thumb="hide"] #entry-collection[data-view="gallery"] .entry-main,
[data-gallery-thumb="hide"] #entry-collection[data-view="gallery"] .entry-side,
[data-gallery-thumb="hide"] #entry-collection[data-view="gallery"] .entry-line {
  display: contents;
}

#entry-collection[data-view="gallery"] .entry-card.no-thumb .entry-title {
  margin: 0;
}

#entry-collection[data-view="gallery"] .entry-card.no-thumb .entry-meta {
  margin: 4px 0 0;
}

#entry-collection[data-view="gallery"] .entry-card.no-thumb .entry-date {
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(128, 128, 128, 0.14);
}

[data-gallery-thumb="hide"] #entry-collection[data-view="gallery"] .entry-thumb {
  display: none;
}

[data-gallery-thumb="hide"] #entry-collection[data-view="gallery"] .entry-link {
  min-height: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
}

[data-gallery-thumb="hide"] #entry-collection[data-view="gallery"] .entry-title {
  margin: 0;
}

[data-gallery-thumb="hide"] #entry-collection[data-view="gallery"] .entry-meta {
  margin: 4px 0 0;
}

[data-show-list-date="hide"] #entry-collection[data-view="gallery"] .entry-card.no-thumb .entry-meta,
[data-show-list-date="hide"][data-gallery-thumb="hide"] #entry-collection[data-view="gallery"] .entry-meta {
  margin-bottom: 0;
}

[data-gallery-thumb="hide"] #entry-collection[data-view="gallery"] .entry-date {
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(128, 128, 128, 0.14);
}

#entry-collection[data-view="toc"] {
  max-width: 680px;
  margin: 44px auto 0;
  counter-reset: archive-toc;
  gap: 0;
}

#entry-collection[data-view="toc"] .entry-card {
  border-bottom: 0;
  counter-increment: archive-toc;
}

#entry-collection[data-view="toc"] .entry-link {
  min-height: 40px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
}

#entry-collection[data-view="toc"] .entry-link::before {
  content: counter(archive-toc, decimal-leading-zero);
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#entry-collection[data-view="toc"] .entry-thumb,
#entry-collection[data-view="toc"] .entry-summary,
#entry-collection[data-view="toc"] .entry-category {
  display: none;
}

#entry-collection[data-view="toc"] .entry-main,
#entry-collection[data-view="toc"] .entry-line {
  display: contents;
}

#entry-collection[data-view="toc"] .entry-side {
  display: inline-flex;
  margin-left: 0;
}

#entry-collection[data-view="toc"] .entry-title {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  font-size: 14px;
  font-weight: 440;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#entry-collection[data-view="toc"] .entry-title::after {
  content: "";
  flex: 1 1 auto;
  min-width: 18px;
  border-bottom: 1px solid var(--line);
  transform: translateY(-0.25em);
}

#entry-collection[data-view="toc"] .entry-date {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

[data-show-list-date="hide"] #entry-collection[data-view="toc"] .entry-link {
  grid-template-columns: 34px minmax(0, 1fr);
}

[data-show-list-date="hide"] #entry-collection[data-view="toc"] .entry-side,
[data-show-list-date="hide"] #entry-collection[data-view="toc"] .entry-title::after {
  display: none;
}

.archive-empty {
  margin: 18px 0 0;
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 18px;
  text-align: center;
}

.post-view {
  padding: 54px 0 34px;
}

.post-cover {
  width: calc(100vw - var(--sidebar-current-width) - 72px);
  max-width: var(--post-width, 760px);
  margin: -54px auto 34px;
}

.post-cover img {
  border-bottom: 1px solid var(--line);
}

.post-category {
  display: inline-flex;
  color: var(--accent);
  font-size: 13px;
  font-weight: 620;
}

.post-meta {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.post-admin {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.post-admin button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.post-admin a:hover,
.post-admin button:hover {
  color: var(--text);
}

.post-tags-inline {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}

.post-tags-inline a {
  display: inline-flex;
  margin: 0;
  color: var(--muted);
}

.post-tags-inline a:hover {
  color: var(--accent);
}

.post-copy {
  margin-left: auto;
}

.post-copy.is-done {
  color: var(--accent);
  background: rgba(128, 128, 128, 0.12);
}

.post-toc {
  margin-top: 18px;
  border-left: 2px solid var(--line);
  padding-left: 14px;
}

.post-toc:empty,
.post-toc[hidden] {
  display: none;
}

.post-toc p {
  margin: 0 0 6px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.post-toc a {
  display: block;
  padding: 3px 0;
  color: var(--muted);
  font-size: 13px;
}

.post-toc a.sub {
  padding-left: 14px;
}

.post-toc a:hover {
  color: var(--accent);
}

.post-body {
  margin-top: 26px;
  font-family: var(--font-reader);
  font-size: 17px;
  line-height: 1.95;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

[data-post-font="sans"] .post-body {
  font-family: var(--font-body);
}

[data-post-font="serif"] .post-body {
  font-family: var(--font-reader);
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: var(--font-title);
  line-height: 1.36;
  letter-spacing: 0;
  scroll-margin-top: 28px;
}

.post-body h2 {
  margin: 2.2em 0 0.7em;
  font-size: 1.55em;
}

.post-body h3 {
  margin: 1.8em 0 0.55em;
  font-size: 1.22em;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body table,
.post-body pre {
  margin: 1em 0 0;
}

.post-body ul,
.post-body ol {
  padding-left: 1.25em;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--post-image-radius, 6px);
}

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
  color: var(--muted);
}

.post-body code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  background: var(--panel-soft);
  border-radius: 4px;
  padding: 2px 4px;
}

.post-body pre {
  overflow: auto;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  padding: 14px;
}

.post-body pre code {
  background: transparent;
  padding: 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
}

.post-body th,
.post-body td {
  border: 1px solid var(--line);
  padding: 8px 10px;
}

.post-body .another_category {
  margin: 40px 0 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.post-body .another_category h4 {
  margin: 0;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 620;
  color: var(--text);
}

.post-body .another_category h4 a {
  color: var(--accent);
}

.post-body .another_category table,
.post-body .another_category tbody,
.post-body .another_category tr,
.post-body .another_category th,
.post-body .another_category td {
  border: 0 !important;
  background: transparent !important;
}

.post-body .another_category table {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
}

.post-body .another_category th {
  padding: 10px 0 !important;
  text-align: left;
  font-size: 13px;
  font-weight: 400;
}

.post-body .another_category td {
  width: 92px;
  padding: 10px 0 10px 12px !important;
  text-align: right;
  white-space: nowrap;
  color: var(--faint);
  font-size: 12px;
}

.post-view > .post-tags {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.post-view > .post-tags a {
  display: inline-flex;
  margin: 0 6px 6px 0;
  color: var(--muted);
}

.comment-wrap {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-body);
}

.comment-wrap:empty {
  display: none;
}

.comment-wrap [data-tistory-react-app="Comment"] {
  min-height: 80px;
}

.comment-wrap .tt-comment-cont,
.comment-wrap .tt-box-total,
.comment-wrap .tt-area-reply,
.comment-wrap .tt-box-write {
  color: var(--text);
  font-family: var(--font-body);
}

.comment-wrap .tt-box-total {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.comment-wrap textarea,
.comment-wrap input[type="text"],
.comment-wrap input[type="password"] {
  border: 1px solid var(--line) !important;
  background: var(--panel) !important;
  color: var(--text) !important;
  border-radius: 6px !important;
}

.comment-wrap button,
.comment-wrap input[type="submit"] {
  border-radius: 6px !important;
}

.protected-box {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

.protected-box p {
  margin: 0 0 12px;
  color: var(--muted);
}

.protected-box form {
  display: flex;
  gap: 8px;
}

.protected-box input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  padding: 0 12px;
}

.protected-box button {
  height: 40px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 0 14px;
  cursor: pointer;
}

.paging {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 22px 0 0;
}

.paging a {
  min-width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.paging a:hover,
.paging a.selected {
  background: var(--panel-soft);
  color: var(--text);
}

.no-more-prev,
.no-more-next {
  opacity: 0.35;
  pointer-events: none;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 34px 0 28px;
  color: var(--faint);
  font-size: 12px;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 3px;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

.reading-progress[hidden] {
  display: none;
}

@media (max-width: 1080px) {
  #entry-collection[data-view="gallery"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body,
  body:not(.sidebar-closed),
  body.sidebar-closed {
    --sidebar-current-width: 0px;
  }

  .site-sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow);
  }

  .site-sidebar.is-open {
    transform: translateX(0);
  }

  .floating-sidebar-button {
    top: auto;
    left: 14px;
    bottom: 14px;
  }

  .sidebar-bottom {
    padding-bottom: 2px;
  }

  .sidebar-actions {
    width: 100%;
  }

  .site-main {
    margin-left: 0;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 48px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    gap: 8px;
  }

  .mobile-topbar a {
    min-width: 0;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-cover,
  .archive-panel,
  .paging,
  .site-footer {
    width: calc(100vw - 28px);
    max-width: var(--list-width, 780px);
  }

  .post-view {
    width: calc(100vw - 28px);
    max-width: var(--post-width, 760px);
  }

  .page-cover {
    padding-top: 34px;
  }

  .page-kicker,
  .page-title,
  .page-description {
    padding-inline: 14px;
  }

  .page-title,
  .post-title {
    font-size: 32px;
  }

  [data-title-size="small"] .page-title,
  [data-title-size="small"] .post-title {
    font-size: 24px;
  }

  [data-title-size="normal"] .page-title,
  [data-title-size="normal"] .post-title {
    font-size: 28px;
  }

  [data-title-size="large"] .page-title,
  [data-title-size="large"] .post-title {
    font-size: 32px;
  }

  .post-view {
    padding-top: 34px;
  }

  .post-cover {
    width: calc(100vw - 28px);
    max-width: var(--post-width, 760px);
    margin-top: -34px;
  }

  .cover-image,
  .post-cover img {
    height: var(--cover-height-mobile, 160px);
  }

  [data-cover-height-mobile="0px"] .cover-image,
  [data-cover-height-mobile="0px"] .post-cover {
    display: none;
  }
}

[data-density="compact"] .page-cover {
  padding-top: 54px;
  padding-bottom: 22px;
}

[data-density="compact"] .entry-link {
  min-height: 62px;
  padding: 10px 0;
}

[data-density="compact"] .entry-thumb {
  width: 48px;
  height: 32px;
  flex-basis: 48px;
}

[data-density="compact"] #entry-collection[data-view="list"] .entry-thumb {
  width: 76px;
  height: 46px;
  flex-basis: 76px;
}

[data-density="airy"] .entry-thumb {
  width: 60px;
  height: 40px;
  flex-basis: 60px;
}

[data-density="airy"] #entry-collection[data-view="list"] .entry-thumb {
  width: 104px;
  height: 62px;
  flex-basis: 104px;
}

[data-density="airy"] .page-cover {
  padding-top: 92px;
  padding-bottom: 42px;
}

[data-density="airy"] .entry-link {
  min-height: 92px;
  padding: 20px 0;
}

[data-density="airy"] .archive-toolbar {
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  [data-density="compact"] .page-cover,
  [data-density="airy"] .page-cover {
    padding-top: 34px;
    padding-bottom: 24px;
  }

  [data-density="compact"] .entry-link,
  [data-density="airy"] .entry-link {
    min-height: 68px;
    padding: 12px 0;
  }
}

@media (max-width: 640px) {
  .archive-toolbar {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .archive-search {
    min-width: 0;
    height: 32px;
    gap: 6px;
  }

  .archive-search input {
    font-size: 13px;
  }

  .view-switch {
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .view-switch .icon-button {
    width: 28px;
    height: 28px;
  }

  .entry-link {
    align-items: flex-start;
  }

  .entry-thumb {
    width: 52px;
    height: 34px;
    flex-basis: 52px;
  }

  .entry-line {
    display: contents;
  }

  .entry-side {
    order: 3;
    justify-content: flex-start;
    margin-top: 4px;
    margin-left: 0;
  }

  .entry-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .entry-title {
    order: 1;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .entry-date {
    display: block;
    margin-top: 0;
  }

  .entry-meta {
    order: 2;
    display: block;
  }

  .entry-summary {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  #entry-collection[data-view="list"] {
    gap: 10px;
    padding-top: 6px;
  }

  #entry-collection[data-view="list"] .entry-link {
    min-height: 104px;
    padding: 14px;
  }

  #entry-collection[data-view="list"] .entry-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    grid-template-areas:
      "title thumb"
      "meta thumb"
      "date thumb";
    align-items: start;
    column-gap: 14px;
    row-gap: 6px;
  }

  #entry-collection[data-view="list"] .entry-line,
  #entry-collection[data-view="list"] .entry-side {
    display: contents;
  }

  #entry-collection[data-view="list"] .entry-title {
    grid-area: title;
    order: initial;
  }

  #entry-collection[data-view="list"] .entry-thumb {
    grid-area: thumb;
    width: 104px;
    height: 70px;
    flex-basis: 104px;
  }

  #entry-collection[data-view="list"] .entry-date {
    grid-area: date;
    order: initial;
    align-self: end;
    display: block;
    white-space: nowrap;
  }

  #entry-collection[data-view="list"] .entry-meta {
    grid-area: meta;
    order: initial;
  }

  #entry-collection[data-view="list"] .entry-category {
    display: inline-block;
    padding-bottom: 3px;
  }

  #entry-collection[data-view="list"] .entry-card.no-thumb .entry-main,
  #entry-collection[data-view="list"] .entry-card.no-real-thumb .entry-main,
  [data-list-thumb="hide"] #entry-collection[data-view="list"] .entry-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "meta"
      "date";
  }

  #entry-collection[data-view="gallery"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #entry-collection[data-view="gallery"] .entry-line {
    display: contents;
  }

  #entry-collection[data-view="gallery"] .entry-main,
  #entry-collection[data-view="gallery"] .entry-side {
    display: contents;
  }

  #entry-collection[data-view="gallery"] .entry-title {
    order: 2;
  }

  #entry-collection[data-view="gallery"] .entry-date {
    order: 4;
    display: block;
  }

  #entry-collection[data-view="gallery"] .entry-meta {
    order: 3;
  }

  #entry-collection[data-view="toc"] {
    margin-top: 30px;
  }

  #entry-collection[data-view="toc"] .entry-link {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 8px;
    min-height: 36px;
    padding: 6px 0;
  }

  #entry-collection[data-view="toc"] .entry-main,
  #entry-collection[data-view="toc"] .entry-line {
    display: contents;
  }

  #entry-collection[data-view="toc"] .entry-side {
    order: initial;
    margin-top: 0;
  }

  #entry-collection[data-view="toc"] .entry-title {
    order: initial;
    display: flex;
    white-space: nowrap;
    -webkit-line-clamp: initial;
    -webkit-box-orient: initial;
  }

  #entry-collection[data-view="toc"] .entry-date {
    order: initial;
    display: inline-block;
    margin-top: 0;
    white-space: nowrap;
  }

  [data-show-list-date="hide"] #entry-collection[data-view="toc"] .entry-link {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  [data-show-list-date="hide"] #entry-collection[data-view="toc"] .entry-side,
  [data-show-list-date="hide"] #entry-collection[data-view="toc"] .entry-title::after,
  [data-show-list-date="hide"] #entry-collection[data-view="toc"] .entry-date {
    display: none !important;
  }

  #entry-collection[data-view="toc"] .entry-meta {
    display: contents;
  }

  .post-body {
    font-size: 16px;
    line-height: 1.9;
  }

  .protected-box form {
    flex-direction: column;
  }

  .site-footer {
    flex-direction: column;
  }
}
