/* somesay review archive */

:root {
    color-scheme: light dark;
    --accent: #7c5cfc;
    --accent-soft: rgba(124, 92, 252, 0.15);
    --surface: #1e1e2e;
    --surface-hover: #2a2a3e;
    --text-muted: #888;
    --border: #333;
    --radius: 6px;
    --radius-pill: 50px;
}

/* 브라우저/OS가 라이트 모드일 때 표면·경계·희미한 텍스트만 라이트 톤으로 오버라이드.
   PicoCSS의 본문 텍스트/배경은 자동으로 라이트로 전환됨.
   액센트/감성 색(초록·빨강·노랑 등)은 그대로 유지 (양쪽 다 잘 보임). */
@media (prefers-color-scheme: light) {
    :root {
        --surface: #f5f5f7;
        --surface-hover: #e8e8ec;
        --text-muted: #666;
        --border: #dcdce0;
    }
}

body {
    font-size: 14px;
}

/* === Header / Nav === */
header.container {
    padding-bottom: 0;
}

header nav ul li strong {
    color: var(--accent);
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.tab-nav {
    margin-top: 0.5rem;
    display: flex !important;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
}

.tab-nav ul {
    display: flex !important;
    flex-direction: row !important;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: none;
}

.tab-nav li a {
    display: block;
    padding: 0.5rem 1.2rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.tab-nav li a:hover {
    color: var(--accent);
}

.tab-nav li a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: none;
}

/* === Global compact form overrides (PicoCSS defaults are too large) === */
main {
    --pico-form-element-spacing-vertical: 0.3rem;
    --pico-form-element-spacing-horizontal: 0.6rem;
}

main input:not([type="checkbox"]):not([type="radio"]):not(.filter-search-input),
main select,
main textarea {
    font-size: 0.8rem;
    margin-bottom: 0;
}

main .filter-search-input {
    font-size: 0.75rem;
}

main input[type="search"] {
    padding-inline-start: 1.8rem;
    background-size: 0.85rem;
    background-position: center left 0.55rem;
}

main button,
main [type="submit"],
main [type="button"] {
    --pico-form-element-spacing-vertical: 0.25rem;
    --pico-form-element-spacing-horizontal: 0.7rem;
    font-size: 0.8rem;
}

main h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

/* === Filters === */
.filters {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.filter-row {
    margin-bottom: 0.6rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-row > label {
    min-width: 70px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 0.4rem;
    margin: 0;
}

.filter-row input[type="date"] {
    --pico-form-element-spacing-vertical: 0.2rem;
    --pico-form-element-spacing-horizontal: 0.4rem;
    width: auto;
    margin: 0;
    font-size: 0.75rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.date-sep {
    color: var(--text-muted);
    padding-top: 0.3rem;
}

.filter-searchable {
    flex: 1;
    min-width: 0;
}

.filter-search-input {
    --pico-form-element-spacing-vertical: 0.15rem;
    --pico-form-element-spacing-horizontal: 0.5rem;
    width: 200px;
    font-size: 0.75rem;
    margin: 0 0 0.7rem 0;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filter-search-input::placeholder {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.toggle-group-2row {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    overflow-x: auto;
    padding-bottom: 0.3rem;
}

.toggle-btn {
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: transparent;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    line-height: 1.4;
}

.toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.toggle-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.toggle-btn small {
    opacity: 0.6;
    font-size: 0.7rem;
}

/* === Action bar === */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.export-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    background: var(--surface);
    color: var(--accent);
    text-decoration: none;
    border-radius: var(--radius);
    border: 1px solid var(--accent);
    transition: all 0.15s;
}

.export-btn:hover {
    background: var(--accent);
    color: white;
}

/* === Result count === */
.result-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

/* === Tables === */
.table-wrapper {
    overflow-x: auto;
}

table {
    font-size: 0.8rem;
}

table thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border);
}

table tbody td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}

table tbody tr {
    transition: background 0.1s;
}

table tbody tr:hover {
    background: var(--surface-hover);
}

table a {
    font-size: 0.8rem;
}

.col-badge {
    width: 1px;
    white-space: nowrap;
    text-align: center;
}

/* === Search snippet === */
.search-snippet {
    font-size: 0.75rem;
    line-height: 1.5;
    color: #ccc;
    max-width: 340px;
}

.search-snippet mark {
    background: rgba(255, 230, 0, 0.3);
    color: #ffd54f;
    padding: 0.05rem 0.15rem;
    border-radius: 2px;
}

/* === Sentiment badges === */
.sentiment {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 500;
}

.sentiment.positive { background: rgba(76, 175, 80, 0.2); color: #81c784; }
.sentiment.negative { background: rgba(244, 67, 54, 0.2); color: #e57373; }
.sentiment.neutral { background: rgba(158, 158, 158, 0.2); color: #aaa; }
.sentiment.mixed { background: rgba(255, 193, 7, 0.2); color: #ffd54f; }

/* === Gemini 매칭 confidence === */
.confidence-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 500;
}
.confidence-badge.c5 { background: rgba(76, 175, 80, 0.25); color: #81c784; }
.confidence-badge.c4 { background: rgba(139, 195, 74, 0.22); color: #aed581; }
.confidence-badge.c3 { background: rgba(255, 193, 7, 0.22); color: #ffd54f; }
.confidence-badge.c2 { background: rgba(255, 152, 0, 0.22); color: #ffb74d; }
.confidence-badge.c1 { background: rgba(244, 67, 54, 0.22); color: #e57373; }

/* === Video format badge === */
.video-format {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-pill);
    font-size: 0.65rem;
    font-weight: 500;
}
.video-format.short { background: rgba(233, 30, 99, 0.2); color: #f48fb1; }
.video-format.long { background: rgba(33, 150, 243, 0.2); color: #64b5f6; }

/* === Delete button === */
.delete-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.1rem 0.3rem;
    line-height: 1;
    border-radius: var(--radius);
    transition: all 0.15s;
}

.delete-btn:hover {
    color: #e57373;
    background: rgba(244, 67, 54, 0.1);
}

/* === Review Detail === */
.review-detail {
    font-size: 0.85rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.detail-item {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    min-width: 50px;
}

.timelink-badge {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-size: 0.8rem;
}

.timelink-badge:hover {
    background: var(--accent);
    color: white;
}

.organic-badge {
    color: #81c784;
    font-size: 0.8rem;
}

.sponsored-badge {
    color: #e57373;
    font-size: 0.8rem;
}

.dropdown-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.dropdown-filters select {
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: inherit;
    min-width: 130px;
    margin: 0;
}

.summary-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.tag-group { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.tag { padding: 0.1rem 0.45rem; border-radius: var(--radius-pill); font-size: 0.7rem; font-weight: 500; }
.tag-skin { background: rgba(33, 150, 243, 0.2); color: #64b5f6; }
.tag-benefit { background: rgba(76, 175, 80, 0.2); color: #81c784; }

.detail-section {
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.section-header h4 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
}

.refined-text {
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}
/* 종합 리뷰 3줄 표시용 — 각 줄 앞에 • (DB 값엔 없음, UI 표시 전용) */
.refined-bulleted .bullet-line {
    padding-left: 1rem;
    text-indent: -1rem;
    margin: 0.15rem 0;
}

.raw-section {
    margin-top: 0.5rem;
}

.raw-section summary {
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
}

.raw-transcript {
    background: var(--surface);
    padding: 0.8rem;
    border-left: 2px solid var(--border);
    font-size: 0.8rem;
    white-space: pre-wrap;
    color: var(--text-muted);
    margin: 0.5rem 0 0 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.edit-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.btn-primary-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.btn-secondary-sm {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    line-height: 1.2;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 0.8rem;
    font-size: 0.8rem;
}

/* === Flash messages === */
.flash {
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.flash.success { background: rgba(76, 175, 80, 0.15); color: #81c784; border: 1px solid rgba(76,175,80,0.3); }
.flash.error { background: rgba(244, 67, 54, 0.15); color: #e57373; border: 1px solid rgba(244,67,54,0.3); }
.flash.info { background: rgba(33, 150, 243, 0.15); color: #64b5f6; border: 1px solid rgba(33,150,243,0.3); }

/* === Settings === */
.settings-tabs {
    margin-bottom: 1.2rem;
    display: flex;
    gap: 0.3rem;
}

.trash-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.btn-restore {
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    border-radius: var(--radius);
}

.btn-danger {
    background: rgba(244, 67, 54, 0.8) !important;
    color: white !important;
    border-color: transparent !important;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    border-radius: var(--radius);
}

.btn-small {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: var(--radius);
}

/* === Product detail === */
.product-detail-page header h3 {
    margin-bottom: 0.2rem;
}

.product-summary {
    background: var(--surface);
    padding: 1.2rem;
    border-radius: var(--radius);
    margin: 0.8rem 0;
    border: 1px solid var(--border);
}

.one-line-summary-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid #c89c2c;
    border-radius: var(--radius);
    padding: 0.4rem 0.75rem;
    margin: 0.6rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.one-line-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.one-line-stale {
    color: #c89c2c;
    font-size: 0.65rem;
    flex-shrink: 0;
}
.one-line-text {
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text);
}
.one-line-empty { color: var(--text-muted); font-style: italic; }

.product-summary h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.en-name {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* === View Toggle === */
.view-toggle {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

/* === Creator Accordion === */
.creator-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.creator-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.creator-card[open] {
    border-color: var(--accent);
}

.creator-card-header {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.creator-card-header::-webkit-details-marker { display: none; }
.creator-card-header::marker { content: ""; }

.creator-card-header:hover {
    background: var(--surface-hover);
}

.creator-name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 0.6rem;
}

.creator-review-count {
    flex: 0 0 auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.creator-card-body {
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
}

.creator-summary {
    background: var(--accent-soft);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
    border-left: 3px solid var(--accent);
}

.creator-summary .refined-text {
    font-size: 0.85rem;
    line-height: 1.7;
    margin: 0;
}

.summary-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.summary-actions > form,
.summary-actions > form > button,
.summary-actions > button {
    display: inline-flex;
    align-items: center;
    margin: 0;
    line-height: 1.3;
}

.summary-edit-dialog article {
    max-width: 700px;
    width: 90vw;
}

.stale-marker {
    color: #ffb74d;
    font-size: 0.9rem;
    margin-right: 0.3rem;
    cursor: help;
    user-select: none;
}

.summary-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.creator-summary-empty {
    background: var(--accent-soft);
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
    border-left: 3px dashed var(--border);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.info-muted {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.creator-review-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.creator-review-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.creator-review-item:last-child {
    border-bottom: none;
}

.creator-review-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.review-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.review-video-title {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.creator-review-text {
    font-size: 0.8rem;
    line-height: 1.6;
    margin: 0;
}

/* === Dialog === */
dialog {
    border: 1px solid var(--border);
    border-radius: 12px;
}

dialog article {
    max-width: 650px;
    max-height: 80vh;
    overflow-y: auto;
}

dialog article header {
    padding-bottom: 0.5rem;
}

dialog article header span {
    font-weight: 600;
}

/* === Login === */
.login-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 360px;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.login-card .brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-card .brand h2 {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    margin-bottom: 0.2rem;
}

.login-card .brand h2 span {
    color: var(--accent);
}

.login-card .brand p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.login-card label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.login-card {
    --pico-form-element-spacing-vertical: 0.55rem;
    --pico-form-element-spacing-horizontal: 0.8rem;
}

.login-card input {
    font-size: 0.85rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    margin-bottom: 0.8rem;
}

.login-card button[type="submit"] {
    width: 100%;
    background: var(--accent);
    border-color: var(--accent);
    font-size: 0.85rem;
}

.login-card .login-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
}

.info {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.8rem;
}

/* === Candidates === */
#merge-bar { display:flex; align-items:center; gap:0.8rem; padding:0.5rem 1rem; border:1px solid var(--accent); border-radius:var(--radius); margin-bottom:0.5rem; }
#register-dialog article, #merge-dialog article, #rename-dialog article { max-width: 500px; }
.product-search-results { max-height: 180px; overflow-y: auto; margin-bottom: 0.5rem; }
.search-result-item { padding: 0.4rem 0.6rem; font-size: 0.8rem; cursor: pointer; border-bottom: 1px solid var(--border); }
.search-result-item:hover { background: var(--surface-hover); }
.search-no-result { padding: 0.4rem 0.6rem; font-size: 0.8rem; color: var(--text-muted); }
.selected-product { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; background: var(--accent-soft); border-radius: var(--radius); font-size: 0.8rem; margin-bottom: 0.5rem; }

/* === New Reviews tab === */
.update-bar {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.update-bar select {
    max-width: 420px;
    flex: 1;
}

.update-bar button {
    white-space: nowrap;
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.update-bar button:hover {
    opacity: 0.85;
}

.update-status-card {
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.7rem 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.update-status-card .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.update-status-card .status-info {
    flex: 1;
    min-width: 0;
}

.update-status-card .status-text {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.update-status-card .status-stats {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Dialog compact */
dialog form label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

dialog form p {
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
}

dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

/* === Confirmed DB === */
.confirmed-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-pill);
    font-size: 0.65rem;
    font-weight: 500;
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}

.edited-badge {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-pill);
    font-size: 0.6rem;
    font-weight: 500;
    background: rgba(255, 193, 7, 0.2);
    color: #ffd54f;
    margin-left: 0.3rem;
}

.summary-header-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.creator-rating {
    background: #fff3e0;
    color: #e65100;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.summary-edit-area {
    width: 100%;
    min-height: 120px;
    font-size: 0.85rem;
    line-height: 1.7;
    background: var(--surface-hover);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.8rem;
    resize: vertical;
    font-family: inherit;
    color: inherit;
}

.edit-actions-inline {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
    justify-content: flex-end;
}

.confirm-action-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.8rem 0;
    flex-wrap: wrap;
}

.confirm-action-bar > button,
.confirm-action-bar > form > button,
.confirm-action-bar > form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    line-height: 1.3;
}

.btn-confirm {
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-confirm:hover {
    background: #43a047;
}

.btn-generate {
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.btn-generate:hover {
    opacity: 0.85;
}

.rating-display {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffd54f;
}

.rating-display.empty {
    color: var(--text-muted);
    font-weight: 400;
}

.rating-input select {
    width: auto;
    min-width: 70px;
    font-size: 0.78rem;
    padding: 0.2rem 0.4rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: inherit;
    margin: 0;
}

.new-review-dot {
    color: #64b5f6;
    font-size: 0.6rem;
    vertical-align: middle;
    margin-right: 0.2rem;
}

.confirmed-dot {
    color: #ffd54f;
    font-size: 0.55rem;
    vertical-align: middle;
}

.new-review-notice {
    font-size: 0.78rem;
    color: #64b5f6;
    margin: 0.2rem 0 0 0;
}

.new-review-notice a {
    color: var(--accent);
    font-size: 0.78rem;
}

.confirmed-detail-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confirm-preview {
    background: var(--surface);
    padding: 0.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 0.5rem 0;
}

.confirm-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* === Edit History Filters === */
.edit-filters {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.edit-filters .filter-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.edit-filters .filter-row:last-child {
    margin-bottom: 0;
}

.edit-filters label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 45px;
    margin: 0;
}

.edit-filters select {
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: inherit;
    min-width: 120px;
    margin: 0;
}

/* === Edit Stats Bar === */
.edit-stats-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === Diff Styles === */
.diff-added {
    background: rgba(76, 175, 80, 0.25);
    color: #a5d6a7;
    padding: 0.05rem 0.2rem;
    border-radius: 2px;
}

.diff-removed {
    background: rgba(244, 67, 54, 0.2);
    color: #ef9a9a;
    text-decoration: line-through;
    padding: 0.05rem 0.2rem;
    border-radius: 2px;
}

.diff-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.diff-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem;
}

.diff-panel h5 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
}

.diff-text {
    font-size: 0.85rem;
    line-height: 1.7;
    word-break: break-word;
}

/* === Edit Reason Tag === */
.edit-reason-tag {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(255, 193, 7, 0.2);
    color: #ffd54f;
}

/* === Edit Detail Modal === */
.edit-detail-modal {
    font-size: 0.85rem;
}

.edit-detail-modal .detail-grid {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
}

/* === Edit Stats Panel === */
.edit-stats-panel {
    font-size: 0.85rem;
}

.stat-section {
    margin-bottom: 1.2rem;
}

.stat-section h5 {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-muted);
}

.stat-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.stat-bar-label {
    font-size: 0.75rem;
    min-width: 80px;
    text-align: right;
    color: var(--text-muted);
}

.stat-bar-track {
    flex: 1;
    height: 16px;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius);
    min-width: 2px;
    transition: width 0.3s;
}

.stat-bar-fill-blue {
    background: #64b5f6;
}

.stat-bar-value {
    font-size: 0.75rem;
    min-width: 30px;
    color: var(--text-muted);
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

/* === Prompt Editor === */
.prompt-group {
    margin-bottom: 1.5rem;
}

.prompt-group-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 0.6rem 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.prompt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.prompt-card[open] {
    border-color: var(--accent);
}

.prompt-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.prompt-card-header:hover {
    background: var(--surface-hover);
}

.prompt-card-label {
    font-weight: 600;
}

.prompt-card-key {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius);
}

.prompt-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-pill);
    font-size: 0.65rem;
    font-weight: 500;
    background: rgba(255, 193, 7, 0.2);
    color: #ffd54f;
    margin-left: auto;
}

.prompt-card-body {
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
}

.prompt-textarea {
    width: 100%;
    min-height: 120px;
    font-size: 0.8rem;
    line-height: 1.6;
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem;
    resize: vertical;
    color: inherit;
    tab-size: 2;
}

.prompt-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.prompt-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* === Reanalysis === */
.reanalyze-form {
    max-width: 480px;
}

.reanalyze-form input[type="text"] {
    font-size: 0.8rem;
    margin: 0;
    padding: 0.35rem 0.5rem;
    height: auto;
    line-height: 1.4;
}

.reanalyze-form .btn-primary-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    flex-shrink: 0;
    min-width: 0;
    width: auto;
    line-height: 1.4;
    height: auto;
}

.video-info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background: var(--surface);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.reanalyze-result .flash {
    margin-bottom: 0.8rem;
}

/* === Product Change Form === */
.product-change-form {
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}

.product-change-form .product-search-input {
    width: 100%;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.product-change-form .product-search-results {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    background: var(--surface-hover);
}

.product-change-form .search-result-item {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.product-change-form .search-result-item:hover {
    background: var(--accent-soft);
}

/* === Error Candidate Highlight === */
table.striped tbody tr.error-candidate td,
table.striped tbody tr.error-candidate th,
tr.review-row.error-candidate,
tr.review-row.error-candidate td {
    background-color: rgba(244, 67, 54, 0.10) !important;
    background: rgba(244, 67, 54, 0.10) !important;
}
.creator-review-item.error-candidate { background: rgba(244, 67, 54, 0.10); border-left: 3px solid #e57373; }
.creator-review-item.error-cleared { background: rgba(76, 175, 80, 0.10); border-left: 3px solid #81c784; }
.error-badge { background: rgba(244, 67, 54, 0.2); color: #e57373; padding: 0.1rem 0.45rem; border-radius: var(--radius-pill); font-size: 0.7rem; }
.error-flag-btn { color: #e57373 !important; }

/* Error Cleared (오류 없음) - green */
table.striped tbody tr.error-cleared td,
table.striped tbody tr.error-cleared th,
tr.review-row.error-cleared,
tr.review-row.error-cleared td {
    background-color: rgba(76, 175, 80, 0.10) !important;
    background: rgba(76, 175, 80, 0.10) !important;
}
.cleared-badge { background: rgba(76, 175, 80, 0.2); color: #81c784; padding: 0.1rem 0.45rem; border-radius: var(--radius-pill); font-size: 0.7rem; }
.ec-cleared-btn { border-color: #81c784 !important; color: #81c784 !important; }
.ec-cleared-btn.active { background: rgba(76, 175, 80, 0.2) !important; border-color: #81c784 !important; color: #81c784 !important; }

/* Error type selector */
.error-type-selector { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; }
.error-type-selector button { padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-size: 0.75rem; }
.error-type-selector .error-clear-btn { border-color: #81c784; color: #81c784; background: rgba(76, 175, 80, 0.08); }
.error-type-selector .error-clear-btn.selected { background: rgba(76, 175, 80, 0.25); border-color: #81c784; color: #81c784; }
.error-type-selector button.selected { background: rgba(244, 67, 54, 0.2); border-color: #e57373; color: #e57373; }

/* === Edit Subtabs === */
.edit-subtabs {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
}

/* 제품 후보 추천 매칭 칩 */
.candidate-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.3rem;
}
.suggestion-chip {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.8rem;
    background: #eef6ff;
    color: #2c5d99;
    border: 1px solid #c5d9ee;
    cursor: pointer;
    transition: background 0.15s;
}
.suggestion-chip:hover {
    background: #d8eaff;
}

.candidate-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}
.candidate-toolbar .info-muted {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
}

.candidate-tabs {
    display: flex;
    gap: 0.4rem;
    margin: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}
.candidate-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-muted);
}
.candidate-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.btn-icon-trash {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 0.3rem;
    font-size: 0.85rem;
    opacity: 0.5;
    margin-left: auto;
}
.btn-icon-trash:hover {
    opacity: 1;
}

.export-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.linked-banner {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.3rem 0.6rem;
    border-radius: 0.3rem;
    font-size: 0.75rem;
    margin: 0.3rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.suggestion-chip.active {
    background: #2c5d99;
    color: white;
    border-color: #2c5d99;
}
.cand-mention-actions {
    margin-left: auto;
    display: inline-flex;
    gap: 0.4rem;
}
.btn-text-sm {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    padding: 0.08rem 0.35rem;
    font-size: 0.65rem;
    line-height: 1.2;
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.7;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.btn-text-sm:hover {
    opacity: 1;
    color: var(--text);
}
.btn-text-sm.danger {
    color: #b06b6b;
}
.btn-text-sm.danger:hover {
    color: #e57373;
    background: rgba(229, 115, 115, 0.08);
}

/* ===== 검수 메모 (포스트잇) ===== */
.memos-block {
    margin: 0.4rem 0 0.8rem;
}
.memos-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}
.memo-card {
    width: 170px;
    min-height: 95px;
    background: #fff59d;
    color: #3b2f00;
    padding: 0.4rem 0.5rem;
    font-size: 0.7rem;
    line-height: 1.3;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    box-sizing: border-box;
}
.memo-card-readonly {
    background: #fff3a3;
}
.memo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.6rem;
    color: #6b5400;
    border-bottom: 1px dashed rgba(0,0,0,0.18);
    padding-bottom: 0.15rem;
    align-items: center;
}
.memo-author {
    font-weight: 700;
}
.memo-date {
    color: #8a7000;
}
.memo-editor {
    margin-left: auto;
    font-size: 0.58rem;
    opacity: 0.75;
}
.memo-text {
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1;
    cursor: pointer;
    min-height: 1.1rem;
}
.memo-card-readonly .memo-text {
    cursor: default;
}
.memo-edit-form textarea {
    width: 100%;
    font-size: 0.68rem;
    padding: 0.25rem;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 2px;
    resize: vertical;
    color: #3b2f00;
    margin-bottom: 0.25rem;
    box-sizing: border-box;
}
.memo-actions {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.7rem;
}
.memo-actions .btn-primary-sm,
.memo-actions .btn-secondary-sm {
    font-size: 0.68rem;
    padding: 0.2rem 0.45rem;
}
.memo-actions .btn-text.memo-delete {
    margin-left: auto;
    color: #b71c1c;
    font-size: 0.62rem;
}
.memo-card-new {
    background: rgba(255, 245, 157, 0.45);
    border: 1px dashed #d4b400;
    align-items: stretch;
    justify-content: center;
    padding: 0.4rem;
}
.memo-add-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b5400;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem;
    width: 100%;
    height: 100%;
    min-height: 85px;
}
.memo-add-btn:hover {
    background: rgba(255,245,157,0.4);
}

/* 제품 검색탭 — 담당자 셀 */
.assignee-cell { padding: 0.2rem 0.4rem !important; }
.assignee-select {
    font-size: 0.75rem;
    padding: 0.15rem 0.3rem;
    background: transparent;
    color: inherit;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    max-width: 7rem;
}
.assignee-select:hover, .assignee-select:focus {
    border-color: var(--muted-border-color, #555);
    background: rgba(255,255,255,0.04);
}
