/* 마크다운 컨텐츠 스타일 */
.markdown-content {
    line-height: 1.8;
    color: #333;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: #2c3e50;
}

.markdown-content h1 {
    font-size: 2em;
    border-bottom: 2px solid #e1e4e8;
    padding-bottom: 8px;
}

.markdown-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 8px;
}

.markdown-content h3 {
    font-size: 1.25em;
}

.markdown-content h4 {
    font-size: 1em;
}

.markdown-content p {
    margin-top: 0;
    margin-bottom: 16px;
}

.markdown-content ul,
.markdown-content ol {
    margin-top: 0;
    margin-bottom: 16px;
    padding-left: 2em;
}

.markdown-content li {
    margin-bottom: 4px;
}

.markdown-content code {
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
    font-size: 85%;
    margin: 0;
    padding: 0.2em 0.4em;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.markdown-content pre {
    background-color: #f6f8fa;
    border-radius: 6px;
    font-size: 85%;
    line-height: 1.45;
    overflow: auto;
    padding: 16px;
    margin-bottom: 16px;
}

.markdown-content pre code {
    background-color: transparent;
    border: 0;
    display: inline;
    line-height: inherit;
    margin: 0;
    overflow: visible;
    padding: 0;
    word-wrap: normal;
}

.markdown-content blockquote {
    border-left: 4px solid #dfe2e5;
    color: #6a737d;
    margin: 0 0 16px 0;
    padding: 0 1em;
}

.markdown-content strong {
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}

.markdown-content a {
    color: #3498db;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content hr {
    border: 0;
    border-top: 1px solid #e1e4e8;
    margin: 24px 0;
}

.markdown-content table {
    border-collapse: collapse;
    margin-bottom: 16px;
    width: 100%;
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid #dfe2e5;
    padding: 6px 13px;
}

.markdown-content table th {
    background-color: #f6f8fa;
    font-weight: 600;
}

.markdown-content table tr:nth-child(2n) {
    background-color: #f6f8fa;
}

/* 검색 탭 스타일 */
.search-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.search-tab {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #4a5562;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.search-tab:hover {
    color: #1f2933;
    background: rgba(31, 41, 51, 0.05);
}

.search-tab.active {
    color: #1f2933;
    border-bottom-color: #1f2933;
    background: rgba(31, 41, 51, 0.08);
}

.search-tab-content {
    display: none;
}

.search-tab-content.active {
    display: block;
}

.image-search-dropzone {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px dashed #c2cad3;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfcfd 0%, #f5f8fa 100%);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.image-search-dropzone:hover {
    border-color: #90a0af;
    background: linear-gradient(180deg, #ffffff 0%, #f3f7fa 100%);
}

.image-search-dropzone.is-dragover {
    border-color: #1f2933;
    background: linear-gradient(180deg, #f4f8fb 0%, #edf3f7 100%);
    box-shadow: 0 0 0 4px rgba(31, 41, 51, 0.08);
    transform: translateY(-1px);
}

.image-search-dropzone.is-loading {
    border-color: #6e7f90;
    background: linear-gradient(180deg, #f7f9fb 0%, #eef3f6 100%);
}

.image-search-dropzone-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.image-search-dropzone-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(31, 41, 51, 0.08);
    color: #334155;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.image-search-dropzone-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2933;
    font-weight: 700;
}

.image-search-status {
    margin: 0;
    color: #334155;
    font-size: 0.97rem;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.image-search-status[data-tone="loading"] {
    color: #35506a;
}

.image-search-status[data-tone="success"] {
    color: #1f5134;
}

.image-search-status[data-tone="error"] {
    color: #8a2d2d;
}

.image-search-status[data-tone="ready"] {
    color: #1f2933;
}

.image-search-dropzone-help {
    margin: 0;
    color: #6b7280;
    font-size: 0.86rem;
}

.image-search-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 18px;
    border: 1px dashed #c7d0d8;
    border-radius: 14px;
    background: #f9fbfc;
    overflow: auto;
}

.image-search-preview:not(.is-empty) {
    background: #ffffff;
    border-style: solid;
}

.image-search-preview.is-empty {
    color: #6b7280;
    font-size: 0.95rem;
}

.image-search-preview img {
    display: block;
    max-width: min(100%, 920px);
    max-height: clamp(440px, 74vh, 960px);
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

.image-search-preview-stage {
    position: relative;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
}

.image-search-selection-box {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45);
    border-radius: 8px;
    cursor: move;
    touch-action: none;
}

.image-search-selection-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 2px solid #111827;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
}

.image-search-selection-handle.nw {
    top: -8px;
    left: -8px;
    cursor: nwse-resize;
}

.image-search-selection-handle.ne {
    top: -8px;
    right: -8px;
    cursor: nesw-resize;
}

.image-search-selection-handle.sw {
    bottom: -8px;
    left: -8px;
    cursor: nesw-resize;
}

.image-search-selection-handle.se {
    right: -8px;
    bottom: -8px;
    cursor: nwse-resize;
}

.image-search-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.image-search-preview-btn {
    padding: 10px 14px;
    border: 1px solid #d6dde6;
    border-radius: 999px;
    background: #ffffff;
    color: #1f2933;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.image-search-preview-btn:hover {
    background: #f3f6f9;
    border-color: #c4ced8;
}

.image-search-preview-btn.primary {
    background: #1f2933;
    border-color: #1f2933;
    color: #ffffff;
}

.image-search-preview-btn.primary:hover {
    background: #111827;
    border-color: #111827;
}

.image-search-preview-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.image-search-crop-hint {
    margin: 10px 0 0;
    color: #6b7280;
    font-size: 0.88rem;
    line-height: 1.5;
}

.image-search-note {
    margin-top: 12px;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
}

.image-search-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 16px;
    align-items: start;
}

.image-search-layout.single-card {
    grid-template-columns: 1fr;
}

.image-search-card {
    padding: 18px;
    border: 1px solid #e4e8ee;
    border-radius: 14px;
    background: #fafbfd;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.image-search-card h3 {
    margin: 0 0 8px;
    color: #1f2933;
    font-size: 1rem;
}

.image-search-card-description {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.55;
}

.image-search-text-box {
    flex-wrap: wrap;
}

#imageTextSearchInput {
    flex: 1 1 320px;
    min-width: 220px;
}

/* OCR 페이지 카테고리 필터 */
.filter-section {
    margin-top: 16px;
    padding: 1.5rem;
    background: #faf9f6;
    border-radius: 10px;
    border: 1px solid #e4e3dc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.advanced-search-toggle {
    padding: 10px 16px;
    font-size: 14px;
    background: #f1efe8;
    border: 1px solid #d8d3c7;
    border-radius: 6px;
    color: #1f2933;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.advanced-search-toggle:hover {
    background: #e8e5dc;
    border-color: #cfc8ba;
}

.advanced-search-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
}

.advanced-search-panel.open {
    max-height: 2400px;
    opacity: 1;
    transform: translateY(0);
}

#ocrSearchSection .search-box {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .image-search-layout {
        grid-template-columns: 1fr;
    }

    .image-search-card {
        padding: 14px;
    }

    .image-search-dropzone {
        padding: 14px;
    }

    .image-search-dropzone-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .image-search-dropzone-action {
        width: 100%;
    }

    .image-search-preview {
        min-height: 180px;
        padding: 14px;
    }

    .image-search-preview img {
        max-height: clamp(360px, 60vh, 720px);
    }

    .image-search-preview-actions {
        flex-direction: column;
    }

    .image-search-preview-btn {
        width: 100%;
        justify-content: center;
    }

    #imageTextSearchInput {
        min-width: 0;
    }
}

#ocrSearchSection .search-box input {
    flex: 1 1 240px;
    min-width: 200px;
}

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

.filter-title {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
}

.filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    background: #faf9f6;
    border: 1px solid #e4e3dc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    user-select: none;
    color: #1f2933;
}

.filter-btn:hover {
    background: #f0eee8;
    border-color: #d0ccc2;
}

.filter-btn.active {
    background: #e8e6de;
    border-color: #d0ccc2;
    color: #1f2933;
    font-weight: 600;
}

.filter-error {
    margin-top: 8px;
    font-size: 13px;
    color: #c0392b;
}

.filter-block {
    padding: 1.25rem;
    background: #f7f6f2;
    border: 1px solid #e2dfd6;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-block-title {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.filter-block-description {
    margin: 6px 0 0 0;
    font-size: 0.85rem;
    color: #666;
}

.filter-range {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.filter-field label {
    font-size: 0.85rem;
    color: #666;
}

.filter-field input[type="month"] {
    padding: 6px 8px;
    border: 1px solid #d6d2c8;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #1f2933;
    background: #fff;
}

.range-separator {
    padding-bottom: 6px;
    font-size: 1rem;
    color: #777;
}

.filter-subgroup {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#clearMagazineFilters[disabled] {
    opacity: 0.5;
    cursor: default;
}

.magazine-shelf {
    padding: 1.25rem;
    border: 1px solid #e1ded5;
    border-radius: 12px;
    background: linear-gradient(180deg, #f9f7f1 0%, #f3f0e8 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.magazine-shelf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.magazine-shelf-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
}

.magazine-shelf-header span {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.magazine-shelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
}

.magazine-shelf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    cursor: pointer;
}

.magazine-shelf-cover {
    width: 78px;
    height: 110px;
    border-radius: 6px;
    border: 1px solid #d7d2c8;
    background: #e5e1d7;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.magazine-shelf-item:hover .magazine-shelf-cover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.magazine-shelf-title {
    font-size: 0.72rem;
    color: #4a4a4a;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.magazine-shelf-empty {
    padding: 12px 0;
    text-align: center;
    color: #777;
    font-size: 0.85rem;
}

/* 검색 결과 전용 스타일 */
.search-results {
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.search-load-status {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.search-load-status.error {
    color: #c0392b;
}

/* 건의사항 게시판 */
.feedback-section {
    margin-top: 30px;
    padding: 20px;
    background: #f7f6f2;
    border: 1px solid #e4e3dc;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.feedback-header h2 {
    margin: 0 0 6px 0;
    color: #1f2933;
}

.feedback-header p {
    margin: 0;
    color: #4a5562;
    font-size: 14px;
}

.feedback-user-info {
    font-size: 13px;
    color: #4a5562;
}

.feedback-form textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid #cfcbbf;
    border-radius: 10px;
    padding: 14px;
    font-family: inherit;
    font-size: 14px;
    background: #f3f1eb;
    color: #1f2933;
    resize: vertical;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.feedback-notice {
    padding: 12px;
    background: #f3f1eb;
    border: 1px solid #d9d5cb;
    border-radius: 8px;
    color: #1f2933;
    line-height: 1.5;
}

.feedback-notice-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.feedback-notice-actions button {
    background: #e0ded6;
    border: 1px solid #cfcbbf;
    color: #1f2933;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-notice-actions button:hover {
    background: #d6d3c9;
    border-color: #c0baad;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.feedback-comment-edit textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #cfcbbf;
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    background: #f3f1eb;
    color: #1f2933;
    resize: vertical;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-comment-edit textarea:focus {
    outline: none;
    border-color: #c0baad;
    background: #f8f6f1;
    box-shadow: 0 0 0 2px rgba(192,186,173,0.2), inset 0 1px 3px rgba(0,0,0,0.05);
}

.feedback-form textarea:focus {
    outline: none;
    border-color: #c0baad;
    background: #f8f6f1;
    box-shadow: 0 0 0 2px rgba(192,186,173,0.2), inset 0 1px 3px rgba(0,0,0,0.05);
}

.feedback-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.feedback-form-actions span {
    color: #4a5562;
    font-size: 12px;
}

.feedback-form-actions button {
    background: linear-gradient(135deg, #e4e1d8, #d8d5cc);
    color: #1f2933;
    border: 1px solid #cfcbbf;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-form-actions button:hover {
    background: linear-gradient(135deg, #dbd7ce, #cecac1);
    border-color: #c0baad;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-card {
    padding: 14px;
    border: 1px solid #e4e3dc;
    border-radius: 10px;
    background: #f7f6f2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.feedback-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.feedback-author {
    font-weight: 600;
    color: #1f2933;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.feedback-date {
    font-size: 12px;
    color: #4a5562;
}

.operator-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, #cabfb2, #b5a998);
    color: #1f2933;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.feedback-content {
    color: #1f2933;
    line-height: 1.5;
    white-space: pre-wrap;
    margin-bottom: 10px;
}

.feedback-comments {
    margin-top: 8px;
    border-top: 1px solid #e4e3dc;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feedback-comment {
    padding: 8px 10px;
    background: #f3f1eb;
    border-radius: 8px;
    border-left: 3px solid #c5c0b4;
}

.feedback-comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #4a5562;
    margin-bottom: 4px;
}

.feedback-comment-content {
    color: #1f2933;
    line-height: 1.4;
    white-space: pre-wrap;
}

.feedback-comment-form {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.feedback-comment-form textarea {
    width: 100%;
    min-height: 60px;
    border: 1px solid #cfcbbf;
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    background: #f3f1eb;
    color: #1f2933;
    resize: vertical;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-comment-form textarea:focus {
    outline: none;
    border-color: #c0baad;
    background: #f8f6f1;
    box-shadow: 0 0 0 2px rgba(192,186,173,0.2), inset 0 1px 3px rgba(0,0,0,0.05);
}

.feedback-comment-form button {
    align-self: flex-end;
    background: linear-gradient(135deg, #e4e1d8, #d8d5cc);
    color: #1f2933;
    border: 1px solid #cfcbbf;
    padding: 7px 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-comment-form button:hover {
    background: linear-gradient(135deg, #dbd7ce, #cecac1);
    border-color: #c0baad;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.feedback-action-bar,
.feedback-edit-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.feedback-action-bar button,
.feedback-edit-actions button {
    background: #e0ded6;
    border: 1px solid #cfcbbf;
    color: #1f2933;
    cursor: pointer;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-action-bar button:hover,
.feedback-edit-actions button:hover {
    background: #d6d3c9;
    border-color: #c0baad;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

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

.feedback-pagination button {
    background: #e0ded6;
    color: #1f2933;
    border: 1px solid #d0ccc2;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.feedback-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feedback-pagination button:hover:not(:disabled) {
    background: #d6d3c9;
    border-color: #c5c0b4;
}

.search-select {
    padding: 10px 12px;
    border: 1px solid #d0ccc2;
    border-radius: 6px;
    background: #f4f3ef;
    color: #1f2933;
    font-size: 14px;
    margin-left: 10px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.search-select:focus {
    outline: none;
    border-color: #c5c0b4;
    background: #f9f8f4;
}

.search-result-item {
    border: 1px solid #e4e3dc;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    contain: layout style;
    background: #faf9f6;
}

.search-result-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-color: #dcdad2;
}

@media (max-width: 768px) {
    .search-result-item {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .result-thumbnail {
        align-self: center;
        width: 70px;
        height: 99px;
    }
}

.result-thumbnail {
    width: 90px;
    height: 127px;
    object-fit: cover;
    border-radius: 4px;
}

.result-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.result-magazine {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.result-text {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
    max-height: 120px;
    overflow: hidden;
    word-break: break-all;
    overflow-wrap: break-word;
    hyphens: auto;
    display: block;
    position: relative;
}

.result-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1.4em;
    background: linear-gradient(to bottom, transparent, #faf9f6);
    pointer-events: none;
}

.result-text em {
    font-style: normal;
    background-color: #ffeb3b;
    padding: 2px;
    border-radius: 2px;
}

/* 그룹핑된 검색 결과 스타일 */
.search-results-grouped {
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.magazine-group-card {
    border: 1px solid #e4e3dc;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    background: #faf9f6;
}

.magazine-group-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #dcdad2;
}

.magazine-group-header {
    display: flex;
    gap: 15px;
    padding: 20px;
    cursor: pointer;
    background: #faf9f6;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.magazine-group-header:hover {
    background: #f4f3ef;
}

.magazine-group-thumbnail {
    width: 80px;
    height: 107px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.magazine-group-info {
    flex: 1;
    min-width: 0;
}

.magazine-group-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.magazine-group-summary {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.page-count {
    background: #e0ded6;
    color: #1f2933;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.page-numbers {
    color: #666;
    font-size: 0.9em;
}

.magazine-group-preview {
    color: #555;
    font-size: 0.9em;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    position: relative;
    word-break: break-all;
}

.magazine-group-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1.4em;
    background: linear-gradient(to bottom, transparent, #faf9f6);
    pointer-events: none;
}

.magazine-group-expand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    flex-shrink: 0;
}

.expand-icon {
    color: #666;
    font-size: 1.2em;
    transition: transform 0.2s ease;
}

.magazine-group-pages {
    border-top: 1px solid #e4e3dc;
    background: #f4f3ef;
    padding: 15px;
}

.page-result-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    background: #faf9f6;
    border-radius: 8px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    border: 1px solid #e4e3dc;
}

.page-result-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #dcdad2;
    background: #f4f3ef;
}

.page-result-item:last-child {
    margin-bottom: 0;
}

.page-result-thumbnail {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.page-result-content {
    flex: 1;
    min-width: 0;
}

.page-result-number {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.page-result-text {
    color: #666;
    font-size: 0.85em;
    line-height: 1.3;
    max-height: 80px;
    overflow: hidden;
    word-break: break-all;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .magazine-group-header {
        padding: 15px;
        gap: 12px;
    }
    
    .magazine-group-thumbnail {
        width: 60px;
        height: 80px;
    }
    
    .magazine-group-title {
        font-size: 1em;
    }
    
    .magazine-group-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .magazine-group-pages {
        padding: 10px;
    }
    
    .page-result-item {
        padding: 10px;
        gap: 10px;
    }
    
    .page-result-thumbnail {
        width: 50px;
        height: 67px;
    }
}

/* 댓글 검색 결과 스타일 */
.comments-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-result-item {
    background: #faf9f6;
    border: 1px solid #e4e3dc;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.comment-result-item:hover {
    border-color: #dcdad2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.comment-result-content {
    display: flex;
    gap: 16px;
    padding: 16px;
}

.comment-result-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 80px;
}

.comment-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.comment-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.comment-magazine-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.comment-page-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
}

.comment-result-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #666;
}

.comment-author {
    font-weight: 500;
}

.comment-date {
    color: #888;
}

.comment-result-text {
    font-size: 14px;
    color: #1f2933;
    line-height: 1.5;
    padding: 8px 12px;
    background: #f4f3ef;
    border-radius: 6px;
    border-left: 3px solid #c5c0b4;
}

/* 댓글 검색 모바일 최적화 */
@media (max-width: 768px) {
    .comment-result-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .comment-result-thumbnail {
        width: 50px;
        height: 67px;
        align-self: flex-start;
    }
    
    .comment-magazine-title {
        font-size: 15px;
    }
    
    .comment-result-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* 잡지 메타데이터 스타일 */
.magazine-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0;
    font-size: 13px;
}

.metadata-item {
    display: inline-flex;
    align-items: center;
    background: rgba(228, 225, 216, 0.5);
    padding: 4px 10px;
    border-radius: 12px;
    color: #52606d;
    font-size: 12px;
    border: 1px solid rgba(207, 203, 191, 0.4);
}

/* 페이지 카테고리 뱃지 */
.page-category-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(100, 149, 237, 0.15);
    color: #4169e1;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    border: 1px solid rgba(65, 105, 225, 0.2);
}

.page-score-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 206, 86, 0.2);
    color: #6b5a1e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 6px;
    border: 1px solid rgba(255, 206, 86, 0.35);
}

.search-score-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 206, 86, 0.2);
    color: #6b5a1e;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid rgba(255, 206, 86, 0.35);
}

/* 모바일 대응 */
@media (max-width: 640px) {
    .magazine-metadata {
        font-size: 11px;
        gap: 6px;
    }

    .metadata-item {
        font-size: 11px;
        padding: 3px 8px;
    }

    .page-category-badge {
        font-size: 10px;
        padding: 2px 6px;
        margin-left: 6px;
    }

    .page-score-badge {
        font-size: 10px;
        padding: 2px 6px;
        margin-left: 4px;
    }

    .search-score-badge {
        font-size: 0.75em;
        padding: 3px 6px;
    }
}
