/**
 * 파일명: view.css
 * 파일경로: /home/urlkr/public_html/webzine/assets/css/
 * 기능: 글 보기 페이지 고유 스타일
 * 작성일: 2025-06-20
 * 수정일: 2026-04-08
 */

/* ===== 브레드크럼 (타이틀 위) ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--color-accent-dark);
}

.breadcrumb-sep {
    display: inline-flex;
    align-items: center;
    opacity: 0.35;
}

.breadcrumb-sep svg {
    width: 14px;
    height: 14px;
}

.breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ===== 레이아웃: TOC + 메인 ===== */
.view-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 10px 72px;
    display: grid;
    grid-template-columns: 262px 1fr;
    gap: 10px;
    align-items: start;
}


/* ===== 좌측 TOC ===== */
.toc-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 28px);
    max-height: calc(100vh - var(--header-height) - 60px);
    overflow-y: auto;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.toc-sidebar::-webkit-scrollbar {
    width: 3px;
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.toc-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #FF8000;
    margin-bottom: 12px;
    padding-bottom: 0;
    padding-left: 14px;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toc-sidebar-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #FF8000;
    border-radius: 50%;
    flex-shrink: 0;
}

.toc-sidebar-list {
    list-style: none;
}

.toc-sidebar-list li {
    margin-bottom: 1px;
}

.toc-sidebar-list a {
    display: block;
    padding: 7px 10px 7px 14px;
    font-size: 12px;
    color: var(--text-muted);
    border-left: 5px solid #e0e0e0;
    border-radius: 0;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.toc-sidebar-list a:hover {
    color: var(--text-primary);
    background: transparent;
    border-left-color: #bdbdbd;
}

.toc-sidebar-list a.active {
    color: var(--color-accent-dark);
    background: transparent;
    border-left-color: #FF8000;
    font-weight: 600;
}

.toc-sidebar-list .toc-h3 {
    padding-left: 28px;
    font-size: 12px;
}


/* ===== 메인 콘텐츠 ===== */
.main-content {
    min-width: 0;
    max-width: 880px;
}


.article-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
}


/* 글 헤더 */
.article-header {
    padding: 44px 40px 0;
    border-top: 4px solid #FF8000;
    border-left: 1px solid #FF8000;
    border-right: 1px solid #FF8000;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-sizing: border-box;
    background: #fff;
    background-clip: padding-box;
}


.article-title {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    font-weight: 400;
    line-height: 1.35;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.article-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid #FFD0A0;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.article-category {
    display: inline-block;
    color: var(--color-accent-dark);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.article-category:hover {
    color: var(--text-primary);
}

.meta-item {
    font-size: 13px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.meta-item svg {
    width: 14px;
    height: 14px;
}

.meta-right {
    display: flex;
    gap: 6px;
}

.meta-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.meta-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--bg-surface);
}

.meta-btn.delete:hover {
    border-color: #dc2626;
    color: #dc2626;
}

/* ===== 본문 ===== */
.article-body {
    padding: 32px 40px 44px;
}

/* TTS 인라인 플레이어 */
.tts-player-inline {
    margin-bottom: 28px;
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}

.tts-player-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tts-play-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    border: none;
    background: var(--text-primary);
    color: var(--text-inverse);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
}

.tts-play-btn:hover {
    background: var(--color-accent-dark);
}

.tts-play-btn.playing {
    background: var(--color-accent-dark);
}

.tts-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 100px;
}

.tts-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.tts-duration {
    font-size: 11px;
    color: var(--text-muted);
}

.tts-progress-wrap {
    flex: 1;
    height: 5px;
    background: var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    min-width: 80px;
}

.tts-progress-bar {
    height: 100%;
    background: var(--color-accent);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.tts-time {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* TTS 플로팅 플레이어 */
.tts-player-floating {
    position: fixed;
    bottom: -80px;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: bottom 0.3s ease;
    pointer-events: none;
}

.tts-player-floating.show {
    bottom: 0;
    pointer-events: auto;
}

.tts-floating-inner {
    max-width: 640px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(45, 45, 45, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    box-shadow: var(--shadow-lg);
}

.tts-float-play-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    border: none;
    background: var(--color-accent);
    color: var(--text-primary);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
}

.tts-float-play-btn:hover {
    background: var(--color-accent-light);
}

.tts-float-progress-wrap {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.tts-float-progress-bar {
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.tts-float-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    min-width: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tts-float-close-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.tts-float-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* 통합 인트로 박스 */
.article-intro-box {
    background: var(--color-accent-lighter);
    border: 1px solid var(--color-accent-light);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 36px;
}

.intro-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-accent-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.intro-label svg {
    width: 15px;
    height: 15px;
}

.intro-label small {
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 6px;
    text-transform: none;
    letter-spacing: 0;
}

.intro-summary p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
}

.intro-divider {
    height: 1px;
    background: var(--color-accent-light);
    margin: 20px 0;
}

.intro-series .series-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.series-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.series-list li {
    padding: 7px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--color-accent-light);
}

.series-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.series-list li a {
    color: var(--text-primary);
}

.series-list li a:hover {
    color: var(--color-accent-dark);
}

.series-list li.current {
    font-weight: 600;
    color: var(--color-accent-dark);
}

.series-list li.current::before {
    content: '› ';
}

/* 본문 콘텐츠 */
.article-content {
    font-size: 17px;
    line-height: 1.9;
    color: var(--text-primary);
}

.article-content h2:not(.inline-ad h2):not(.auto-ad h2) {
    font-size: 23px;
    font-weight: 700;
    color: var(--text-primary);
    border: none;
    background-image: linear-gradient(90deg, var(--color-accent) 0%, #E8A0A0 100%);
    background-size: 100% 3px;
    background-position: bottom;
    background-repeat: no-repeat;
    padding: 0 0 20px;
    margin: 64px 0 32px;
    line-height: 1.42;
    letter-spacing: -0.02em;
}


.article-content h3:not(.inline-ad h3):not(.auto-ad h3) {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    border: none;
    background-image: linear-gradient(90deg, #E8A0A0 0%, transparent 100%);
    background-size: 50% 2px;
    background-position: bottom left;
    background-repeat: no-repeat;
    padding-bottom: 12px;
    margin: 48px 0 20px;
    line-height: 1.42;
    letter-spacing: -0.01em;
}


.article-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 28px 0 12px;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 24px 0;
}

/* CKEditor 이미지 figure 정렬 */
.article-content figure.image {
    display: table;
    margin: 24px auto;
    max-width: 100%;
}
.article-content figure.image img {
    margin: 0;
    display: block;
}
.article-content figure.image.image-style-align-center {
    margin-left: auto;
    margin-right: auto;
}
.article-content figure.image.image-style-align-left {
    float: left;
    margin-left: 0;
    margin-right: 24px;
}
.article-content figure.image.image-style-align-right {
    float: right;
    margin-right: 0;
    margin-left: 24px;
}
.article-content figure.image.image-style-side {
    float: right;
    max-width: 50%;
    margin-right: 0;
    margin-left: 24px;
}
/* float 해제 */
.article-content p:has(+ figure.image-style-align-left),
.article-content p:has(+ figure.image-style-align-right) {
    overflow: hidden;
}
.article-content figure.image + p,
.article-content figure.image + h2,
.article-content figure.image + h3 {
    clear: both;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content blockquote {
    margin: 28px 0;
    padding: 20px 24px;
    background: var(--bg-muted);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content a {
    color: var(--color-accent-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content a:hover {
    color: var(--text-primary);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.article-content th,
.article-content td {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.article-content th {
    background: var(--bg-muted);
    font-weight: 600;
    font-size: 14px;
}

/* ===== 이전글/다음글 ===== */
.post-navigation {
    display: flex;
    gap: 16px;
    margin: 0 40px 28px;
    padding: 24px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.post-nav-item {
    flex: 1;
    min-width: 0;
}

.post-nav-item a {
    display: block;
    padding: 16px;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    text-decoration: none;
}

.post-nav-item a:hover {
    background: var(--color-accent-lighter);
}

.post-nav-item.next {
    text-align: right;
}

.post-nav-item .nav-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.post-nav-item .nav-label svg {
    width: 14px;
    height: 14px;
}

.post-nav-item.next .nav-label {
    justify-content: flex-end;
}

.post-nav-item .nav-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-nav-item a:hover .nav-title {
    color: var(--color-accent-dark);
}

/* ===== 업데이트 로그 ===== */
.update-log {
    margin: 0 40px 32px;
    padding: 20px;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.update-log-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.update-log-header svg {
    width: 15px;
    height: 15px;
    color: var(--text-muted);
}

.update-log-content {
    font-size: 13px;
    color: var(--text-secondary);
}

.update-log-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.update-log-date svg {
    width: 13px;
    height: 13px;
    color: var(--text-muted);
}

.update-log-date .date {
    font-weight: 600;
}

/* ===== 공유하기 ===== */
.share-box {
    margin: 0 40px 44px;
    padding: 24px;
    background: var(--bg-muted);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-align: center;
}

.share-buttons {
    display: flex;
    justify-content: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 36px;
    border-radius: var(--radius-xl);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.share-copy {
    background: var(--text-primary);
    color: var(--text-inverse);
}

.share-copy:hover {
    background: var(--color-accent-dark);
}

.share-copy.copied {
    background: var(--color-accent-dark);
}

/* ===== 쇼트코드 스타일 ===== */

/* 인라인 목차 */
.toc-container {
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 24px 0;
    overflow: hidden;
}

.toc-header {
    padding: 16px 20px;
    background: var(--bg-surface);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
}

.toc-toggle {
    transition: transform 0.2s;
    color: var(--text-muted);
}

.toc-container.collapsed .toc-toggle {
    transform: rotate(-90deg);
}

.toc-container.collapsed .toc-list {
    display: none;
}

.toc-list {
    list-style: none;
    padding: 16px 20px;
    margin: 0;
}

.toc-list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}

.toc-list li:last-child {
    border-bottom: none;
}

.toc-list li.toc-indent {
    padding-left: 20px;
    font-size: 14px;
}

.toc-list a {
    color: var(--text-primary);
}

.toc-list a:hover {
    color: var(--color-accent-dark);
}

/* 코드 블록 */
.code-block {
    background: #1e1e1e;
    border-radius: var(--radius-md);
    margin: 24px 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #2d2d2d;
}

.code-lang {
    font-size: 12px;
    color: #888;
    font-weight: 600;
}

.code-copy {
    background: #444;
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.code-copy:hover {
    background: #555;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-block code {
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* 정보 박스 */
.info-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-md);
    margin: 24px 0;
}

.info-box-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.info-box-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 14px;
}

.info-box-text {
    font-size: 15px;
    line-height: 1.7;
}

.info-box-info {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
}

.info-box-tip {
    background: var(--color-accent-lighter);
    border: 1px solid var(--color-accent-light);
}

.info-box-warning {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
}

.info-box-danger {
    background: #FEF2F2;
    border: 1px solid #FECACA;
}

/* FAQ */
.faq-container {
    margin: 24px 0;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-muted);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
}

.faq-q {
    width: 26px;
    height: 26px;
    background: var(--text-primary);
    color: var(--text-inverse);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    font-weight: 700;
}

.faq-question-text {
    flex: 1;
}

.faq-toggle {
    font-size: 20px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 20px;
    background: var(--bg-surface);
}

.faq-item.open .faq-answer {
    display: flex;
    gap: 12px;
}

.faq-a {
    width: 26px;
    height: 26px;
    background: var(--color-accent-light);
    color: var(--color-accent-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* 버튼 쇼트코드 */
.shortcode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: var(--text-primary);
    color: var(--text-inverse) !important;
    border-radius: var(--radius-xl);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all var(--transition);
    margin: 8px 4px;
    border: 2px solid transparent;
}

.shortcode-btn:hover {
    background: var(--color-accent-dark);
}

.shortcode-btn.btn-outline {
    background: transparent;
    color: var(--text-primary) !important;
    border: 2px solid var(--text-primary);
}

.shortcode-btn.btn-outline:hover {
    background: var(--text-primary);
    color: var(--text-inverse) !important;
}

/* 광고 */
.auto-ad,
.inline-ad {
    margin: 24px 0;
    text-align: center;
}

/* ===== 404 에러 ===== */
.error-page {
    text-align: center;
    padding: 100px 24px;
}

.error-page h1 {
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.error-page p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 16px;
}

.error-page .btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--text-primary);
    color: var(--text-inverse);
    border-radius: var(--radius-xl);
    font-weight: 600;
    transition: background var(--transition);
}

.error-page .btn:hover {
    background: var(--color-accent-dark);
}

/* ===== 반응형: 태블릿 ===== */
@media (max-width: 1024px) {
    .view-layout {
        grid-template-columns: 1fr;
        padding: 24px 20px 60px;
        gap: 0;
    }

    .toc-sidebar {
        display: none;
    }
}

/* ===== 반응형: 모바일 ===== */
@media (max-width: 640px) {
    .view-layout {
        padding: 16px 12px 48px;
    }

    .breadcrumb-inner {
        padding: 10px 16px;
        font-size: 12px;
    }

    .article-card {
        border-radius: var(--radius-md);
    }

    .article-header {
        padding: 28px 20px 0;
    }

    .article-title {
        font-size: 1.5rem;
        line-height: 1.4;
        margin-bottom: 18px;
    }

    .article-meta-bar {
        gap: 8px;
        padding-bottom: 16px;
    }

    .meta-left {
        gap: 8px;
    }

    .article-category {
        font-size: 11px;
    }

    .meta-item {
        font-size: 12px;
    }

    .meta-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    .article-body {
        padding: 20px;
    }

    .article-intro-box {
        padding: 16px;
        margin-bottom: 24px;
    }

    .intro-label {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .intro-summary p {
        font-size: 14px;
        line-height: 1.65;
    }

    .series-list li {
        font-size: 13px;
        padding: 5px 0;
    }

    .article-content {
        font-size: 15.5px;
        line-height: 1.85;
    }

    .article-content h2:not(.inline-ad h2):not(.auto-ad h2) {
        font-size: 1.25rem;
        margin: 36px 0 16px;
        padding-bottom: 10px;
    }

    .article-content h3:not(.inline-ad h3):not(.auto-ad h3) {
        font-size: 1.1rem;
        margin: 28px 0 12px;
        padding-left: 12px;
    }

    .article-content h4 {
        font-size: 1rem;
        margin: 20px 0 10px;
    }

    .article-content p {
        margin-bottom: 16px;
    }

    .article-content ul,
    .article-content ol {
        margin: 16px 0;
        padding-left: 20px;
    }

    .article-content blockquote {
        margin: 20px 0;
        padding: 16px;
        font-size: 14px;
    }

    .article-content table {
        font-size: 13px;
    }

    .article-content th,
    .article-content td {
        padding: 8px 10px;
    }

    .article-content img {
        margin: 16px 0;
        border-radius: var(--radius-sm);
    }

    .post-navigation {
        margin: 0 20px 20px;
        padding: 20px 0;
        flex-direction: column;
        gap: 10px;
    }

    .post-nav-item a {
        padding: 14px;
    }

    .post-nav-item .nav-label {
        font-size: 10px;
    }

    .post-nav-item .nav-title {
        font-size: 13px;
    }

    .post-nav-item.next {
        text-align: left;
    }

    .post-nav-item.next .nav-label {
        justify-content: flex-start;
    }

    .update-log {
        margin: 0 20px 24px;
        padding: 16px;
    }

    .update-log-header {
        font-size: 12px;
    }

    .update-log-date {
        font-size: 12px;
        padding: 5px 10px;
    }

    .share-box {
        margin: 0 20px 28px;
        padding: 20px;
    }

    .share-btn {
        padding: 11px 28px;
        font-size: 14px;
    }

    /* 쇼트코드 모바일 */
    .toc-container {
        margin: 20px 0;
    }

    .toc-header {
        padding: 14px 16px;
        font-size: 13px;
    }

    .toc-list {
        padding: 14px 16px;
    }

    .toc-list li {
        padding: 6px 0;
        font-size: 13px;
    }

    .code-block {
        border-radius: var(--radius-sm);
        margin: 20px 0;
    }

    .code-header {
        padding: 8px 12px;
    }

    .code-block pre {
        padding: 16px;
    }

    .code-block code {
        font-size: 12px;
    }

    .info-box {
        padding: 16px;
        gap: 12px;
        margin: 20px 0;
    }

    .info-box-icon {
        font-size: 18px;
    }

    .info-box-text {
        font-size: 14px;
    }

    .faq-question {
        padding: 14px 16px;
        gap: 10px;
        font-size: 14px;
    }

    .faq-q, .faq-a {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .faq-answer {
        padding: 16px;
        font-size: 14px;
    }

    .shortcode-btn {
        padding: 11px 20px;
        font-size: 14px;
    }

    /* TTS 모바일 */
    .tts-player-inline {
        padding: 12px 14px;
    }

    .tts-play-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 16px;
    }

    .tts-info {
        min-width: auto;
    }

    .tts-label {
        font-size: 12px;
    }

    .tts-floating-inner {
        margin: 0 10px 10px;
        padding: 8px 12px;
        gap: 8px;
    }

    .tts-float-play-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 13px;
    }

    /* 에러 */
    .error-page {
        padding: 60px 16px;
    }

    .error-page h1 {
        font-size: 3.5rem;
    }
}

/* ===== 반응형: 작은 모바일 ===== */
@media (max-width: 380px) {
    .view-layout {
        padding: 12px 8px 36px;
    }

    .article-header {
        padding: 22px 16px 0;
    }

    .article-title {
        font-size: 1.3rem;
    }

    .article-body {
        padding: 16px;
    }

    .article-content {
        font-size: 14.5px;
    }

    .post-navigation {
        margin: 0 16px 16px;
    }

    .update-log {
        margin: 0 16px 20px;
    }

    .share-box {
        margin: 0 16px 24px;
    }
}


/* 광고 영역 내 h2/h3 스타일 리셋 */
.inline-ad h2, .inline-ad h3,
.auto-ad h2, .auto-ad h3 {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    line-height: inherit;
    letter-spacing: normal;
}
