@charset "utf-8";

/*
 *
 * CSS CONTENTS:
 *
 * 01. Web Font
 * 02. Type Selector Reset
 * 03. Accessibility Navigation
 * 04. Layout Selector
 * 05. Components
 * 06. Entry Content
 * 07. Comment
 * 08. Widget & Template Page
 * 09. ETC
 * 10. Post Type & Color Type
 * 11. Retina Display
 * 12. Media Screen - Tablet
 * 13. Media Screen - Mobie
 *
 */

/* Web Font Load */
@import url("//fonts.googleapis.com/earlyaccess/notosanskr.css");
@import url("//fonts.googleapis.com/css?family=Nanum+Myeongjo");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500&display=swap");
@font-face {
    font-family: "NEXON Lv1 Gothic OTF";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv1 Gothic OTF.woff")
        format("woff");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "KyoboHand";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@1.0/KyoboHand.woff")
        format("woff");
    font-weight: lighter;
    font-style: normal;
}
@font-face {
    font-family: "D2Coding";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_three@1.0/D2Coding.woff")
        format("woff");
    font-weight: normal;
    font-style: normal;
}
:root {
    --dark-bg-color: rgb(30, 31, 33);
    --dark-font-color: #d6dae2;

    --dark-bg-second-color: rgb(50, 51, 53);

    --highlight-color: #ff4081;
    --sidebar-hr-color: rgba(255, 255, 255, 0.2);

    --cal-post: rgba(255,255,255,0.95);
    --cal-empty: rgba(255,255,255,0.35);

}

* {
    margin: 0;
    padding: 0;
    /*font-family: 'Roboto', sans-serif;*/
    font-family: "NEXON Lv1 Gothic OTF";
    /*font-family: 'KyoboHand';*/
    text-decoration: none;
    font-size: 1em;
    line-height: 1.25;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    color: inherit;
}
*:focus {
    outline: none;
}
* s {
    text-decoration: line-through;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--dark-bg-color);
    color: var(--dark-font-color);
}

/********************************************************************/
/* NAVBAR */
.navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1em;
    width: calc(100% - 2em);
    background-color: var(--dark-bg-color);
    position: fixed;
    top: 0;
    z-index: 1000;
}
.navbar .navbar-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}
.navbar .navbar-block .navbar-btn {
    background: transparent;
    border: none;
    cursor: pointer;
}
.navbar .search {
    background-color: var(--dark-bg-second-color);
    padding: 0.1em;
    padding-right: 1em;
    border-radius: 2em;
    width: 500px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

.navbar .search .sbar {
    background-color: var(--dark-bg-color);
    border-radius: 2em;
    border: none;
    color: var(--dark-font-color);
    padding: 0.5em 1em 0.5em 2em;
    font-size: 0.8em;
    height: 2em;
    width: 450px;
}

.navbar .navbar-block .blog_img img {
    width: 2em;
    height: 2em;
    object-fit: cover;
    border-radius: 100%;
}
/* NAVBAR DONE */
/********************************************************************/

.container {
    margin-top: 73px;
    display: flex;
    flex-direction: row;
}

/********************************************************************/
/* SIDEBAR DONE */
.sidebar {
    width: 300px;
    position: sticky;
    top: 73px;
    height: 100vh;
    transition: all 0.5s ease;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateX(0);
    visibility: visible;
}
.sidebar::-webkit-scrollbar {
    width: 1px;
}

.sidebar.hidden {
    width: 0;
    visibility: hidden;
    transform: translateX(-200px);
}
.sidebar .sidebar-closeBtn {
    display: none;
    background: transparent;
    border: none;
    position: absolute;
    top: 10px;
    left: 160px;
    cursor: pointer;
}
.sidebar .sidebar-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 85%;
    padding: 1em 0.5em 1em 1.5em;
    margin: 0.5em auto;
    font-size: 0.8em;
    gap: 1em;
    border-radius: 1em;
}
.sidebar .sidebar-item:hover {
    background-color: var(--dark-bg-second-color);
}
.sidebar .sidebar-item i {
    width: 1em;
}
.sidebar .sidebar-item a {
    color: var(--dark-font-color);
}
.sidebar .sidebar-item ul,
.sidebar .sidebar-item li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar .sidebar-category,
.sidebar .sidebar-theme {
    border-top: 1px solid var(--sidebar-hr-color);
}
.sidebar .sidebar-category .link_tit {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 85%;
    padding: 1em 0.5em 1em 1.5em;
    margin: 0.5em auto;
    font-size: 0.8em;
    gap: 0.5em;
    border-radius: 1em;
}

.sidebar .sidebar-category ul li ul li ul li:hover,
.sidebar .sidebar-category .link_tit:hover {
    background-color: var(--dark-bg-second-color);
}
.sidebar .sidebar-category ul li ul li {
    display: flex;
    flex-direction: column;
    width: 85%;
    padding: 1em 0.5em 1em 1.5em;
    margin: 0.5em auto;
    font-size: 0.8em;
    gap: 0.5em;
    border-radius: 1em;
}
.sidebar .sidebar-category ul li ul li ul li {
    display: flex;
    flex-direction: row;
    width: 85%;
    padding: 0.5em 0.5em 0.5em 3em;
    margin: 0 auto;
    font-size: 1em;
    border-radius: 1em;
    position: relative;
    left: -15px;
}
.sidebar .sidebar-category ul li ul li ul li::before {
    content: "￫";
    position: absolute;
    top: 0px;
    left: 1em;
    font-size: 22px;
    font-weight: 600;
    opacity: 0.7;
}
.sidebar .sidebar-theme {
    padding: 2em 0em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar .sidebar-theme .theme-info {
    font-size: 0.7em;
    margin-right: 1em;
    text-transform: uppercase;
}
.sidebar .sidebar-theme .switch {
    position: relative;
    display: inline-block;
    width: 3em;
    height: 1.5em;
}
.sidebar .sidebar-theme .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.sidebar .sidebar-theme .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgb(70, 71, 73);
    -webkit-transition: 0.4s;
    transition: 0.4s;
}
.sidebar .sidebar-theme .slider:before {
    position: absolute;
    content: "";
    height: 1em;
    width: 1em;
    left: 4px;
    bottom: 4px;
    background-color: #fefefe;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

.sidebar .sidebar-theme input:checked + .slider {
    background-color: #ff4081;
}

.sidebar .sidebar-theme input:focus + .slider {
    box-shadow: 0 0 1px #ff4081;
}

.sidebar .sidebar-theme input:checked + .slider:before {
    -webkit-transform: translateX(1.5em);
    -ms-transform: translateX(1.5em);
    transform: translateX(1.5em);
}
.sidebar .sidebar-theme .slider.round {
    border-radius: 34px;
}
.sidebar .sidebar-theme .slider.round:before {
    border-radius: 50%;
}

.sidebar .empty-div {
    height: 100px;
}
/* SIDEBAR DONE */
/**********************************************************************/

.content {
    width: 100%;
}

/**********************************************************************/
/* SEARCH LIST */
.searchList {
    display: flex;
    flex-wrap: wrap;
    padding: 1em;
    gap: 1em;
    margin: 0 auto;
    justify-content: center;
    max-width: 1024px;
}
.searchList .one_article {
    flex: 0 0 calc(32% - 1em);
    margin-top: 1em;
}
.searchList .one_article .thumbnail {
    height: 17vh;
    width: 100%;
    background-color: var(--dark-bg-second-color);
    border-radius: 1em;
    margin-bottom: 0.5em;
}
.searchList .one_article .thumbnail img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 1em;
}
.searchList .one_article .title {
    color: var(--dark-font-color);
    margin-bottom: 0.5em;
    font-size: 0.9em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* number of lines to show */
    line-clamp: 1;
    -webkit-box-orient: vertical;
}
.searchList .one_article .summary {
  display: none;
}

.searchList .one_article .date {
    font-size: 0.6em;
    color: var(--dark-font-color);
}
.searchList .one_article .category a {
    color: var(--dark-font-color);
    font-size: 0.5em;
}
/* SEARCH LIST DONE */
/**********************************************************************/

.paging {
    width: 100%;
    margin: 2em 0;
    text-align: center;
    font-size: 0.8em;
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    align-items: center;
    justify-content: center;
}
.paging .selected {
    color: var(--highlight-color);
}
.paging .numbox {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
}

/**********************************************************************/
/* ARTICLE */
#removeButton {
    background: none; /* 배경 제거 */
    color: #aaa; /* 원하는 색상으로 설정 (여기서는 빨간색 예시) */
    border: none; /* 테두리 제거 */
    cursor: pointer; /* 커서 모양 변경 (선택사항) */
    font-size: 12px;
}
.entry_wrap {
}
.entry {
    max-width: 1024px;
    margin: 0 auto;
}

.entry .titleWrap {
    display: flex;
    flex-direction: column;
    padding: 1em;
    align-items: center;
    justify-content: center;
    border-bottom: 0.2px solid rgb(70, 71, 73);
    margin-bottom: 2em;
    margin-top: 3em;
}
.entry .titleWrap .category {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #aaa;
    border-radius: 1em;
    width: fit-content;
    padding: 0.25em 0.5em 0.25em 0.5em;
    margin-bottom: 0.5em;
}
.entry .titleWrap .category a {
    color: #aaa;
    font-size: 0.5em;
}
.entry .titleWrap h2 {
    text-align: center;
    margin-bottom: 0.5em;
}
.entry .titleWrap h2 a {
    font-size: 0.8em;
    color: var(--dark-font-color);
}
.entry .titleWrap .info {
    display: flex;
    flex-direction: row;
    gap: 1em;
    font-size: 0.8em;
    color: #aaa;
}
.entry .titleWrap .info .date span {
    margin-right: 1em;
}
.entry .titleWrap .info .admin a {
    color: #aaa;
}

.entry .article {
    width: 100%;
    margin: 0 auto;
}
.entry .article .article_content {
    padding: 0em 2em 2em 2em;
    word-break: break-word;
    line-height: 150%;
}
.entry .article .article_content .contents_style {
    min-height: 50vh;
}
.entry .article .article_content .contents_style a {
    color: var(--highlight-color);
}

/* 플로팅 목차 스타일 */
.toc-absolute {
    position: fixed;
    top: 100px;
    margin-top: 10px;
}
.toc-fixed {
    position: fixed;
    top: 100px;
}
.toc {
    left: calc((100% + 300px + 1024px) / 2 + 0px);
    max-width: 330px;
    padding: 10px;
    box-sizing: border-box;
}
.toc-list > li {
    margin-top: 10px !important;
    font-size: 0.9em;
}
.toc > .toc-list li {
    margin-bottom: 10px;
}
.toc > .toc-list li:last-child {
    margin-bottom: 0;
}
.toc > .toc-list li a {
    text-decoration: none;
}
.is-active-link::before {
    background-color: var(--highlight-color) !important;
}

.entry .article .article_content h1,
.entry .article .article_content h2,
.entry .article .article_content h3,
.entry .article .article_content h4 {
    color: var(--highlight-color);
    padding-top: 1em;
    padding-bottom: 0.5em;
}

.entry .article .article_content h3 {
    font-weight: bold !important;
}
.entry .article .article_content ul li,
.entry .article .article_content ol li {
    word-break: break-word;
    width: 80%;
    position: relative;
    left: 50px;
    margin: 1em 0;
}
.entry .article .article_content figure {
    margin-top: 1em;
}
figure[data-ke-type="opengraph"] div.og-text p.og-title,
#tt-body-page figure[data-ke-type="opengraph"] div.og-text p.og-title {
    color: var(--dark-font-color);
}
.entry .article .article_content table {
    border: 1px solid var(--sidebar-hr-color);
}
.entry .article .article_content table tbody tr td {
    padding: 0.5em;
    font-size: 0.9em;
}
.entry .article .article_content .another_category.another_category_color_gray {
    border: none;
    background-color: var(--dark-bg-second-color);
    padding: 1em;
    border-radius: 1em;
}
.entry
    .article
    .article_content
    .another_category.another_category_color_gray
    * {
    color: var(--dark-font-color) !important;
}
.entry
    .article
    .article_content
    .another_category.another_category_color_gray
    h4,
.entry
    .article
    .article_content
    .another_category.another_category_color_gray
    h4
    a {
    color: var(--dark-font-color) !important;
}
.entry
    .article
    .article_content
    .another_category.another_category_color_gray
    table {
    border: none;
}
.entry
    .article
    .article_content
    .another_category.another_category_color_gray
    table
    tr
    a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.entry
    .article
    .article_content
    .another_category.another_category_color_gray
    table
    td {
    font-size: 12px;
}
.entry .article .article_content figure.fileblock .filename {
    color: var(--dark-font-color) !important;
}

.entry .article .article_content p {
    line-height: 1.5;
    margin-bottom: 0.25em !important;
}
/* =========================
   Code style fix (inline vs block)
   ========================= */

/* 🔹 인라인 코드 (문장 안에서 쓰는 code) */
.entry .article .article_content :not(pre) > code {
    display: inline;
    margin: 0;
    padding: 0.15em 0.35em;
    border-radius: 4px;
    background-color: rgba(127, 127, 127, 0.18);
    font-size: 0.9em;
    line-height: 1.4;
    vertical-align: baseline;
    font-family: "D2Coding";
}

/* 🔹 코드 블록 (여러 줄 코드) */
.entry .article .article_content pre > code {
    display: block;
    margin: 1em 0;
    padding: 16px;
    border-radius: 8px;
    background-color: var(--dark-bg-second-color);
    color: var(--dark-font-color);
    font-family: "D2Coding";
    font-size: 0.9em;
    line-height: 1.6;
}

/* 🔹 pre 자체 보정 */
.entry .article .article_content pre {
    margin: 1em 0;
    overflow-x: auto;
    border-radius: 8px;
}


pre code.hljs {
    overflow-x: auto;
}

.entry .article .tagTrail {
    margin-top: 2em;
    color: var(--dark-font-color);
}
.entry .article .tagTrail .tagText {
    color: var(--highlight-color);
}
.entry .article .tagTrail a {
    font-size: 0.8em;
    padding: 0.5em;
    border-radius: 0.5em;
    background-color: var(--dark-bg-second-color);
}
.entry .article .tagTrail a:hover {
    color: white;
    background-color: var(--highlight-color);
}
.progress-circle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 30px;
    height: 30px;
    display: flex;
    text-align: center;
    visibility: hidden;
    transition: all 0.5s;
    -webkit-transition: all 0.5s;
    -moz-transition: all 0.5s;
}
.progress-circle:hover {
    cursor: pointer;
    transform: scale(1.1);
}
.top-btn {
    position: absolute;
    width: 30px;
    height: 30px;
    font-size: 15px;
    line-height: 30px;
    color: var(--highlight-color);
    z-index: 3;
}
.is-visible {
    visibility: visible;
    opacity: 1;
}
/* ARTICLE DONE */
/**********************************************************************/

/**********************************************************************/
/* Namecard */
.tt_box_namecard {
    border-radius: 5px;
    background-color: var(--dark-bg-second-color) !important;
    margin: 0 2em;
}
.tt_box_namecard .tt_tit_cont {
    color: var(--dark-font-color) !important;
}
/**********************************************************************/
/* COMMENT */
.entry .comment {
    padding: 2em;
    word-wrap: break-word;
}
.entry .comment .commentWrite {
    margin-top: 0.5em;
    margin-bottom: 2em;
    padding: 1.5em;
    border-radius: 10px;
    min-height: 150px;
    background-color: var(--dark-bg-second-color);
}
.entry .comment .comment_input_box {
    margin-top: 1em;
    margin-bottom: 0.5em;
    min-height: 100px;
}
.entry .comment .comment_input_box textarea {
    background: transparent;
    border: none;
    width: 100%;
    height: 100px;
    border-bottom: 1px solid var(--sidebar-hr-color);
    resize: none;
}
.entry .comment .comment_input_box .guset_input_box {
    display: flex;
    flex-direction: row;
    margin-bottom: 1em;
    gap: 1em;
}
.entry .comment .comment_input_box .guset_input_box input {
    flex: 0 0 calc(50% - 1em);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--sidebar-hr-color);
}
.entry .comment .write_box {
    display: flex;
    flex-direction: row;
    margin-top: 1em;
    gap: 1em;
}
.entry .comment .write_box input {
    background: transparent;
    border: none;
    font-size: 0.8em;
    font-weight: bold;
}
input#sercret_check {
    position: relative;
    top: 3px;
}
.entry .comment .commentList .reply-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.entry .comment .commentList .reply-list.show {
    max-height: 1000px;
}
.entry .comment .commentList ol {
    display: flex;
    flex-direction: column-reverse;
    -webkit-flex-direction: column-reverse;
}
.entry .comment .commentList ol li {
    list-style: none;
    margin-top: 1em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--sidebar-hr-color);
}
.entry .comment .commentList ol li .rp_admin,
.entry .comment .commentList ol li .rp_general {
    margin-bottom: 1em;
}
.entry .comment .commentList ol li .top {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 0.8em;
}
.entry .comment .commentList ol li .top img {
    height: 2.5em;
    width: 2.5em;
    object-fit: cover;
    border-radius: 100%;
    margin-right: 0.5em;
}
.entry .comment .commentList ol li .top .date {
    margin-left: auto;
    font-style: italic;
    font-size: 0.7em;
}
.entry .comment .commentList ol li .top .date a {
    color: var(--highlight-color);
}
.entry .comment .commentList ol li .mid {
    padding: 0.5em 0 0.5em 0;
}

.entry .comment .commentList ol li .bottom {
    text-align: right;
    font-style: italic;
    font-size: 0.7em;
}
.entry .comment .commentList ol li .bottom .modify {
    margin-right: 1em;
}

.entry .comment .commentList ol li ul li {
    margin-top: 0;
    padding-bottom: 0;
    border-bottom: none;
    width: 90%;
    margin-left: auto;
}
/**********************************************************************/

footer {
    padding: 2em 0;
    text-align: center;
    font-size: 0.8em;
    color: #888;
}
footer a:hover {
    color: var(--highlight-color);
}
/**********************************************************************/

/**********************************************************************/
/* Responsive Web */
@media only screen and (max-width: 1600px) {
    .toc {
        display: none;
    }
}
@media only screen and (max-width: 768px) {
    * {
        font-family: "Noto Sans KR", sans-serif;
    }
    .navbar {
        background-color: var(--dark-bg-color);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 998;
        height: 15px;
    }
    .navbar .blog_title {
        font-size: 0.7em;
    }
    .navbar .search {
        width: 60%;
        height: 30px;
        padding-right: 10px;
    }
    .navbar .search .sbar {
        width: calc(100% - 16px);
        height: 18px;
    }
    .container {
        margin-top: 3em;
    }
    .sidebar {
        z-index: 999;
        padding-top: 2em;
        width: 200px;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        background-color: var(--dark-bg-color);
    }
    .sidebar .sidebar-closeBtn {
        display: block;
    }
    .searchList .one_article {
        flex: 0 0 100%;
    }
    .searchList .one_article .thumbnail {
        height: 20vh;
    }
    .entry_wrap {
        display: block;
    }
    .entry .titleWrap {
        padding-top: 3em;
    }
    .entry .article .article_content {
        padding: 0em 1em 1em 1em;
    }
    .entry .comment {
        padding: 1em;
    }
    .entry .comment .comment_input_box .guset_input_box input {
        width: 50%;
        background: transparent;
        border: none;
        border-bottom: 1px solid var(--sidebar-hr-color);
    }
    .entry .titleWrap {
        margin-top: 1em;
    }
    .toc {
        display: none;
    }
    footer {
        padding: 2em 0.5em;
        text-align: center;
        font-size: 0.7em;
    }
}
/* =========================
   Sidebar Calendar - FINAL (posted day only circle)
========================= */

/* 컨테이너(틀) 유지 */
.sidebar-calendar{
  width: 85%;
  margin: 1em auto;
  padding: 1em;
  border-radius: 1em;
  background-color: var(--dark-bg-second-color);
  border: 1px solid rgba(255,255,255,0.06);
}

.sidebar-calendar-box table{
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed;
  text-align: center;
}

.sidebar-calendar-box th{
  padding: .35em 0 .5em;
  font-size: .65em;
  color: rgba(255,255,255,0.55);
  font-weight: 400;
}

.sidebar-calendar-box td{
  padding: .25em 0;
  font-size: .72em;
}

.sidebar-calendar-box td a{
  color: currentColor !important;  /* ✅ 테마 기본 글자색 따라감 */
  font-weight: 600;
}
.sidebar-calendar-box td span{
  color: rgba(255,255,255,0.35) !important; /* 다크 기본 */
}
body.light .sidebar-calendar-box td span{
  color: rgba(0,0,0,0.35) !important; /* 라이트에서는 회색 */
}


/* ✅ 기본: 동그라미 제거 (글 없는 날 포함 전부) */
.sidebar-calendar-box td a,
.sidebar-calendar-box td span{
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

/* ✅ 작성한 날짜(링크 a)만 동그라미 표시 */
.sidebar-calendar-box td a{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.05em !important;
  height: 2.05em !important;
  border-radius: 999px !important;

  /* 라이트/다크 모두 보이게: 변수로 */
  background-color: var(--cal-circle-bg) !important;
  border: 1px solid var(--cal-circle-border) !important;
}

/* hover */
.sidebar-calendar-box td a:hover{
  background-color: var(--cal-circle-hover) !important;
}

/* 오늘 */
.sidebar-calendar-box .today,
.sidebar-calendar-box td.on a,
.sidebar-calendar-box td .today{
  background-color: var(--highlight-color) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* =========================
   Theme vars
========================= */

/* 기본(다크 가정) */
:root{
  /* 글자색은 기존 로직 유지 */
  --cal-post: rgba(255,255,255,0.95);
  --cal-empty: rgba(255,255,255,0.35);

  /* 🟠 주황 동그라미 */
  --cal-circle-bg: rgba(255, 165, 0, 0.18);      /* 배경 */
  --cal-circle-border: rgba(255, 165, 0, 0.55);  /* 테두리 */
  --cal-circle-hover: rgba(255, 165, 0, 0.28);   /* hover */
}

body.light{
  --cal-post: inherit; /* 또는 currentColor 쓰는게 더 안전 */
  --cal-empty: rgba(0,0,0,0.35); /* 비작성일은 살짝 연하게만 */

  /* ✅ 동그라미: 연두색 */
  --cal-circle-bg: rgba(154, 255, 120, 0.22);     /* 연두 배경 */
  --cal-circle-border: rgba(154, 255, 120, 0.55); /* 연두 테두리 */
  --cal-circle-hover: rgba(154, 255, 120, 0.32);  /* hover 더 진하게 */

}


/* 다크 모드 */
body.dark{
  --cal-post: rgba(255,255,255,0.95);
  --cal-empty: rgba(255,255,255,0.35);

  /* ✅ 동그라미: 연두색 */
  --cal-circle-bg: rgba(154, 255, 120, 0.22);     /* 연두 배경 */
  --cal-circle-border: rgba(154, 255, 120, 0.55); /* 연두 테두리 */
  --cal-circle-hover: rgba(154, 255, 120, 0.32);  /* hover 더 진하게 */

}
/* =========================
   Inline code (final)
   - works even if theme class is on html/body
   - no border, visible on light
========================= */
/* Inline code - high visibility (dark & light) */
:root {
  --code-pill-bg: rgba(255, 170, 60, 0.28);   /* 기본 */
}

body.light {
  --code-pill-bg: rgba(255, 170, 60, 0.35);   /* 라이트에서 더 또렷 */
}

body.dark {
  --code-pill-bg: rgba(255, 170, 60, 0.22);   /* 다크에서 은은 */
}

.entry :not(pre) > code {
  background: var(--code-pill-bg);
  padding: 0.15em 0.5em;
  border-radius: 999px;
  font-family: "D2Coding";
  font-size: 0.9em;
  line-height: 1.25;
  color: inherit;

  /* 🔑 핵심: 테두리 아닌 '음영' */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

/* =========================================================
   FINAL BLOG READABILITY PATCH
   - 기존 theme toggle 구조 유지
   - 새 page-bg/text-main 같은 전역 변수로 덮지 않음
   - 글 본문 가독성만 보정
========================================================= */

/* 기본/다크 모드 색상: 기존 변수 이름 유지 */
:root,
body.dark,
html.dark body {
  --dark-bg-color: rgb(30, 31, 33);
  --dark-bg-second-color: rgb(48, 50, 54);
  --dark-font-color: #d6dae2;
  --sidebar-hr-color: rgba(255, 255, 255, 0.16);

  --article-text-color: #d6dae2;
  --article-title-color: #eceff4;
  --article-subtitle-color: #e2e6ed;
  --article-muted-color: #a8aeb8;
  --article-link-color: #ff9a7a;
  --article-link-hover-color: #ffb199;
  --article-code-bg: rgb(48, 50, 54);
  --article-code-text: #e0e4eb;
  --article-inline-code-bg: rgba(255, 170, 90, 0.18);
  --article-inline-code-text: #ffe0c2;
  --article-table-border: rgba(255, 255, 255, 0.16);
  --article-quote-bg: rgba(255, 255, 255, 0.045);
  --article-quote-border: rgba(255, 154, 122, 0.55);

  --cal-post: rgba(255,255,255,0.92);
  --cal-empty: rgba(255,255,255,0.35);
  --cal-circle-bg: rgba(154, 255, 120, 0.20);
  --cal-circle-border: rgba(154, 255, 120, 0.52);
  --cal-circle-hover: rgba(154, 255, 120, 0.30);
  --code-pill-bg: rgba(255, 170, 60, 0.22);
}

/* 라이트 모드 색상: 기존 변수 이름 유지 */
body.light,
html.light body {
  --dark-bg-color: #F6F7F9;
--dark-bg-second-color: #ECEFF3;
  --dark-font-color: #252932;
  --sidebar-hr-color: rgba(0, 0, 0, 0.13);

  --article-text-color: #252932;
  --article-title-color: #111827;
  --article-subtitle-color: #202632;
  --article-muted-color: #6f7682;
  --article-link-color: #d9533f;
  --article-link-hover-color: #b93f30;
  --article-code-bg: #f2f3f5;
  --article-code-text: #242933;
  --article-inline-code-bg: rgba(255, 150, 70, 0.22);
  --article-inline-code-text: #2f333a;
  --article-table-border: rgba(0, 0, 0, 0.14);
  --article-quote-bg: rgba(0, 0, 0, 0.035);
  --article-quote-border: rgba(217, 83, 63, 0.45);

  --cal-post: rgba(0,0,0,0.82);
  --cal-empty: rgba(0,0,0,0.35);
  --cal-circle-bg: rgba(154, 255, 120, 0.22);
  --cal-circle-border: rgba(110, 210, 80, 0.55);
  --cal-circle-hover: rgba(154, 255, 120, 0.32);
  --code-pill-bg: rgba(255, 170, 60, 0.35);
}

/* 전체 배경/글자는 기존 변수만 사용 */
body {
  background-color: var(--dark-bg-color);
  color: var(--dark-font-color);
}

.navbar,
.sidebar {
  background-color: var(--dark-bg-color);
  color: var(--dark-font-color);
}

.navbar .search,
.sidebar .sidebar-item:hover,
.sidebar .sidebar-category ul li ul li ul li:hover,
.sidebar .sidebar-category .link_tit:hover,
.sidebar-calendar,
.entry .comment .commentWrite,
.tt_box_namecard {
  background-color: var(--dark-bg-second-color);
}

.navbar .search .sbar {
  background-color: var(--dark-bg-color);
  color: var(--dark-font-color);
}

.sidebar .sidebar-category,
.sidebar .sidebar-theme,
.entry .titleWrap {
  border-color: var(--sidebar-hr-color);
}

/* 글 제목 영역 */
.entry .titleWrap h2 a {
  color: var(--article-title-color);
}

.entry .titleWrap .category,
.entry .titleWrap .info,
.entry .titleWrap .info .admin a,
.entry .titleWrap .category a,
#removeButton {
  color: var(--article-muted-color);
}

/* 본문 기본 */
.entry .article .article_content {
  color: var(--article-text-color, var(--dark-font-color));
  font-family: "Noto Sans KR", "NEXON Lv1 Gothic OTF", sans-serif;
  font-size: 1.02em;
  line-height: 1.78;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.entry .article .article_content p,
.entry .article .article_content li {
  color: var(--article-text-color, var(--dark-font-color));
  font-family: "Noto Sans KR", "NEXON Lv1 Gothic OTF", sans-serif;
  line-height: 1.82;
  font-weight: 400;
}

.entry .article .article_content p {
  margin-bottom: 0.75em !important;
}

.entry .article .article_content strong,
.entry .article .article_content b {
  color: var(--article-title-color);
  font-weight: 700;
}

/* 본문 제목: 기존 핑크 전체 제목을 완화 */
.entry .article .article_content h1,
.entry .article .article_content h2,
.entry .article .article_content h3,
.entry .article .article_content h4 {
  font-family: "NEXON Lv1 Gothic OTF", "Noto Sans KR", sans-serif;
  color: var(--article-title-color) !important;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.entry .article .article_content h1 {
  font-size: 1.65em;
  padding-top: 1.8em;
  padding-bottom: 0.7em;
}

.entry .article .article_content h2 {
  font-size: 1.45em;
  padding-top: 1.6em;
  padding-bottom: 0.6em;
}

.entry .article .article_content h3 {
  font-size: 1.28em;
  padding-top: 1.4em;
  padding-bottom: 0.5em;
  color: var(--article-subtitle-color) !important;
}

.entry .article .article_content h4 {
  font-size: 1.12em;
  padding-top: 1.2em;
  padding-bottom: 0.45em;
  color: var(--article-subtitle-color) !important;
}

.entry .article .article_content h1 strong,
.entry .article .article_content h2 strong,
.entry .article .article_content h3 strong,
.entry .article .article_content h4 strong {
  color: inherit !important;
}

/* 링크 */
.entry .article .article_content a,
.entry .article .article_content .contents_style a {
  color: var(--article-link-color) !important;
}

.entry .article .article_content a:hover {
  color: var(--article-link-hover-color) !important;
  text-decoration: underline;
}

/* 리스트 */
.entry .article .article_content ul li,
.entry .article .article_content ol li {
  line-height: 1.82;
  margin: 0.7em 0;
}

.entry .article .article_content li::marker {
  color: var(--article-link-color);
}

/* 코드 블록 */
.entry .article .article_content pre {
  background-color: var(--article-code-bg) !important;
  border: 1px solid var(--article-table-border) !important;
  border-radius: 10px !important;
  margin: 1.2em 0 !important;
  overflow-x: auto !important;
}

.entry .article .article_content pre > code,
.entry .article .article_content pre code.hljs,
.entry .article .article_content .hljs {
  display: block !important;
  background-color: var(--article-code-bg) !important;
  color: var(--article-code-text) !important;
  font-family: "D2Coding", Consolas, monospace !important;
  font-size: 0.9em !important;
  line-height: 1.65 !important;
  padding: 16px !important;
  border-radius: 10px !important;
}

/* 인라인 코드 */
.entry .article .article_content :not(pre) > code,
.entry :not(pre) > code {
  display: inline !important;
  margin: 0 0.08em !important;
  padding: 0.14em 0.45em !important;
  border-radius: 999px !important;
  background-color: var(--article-inline-code-bg) !important;
  color: var(--article-inline-code-text) !important;
  box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.15) !important;
  font-family: "D2Coding", Consolas, monospace !important;
  font-size: 0.9em !important;
  line-height: 1.35 !important;
  vertical-align: baseline !important;
}

/* 표 */
.entry .article .article_content table {
  border-color: var(--article-table-border) !important;
}

.entry .article .article_content table th,
.entry .article .article_content table td,
.entry .article .article_content table tbody tr td {
  color: var(--article-text-color, var(--dark-font-color)) !important;
  border-color: var(--article-table-border) !important;
}

.entry .article .article_content table th {
  background-color: var(--dark-bg-second-color) !important;
  color: var(--article-title-color) !important;
}

/* 인용문 */
.entry .article .article_content blockquote {
  background-color: var(--article-quote-bg) !important;
  border-left: 4px solid var(--article-quote-border) !important;
  color: var(--article-text-color, var(--dark-font-color)) !important;
  padding: 1em 1.2em !important;
  margin: 1.2em 0 !important;
  border-radius: 0.4em !important;
}

/* 파일/오픈그래프/다른 글 */
.entry .article .article_content figure,
.entry .article .article_content figcaption,
.entry .article .article_content figure.fileblock .filename {
  color: var(--article-text-color, var(--dark-font-color)) !important;
}

figure[data-ke-type="opengraph"],
#tt-body-page figure[data-ke-type="opengraph"],
.entry .article .article_content .another_category.another_category_color_gray {
  background-color: var(--dark-bg-second-color) !important;
  border-color: var(--article-table-border) !important;
}

figure[data-ke-type="opengraph"] div.og-text p.og-title,
#tt-body-page figure[data-ke-type="opengraph"] div.og-text p.og-title,
.entry .article .article_content .another_category.another_category_color_gray h4,
.entry .article .article_content .another_category.another_category_color_gray h4 a {
  color: var(--article-title-color) !important;
}

.entry .article .article_content .another_category.another_category_color_gray * {
  color: var(--article-text-color, var(--dark-font-color)) !important;
}

/* 태그 */
.entry .article .tagTrail {
  color: var(--article-muted-color);
}

.entry .article .tagTrail .tagText {
  color: var(--article-link-color);
}

.entry .article .tagTrail a {
  background-color: var(--dark-bg-second-color);
  color: var(--article-text-color, var(--dark-font-color));
}

.entry .article .tagTrail a:hover {
  background-color: var(--article-link-color);
  color: #fff;
}

/* 댓글 */
.entry .comment,
.entry .comment textarea,
.entry .comment input {
  color: var(--dark-font-color);
}

.entry .comment textarea::placeholder,
.entry .comment input::placeholder {
  color: var(--article-muted-color);
}

.entry .comment .comment_input_box textarea,
.entry .comment .comment_input_box .guset_input_box input,
.entry .comment .commentList ol li {
  border-color: var(--sidebar-hr-color);
}

/* 캘린더 */
.sidebar-calendar {
  background-color: var(--dark-bg-second-color) !important;
  border-color: var(--sidebar-hr-color) !important;
}

.sidebar-calendar-box th {
  color: var(--article-muted-color) !important;
}

.sidebar-calendar-box td a {
  color: var(--cal-post) !important;
  background-color: var(--cal-circle-bg) !important;
  border-color: var(--cal-circle-border) !important;
}

.sidebar-calendar-box td span {
  color: var(--cal-empty) !important;
}

.sidebar-calendar-box td a:hover {
  background-color: var(--cal-circle-hover) !important;
}

.sidebar-calendar-box .today,
.sidebar-calendar-box td.on a,
.sidebar-calendar-box td .today {
  background-color: var(--highlight-color) !important;
  color: #fff !important;
}

/* 모바일 */
@media only screen and (max-width: 768px) {
  .entry .article .article_content {
    font-size: 1em;
    line-height: 1.78;
    word-break: break-word;
  }

  .entry .article .article_content p,
  .entry .article .article_content li {
    line-height: 1.78;
  }
}
/* =========================================================
   Theme article readability fix
   - JS에서 body.light / body.dark 클래스가 붙는 것을 기준으로 작동
   - style.css 맨 아래에 추가
========================================================= */

/* ---------- Dark mode ---------- */

body.dark .entry .article .article_content {
  color: #d8dbe2 !important;
  line-height: 1.75 !important;
}

body.dark .entry .article .article_content p,
body.dark .entry .article .article_content li {
  color: #d8dbe2 !important;
  line-height: 1.75 !important;
}

body.dark .entry .article .article_content span:not([style*="color"]) {
  color: inherit !important;
}

body.dark .entry .article .article_content strong,
body.dark .entry .article .article_content b {
  color: #f1f3f6 !important;
}

body.dark .entry .article .article_content h1,
body.dark .entry .article .article_content h2,
body.dark .entry .article .article_content h3,
body.dark .entry .article .article_content h4,
body.dark .entry .article .article_content h1 *,
body.dark .entry .article .article_content h2 *,
body.dark .entry .article .article_content h3 *,
body.dark .entry .article .article_content h4 * {
  color: #f1f3f6 !important;
}

body.dark .entry .article .article_content a,
body.dark .entry .article .article_content .contents_style a {
  color: #ff9a7a !important;
}

/* ---------- Light mode ---------- */

body.light .entry .article .article_content {
  color: #242933 !important;
  line-height: 1.75 !important;
}

body.light .entry .article .article_content p,
body.light .entry .article .article_content li {
  color: #242933 !important;
  line-height: 1.75 !important;
}

body.light .entry .article .article_content span:not([style*="color"]) {
  color: inherit !important;
}

body.light .entry .article .article_content strong,
body.light .entry .article .article_content b {
  color: #111827 !important;
}

body.light .entry .article .article_content h1,
body.light .entry .article .article_content h2,
body.light .entry .article .article_content h3,
body.light .entry .article .article_content h4,
body.light .entry .article .article_content h1 *,
body.light .entry .article .article_content h2 *,
body.light .entry .article .article_content h3 *,
body.light .entry .article .article_content h4 * {
  color: #111827 !important;
}

body.light .entry .article .article_content a,
body.light .entry .article .article_content .contents_style a {
  color: #d94f3d !important;
}

/* ---------- Shared ---------- */

body.dark .entry .article .article_content p,
body.light .entry .article .article_content p {
  margin-bottom: 0.6em !important;
}

body.dark .entry .article .article_content li,
body.light .entry .article .article_content li {
  margin-top: 0.65em !important;
  margin-bottom: 0.65em !important;
}

body.dark .entry .article .article_content li::marker {
  color: #ff8a70 !important;
}

body.light .entry .article .article_content li::marker {
  color: #d94f3d !important;
}

/* 인라인 코드 */
body.dark .entry .article .article_content :not(pre) > code {
  color: #ffe2c7 !important;
  background-color: rgba(255, 170, 90, 0.18) !important;
}

body.light .entry .article .article_content :not(pre) > code {
  color: #2b2f36 !important;
  background-color: rgba(255, 150, 70, 0.22) !important;
}

/* 코드블록 */
body.dark .entry .article .article_content pre,
body.dark .entry .article .article_content pre > code,
body.dark .entry .article .article_content pre code.hljs {
  background-color: rgb(50, 51, 53) !important;
  color: #e2e5ea !important;
}

body.light .entry .article .article_content pre,
body.light .entry .article .article_content pre > code,
body.light .entry .article .article_content pre code.hljs {
  background-color: #2f3136 !important;
  color: #e5e7eb !important;
}

/* 표 */
body.dark .entry .article .article_content table,
body.dark .entry .article .article_content table * {
  color: #d8dbe2 !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

body.light .entry .article .article_content table,
body.light .entry .article .article_content table * {
  color: #242933 !important;
  border-color: rgba(0, 0, 0, 0.14) !important;
}

/* 인용문 */
body.dark .entry .article .article_content blockquote,
body.dark .entry .article .article_content blockquote * {
  color: #d8dbe2 !important;
}

body.light .entry .article .article_content blockquote,
body.light .entry .article .article_content blockquote * {
  color: #374151 !important;
}

/* 글 제목 영역 */
body.dark .entry .titleWrap h2 a {
  color: #f1f3f6 !important;
}

body.light .entry .titleWrap h2 a {
  color: #111827 !important;
}

body.dark .entry .titleWrap .info,
body.dark .entry .titleWrap .info *,
body.dark .entry .titleWrap .category a {
  color: #9ca1aa !important;
}

body.light .entry .titleWrap .info,
body.light .entry .titleWrap .info *,
body.light .entry .titleWrap .category a {
  color: #6b7280 !important;
}
/* TIL 코드블록 가독성 개선 */
pre[class],
pre[class] code {
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.7;
}

pre[class] {
  max-width: 100%;
  box-sizing: border-box;
  margin: 18px 0 28px;
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  white-space: pre;
  background-color: #1f2329;
}

pre[class] code {
  display: block;
  white-space: pre;
}
/* TIL 코드블록 밝은 테마 */
pre.arduino {
  background: #f6f8fa !important;
  color: #24292f !important;
  border: 1px solid #d0d7de !important;
  border-radius: 10px !important;
  padding: 18px 20px !important;
  margin: 18px 0 28px !important;
  line-height: 1.7 !important;
  overflow-x: auto !important;
}

pre.arduino code {
  background: transparent !important;
  color: #24292f !important;
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace !important;
  font-size: 14px !important;
}

/* 코드 하이라이트 색상 */
pre.arduino .hljs-keyword,
pre.arduino .hljs-built_in,
pre.arduino .hljs-type {
  color: #cf222e !important;
}

pre.arduino .hljs-string {
  color: #0a3069 !important;
}

pre.arduino .hljs-number,
pre.arduino .hljs-literal {
  color: #0550ae !important;
}

pre.arduino .hljs-comment {
  color: #6e7781 !important;
}

pre.arduino .hljs-title,
pre.arduino .hljs-function {
  color: #8250df !important;
}

pre.arduino .hljs-variable,
pre.arduino .hljs-params {
  color: #953800 !important;
}
/* ===== TIL 코드블록 색상 강제 변경 ===== */

/* 코드블록 전체 배경 */
.tt_article_useless_p_margin pre,
.tt_article_useless_p_margin pre.arduino,
.tt_article_useless_p_margin pre[data-ke-type='codeblock'],
.tt_article_useless_p_margin pre code,
.tt_article_useless_p_margin pre .hljs,
pre,
pre code,
pre .hljs {
  background: #f6f8fa !important;
  color: #24292f !important;
  text-shadow: none !important;
}

/* 코드블록 박스 */
.tt_article_useless_p_margin pre,
pre {
  border: 1px solid #d0d7de !important;
  border-radius: 10px !important;
  padding: 18px 20px !important;
  margin: 18px 0 28px !important;
  box-shadow: none !important;
}

/* 코드 내부 글자 */
.tt_article_useless_p_margin pre code,
.tt_article_useless_p_margin pre .hljs,
pre code,
pre .hljs {
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
}

/* 키워드 */
.hljs-keyword,
.hljs-selector-tag,
.hljs-built_in,
.hljs-type {
  color: #cf222e !important;
}

/* 문자열 */
.hljs-string,
.hljs-attr {
  color: #0a3069 !important;
}

/* 숫자 */
.hljs-number,
.hljs-literal {
  color: #0550ae !important;
}

/* 주석 */
.hljs-comment {
  color: #6e7781 !important;
  font-style: italic !important;
}

/* 함수명 / 클래스명 */
.hljs-title,
.hljs-function,
.hljs-class {
  color: #8250df !important;
}

/* 변수 */
.hljs-variable,
.hljs-params {
  color: #953800 !important;
}