/* ============================================================
 *  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; }

/* ─── 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; }

/* ─── 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 { max-width: 100%; border-radius: .5rem; }

/* ─── 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-harassment-text { font-size: .85rem; line-height: 1.9; color: #555; white-space: pre-wrap; }
.pd-link-email      { color: #457b9d; }
.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: .7rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 3px;
    line-height: 1.7;
    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: #aaa; 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-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        { position: absolute; top: -8px; right: -8px; z-index: 2; background: rgba(0,0,0,.5); border: none; border-radius: 4px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(2px); transition: background .15s, transform .1s; padding: 0; }
.pd-fav-btn:hover  { background: rgba(0,0,0,.7); transform: scale(1.1); }
.pd-fav-btn .pd-fav-icon          { font-size: .78rem !important; color: rgba(255,255,255,.75); 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        { background: rgba(107,114,128,.8); }
#pd-favs-panel .pd-fav-btn:hover  { background: rgba(75,85,99,.95); }
#pd-favs-panel .pd-fav-btn .pd-fav-icon          { color: #fff; font-variation-settings: 'FILL' 0; }
#pd-favs-panel .pd-fav-btn--active .pd-fav-icon  { color: #fff; font-variation-settings: 'FILL' 0; }

/* ─── Favorites: detail star button ─────────────────────── */
.pd-detail-fav-btn { flex-shrink: 0; background: none; border: none; border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, transform .1s; padding: 0; margin-top: .15rem; }
.pd-detail-fav-btn:hover { background: rgba(0,0,0,.07); transform: scale(1.1); }
.pd-detail-fav-btn .pd-fav-icon { font-size: 1.35rem !important; color: #d1d5db; font-variation-settings: 'FILL' 0; transition: color .15s, font-variation-settings .15s; }
.pd-detail-fav-btn.pd-fav-btn--active .pd-fav-icon { color: #fbbf24; font-variation-settings: 'FILL' 1; }

/* ─── 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-btns  { display: flex; flex-direction: column; gap: .6rem; }
.pd-login-modal-btn--login    { background: #1a1a2e; color: #fff; border-radius: 8px; font-size: .85rem; font-weight: 600; padding: .55rem; text-decoration: none; display: block; }
.pd-login-modal-btn--login:hover    { background: #2d2d4e; color: #fff; text-decoration: none; }
.pd-login-modal-btn--register { background: #dc3545; color: #fff; border-radius: 8px; font-size: .85rem; font-weight: 600; padding: .55rem; text-decoration: none; display: block; }
.pd-login-modal-btn--register:hover { background: #b91c2c; color: #fff; text-decoration: none; }

/* ─── 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; }


