/* ============================================================
 *  page-postdata.css
 *  記事一覧・詳細ページ専用スタイル（page-postdata.php）
 * ============================================================ */

/* ─── Layout ─────────────────────────────────────────────── */
.pd-main      { background: #f5f5f5; }
.pd-list-main { background: #f4f5f7; }

/* ─── Detail: structure ──────────────────────────────────── */
.pd-wrap { max-width: 800px; margin: 0 auto; }
.pd-section { margin-bottom: 2rem; }
.pd-section-title {
    font-size: .85rem;
    font-weight: 700;
    color: #888;
    letter-spacing: .06em;
    border-bottom: 2px solid #eee;
    padding-bottom: .4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.pd-section-title .material-symbols-rounded { font-size: 1rem; color: #dc3545; }

/* ─── Detail: table ──────────────────────────────────────── */
.pd-table { width: 100%; font-size: .88rem; }
.pd-table tr { border-bottom: 1px solid #f0f0f0; }
.pd-table th { width: 8rem; padding: .55rem .5rem .55rem 0; color: #999; font-weight: 500; vertical-align: top; white-space: nowrap; }
.pd-table td { padding: .55rem .5rem; color: #333; vertical-align: top; word-break: break-all; }
.pd-td-pre  { white-space: pre-wrap; }
.pd-td-url  { word-break: break-all; white-space: pre-wrap; }
@media (max-width: 600px) { .pd-table th { width: 6rem; } }

/* ─── Detail: sub images ─────────────────────────────────── */
.pd-sub-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; margin-top: 1rem; }
.pd-sub-imgs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: .4rem; cursor: pointer; }

/* ─── Detail: image modal ────────────────────────────────── */
.pd-modal      { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.88); align-items: center; justify-content: center; }
.pd-modal-close { position: absolute; top: 1rem; right: 1.2rem; background: none; border: none; color: #fff; font-size: 2.5rem; cursor: pointer; line-height: 1; padding: 0; }
.pd-modal-prev,
.pd-modal-next  { position: absolute; top: 50%; transform: translateY(calc(-50% + 2px)); background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 1.6rem; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 0; padding: 0; }
.pd-modal-prev  { left: .8rem; }
.pd-modal-next  { right: .8rem; }
.pd-modal-img   { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: .4rem; box-shadow: 0 8px 40px rgba(0,0,0,.6); }

/* ─── Detail: back link ──────────────────────────────────── */
.pd-back-link { font-size: .82rem; color: #888; text-decoration: none; }

/* ─── Detail: badges ─────────────────────────────────────── */
.pd-badge {
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
}
.pd-badge-cat   { background: #fef2f2; color: #dc3545; border: 1px solid #fca5a5; }
.pd-badge-kubun { font-weight: 600; background: #f3f4f6; color: #555; border: 1px solid #e5e7eb; }
.pd-badge-draft { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

/* ─── Detail: draft banner ───────────────────────────────── */
.pd-draft-banner {
    background: #dc3545;
    color: #fff;
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.pd-draft-banner .material-symbols-rounded {
    font-size: 1.5rem;
}
@media (max-width: 575.98px) {
    .pd-draft-banner {
        font-size: 0.85rem;
        padding: 0.65rem 0.75rem;
    }
    .pd-draft-banner .material-symbols-rounded {
        font-size: 1.1rem;
    }
}

/* ─── Detail: title / meta ───────────────────────────────── */
.pd-detail-h1  { font-size: 1.5rem; font-weight: 800; line-height: 1.35; color: #1a1a2e; margin-bottom: 1rem; }
.pd-date-meta  { font-size: .82rem; color: #aaa; margin-bottom: 1rem; }
.pd-meta-row   { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .82rem; color: #666; margin-bottom: 1rem; }
.pd-start-date { color: #aaa; }
.pd-detail-img { width: 100%; max-width: 100%; border-radius: .5rem; }

/* ─── Detail: edit button ────────────────────────────────── */
.pd-edit-btn,
.pd-hide-btn,
.pd-preview-btn,
.pd-publish-btn,
.pd-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 500;
    color: #555;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: .35rem .7rem;
    border-radius: .4rem;
    text-decoration: none;
    transition: background .2s;
    cursor: pointer;
}
.pd-edit-btn:hover,
.pd-hide-btn:hover,
.pd-preview-btn:hover,
.pd-publish-btn:hover,
.pd-delete-btn:hover {
    background: #ebebeb;
    color: #333;
    text-decoration: none;
}
.pd-edit-btn .material-symbols-rounded,
.pd-hide-btn .material-symbols-rounded,
.pd-preview-btn .material-symbols-rounded,
.pd-publish-btn .material-symbols-rounded,
.pd-delete-btn .material-symbols-rounded { font-size: .85rem; }

@media (max-width: 576px) {
    .pd-edit-btn,
    .pd-hide-btn,
    .pd-preview-btn,
    .pd-publish-btn,
    .pd-delete-btn {
        font-size: .65rem;
        padding: .28rem .55rem;
    }
    .pd-edit-btn .material-symbols-rounded,
    .pd-hide-btn .material-symbols-rounded,
    .pd-preview-btn .material-symbols-rounded,
    .pd-publish-btn .material-symbols-rounded,
    .pd-delete-btn .material-symbols-rounded { font-size: .75rem; }
}

/* ─── Detail: preview URL box ────────────────────────────── */
.pd-preview-url-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .4rem;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}
.pd-preview-url-label {
    font-size: .75rem;
    color: #888;
    margin-bottom: .5rem;
}
.pd-preview-url-input {
    flex: 1;
    font-size: .8rem;
    padding: .5rem .7rem;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: .4rem 0 0 .4rem;
    background: #fff;
    color: #333;
    min-width: 0;
}
.pd-preview-url-row {
    display: flex;
    align-items: center;
    margin-bottom: .5rem;
}
.pd-preview-url-btns {
    display: flex;
    gap: .5rem;
}
.pd-preview-copy-btn {
    border-radius: 0 .4rem .4rem 0;
    border-left: none;
    white-space: nowrap;
}
@media (max-width: 576px) {
    .pd-preview-url-row {
        margin-bottom: .5rem;
    }
    .pd-preview-url-input {
        width: 100%;
        box-sizing: border-box;
    }
    .pd-preview-url-btns {
        flex-wrap: wrap;
    }
}
.pd-preview-copy-btn,
.pd-preview-regen-btn,
.pd-preview-delete-btn {
    font-size: .8rem;
    font-weight: 500;
    padding: .5rem 1rem;
    border-radius: .4rem;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.pd-preview-copy-btn {
    background: #1976d2;
    color: #fff;
    border: 1px solid #1976d2;
    border-left: none;
    border-radius: 0 .4rem .4rem 0;
    white-space: nowrap;
}
.pd-preview-copy-btn:hover {
    background: #1565c0;
    border-color: #1565c0;
}
.pd-preview-regen-btn,
.pd-preview-delete-btn {
    background: #fff;
    color: #666;
}
.pd-preview-regen-btn:hover,
.pd-preview-delete-btn:hover {
    background: #f5f5f5;
}

/* ─── Detail: publish / delete buttons ─────────────────── */
.pd-publish-btn {
    background: #f0f0f0;
    color: #666;
    border-color: #ddd;
}
.pd-publish-btn:hover {
    background: #e0e0e0;
    color: #444;
}
.pd-delete-btn {
    background: #f0f0f0;
    color: #666;
    border-color: #ddd;
}
.pd-delete-btn:hover {
    background: #e0e0e0;
    color: #444;
}

/* ─── Detail: icon sizes ─────────────────────────────────── */
.pd-icon-sm     { font-size: 1rem; }
.pd-icon-sm-red { font-size: 1rem; color: #dc3545; }

/* ─── Detail: body text ──────────────────────────────────── */
.pd-comment-body    { font-size: .92rem; line-height: 2; color: #333; }
.pd-comment-body h3 { display: inline; font-size: 1.2rem; font-weight: 700; margin: 1em 0 0.5em; color: #333; }
.pd-comment-body .cinepu-red { color: #e74c3c; }
.pd-comment-body img { max-width: 100%; height: auto; }
.pd-harassment-text { font-size: .85rem; line-height: 1.9; color: #555; white-space: pre-wrap; }
.pd-link-email      { color: #c0392b; }
.pd-guar-label      { font-weight: 700; }

/* ─── List: page header ──────────────────────────────────── */
.pd-list-header     { background: linear-gradient(135deg,#f0f2f5 0%,#e8eaed 100%); }
.pd-list-header-bar { background: linear-gradient(135deg,#f0f2f5 0%,#e8eaed 100%); border-bottom: 1px solid #d1d5db; }
.pd-list-title      { font-size: 1.35rem; letter-spacing: .02em; color: #1a1a2e; }
.pd-list-subtitle   { font-size: .82rem; color: #6b7280; }
.pd-header-icon     { font-size: 1.4rem; vertical-align: -3px; color: #e63946; }
.pd-count-strong    { color: #1a1a2e; }

/* ─── List: kubun filter bar ─────────────────────────────── */
.pd-filter-type { font-size: .7rem; color: #888; white-space: nowrap; min-width: 4em; }
.pd-kubun-btn          { font-size: .68rem !important; border-radius: 20px !important; padding: 2px 9px !important; }
.pd-kubun-btn--active  { background: #555555 !important; color: #fff !important; border-color: #555555 !important; }
.pd-kubun-btn--inactive{ background: #fff !important; color: #555 !important; border-color: #d1d5db !important; }

/* ─── List: detail filter bar ────────────────────────────── */
.pd-filter-bar    { background: #fff; border-bottom: 1px solid #e5e7eb; }
.pd-filter-toggle { font-size: .75rem; color: #555; background: none; border: none; padding-left: 0 !important; margin-left: -3px; }
.pd-filter-tune   { font-size: .95rem; color: #888; }
.pd-filter-chevron{ font-size: .95rem; color: #aaa; transition: transform .2s; }

.pd-filter-label-sm { font-size: .72rem; color: #888; white-space: nowrap; flex: 0 0 8em; padding-top: 3px; }

.pd-filter-sub-btn          { font-size: .65rem !important; border-radius: 20px !important; padding: 1px 8px !important; }
.pd-filter-sub-btn--active  { background: #555555 !important; color: #fff !important; border-color: #555555 !important; }
.pd-filter-sub-btn--inactive{ background: #f9fafb !important; color: #555 !important; border-color: #d1d5db !important; }

.pd-country-display { font-size: .68rem; color: #555; background: #e5e7eb; border-radius: 4px; padding: 2px 8px; line-height: 1.7; }
.pd-country-change  { font-size: .68rem; color: #888; text-decoration: underline; text-underline-offset: 2px; margin-left: .5rem; }
.pd-country-select  { font-size: .78rem; border: 1px solid #d1d5db; border-radius: 6px; padding: 3px 10px; color: #333; background: #fff; cursor: pointer; }

/* ─── List: article list ─────────────────────────────────── */
.pd-alert-sm   { font-size: .82rem; }
.pd-list-ul    { border-top: 1px solid #e5e7eb; }
.pd-list-item  { border-bottom: 1px solid #e5e7eb; padding: 14px 0 14px 10px; }
.pd-list-item > .d-flex.align-items-center { align-items: flex-start !important; }
.pd-empty-msg  { color: #888; padding: 40px 0; text-align: center; }

/* ─── List: thumbnail ────────────────────────────────────── */
.pd-thumb-link  { width: 80px; height: 80px; border-radius: 6px; overflow: hidden; background: #ddd; display: block; }
.pd-thumb-img   { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb-wrap  { position: relative; width: 80px; height: 80px; flex-shrink: 0; overflow: visible; cursor: grab; }
.pd-thumb-wrap:active { cursor: grabbing; }
.pd-thumb-wrap .pd-thumb-link { width: 80px; height: 80px; }
.pd-no-img-bg   { background: #e5e7eb; }
.pd-no-img-icon { font-size: 2rem; color: #ccc; }

/* ─── List: article list badges ──────────────────────────── */
.pd-list-badge-cat {
    font-size: .7rem;
    background: #e5e7eb;
    color: #555;
    padding: 1px 7px;
    border-radius: 3px;
    line-height: 1.7;
    white-space: nowrap;
}
.pd-list-badge-guarantee {
    font-size: .65rem;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 12px;
    line-height: 1.6;
    white-space: nowrap;
}

/* ─── List: article text ─────────────────────────────────── */
.pd-article-title-link { font-size: .82rem; line-height: 1.5; color: #1a1a2e; display: block; }
.pd-article-meta { font-size: .68rem; color: #aaa; gap: 1px; }
.pd-author-link  { color: #666; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; position: relative; top: -1px; }
.pd-author-icon  { font-size: .85rem; vertical-align: middle; margin-left: 2px; }
.pd-end-span     { white-space: nowrap; }
.pd-end-expired  { color: #dc3545; }
.pd-deadline-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .68rem;
    background: #e5e7eb;
    color: #555;
    border-radius: 4px;
    padding: 1px 8px;
    line-height: 1.7;
}
.pd-deadline-icon { font-size: .8rem !important; display: block; line-height: 1; position: relative; top: 1px; }
.pd-deadline-label span:not(.pd-deadline-icon):not(.pd-end-expired) { position: relative; top: -1px; }


/* ─── Favorites: tab bar ─────────────────────────────────── */
.pd-tab-bar       { padding-top: 1rem; }
.pd-free-notice { font-size: .72rem; color: #999; margin: .25rem 0 0; }
.pd-tab-bar-inner { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.pd-tabs          { display: inline-flex; gap: 0; border-bottom: 2px solid rgba(0,0,0,.1); }
.pd-tab           { background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: .6rem 1.1rem; font-size: .82rem; font-weight: 600; color: #888; cursor: pointer; display: flex; align-items: center; gap: .35rem; transition: color .15s, border-color .15s; text-decoration: none; }
.pd-tab .material-symbols-rounded { font-size: 1rem; }
.pd-tab:hover     { color: #555; }
.pd-tab--active   { color: #dc3545 !important; border-bottom-color: #dc3545 !important; }
.pd-fav-count     { display: inline-flex; align-items: center; justify-content: center; background: #dc3545; color: #fff; border-radius: 10px; font-size: .6rem; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px; line-height: 1; }

/* ─── Favorites: clear button ────────────────────────────── */
.pd-favs-clear-btn { display: inline-flex; align-items: center; gap: .3rem; background: none; border: 1px solid #d1d5db; border-radius: 6px; font-size: .75rem; color: #888; padding: 3px 10px; cursor: pointer; transition: color .15s, border-color .15s; }
.pd-favs-clear-btn .material-symbols-rounded { font-size: .95rem; }
.pd-favs-clear-btn:hover { color: #dc3545; border-color: #dc3545; }

/* ─── Favorites: drag hint ───────────────────────────────── */
.pd-favs-hint { display: flex; align-items: center; gap: .3rem; font-size: .72rem; color: #aaa; padding: .5rem 0 .25rem; }
.pd-favs-hint-icon { font-size: .95rem; color: #bbb; }

/* ─── Favorites: filter disabled ────────────────────────── */
.pd-filter--disabled { opacity: .4; pointer-events: none; user-select: none; }

/* ─── Favorites: star button (list card) ─────────────────── */
.pd-fav-btn        { background: #e5e7eb; border: none; border-radius: 5px; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, transform .1s; padding: 0; flex-shrink: 0; }
.pd-fav-btn:hover  { background: #f3f4f6; }
.pd-fav-btn .pd-fav-icon          { font-size: .85rem !important; color: #9ca3af; font-variation-settings: 'FILL' 0; transition: color .15s, font-variation-settings .15s; }
.pd-fav-btn--active .pd-fav-icon  { color: #fbbf24; font-variation-settings: 'FILL' 1; }
/* お気に入りパネル内のみ × スタイル */
#pd-favs-panel .pd-fav-btn .pd-fav-icon          { color: #9ca3af; font-variation-settings: 'FILL' 0; }
#pd-favs-panel .pd-fav-btn--active .pd-fav-icon  { color: #9ca3af; font-variation-settings: 'FILL' 0; }

/* ─── Detail: PDF button ────────────────────────────────── */
.pd-pdf-btn { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 500; color: #555; background: #f5f5f5; border: 1px solid #e0e0e0; padding: .35rem .7rem; border-radius: .4rem; cursor: pointer; transition: background .2s, border-color .2s, color .2s; flex-shrink: 0; }
.pd-pdf-btn:hover { background: #ebebeb; color: #333; }
.pd-pdf-btn .material-symbols-rounded {
    font-size: .85rem !important;
    width: 1em;
    text-align: center;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

/* ─── Favorites: detail fav button ─────────────────────── */
.pd-detail-fav-btn { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 500; color: #555; background: #f5f5f5; border: 1px solid #e0e0e0; padding: .35rem .7rem; border-radius: .4rem; cursor: pointer; transition: background .2s, border-color .2s, color .2s; flex-shrink: 0; }
.pd-detail-fav-btn:hover { background: #ebebeb; color: #333; }
.pd-detail-fav-btn .pd-fav-icon { font-size: .85rem !important; color: #9ca3af; font-variation-settings: 'FILL' 0; transition: color .15s, font-variation-settings .15s; }
.pd-detail-fav-btn.pd-fav-btn--active { background: #d5d5d5; border-color: #bbb; color: #444; }
.pd-detail-fav-btn.pd-fav-btn--active .pd-fav-icon { color: #555; font-variation-settings: 'FILL' 1; }

/* ─── Detail: site-card top padding override ─────────────── */
.pd-wrap .site-card { padding-top: 1rem; }

/* ─── Detail: hero action buttons (right-aligned) ────────── */
.pd-hero-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* ─── Print / PDF ───────────────────────────────────────── */
@media print {
    /* 印刷不要なUI要素を非表示 */
    .site-header, .site-footer, .breadcrumb-bar, .pd-back-link,
    .pd-action-btns, .pd-edit-btn, .pd-hide-btn, .pd-publish-btn,
    .pd-preview-btn, .pd-delete-btn, .pd-preview-url-box,
    .pd-modal, #pd-modal { display: none !important; }

    body, .pd-main { background: #fff !important; }
    .site-card { box-shadow: none !important; border: 1px solid #ddd; }
    .container { max-width: 100% !important; padding: 0 !important; }

    /* 文字の途中で改ページしない */
    p, li, td, th, span, div {
        orphans: 3;
        widows: 3;
    }
    h1, h2, h3, h4, .pd-section-title, .pd-badge {
        page-break-after: avoid;
        break-after: avoid;
    }
    tr, .pd-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .site-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    img {
        page-break-inside: avoid;
        break-inside: avoid;
        max-width: 100% !important;
    }
}

/* ─── Favorites: login modal ─────────────────────────────── */
.pd-login-modal     { display: none; position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.6); align-items: center; justify-content: center; }
.pd-login-modal-box { background: #fff; border-radius: 12px; padding: 2rem 1.75rem; max-width: 340px; width: 90%; text-align: center; position: relative; box-shadow: 0 8px 40px rgba(0,0,0,.22); }
.pd-login-modal-close { position: absolute; top: .6rem; right: .9rem; background: none; border: none; font-size: 1.6rem; color: #aaa; cursor: pointer; line-height: 1; padding: 0; }
.pd-login-modal-close:hover { color: #555; }
.pd-login-modal-icon  { font-size: 2.8rem; color: #fbbf24; font-variation-settings: 'FILL' 1; display: block; margin-bottom: .5rem; }
.pd-login-modal-title { font-size: 1rem; font-weight: 700; margin: 0 0 .5rem; color: #1a1a2e; }
.pd-login-modal-text  { font-size: .82rem; color: #666; margin-bottom: .75rem; line-height: 1.6; }
.pd-login-modal-note  { font-size: .72rem; color: #999; }
.pd-login-modal-btns  { display: flex; flex-direction: column; gap: .6rem; }
.pd-login-modal-btn--login,
.pd-login-modal-btn--register {
    background: #1a1a2e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: .85rem !important;
    font-weight: 600 !important;
    padding: .65rem !important;
    text-decoration: none !important;
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s;
}
.pd-login-modal-btn--login:hover    { background: #2d2d4e !important; color: #fff !important; }
.pd-login-modal-btn--register { background: #dc3545 !important; }
.pd-login-modal-btn--register:hover { background: #b91c2c !important; color: #fff !important; }

.pd-extlink-modal     { display: none; position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.6); align-items: center; justify-content: center; padding: 1rem; }
.pd-extlink-modal-box { background: #fff; border-radius: 12px; padding: 2rem 1.75rem; max-width: 380px; width: 90%; text-align: center; position: relative; box-shadow: 0 8px 40px rgba(0,0,0,.22); }
.pd-extlink-modal-icon { font-size: 2.6rem; color: #f39c12; font-variation-settings: 'FILL' 1; display: block; margin-bottom: .5rem; }
.pd-extlink-modal-title { font-size: .95rem; font-weight: 700; margin: 0 0 .6rem; color: #1a1a2e; }
.pd-extlink-modal-text  { font-size: .8rem; color: #555; margin-bottom: 1.25rem; line-height: 1.7; text-align: left; }
.pd-extlink-modal-btns  { display: flex; gap: .6rem; }
.pd-extlink-modal-btn--cancel,
.pd-extlink-modal-btn--ok {
    flex: 1;
    border: none !important;
    border-radius: 8px !important;
    font-size: .85rem !important;
    font-weight: 600 !important;
    padding: .65rem !important;
    text-decoration: none !important;
    display: block !important;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s;
}
.pd-extlink-modal-btn--cancel { background: #eee !important; color: #333 !important; }
.pd-extlink-modal-btn--cancel:hover { background: #ddd !important; }
.pd-extlink-modal-btn--ok     { background: #1a1a2e !important; color: #fff !important; }
.pd-extlink-modal-btn--ok:hover { background: #2d2d4e !important; color: #fff !important; }

/* ─── Favorites: sorter area ────────────────────────────── */
#pd-fav-sorter { margin-bottom: 1.25rem; padding-top: .75rem; }
.pd-fav-sorter-header { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pd-fav-sorter-title { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 600; color: #555; }
.pd-fav-sorter-title .material-symbols-rounded { font-size: 1.05rem; color: #888; }
.pd-add-group-btn { display: inline-flex; align-items: center; gap: .2rem; background: none; border: 1px dashed #c8cacd; border-radius: 6px; font-size: .72rem; color: #999; padding: 3px 10px; cursor: pointer; transition: color .15s, border-color .15s; }
.pd-add-group-btn:hover { color: #555; border-color: #888; }
.pd-add-group-btn .material-symbols-rounded { font-size: .9rem; }
#pd-add-group-form { display: flex; align-items: center; gap: .4rem; }
#pd-add-group-input { font-size: .8rem; border: 1px solid #d1d5db; border-radius: 6px; padding: 3px 8px; outline: none; width: 150px; }
#pd-add-group-input:focus { border-color: #777; }
#pd-add-group-ok { font-size: .72rem; background: #555; color: #fff; border: none; border-radius: 6px; padding: 3px 10px; cursor: pointer; }
#pd-add-group-cancel { font-size: .72rem; background: none; border: 1px solid #d1d5db; border-radius: 6px; padding: 3px 8px; cursor: pointer; color: #888; }

/* ─── Favorites: group ──────────────────────────────────── */
.pd-fav-group { margin-bottom: 1.5rem; }
.pd-fav-group-header { display: flex; align-items: center; gap: .3rem; margin-bottom: .3rem; cursor: grab; padding: .25rem 0; border-bottom: 1px solid #f0f0f0; }
.pd-fav-group-header:active { cursor: grabbing; }
.pd-fav-group--drag-ghost { opacity: .4; }
.pd-fav-group--drag-chosen { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.pd-fav-group-icon { font-size: .9rem !important; color: #aaa; display: inline-flex; align-items: center; line-height: 1; }
.pd-fav-group-label { font-size: .95rem; font-weight: 600; color: #444; flex: 1; }
.pd-fav-group-rename-btn, .pd-fav-group-delete-btn { background: none; border: none; cursor: pointer; padding: 3px; color: #aaa; display: inline-flex; align-items: center; transition: color .15s; border-radius: 4px; }
.pd-fav-group-rename-btn:hover { color: #444; background: #f0f0f0; }
.pd-fav-group-delete-btn:hover { color: #dc3545; background: #fff0f0; }
.pd-fav-group-rename-btn .material-symbols-rounded, .pd-fav-group-delete-btn .material-symbols-rounded { font-size: 1rem; }
.pd-fav-group-rename-input { font-size: .78rem; font-weight: 600; color: #444; border: 1px solid #888; border-radius: 4px; padding: 1px 6px; outline: none; flex: 1; max-width: 180px; }
.pd-fav-group-toggle { background: #e8e8e8; border: none; cursor: pointer; padding: 2px; color: #888; display: inline-flex; align-items: center; transition: color .15s; border-radius: 4px; flex-shrink: 0; }
.pd-fav-group-toggle:hover { color: #333; background: #d4d4d4; }
.pd-fav-group-toggle .material-symbols-rounded { font-size: 1.1rem; transition: transform .2s; }
.pd-fav-group--collapsed .pd-fav-group-toggle .material-symbols-rounded { transform: rotate(-90deg); }
.pd-fav-group--collapsed .pd-fav-group-list { display: none; }
.pd-fav-group-list { min-height: 56px; border: 2px dashed #c4c9d0; border-radius: .5rem; padding: .25rem .75rem; transition: border-color .15s, background .15s; }
.pd-fav-group-list.sortable-drag-over { border-color: #dc3545 !important; background: rgba(220,53,69,.04); }
.pd-fav-group-dropzone { display: flex; align-items: center; justify-content: center; gap: .3rem; color: #ccc; font-size: .72rem; padding: 1rem; pointer-events: none; }
.pd-fav-group-dropzone .material-symbols-rounded { font-size: .95rem; }
.pd-group-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; font-size: .8rem; color: #bbb; padding: 1.25rem; margin: 0; pointer-events: none; text-align: center; line-height: 1.5; width: 100%; }
.pd-group-empty .material-symbols-rounded { font-size: 1.5rem; color: #d4d4d4; font-variation-settings: 'FILL' 1; }

/* ─── Favorites: drag states ────────────────────────────── */
.pd-list-item--drag-ghost  { opacity: .35; border: 2px dashed #dc3545; border-radius: .4rem; }
.pd-list-item--drag-chosen { cursor: grabbing; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.pd-list-item--dragging    { opacity: .9; }

/* ─── Favorites: empty panel ─────────────────────────────── */
#pd-favs-panel { padding-top: .75rem; }


