@charset "utf-8";

/* =========================================
   1. Global Resets & Tistory Overrides
   ========================================= */
#tistory-toolbar,
.tt_toolbar_container,
.plugin_author,
div[data-tistory-react-app="Namecard"],
.tt_adsense_bottom,
#tistorytoolbarid,
.tt_menubar,
#kakaoWrap #kakaoHead,
.tistoryProfileLayerTrigger {
    display: none !important;
}

/* Force Vertical Scrollbar & Stability */
html {
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

body {
    overflow: visible !important;
}

/* Global Scrollbar Styling */
::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: #18181b;
}

::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 10px;
    border: 4px solid #18181b;
}

::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: #27272a #18181b;
}

/* Guestbook Input Reset */
input[type="text"],
input[type="password"],
textarea {
    appearance: none;
    -webkit-appearance: none;
}

/* Mobile Scrollbar Hide */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Syntax Highlighting */
/* Syntax Highlighting & Code Blocks */
.hljs,
pre,
code,
.prose pre,
.prose code {
    background-color: #282c34 !important;
    /* Atom One Dark BG */
    color: #abb2bf !important;
    /* Atom One Dark FG */
    font-family: 'JetBrains Mono', monospace !important;
}

.hljs {
    display: block;
    overflow-x: auto;
    padding: 1.25rem !important;
    border-radius: 0.75rem !important;
    line-height: 1.6 !important;
    font-size: 0.9rem !important;
}

/* Custom Scrollbar for Code Blocks */
.hljs::-webkit-scrollbar {
    height: 8px;
    /* Horizontal Scrollbar Height */
}

.hljs::-webkit-scrollbar-track {
    background: #21252b;
    /* Slightly darker than code bg */
    border-radius: 4px;
}

.hljs::-webkit-scrollbar-thumb {
    background: #4b5263;
    /* Muted Grey */
    border-radius: 4px;
}

.hljs::-webkit-scrollbar-thumb:hover {
    background: #5c6370;
    /* Slightly lighter on hover */
}

/* Atom One Dark Syntax Colors (Forced) */
.hljs-comment,
.hljs-quote {
    color: #5c6370 !important;
    font-style: normal !important;
}

.hljs-doctag,
.hljs-keyword,
.hljs-formula {
    color: #c678dd !important;
    /* Purple */
}

.hljs-built_in {
    color: #e5c07b !important;
    /* Soft Gold/Yellow for print(), etc. */
}

.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
    color: #e06c75 !important;
    /* Red */
}

.hljs-literal {
    color: #56b6c2 !important;
    /* Cyan */
}

.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta .hljs-string {
    color: #98c379 !important;
    /* Green */
}

.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
    color: #d19a66 !important;
    /* Orange */
}

.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
    color: #60a5fa !important;
    /* Brighter Blue */
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: bold;
}

.hljs-link {
    text-decoration: underline;
}

/* Ensure contrast for inline code */
.prose pre code {
    background-color: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    border: none !important;
}

/* Prose Image Radius */
.prose img {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

/* Remove default P margins */
.tt_article_useless_p_margin p {
    margin: 1.5em 0;
}

/* =========================================
   2. Layout & Post Limits
   ========================================= */
/* Ensure desktop has height for 9 posts + pagination */
#main-layout main {
    position: relative !important;
    min-height: 1600px !important;
    padding-bottom: 120px !important;
}

@media (max-width: 1280px) {
    #main-layout main {
        min-height: 2000px !important;
    }
}

@media (max-width: 768px) {
    #main-layout main {
        min-height: auto !important;
        padding-bottom: 80px !important;
    }
}

/* Hide posts > 9 */
#main-layout main>article:nth-of-type(n+10) {
    display: none !important;
}

/* =========================================
   3. Pagination Design
   ========================================= */
/* =========================================
   3. Pagination Design
   ========================================= */
.pagination {
    position: relative !important;
    /* Flow naturally after content */
    margin-top: 60px !important;
    /* Space from content */
    margin-bottom: 40px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    gap: 8px;
    z-index: 10;
}

/* Anti-Flicker Cloak */
.cloak-until-loaded {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.cloak-until-loaded.loaded {
    opacity: 1;
}

.pagination a,
.pagination span {
    pointer-events: auto;
    padding: 8px 12px;
    border-radius: 6px;
    background: #27272a;
    color: #a1a1aa;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination .selected,
.pagination .current {
    background: #c084fc;
    color: white;
    font-weight: bold;
}

/* =========================================
   4. FOUC Prevention (Fade-In Animation)
   ========================================= */
/* 4. FOUC Prevention (JS-Triggered Fade-In) */
#sidebar-desktop,
#toc-container,
#guestbook-container,
#guestbook-list,
#guestbook-form {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* State when JS adds this class */
#sidebar-desktop.is-loaded,
#toc-container.is-loaded,
#guestbook-container.is-loaded,
#guestbook-list.is-loaded,
#guestbook-form.is-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 5. Sleek Dark Tag Design (Reference Match) */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    /* Compact gap */
    margin-top: 3rem;
    font-size: 0 !important;
}

.tag-container a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    /* Slightly compact height */
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 400;
    /* Regular weight */
    color: #a1a1aa;
    /* text-zinc-400 */
    background: #18181b;
    /* Dark specific bg matching reference */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    /* Soft rounded corners */
    transition: all 0.2s ease;
    text-decoration: none;
}

/* Add Hash (#) Prefix */
.tag-container a::before {
    content: "#";
    margin-right: 2px;
    color: #71717a;
    /* Dimmer hash */
}

.tag-container a:hover {
    background: #27272a;
    /* Slightly lighter on hover */
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Hide the old icon if it exists in HTML, as reference doesn't emphasize it */
.tag-container i {
    display: none !important;
}

/* 6. HIDE Tistory Default Elements (Reset) */
/* Sympathy, Share, Stats, Etc */
.container_postbtn {
    display: none !important;
}

/* Related Articles (Another Category) */
.another_category {
    display: none !important;
}

/* Additional Tistory Injected Layers (Statistics, Etc) */
/* [Extended] 8. Modern Comment Section Styling */
/* Input Box Visibility Fix */
#comments-section textarea {
    background-color: rgba(39, 39, 42, 0.6) !important;
    /* Lighter bg */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    /* Stronger border */
    color: #f4f4f5 !important;
}

#comments-section textarea:focus {
    background-color: rgba(39, 39, 42, 0.9) !important;
    border-color: #c084fc !important;
}

/* Admin (Owner) Styling */
/* Tistory adds 'rp_admin' class to the li if it's the owner */
li.rp_admin .rp_admin-avatar {
    border: 2px solid #c084fc !important;
    /* Purple border for owner */
}

li.rp_admin .flex-1 .flex span:first-child {
    color: #c084fc !important;
    /* Purple name */
}

/* Add Checkmark Badge for Owner */
li.rp_admin .flex-1 .flex span:first-child::after {
    content: '\f058';
    /* FontAwesome Check Circle */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 6px;
    font-size: 0.85rem;
    color: #c084fc;
}

/* Secret Comment Styling */
/* Secret Comment Styling - Clean Text Only */
li.rp_secret .text-zinc-300 {
    color: #a1a1aa !important;
    font-size: 0.95rem;
    /* Standard size */
    opacity: 0.8;
}

/* Remove the previous lock from content */
li.rp_secret .text-zinc-300::before {
    content: none !important;
}

/* Add Lock Icon to Header (Next to Date/Report) */
/* Lock Icon Removed as per preference */
li.rp_secret .flex.items-baseline::after {
    content: none !important;
}

/* Avatar Placeholder Random Colors (Simulation) */
/* Guest Avatars (DiceBear Enhanced) */
/* Only target images that are explicitly avatars */
li:not(.rp_admin) img.guest-avatar-enhanced,
li:not(.rp_admin) .profile-image img {
    background-color: #f4f4f5;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease;
}

li:not(.rp_admin):hover img.guest-avatar-enhanced {
    transform: scale(1.1) rotate(5deg);
}

/* Fix Emojis & Content Images */
/* Ensure emojis inside the comment text content do NOT get avatar styling */
.text-zinc-300 img {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: inline-block !important;
    vertical-align: middle;
    margin: 0 2px;
    box-shadow: none !important;
    transform: none !important;
}

/* Input Form Focus Effects */
textarea:focus {
    box-shadow: none !important;
    /* Remove default browser rings */
}

/* Checkbox Customization */
input[type="checkbox"]:checked {
    background-color: transparent !important;
    border-color: #c084fc !important;
    color: #c084fc !important;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%23c084fc' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e") !important;
}


.another_category td a {
    color: #e4e4e7 !important;
    /* text-zinc-200 */
    text-decoration: none !important;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 60vw;
    /* Prevent overflow */
}

.another_category tr:hover td a {
    color: #c084fc !important;
}

/* Date */
.another_category td.date {
    font-size: 0.85rem !important;
    color: #71717a !important;
    /* text-zinc-500 */
    min-width: 80px;
    text-align: right;
}

/* -------------------------------------------------------------------------- */
/*                          Link Embed (OpenGraph) Styling                    */
/* -------------------------------------------------------------------------- */
figure[data-ke-type="opengraph"] {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    display: block !important;
    line-height: 0 !important;
}

figure[data-ke-type="opengraph"] a {
    display: flex !important;
    min-height: 150px !important;
    height: auto !important;
    /* Allow growth */
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    background-color: rgba(24, 24, 27, 0.6) !important;
    /* zinc-900/60 */
    text-decoration: none !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

figure[data-ke-type="opengraph"] a:hover {
    background-color: rgba(39, 39, 42, 0.8) !important;
    /* zinc-800/80 */
    border-color: rgba(192, 132, 252, 0.3) !important;
    /* accent/30 */
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

/* Image Section */
figure[data-ke-type="opengraph"] .og-image {
    width: 25% !important;
    min-width: 140px !important;
    max-width: 200px !important;
    height: 100% !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background-size: cover !important;
    background-position: center !important;
    position: relative;
    overflow: hidden;
}

/* Subtle overlay on image */
figure[data-ke-type="opengraph"] .og-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
}

/* Text Container */
figure[data-ke-type="opengraph"] .og-text {
    flex: 1 !important;
    padding: 1.25rem 1.5rem !important;
    /* Reverted padding */
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    background: transparent !important;
    height: 100% !important;
    /* Ensure full height for margin-top: auto to work */
}

/* Title */
figure[data-ke-type="opengraph"] .og-title {
    font-family: 'Pretendard', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #f4f4f5 !important;
    /* zinc-100 */
    margin-bottom: 0.5rem !important;
    line-height: 1.4 !important;

    /* Ellipsis */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

/* Description */
figure[data-ke-type="opengraph"] .og-desc {
    font-family: 'Pretendard', sans-serif !important;
    font-size: 0.875rem !important;
    /* 14px */
    color: #a1a1aa !important;
    /* zinc-400 */
    line-height: 1.5 !important;
    margin-bottom: 0 !important;
    /* Removed auto margin from desc */

    /* Multi-line ellipsis (2 lines) */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
    word-break: keep-all !important;
    /* Prevent mid-word breaks for Korean */
}

/* Host/URL */
/* Host/URL */
/* Host/URL */
figure[data-ke-type="opengraph"] .og-host {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.75rem !important;
    /* 12px */
    color: #71717a !important;
    /* zinc-500 */
    margin-top: 0 !important;
    position: absolute !important;
    bottom: -17px !important;
    left: 1.5rem !important;
    width: calc(100% - 3rem) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

figure[data-ke-type="opengraph"] .og-host::before {
    content: '\f0c1';
    /* Link Icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: #c084fc;
    /* accent */
    opacity: 0.7;
}

/* Mobile Adjustments */
/* Mobile Adjustments (Link Embed Card Style) */
@media (max-width: 1024px) {

    /* 0. Parent Figure: Flush Left Reset */
    html body figure[data-ke-type="opengraph"] {
        margin: 0 !important;
        /* Mobile Vertical Spacing */
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        line-height: 0 !important;
    }

    /* 1. Container: Horizontal Flex Layout */
    html body figure[data-ke-type="opengraph"] a {
        display: flex !important;
        /* Row Layout */
        flex-direction: row !important;
        height: 80px !important;
        min-height: 80px !important;
        /* Compact Height FORCE OVERRIDE */
        margin: 0 !important;
        padding: 0 !important;
        text-decoration: none !important;
        background: #18181b !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        /* Clip image corners */
    }

    /* 2. Image: Thumbnail Style (Left) */
    html body figure[data-ke-type="opengraph"] .og-image {
        display: block !important;
        width: 85px !important;
        /* Larger Thumbnail */
        min-width: 85px !important;
        height: 100% !important;
        margin: 0 !important;
        border: none !important;
        border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding: 0 !important;
        object-fit: cover !important;
    }

    /* 3. Text Container: Flex Grow (Right) */
    html body figure[data-ke-type="opengraph"] .og-text {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        flex: 1 !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 1rem !important;
        /* Side Padding */
        text-align: left !important;
        background: transparent !important;
        border: none !important;
        box-sizing: border-box !important;
    }

    /* 4. Title */
    html body figure[data-ke-type="opengraph"] .og-title {
        display: -webkit-box !important;
        /* Required for line-clamp */
        -webkit-box-orient: vertical !important;
        /* Required for line-clamp */
        font-size: 0.75rem !important;
        /* Compact Title */
        line-height: 1.35 !important;
        margin-bottom: 0.25rem !important;
        white-space: normal !important;
        word-break: break-all !important;
        color: #f4f4f5 !important;
        opacity: 1 !important;
        -webkit-line-clamp: 2 !important;
        /* Limit lines */
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* 5. Description: Hidden */
    html body figure[data-ke-type="opengraph"] .og-desc {
        display: none !important;
    }

    /* 6. Host / URL */
    html body figure[data-ke-type="opengraph"] .og-host {
        display: block !important;
        position: static !important;
        margin: 0 !important;
        font-size: 0.7rem !important;
        /* Smaller Host */
        color: #a1a1aa !important;
        opacity: 0.8 !important;
    }
}

/* -------------------------------------------------------------------------- */
/*                        Refined Comment Form Styling                        */
/* -------------------------------------------------------------------------- */

/* 1. Comment Form Container */
.comment-form-box {
    background: linear-gradient(145deg, rgba(39, 39, 42, 0.4), rgba(24, 24, 27, 0.95)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .comment-form-box {
        backdrop-filter: none !important;
        background: #18181b !important;
        /* Fallback solid color */
    }
}

/* 2. Textarea Styling */
.comment-form-box textarea {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 1.25rem !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #f4f4f5 !important;
    /* zinc-100 */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: 120px !important;
}

.comment-form-box textarea::placeholder {
    color: rgba(161, 161, 170, 0.8) !important;
    /* zinc-400/80 - More visible */
    font-weight: 500;
}

.comment-form-box textarea:focus {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(192, 132, 252, 0.6) !important;
    /* accent/60 */
    box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.15) !important;
}

/* 3. Submit Button Styling */
.comment-form-box button {
    background: #7c3aed !important;
    /* Solid Violet 600 - Calmer, deep purple */
    color: #ffffff !important;
    font-weight: 700 !important;
    border: none !important;
    padding: 0.6rem 2rem !important;
    border-radius: 9999px !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.02em !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    /* Standard subtle shadow, no glow */
    cursor: pointer;
}

.comment-form-box button:hover {
    background: #6d28d9 !important;
    /* Violet 700 hover */
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

.comment-form-box button:active {
    transform: translateY(0);
}

/* 4. Guest Input Fields - Completely Hidden (Logged-in only) */
.comment-form-box input[type="text"],
.comment-form-box input[type="password"] {
    display: none !important;
}

/* 5. Secret Checkbox Styling */
.comment-form-box label {
    margin-right: 1.5rem !important;
    /* More spacing after checkbox */
    display: flex !important;
    align-items: center !important;
}

.comment-form-box label span {
    font-size: 0.9rem !important;
    color: #a1a1aa !important;
    /* zinc-400 */
    font-weight: 500;
}

.comment-form-box label:hover span {
    color: #c084fc !important;
}

.comment-form-box input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem !important;
    height: 1.25rem !important;
    border: 1.5px solid rgba(161, 161, 170, 0.5) !important;
    border-radius: 4px !important;
    /* Slightly less rounded */
    background-color: rgba(255, 255, 255, 0.05) !important;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    vertical-align: middle;
    margin-right: 8px !important;
}

.comment-form-box input[type="checkbox"]:checked {
    background-color: #c084fc !important;
    border-color: #c084fc !important;
}

.comment-form-box input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: #ffffff;
    /* White check for better contrast */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.comment-form-box input[type="checkbox"]:hover {
    border-color: #c084fc !important;
}

/* -------------------------------------------------------------------------- */
/*                          Blockquote / Quote Styling                        */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/*                          Blockquote / Quote Styling                        */
/* -------------------------------------------------------------------------- */

/* Common Blockquote Reset */
.prose blockquote,
.tt_article_useless_p_margin blockquote {
    margin: 2rem 0 !important;
    padding: 1.5rem 2rem !important;
    word-break: break-all;
    color: #e4e4e7 !important;
    /* zinc-200 */
}

.prose blockquote p,
.tt_article_useless_p_margin blockquote p {
    margin: 0 !important;
    line-height: 1.7 !important;
}

/* Remove Automatic Quotes (Tailwind Typography Reset) */
.prose blockquote p:first-of-type::before,
.prose blockquote p:last-of-type::after,
.tt_article_useless_p_margin blockquote p:first-of-type::before,
.tt_article_useless_p_margin blockquote p:last-of-type::after {
    content: none !important;
}

/* Style 1: Centered Quote (인용1) - Editor Style Adapted */
.prose blockquote[data-ke-style="style1"],
.tt_article_useless_p_margin blockquote[data-ke-style="style1"] {
    position: relative !important;
    text-align: center !important;
    background: transparent !important;
    /* No box, like editor */
    border: none !important;
    padding-top: 4rem !important;
    padding-bottom: 2rem !important;
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    color: #f4f4f5 !important;
    /* Brighter text for focus */
}

/* Style 1 Icon (Replaces default BG image for better dark mode control) */
.prose blockquote[data-ke-style="style1"]::before,
.tt_article_useless_p_margin blockquote[data-ke-style="style1"]::before {
    content: '\f10d';
    /* FontAwesome Quote Left */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2.5rem;
    color: #71717a;
    /* zinc-500 (Gray like editor) */
    opacity: 0.5;
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
}

/* Style 2: Left Line (인용2) */
.prose blockquote[data-ke-style="style2"],
.tt_article_useless_p_margin blockquote[data-ke-style="style2"] {
    border-left: 4px solid #c084fc !important;
    /* Accent */
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 0 8px 8px 0 !important;
}

/* Style 3: Box (인용3) */
.prose blockquote[data-ke-style="style3"],
.tt_article_useless_p_margin blockquote[data-ke-style="style3"] {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: transparent !important;
    border-radius: 12px !important;
    color: #d4d4d8 !important;
}

/* Fallback / Default Blockquote Styling */
.prose blockquote:not([data-ke-style]),
.tt_article_useless_p_margin blockquote:not([data-ke-style]) {
    border-left: 4px solid #71717a !important;
    /* Neutral for user blocks */
    background: rgba(255, 255, 255, 0.02) !important;
}

/* -------------------------------------------------------------------------- */
/*                          Content Link Styling                              */
/* -------------------------------------------------------------------------- */
.tt_article_useless_p_margin a,
.prose a {
    color: #c084fc !important;
    /* Accent Purple */
    text-decoration: none !important;
    border-bottom: 1px solid rgba(192, 132, 252, 0.3);
    transition: all 0.2s ease;
}

.tt_article_useless_p_margin a:hover,
.prose a:hover {
    color: #d8b4fe !important;
    /* Lighter Purple */
    border-bottom-color: #d8b4fe;
    background: rgba(192, 132, 252, 0.1);
    border-radius: 2px;
}

/* -------------------------------------------------------------------------- */
/*                        Post Navigation (Prev/Next)                         */
/* -------------------------------------------------------------------------- */
.nav-card {
    position: relative;
    background-color: #18181b !important;
    /* zinc-900 */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 1rem !important;
    padding: 1.5rem !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
}

.nav-card:hover {
    transform: translateY(-4px);
    border-color: rgba(192, 132, 252, 0.5) !important;
    box-shadow: 0 10px 30px -5px rgba(192, 132, 252, 0.15);
}

/* Gradient Overlay */
.nav-card .hover-gradient {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.nav-card:hover .hover-gradient {
    opacity: 1;
}


/* Prev Card Gradient */
.nav-card.prev .hover-gradient {
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.1), transparent);
}

/* Next Card Gradient */
.nav-card.next .hover-gradient {
    background: linear-gradient(225deg, rgba(192, 132, 252, 0.1), transparent);
}

/* Content Layer */
.nav-card .relative {
    position: relative;
    z-index: 10;
}

/* Icon Circle */
.nav-card .icon-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-card:hover .icon-circle {
    background-color: #c084fc;
    color: #000;
}

.nav-card:hover .icon-circle i {
    color: #000 !important;
}

/* Text Styles */
.nav-card h4 {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #e4e4e7 !important;
    line-height: 1.4 !important;
    margin-top: 0.5rem !important;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-card:hover h4 {
    color: #ffffff !important;
}

.nav-card .label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #71717a;
    /* zinc-500 */
    transition: color 0.3s ease;
}

.nav-card:hover .label {
    color: #c084fc;
}

/* Custom Tag Styling - Subtle/Text Only */
.tag-container a {
    /* Reset Box Properties */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 0.35rem 0 0 !important;
    /* Extremely tight right spacing */

    /* Typography */
    color: #52525b !important;
    font-size: 0.7rem !important;
    /* 11px equivalent */
    line-height: 1 !important;
    /* Compact vertical height */
    font-weight: 400 !important;
    font-family: monospace, ui-monospace, SFMono-Regular !important;
    /* Tech feel */
    text-decoration: none !important;

    /* Transition */
    transition: color 0.2s ease !important;
    display: inline-block !important;
}

.tag-container a:hover {
    color: #c084fc !important;
    /* Accent Color on Hover */
    background: transparent !important;
    text-decoration: none !important;
}

/* Optional: Add hash if missing (Visual flair) */
.tag-container a::before {
    /* ... previous content ... */
    content: "#";
    margin-right: 1px;
    opacity: 0.5;
}

/* =========================================
   7. Content Typography System (Theme Match)
   ========================================= */

/* Main Content Wrapper */
.tt_article_useless_p_margin,
.prose {
    color: #e4e4e7;
    /* zinc-200 */
    line-height: 1.75;
}

/* Ensure Bold Tags are Visible in Dark Mode */
b,
strong,
.tt_article_useless_p_margin b,
.tt_article_useless_p_margin strong,
.prose b,
.prose strong {
    font-weight: 700 !important;
    color: #fff !important;
    /* Force white for contrast */
}

/* Title 1 (H2) - User liked this, keeping it prominent */
.tt_article_useless_p_margin h2,
.prose h2 {
    font-size: 1.875rem !important;
    /* 30px */
    font-weight: 700 !important;
    color: #f4f4f5 !important;
    /* zinc-100 */
    margin-top: 3.5rem !important;
    margin-bottom: 1.25rem !important;
    letter-spacing: -0.01em !important;
    line-height: 1.3 !important;
    border-bottom: none !important;
    /* Clean look */
}

/* Title 2 (H3) - Requested to be smaller */
.tt_article_useless_p_margin h3,
.prose h3 {
    font-size: 1.5rem !important;
    /* 24px (Reduced from typical 1.5rem~1.8rem) */
    font-weight: 600 !important;
    color: #e4e4e7 !important;
    /* zinc-200 */
    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.4 !important;
}

/* Title 3 (H4) - Distinct subsection style */
.tt_article_useless_p_margin h4,
.prose h4 {
    font-size: 1.25rem !important;
    /* 20px */
    font-weight: 600 !important;
    color: #d4d4d8 !important;
    /* zinc-300 */
    margin-top: 2rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.5 !important;
}

/* Body Text (P) - Default Paragraph */
.tt_article_useless_p_margin p,
.prose p {
    font-size: 1.0625rem !important;
    /* 17px - optimal reading size */
    color: #d4d4d8 !important;
    /* zinc-300 */
    margin-bottom: 1.5rem !important;
    line-height: 1.8 !important;
    /* Relaxed reading */
    word-break: break-all;
}

/* List Styling */
.tt_article_useless_p_margin ul,
.tt_article_useless_p_margin ol {
    margin-bottom: 1.5rem !important;
    padding-left: 1.5rem !important;
    color: #d4d4d8 !important;
}

.tt_article_useless_p_margin li {
    margin-bottom: 0.5rem !important;
    line-height: 1.7 !important;
}

.tt_article_useless_p_margin ul {
    list-style-type: disc !important;
}

/* ... previous content ... */
.tt_article_useless_p_margin ol {
    list-style-type: decimal !important;
}

/* =========================================
   8. Horizontal Rule (Divider) System
   ========================================= */
.tt_article_useless_p_margin hr,
.prose hr {
    display: block;
    border: 0;
    margin: 4rem auto !important;
    opacity: 1 !important;
    /* Ensure visibility */
}

/* Style 1: Dots (· · ·) - Kept as is */
.tt_article_useless_p_margin hr[data-ke-style="style1"],
.prose hr[data-ke-style="style1"] {
    background: transparent !important;
    height: 30px !important;
    width: 100% !important;
    position: relative;
}

.tt_article_useless_p_margin hr[data-ke-style="style1"]::after,
.prose hr[data-ke-style="style1"]::after {
    content: "· · ·";
    font-size: 40px;
    line-height: 0px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #e4e4e7;
    /* zinc-200 (Bright for contrast) */
    font-weight: 900;
    letter-spacing: 12px;
    text-indent: 12px !important;
    /* Perfect center alignment */
    margin-right: 0 !important;
}

/* Style 2: Thick Short Line (-) */
.tt_article_useless_p_margin hr[data-ke-style="style2"],
.prose hr[data-ke-style="style2"] {
    height: 3px !important;
    width: 50px !important;
    background-color: #a1a1aa !important;
    /* zinc-400 */
    border-radius: 99px;
}

/* Style 3: Zigzag (~) - Brighter & Clean SVG */
.tt_article_useless_p_margin hr[data-ke-style="style3"],
.prose hr[data-ke-style="style3"] {
    height: 15px !important;
    width: 110px !important;
    background-color: transparent !important;
    /* Stroke brighten to #e4e4e7 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 6'%3E%3Cpath d='M0 5L6 1L12 5' fill='none' stroke='%23e4e4e7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: repeat-x !important;
    background-size: 12px 6px !important;
    background-position: center !important;
    border: none !important;
    opacity: 1 !important;
}

/* Reset previous pseudo-element styling if any exists */
.tt_article_useless_p_margin hr[data-ke-style="style3"]::after,
.prose hr[data-ke-style="style3"]::after {
    display: none !important;
}

/* Style 4: Vertical Line (|) */
.tt_article_useless_p_margin hr[data-ke-style="style4"],
.prose hr[data-ke-style="style4"] {
    width: 2px !important;
    height: 50px !important;
    background-color: #a1a1aa !important;
    /* zinc-400 */
}

/* Style 5: Full Solid Line (─) */
.tt_article_useless_p_margin hr[data-ke-style="style5"],
.prose hr[data-ke-style="style5"] {
    height: 1px !important;
    width: 100% !important;
    background-color: #52525b !important;
    /* zinc-600 */
}

/* Style 6: Double Line (=) */
.tt_article_useless_p_margin hr[data-ke-style="style6"],
.prose hr[data-ke-style="style6"] {
    height: 6px !important;
    width: 100% !important;
    border-top: 1px solid #52525b !important;
    border-bottom: 1px solid #52525b !important;
    background: transparent !important;
}

/* Style 7: Diamond (-◇-) - Gradient Approach (Clean) */
.tt_article_useless_p_margin hr[data-ke-style="style7"],
.prose hr[data-ke-style="style7"] {
    border: none !important;
    height: 20px !important;
    width: 100% !important;
    position: relative;
    /* Gradient line with gap */
    background: linear-gradient(to right, #52525b 0%, #52525b 45%, transparent 45%, transparent 55%, #52525b 55%, #52525b 100%) !important;
    background-size: 100% 1px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.tt_article_useless_p_margin hr[data-ke-style="style7"]::after,
.prose hr[data-ke-style="style7"]::after {
    content: "◇";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent !important;
    color: #e4e4e7 !important;
    /* zinc-200 (Bright) */
    font-size: 16px;
    line-height: normal;
}

/* Style 8: Circle (-○-) - Gradient Approach (Clean) */
.tt_article_useless_p_margin hr[data-ke-style="style8"],
.prose hr[data-ke-style="style8"] {
    border: none !important;
    height: 20px !important;
    width: 100% !important;
    position: relative;
    /* Gradient line with gap */
    background: linear-gradient(to right, #52525b 0%, #52525b 45%, transparent 45%, transparent 55%, #52525b 55%, #52525b 100%) !important;
    background-size: 100% 1px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.tt_article_useless_p_margin hr[data-ke-style="style8"]::after,
.prose hr[data-ke-style="style8"]::after {
    content: "○";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent !important;
    color: #e4e4e7 !important;
    /* zinc-200 (Bright) */
    font-size: 16px;
    line-height: normal;
}

/* Custom Line Clamp for Dynamic Summaries */
.line-clamp-6 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
}

/* Guestbook Reply Fix */
#guestbook-list ul li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

#guestbook-list ul li .group\/reply {
    background: transparent !important;
}

/* Guestbook Reply Description Force */
.reply-desc {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: #e4e4e7 !important;
    /* Zinc-200 */
    min-height: 20px;
    height: auto !important;
}

.reply-desc * {
    color: #e4e4e7 !important;
}

/* Guestbook Reply Meta Force */
.guest-reply-name {
    display: inline-block !important;
    color: #e4e4e7 !important;
    /* Zinc-200 */
    opacity: 1 !important;
    visibility: visible !important;
}

.guest-reply-date {
    display: inline-block !important;
    color: #71717a !important;
    /* Zinc-500 */
    opacity: 1 !important;
    visibility: visible !important;
}

/* Styling Tistory 'Load More Comments' Button (System Generated) */
.tt_more_preview_comments_wrap {
    background-color: #27272a !important;
    /* bg-zinc-800 */
    border-radius: 9999px !important;
    padding: 8px 16px !important;
    margin: 20px auto !important;
    width: fit-content !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-align: center !important;
}

.tt_more_preview_comments_wrap:hover {
    background-color: #3f3f46 !important;
    /* bg-zinc-700 */
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.tt_more_preview_comments_text {
    color: #a1a1aa !important;
    /* text-zinc-400 */
    font-size: 0.875rem !important;
    /* text-sm */
    font-weight: 500 !important;
}

.tt_more_preview_comments_wrap:hover .tt_more_preview_comments_text {
    color: #ffffff !important;
}

/* -------------------------------------------------------------------------- */
/* TISTORY SYSTEM OVERRIDES (Anti-Wobble / CLS Fix) */
/* -------------------------------------------------------------------------- */

/* Hide Tistory Toolbar completely to prevent top-shift on load */
#tistorytoolbarid,
.tt_menubar,
.tt-menubar {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* Ensure body doesn't possess padding from Tistory scripts */
body,
html {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Fix for potential margin collapse on Home Page */
#main-layout {
    padding-top: 3rem !important;
    /* Ensure consistent spacing */
}

/* -------------------------------------------------------------------------- */
/* ANTI-FLICKER / CLOAK STYLES (Fixes Scroll Shift) */
/* -------------------------------------------------------------------------- */
.cloak-until-loaded {
    /* Use visibility:hidden to PRESERVE SPACE during load */
    /* Do NOT use display:none, causing CLS/Wobble */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.cloak-until-loaded.loaded {
    visibility: visible;
    opacity: 1;
}

/* -------------------------------------------------------------------------- */
/* MOBILE OPTIMIZATION: Separators & Blockquotes */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {

    /* Blockquote Adjustments */
    .prose blockquote,
    .tt_article_useless_p_margin blockquote {
        margin: 1.5rem 0 !important;
        padding: 1.25rem 1rem !important;
    }

    /* Style 1: Centered Quote (Icon) */
    .prose blockquote[data-ke-style="style1"] .tt_article_useless_p_margin blockquote[data-ke-style="style1"] {
        padding-top: 3rem !important;
        font-size: 1rem !important;
    }

    /* Style 1 Icon Resize */
    .prose blockquote[data-ke-style="style1"]::before,
    .tt_article_useless_p_margin blockquote[data-ke-style="style1"]::before {
        font-size: 1.75rem !important;
        top: 0.25rem !important;
    }

    /* Horizontal Rule (HR) Adjustments */
    .tt_article_useless_p_margin hr,
    .prose hr {
        margin: 2.5rem auto !important;
    }

    /* Style 1: Dots */
    .tt_article_useless_p_margin hr[data-ke-style="style1"]::after,
    .prose hr[data-ke-style="style1"]::after {
        font-size: 28px !important;
        font-size: 28px !important;
        letter-spacing: 8px !important;
        text-indent: 8px !important;
        /* Perfect center alignment */
        margin-right: 0 !important;
    }

    /* Style 3: Zigzag */
    .tt_article_useless_p_margin hr[data-ke-style="style3"],
    .prose hr[data-ke-style="style3"] {
        width: 80px !important;
        height: 12px !important;
        background-size: 10px 5px !important;
    }

    /* Style 4: Vertical Line */
    .tt_article_useless_p_margin hr[data-ke-style="style4"],
    .prose hr[data-ke-style="style4"] {
        height: 24px !important;
    }
}

/* -------------------------------------------------------------------------- */
/*                        Post Navigation (Prev/Next)                         */
/* -------------------------------------------------------------------------- */
.nav-stable-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}
.nav-grid-item {
    width: 100%;
}
@media (min-width: 768px) {
    .nav-stable-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}