/* コメント管理: 投稿サムネ＋件数で絞り込み */
.comment-mgmt-media-filter-row {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.comment-mgmt-media-filter-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.65rem;
    align-items: stretch;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    padding: 0.2rem 0;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.comment-mgmt-media-filter-strip[aria-disabled='true'] {
    pointer-events: none;
    opacity: 0.65;
}

.comment-mgmt-media-filter-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    width: 4.75rem;
    margin: 0;
    padding: 0.35rem 0.3rem 0.3rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font: inherit;
    cursor: pointer;
    box-sizing: border-box;
}

.comment-mgmt-media-filter-chip:hover:not(:disabled) {
    border-color: var(--primary-color);
}

.comment-mgmt-media-filter-chip[aria-checked='true'] {
    border-color: var(--primary-color);
    background-color: rgba(71, 120, 223, 0.12);
}

.comment-mgmt-media-filter-chip:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.comment-mgmt-media-filter-chip--all {
    justify-content: center;
    min-height: 5.25rem;
}

.comment-mgmt-media-filter-thumb-wrap {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    box-sizing: border-box;
    flex-shrink: 0;
}

.comment-mgmt-media-filter-rank-badge {
    position: absolute;
    top: 0.12rem;
    left: 0.12rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
    pointer-events: none;
}

.comment-mgmt-media-filter-chip--top3 {
    justify-content: center;
    min-height: 5.25rem;
}

.comment-mgmt-media-filter-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-mgmt-media-filter-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.7rem;
    color: var(--text-light);
}

.comment-mgmt-media-filter-chip-label {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-mgmt-media-filter-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.2;
}

.posts-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.82);
    pointer-events: auto;
}

.posts-loading-overlay[hidden] {
    display: none;
}

/* ログイン後メイン列: サイドバー（220px）を除くビューポート全体を覆う */
.app-main-loading-overlay.posts-loading-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 220px;
    z-index: 50;
}

@media (max-width: 768px) {
    .app-main-loading-overlay.posts-loading-overlay {
        left: 0;
    }
}

.posts-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
}

.posts-loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: posts-loading-spin 0.75s linear infinite;
}

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

.posts-toolbar {
    /* IG トリガー・日付・適用/ダウンロードの外寸を一致させる */
    --posts-toolbar-control-height: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.25rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    box-sizing: border-box;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.posts-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.25rem;
    flex: 1 1 auto;
    min-width: 0;
}

.posts-filter-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.posts-period-presets > span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.posts-period-presets__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.posts-toolbar .period-preset-btn {
    padding: 0 0.75rem;
}

.posts-toolbar .period-preset-btn.is-active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(156, 59, 46, 0.12);
}

.posts-toolbar .period-preset-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.posts-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* 一覧系ツールバー: IG・日付・ボタンを同一外寸に（全体の .btn より一段コンパクト） */
.posts-toolbar .btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--posts-toolbar-control-height);
    min-height: var(--posts-toolbar-control-height);
    max-height: var(--posts-toolbar-control-height);
    padding: 0 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
}

.posts-toolbar .btn-primary:hover {
    transform: none;
    box-shadow: var(--shadow);
}

/* セカンダリの 2px 枠で主ボタンより背が出ないようツールバー内のみ 1px に揃える */
.posts-toolbar .btn-secondary {
    border-width: 1px;
}

.posts-toolbar .posts-ig-account-trigger {
    box-sizing: border-box;
    height: var(--posts-toolbar-control-height);
    min-height: var(--posts-toolbar-control-height);
    max-height: var(--posts-toolbar-control-height);
    padding: 0 0.65rem;
    font-size: 0.9rem;
}

.posts-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.posts-filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.posts-toolbar .posts-filter-group input[type='date'] {
    box-sizing: border-box;
    height: var(--posts-toolbar-control-height);
    min-height: var(--posts-toolbar-control-height);
    max-height: var(--posts-toolbar-control-height);
    min-width: 0;
    width: 100%;
    max-width: 11.5rem;
    margin: 0;
    padding: 0 0.6rem;
    font-size: 0.9rem;
    line-height: normal;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.posts-filter-group input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.posts-error-message {
    color: var(--error-color);
    min-height: 1.2rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.posts-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
}

.posts-table {
    width: 100%;
    border-collapse: collapse;
    /* 当初 min-width 1300px・画像列 72px を前提に、列幅差分だけ加算。自社投稿・メモ列分を加算 */
    min-width: calc(1520px + var(--posts-thumb-column-width) - 72px);
}

/* コメント管理: 列数が少ないため広い min-width を打ち消す */
/* 投稿画像の縦幅は --comment-mgmt-thumb-height のみ変更すればよい（外枠・内枠・img を同期） */
.posts-table.comment-management-table {
    min-width: 100%;
    --comment-mgmt-thumb-height: 80px;
}

.posts-table.comment-management-table .post-thumb {
    height: var(--comment-mgmt-thumb-height);
}

.posts-table.comment-management-table .post-thumb-inner {
    height: var(--comment-mgmt-thumb-height);
    min-height: var(--comment-mgmt-thumb-height);
}

.posts-table.comment-management-table .post-thumb-img {
    height: var(--comment-mgmt-thumb-height);
    max-height: var(--comment-mgmt-thumb-height);
}

.posts-table.comment-management-table .comment-mgmt-thread-cell {
    color: var(--text-light);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Instagram 非表示コメント行（一覧は列なし・左ラインと薄い地で識別） */
.posts-table.comment-management-table tr.comment-mgmt-row--ig-hidden > td {
    background-color: #ffebee;
}

.posts-table.comment-management-table tr.comment-mgmt-row--ig-hidden > td.post-thumb-cell {
    box-shadow: inset 3px 0 0 var(--error-color);
}

.posts-table.comment-management-table .comment-mgmt-self-reply-cell {
    font-size: 0.85rem;
    white-space: nowrap;
}

.posts-table.comment-management-table .comment-mgmt-reply-count-cell {
    font-size: 0.85rem;
    white-space: nowrap;
}

.comment-mgmt-self-reply-open {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--primary-color);
    font: inherit;
    font-size: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.comment-mgmt-self-reply-open:hover {
    color: var(--primary-color);
    text-decoration-thickness: 2px;
}

.comment-mgmt-self-reply-open:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

.comment-mgmt-thread-modal-content {
    width: min(560px, 100%);
    max-height: min(480px, 80vh);
    display: flex;
    flex-direction: column;
}

.comment-mgmt-thread-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 1rem 1rem;
}

.comment-mgmt-thread-modal-hint {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.5;
}

.comment-mgmt-thread-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-mgmt-thread-entry {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-mgmt-thread-entry:last-child {
    border-bottom: none;
}

.comment-mgmt-thread-entry-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.comment-mgmt-thread-entry-body {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.comment-mgmt-thread-empty {
    margin: 0;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* コメント管理: 返信列（ソートなしヘッダー） */
.posts-table.comment-management-table th.comment-mgmt-reply-col-header {
    width: 1%;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.posts-table.comment-management-table td.comment-mgmt-reply-cell {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

.comment-mgmt-reply-open-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.comment-mgmt-reply-modal-content {
    width: min(520px, 100%);
    max-height: min(90vh, 640px);
    display: flex;
    flex-direction: column;
}

.comment-mgmt-reply-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 1rem 1rem;
}

.comment-mgmt-reply-modal-hint {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.5;
}

.comment-mgmt-reply-context {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.comment-mgmt-reply-thumb-wrap {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.comment-mgmt-reply-thumb-wrap[hidden] {
    display: none;
}

.comment-mgmt-reply-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-mgmt-reply-context-main {
    flex: 1;
    min-width: 0;
}

.comment-mgmt-reply-target-user {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.comment-mgmt-reply-target-body {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.comment-mgmt-reply-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.comment-mgmt-reply-textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 0.35rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color);
    background: var(--bg-color);
    resize: vertical;
    min-height: 5rem;
}

.comment-mgmt-reply-textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.comment-mgmt-reply-char-count {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.comment-mgmt-reply-stub-message {
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #2e7d32;
    background: #e8f5e9;
    border-radius: 8px;
}

.comment-mgmt-reply-stub-message[hidden] {
    display: none;
}

.comment-mgmt-reply-stub-message--error {
    color: var(--error-color);
    background: #ffebee;
}

.comment-mgmt-reply-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.posts-table.comment-management-table .comment-mgmt-text-cell {
    vertical-align: top;
}

.posts-table.comment-management-table .comment-mgmt-hidden-badge {
    display: inline-block;
    margin-bottom: 0.35rem;
    margin-right: 0.35rem;
    padding: 0.12rem 0.45rem;
    border: 1px solid rgba(198, 40, 40, 0.35);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--error-color);
    background-color: #ffebee;
    vertical-align: middle;
}

.posts-table.comment-management-table .comment-mgmt-reply-target {
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    word-break: break-word;
    white-space: normal;
}

.posts-table.comment-management-table .comment-mgmt-comment-body {
    word-break: break-word;
    white-space: normal;
}

.posts-table th,
.posts-table td {
    border-bottom: 1px solid var(--border-color);
    padding: 0.25rem 0.35rem;
    text-align: left;
    vertical-align: middle;
    font-size: 0.9rem;
}

/* 高さ128px固定・contain。横長は列内で縮小表示 */
.posts-table td.post-thumb-cell {
    padding: 0;
    vertical-align: middle;
    width: var(--posts-thumb-column-width);
}

.posts-table th.posts-col-post-time,
.posts-table td.posts-col-post-time {
    width: 1%;
    min-width: 7.5rem;
    max-width: 9rem;
    white-space: normal;
    vertical-align: middle;
}

/* API の改行のみで区切る（pre-line だと日付内のハイフンでも折り返す） */
.posts-table td.posts-col-post-time {
    overflow: visible;
}

.posts-metric-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.35;
}

.posts-metric-total {
    color: var(--text-light);
    font-size: 0.85em;
    line-height: 1.3;
}

/* 1行目と total（括弧内）が異なるときの2行目（ブースト等の参考） */
.posts-metric-total--highlight {
    color: var(--primary-color);
    font-weight: 500;
}

.posts-metrics-legend {
    margin: 0 0 0.75rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--text-light);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.posts-metrics-legend__item {
    margin: 0;
}

.posts-metrics-legend__item + .posts-metrics-legend__item {
    margin-top: 0.35rem;
}

.posts-metrics-legend__item strong {
    color: var(--text-color);
    font-weight: 600;
}

.posts-weather-disclaimer {
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-light);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.posts-weather-disclaimer--hidden {
    display: none;
}

.posts-table .posts-col-post-time .posts-weather {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
    position: relative;
    width: fit-content;
    max-width: 100%;
    cursor: default;
    outline: none;
}

.posts-table .posts-weather-icon {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--primary-color);
}

.posts-table .posts-weather--cloudy .posts-weather-icon,
.posts-table .posts-weather--fog .posts-weather-icon,
.posts-table .posts-weather--other .posts-weather-icon {
    color: var(--text-light);
}

.posts-table .posts-weather--rain .posts-weather-icon,
.posts-table .posts-weather--thunder .posts-weather-icon {
    color: var(--primary-color);
}

.posts-table .posts-weather--snow .posts-weather-icon {
    color: var(--text-color);
}

.posts-table .posts-weather-temps {
    font-size: 0.75rem;
    line-height: 1.2;
    color: var(--text-color);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.posts-table .posts-weather-tooltip {
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    z-index: 20;
    min-width: 12rem;
    max-width: 18rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-color);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
}

.posts-table .posts-weather:hover .posts-weather-tooltip,
.posts-table .posts-weather:focus-visible .posts-weather-tooltip {
    opacity: 1;
    visibility: visible;
}

.posts-table .posts-post-time {
    display: block;
    white-space: pre;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

/*
 * タグ付け投稿一覧は table-layout:fixed。汎用の posts-col-post-time { width:1% } だと
 * 他列の固定幅と相殺され日時列が極端に細くなるため、ここで幅を明示する。
 */
.posts-table.tagged-posts-main-table th.posts-col-post-time,
.posts-table.tagged-posts-main-table td.posts-col-post-time {
    width: var(--tagged-datetime-w);
    min-width: var(--tagged-datetime-min);
    max-width: var(--tagged-datetime-max);
    box-sizing: border-box;
    overflow: visible;
}

.posts-table.tagged-posts-main-table th.posts-col-post-time {
    white-space: normal;
}

.posts-table.tagged-posts-main-table th.posts-col-post-time .sort-button {
    white-space: normal;
    line-height: 1.25;
    font-size: 0.82rem;
    text-align: center;
    width: 100%;
}

.posts-table th {
    background-color: var(--bg-light);
    white-space: nowrap;
}

.posts-row td {
    height: auto;
    overflow: hidden;
}

.sort-button {
    border: none;
    background-color: transparent;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
}

.sort-button:hover {
    color: var(--primary-color);
}

.post-thumb {
    position: relative;
    width: var(--posts-thumb-column-width);
    height: 128px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* コラボ投稿行: 一覧テーブルで行全体を薄い黄色で識別 */
.posts-table tr.posts-row--collaborative > td {
    background-color: #fffbf0;
}

.post-thumb-collab-badge {
    position: absolute;
    top: 4px;
    left: 50%;
    z-index: 1;
    transform: translateX(-50%);
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--bg-color);
    background-color: var(--primary-color);
    border-radius: 2px;
}

.post-thumb-inner {
    width: 64px;
    height: 114px;
    background-color: #efefef;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-thumb-inner span {
    color: var(--text-light);
    font-size: 0.75rem;
}

.post-thumb-img {
    width: 100%;
    height: 128px;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    display: block;
}

.post-thumb a.post-thumb-link {
    display: block;
    line-height: 0;
    border-radius: 0;
    color: inherit;
    text-decoration: none;
}

.post-thumb a.post-thumb-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.post-text-cell {
    width: 230px;
}

.post-text-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.btn-readmore {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
}

.posts-empty {
    text-align: center;
    color: var(--text-light);
    padding: 1.2rem;
}

.posts-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.8rem;
}

.posts-table th.posts-col-comments-trigger {
    width: 2.5rem;
    padding: 0.25rem;
}

.posts-table td.posts-comment-cell {
    width: 2.5rem;
    text-align: center;
    vertical-align: middle;
    padding: 0.25rem;
}

.posts-table .posts-annotation-select,
.posts-table.comment-management-table .comment-mgmt-ops-select {
    width: 100%;
    max-width: 11rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    box-sizing: border-box;
}

.posts-table .posts-annotation-select:focus,
.posts-table.comment-management-table .comment-mgmt-ops-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.posts-table.comment-management-table td.comment-mgmt-ops-cell {
    min-width: 7rem;
    max-width: 10rem;
    vertical-align: middle;
}

.posts-table td.posts-col-company-mark {
    min-width: 6.5rem;
    max-width: 8rem;
}

.posts-table td.posts-col-memo {
    min-width: 5.5rem;
    max-width: 7rem;
    text-align: center;
    vertical-align: middle;
}

.posts-memo-open-btn {
    min-width: 4.5rem;
    white-space: nowrap;
}

.posts-memo-open-btn--has-content {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(71, 120, 223, 0.12);
}

.post-operator-context-modal__content {
    width: min(560px, 100%);
    max-height: 90vh;
}

.post-operator-context-modal__body {
    padding: 0 1.25rem 1.25rem;
    overflow-y: auto;
}

.post-operator-context-modal__meta {
    margin: 0 0 0.35rem;
}

.post-operator-context-modal__deadline {
    margin: 0 0 1rem;
    padding: 0.5rem 0.65rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.post-operator-context-modal__field {
    margin-bottom: 1rem;
}

.post-operator-context-modal__label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
    color: var(--text-color);
}

.post-operator-context-modal__textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 4rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    box-sizing: border-box;
}

.post-operator-context-modal__textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.post-operator-context-modal__count {
    text-align: right;
    margin: 0.25rem 0 0;
    font-variant-numeric: tabular-nums;
}

.post-operator-context-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.posts-comment-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #ffffff;
    color: var(--text-color);
    cursor: pointer;
}

.posts-comment-open-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.posts-comment-open-btn.is-selected {
    background-color: rgba(71, 120, 223, 0.12);
    border-color: #4778df;
    color: #4778df;
}

.posts-comment-open-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.posts-table td.posts-col-media-download,
.posts-table th.posts-col-media-download {
    width: 2.5rem;
    text-align: center;
    vertical-align: middle;
    padding: 0.25rem;
}

.posts-media-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #ffffff;
    color: var(--text-color);
    cursor: pointer;
}

.posts-media-download-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.posts-media-download-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.posts-media-download-btn--loading {
    pointer-events: none;
}

.posts-media-download-spinner {
    display: block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: posts-loading-spin 0.75s linear infinite;
}

.caption-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.caption-modal-media-download-btn {
    flex-shrink: 0;
}

.posts-consideration-month-hint {
    margin: 0.35rem 0 0;
}

.posts-client-filters__month {
    min-width: 10rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
}

.posts-col-consideration {
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
}

.posts-consideration-empty {
    color: var(--text-light);
    font-size: 0.95rem;
}

.posts-consideration-open-btn {
    margin: 0;
}

