/* ==================================
   写メ日記システム スタイルシート v2.0
   ================================== */

/* ========== 共通スタイル ========== */
.krc-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ========== ナビゲーション ========== */
.krc-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.krc-nav-brand {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.krc-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.krc-nav-item a {
    display: block;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.krc-nav-item a:hover {
    background: #f5f5f5;
    color: #333;
}

.krc-nav-item.active a {
    background: #0073aa;
    color: #fff;
}

/* ========== ヘッダー ========== */
.krc-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.krc-dashboard-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

/* ========== ボタン ========== */
.krc-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.krc-btn:hover {
    opacity: 0.9;
}

.krc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.krc-btn-primary {
    background: #0073aa;
    color: #fff;
}

.krc-btn-primary:hover {
    background: #005a87;
    color: #fff;
}

.krc-btn-secondary {
    background: #666;
    color: #fff;
}

.krc-btn-draft {
    background: #4caf50;
    color: #fff;
}

.krc-btn-cancel {
    background: #999;
    color: #fff;
}

.krc-btn-danger {
    background: #dc3232;
    color: #fff;
}

.krc-btn-small {
    padding: 5px 12px;
    font-size: 12px;
}

.krc-btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.krc-btn-text {
    background: transparent;
    color: #666;
    padding: 5px 10px;
}

.krc-btn-text:hover {
    color: #333;
}

.krc-btn-icon {
    margin-right: 8px;
}

/* ========== サマリーセクション ========== */
.krc-summary-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.krc-summary-section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.krc-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.krc-summary-card {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.krc-summary-count {
    display: block;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.krc-summary-label {
    font-size: 14px;
    color: #666;
}

.krc-summary-draft {
    background: #f0f0f0;
}
.krc-summary-draft .krc-summary-count { color: #666; }

.krc-summary-pending {
    background: #fff8e5;
}
.krc-summary-pending .krc-summary-count { color: #f0ad4e; }

.krc-summary-publish {
    background: #ecf7ed;
}
.krc-summary-publish .krc-summary-count { color: #46b450; }

.krc-summary-future {
    background: #e8f4fc;
}
.krc-summary-future .krc-summary-count { color: #0073aa; }

/* ========== 最新投稿セクション ========== */
.krc-recent-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.krc-recent-section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.krc-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.krc-recent-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.krc-recent-item:last-child {
    border-bottom: none;
}

.krc-recent-thumbnail {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
}

.krc-recent-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.krc-no-thumbnail,
.krc-no-thumbnail-small {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
}

.krc-recent-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.krc-recent-title {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.krc-recent-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.krc-recent-date {
    color: #999;
}

.krc-recent-actions {
    flex: 0 0 auto;
}

.krc-recent-actions .krc-action-btns {
    display: flex;
    gap: 6px;
    align-items: center;
}

.krc-recent-actions .krc-action-btn {
    padding: 5px 10px;
    font-size: 12px;
}

/* ========== クイックアクション ========== */
.krc-quick-actions {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.krc-quick-actions h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.krc-action-buttons {
    display: flex;
    gap: 15px;
}

/* ========== フォームスタイル ========== */
.krc-post-form-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.krc-form-group {
    margin-bottom: 25px;
}

.krc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.krc-form-group input[type="text"],
.krc-form-group input[type="password"],
.krc-form-group input[type="datetime-local"],
.krc-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.krc-form-group input:focus,
.krc-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.krc-form-group.has-error input,
.krc-form-group.has-error textarea {
    border-color: #dc3232;
}

.krc-required {
    color: #dc3232;
    font-size: 12px;
    font-weight: normal;
}

.krc-title-input-wrapper {
    display: flex;
    gap: 10px;
}

.krc-title-input-wrapper input {
    flex: 1;
}

.krc-editor-toolbar {
    margin-bottom: 10px;
}

.krc-editor-toolbar .krc-btn {
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid #c3c4c7;
}

.krc-editor-toolbar .krc-btn:hover {
    background: #e0e0e1;
    color: #1d2327;
}

.krc-title-count,
.krc-char-count {
    float: right;
    font-weight: normal;
    font-size: 13px;
    color: #666;
}

.krc-title-count.exceeded,
.krc-char-count.exceeded {
    color: #dc3232;
    font-weight: bold;
}

.krc-char-warning {
    color: #dc3232;
    font-size: 13px;
    margin-top: 8px;
    padding: 10px;
    background: #fff5f5;
    border-radius: 4px;
}

.krc-field-error {
    color: #dc3232;
    font-size: 13px;
    margin-top: 5px;
}

.krc-field-hint {
    color: #666;
    font-size: 13px;
    margin-top: 5px;
}

.krc-form-hint-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.krc-form-hint-box p {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #666;
}

.krc-form-hint-box p:last-child {
    margin-bottom: 0;
}

.krc-thumbnail-wrapper {
    margin-top: 10px;
}

.krc-image-preview-item {
    margin-top: 15px;
}

.krc-image-preview-item img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.krc-image-info {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.krc-image-info span {
    display: inline-block;
    margin-right: 15px;
}

.krc-image-preview-item .krc-remove-image {
    display: block;
    margin-top: 10px;
    background: none;
    border: none;
    color: #dc3232;
    cursor: pointer;
    font-size: 13px;
}

.krc-schedule-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.krc-datetime-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.krc-date-input {
    width: 150px !important;
    cursor: pointer;
    background: #fff url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat right 10px center;
    background-size: 16px;
    padding-right: 35px !important;
}

.krc-time-select {
    width: 70px;
    padding: 10px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.krc-time-select:focus {
    outline: none;
    border-color: #0073aa;
}

.krc-time-separator {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.krc-schedule-preview {
    margin-top: 10px;
    padding: 10px 15px;
    background: #e8f4fc;
    border-radius: 4px;
    color: #0073aa;
    font-size: 14px;
}

/* jQueryUI Datepicker カスタマイズ */
.ui-datepicker {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    padding: 10px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    z-index: 9999 !important;
    width: auto !important;
    min-width: 280px;
}

.ui-datepicker-header {
    background: #0073aa !important;
    border: none !important;
    border-radius: 6px 6px 0 0 !important;
    padding: 12px 10px !important;
    position: relative;
}

.ui-datepicker-title {
    color: #fff !important;
    font-weight: bold !important;
    line-height: 1.5 !important;
}

.ui-datepicker-title select {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    margin: 0 3px !important;
    font-size: 14px !important;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 30px !important;
    height: 30px !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    background: rgba(255,255,255,0.1) !important;
    border: none !important;
}

.ui-datepicker-prev {
    left: 8px !important;
}

.ui-datepicker-next {
    right: 8px !important;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: rgba(255,255,255,0.25) !important;
}

.ui-datepicker-prev span,
.ui-datepicker-next span {
    display: none !important;
}

.ui-datepicker-prev::after,
.ui-datepicker-next::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: solid #fff;
    border-width: 0 2px 2px 0;
    padding: 4px;
}

.ui-datepicker-prev::after {
    transform: translate(-40%, -50%) rotate(135deg);
}

.ui-datepicker-next::after {
    transform: translate(-60%, -50%) rotate(-45deg);
}

.ui-datepicker-calendar {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 5px !important;
}

.ui-datepicker-calendar th {
    color: #666 !important;
    font-weight: 600 !important;
    padding: 10px 5px !important;
    font-size: 12px !important;
    text-align: center !important;
    background: transparent !important;
    border: none !important;
}

.ui-datepicker-calendar td {
    padding: 2px !important;
    border: none !important;
    background: transparent !important;
}

.ui-datepicker-calendar td a,
.ui-datepicker-calendar td span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    margin: 0 auto !important;
    text-align: center !important;
    padding: 0 !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    color: #333 !important;
    font-size: 13px !important;
    background: transparent !important;
    border: none !important;
    transition: all 0.15s !important;
}

.ui-datepicker-calendar td a:hover {
    background: #f0f0f0 !important;
    color: #333 !important;
}

.ui-datepicker-calendar .ui-state-default {
    background: transparent !important;
    border: none !important;
}

.ui-datepicker-calendar .ui-state-active {
    background: #0073aa !important;
    color: #fff !important;
}

.ui-datepicker-calendar .ui-state-highlight {
    background: #fff3cd !important;
    color: #333 !important;
}

.ui-datepicker-calendar .ui-state-disabled span {
    color: #ccc !important;
}

.ui-datepicker-calendar .ui-datepicker-today a {
    background: #e8f4fc !important;
    color: #0073aa !important;
    font-weight: bold !important;
}

.ui-datepicker-buttonpane {
    padding: 10px !important;
    border-top: 1px solid #eee !important;
    margin-top: 5px !important;
    background: transparent !important;
}

.ui-datepicker-buttonpane button {
    padding: 6px 12px !important;
    border-radius: 4px !important;
    border: 1px solid #ddd !important;
    background: #f7f7f7 !important;
    color: #333 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    margin: 0 5px !important;
}

.ui-datepicker-buttonpane button:hover {
    background: #eee !important;
}

.krc-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ========== 投稿一覧 ========== */
.krc-post-list-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ========== フィルタタブ ========== */
.krc-filter-tabs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0 !important;
    margin-bottom: 20px !important;
    background: #f0f0f1 !important;
    border-radius: 6px !important;
    padding: 4px !important;
    border: none !important;
    align-items: stretch !important;
}

.krc-filter-tab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    margin: 0 !important;
    color: #50575e !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    background: transparent !important;
    border: none !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
    position: relative !important;
    top: 0 !important;
    box-sizing: border-box !important;
}

.krc-filter-tab:hover {
    background: rgba(255,255,255,0.6) !important;
    color: #1d2327 !important;
}

.krc-filter-tab.active {
    background: #2271b1 !important;
    color: #fff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
}

.krc-tab-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    margin-left: 5px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    background: rgba(0,0,0,0.07) !important;
    border-radius: 9px !important;
    color: inherit !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

.krc-filter-tab.active .krc-tab-count {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}

/* ========== 表示オプション ========== */
.krc-list-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.krc-list-info {
    font-size: 13px;
    color: #666;
}

.krc-list-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.krc-list-controls label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

.krc-select-small {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

.krc-select-small:focus {
    outline: none;
    border-color: #0073aa;
}

/* ========== ソート可能列 ========== */
.krc-sortable {
    cursor: pointer;
    user-select: none;
}

.krc-sortable:hover {
    background: #f0f0f0;
}

.krc-sort-icon {
    margin-left: 5px;
    font-size: 10px;
    color: #999;
}

.krc-sortable:hover .krc-sort-icon {
    color: #333;
}

.krc-post-table {
    width: 100%;
    border-collapse: collapse;
}

.krc-post-table thead {
    background: #f7f7f7;
}

.krc-post-table th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
    font-size: 13px;
    color: #333;
}

.krc-post-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.krc-post-table tr:hover {
    background: #f9f9f9;
}

.krc-col-thumbnail {
    width: 100px;
}

.krc-list-thumbnail {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.krc-no-thumbnail-small {
    width: 80px;
    height: 100px;
}

.krc-col-title {
    min-width: 200px;
}

.krc-post-title {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.krc-post-chars {
    font-size: 12px;
    color: #999;
}

.krc-col-date {
    width: 140px;
    font-size: 13px;
    color: #666;
}

.krc-scheduled-label {
    display: block;
    font-size: 11px;
    color: #0073aa;
    margin-top: 3px;
}

.krc-col-status {
    width: 100px;
}

.krc-col-actions {
    width: 150px;
}

/* フッター列（ステータス + アクション統合） */
.krc-col-footer {
    width: 250px;
}

.krc-post-table th.krc-col-footer {
    text-align: center;
}

.krc-post-table td.krc-col-footer {
    display: table-cell;
    vertical-align: middle;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.krc-col-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.krc-col-footer .krc-status {
    display: inline-block;
    flex-shrink: 0;
}

.krc-col-footer .krc-action-btns {
    display: inline-flex;
    margin-left: auto;
}

/* ========== アクションボタン ========== */
.krc-action-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.krc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.krc-action-edit {
    background: #0073aa;
    color: #fff;
}

.krc-action-edit:hover {
    background: #005a87;
    color: #fff;
}

.krc-action-view {
    background: #4caf50;
    color: #fff;
}

.krc-action-view:hover {
    background: #3d8b40;
    color: #fff;
}

.krc-action-delete {
    background: #dc3232;
    color: #fff;
}

.krc-action-delete:hover {
    background: #b52727;
    color: #fff;
}

.krc-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== ステータスバッジ ========== */
.krc-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.krc-status-draft {
    background: #f0f0f0;
    color: #666;
}

.krc-status-pending {
    background: #fff8e5;
    color: #f0ad4e;
}

.krc-status-publish {
    background: #ecf7ed;
    color: #46b450;
}

.krc-status-future {
    background: #e8f4fc;
    color: #0073aa;
}

.krc-status-char_exceeded {
    background: #ffebe8;
    color: #dc3232;
}

/* ========== ページネーション ========== */
.krc-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.krc-page-link {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.krc-page-link:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.krc-page-current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.krc-page-ellipsis {
    padding: 8px 5px;
    color: #999;
}

/* ========== 投稿なし ========== */
.krc-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.krc-no-posts p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* ========== ログイン画面 ========== */
.krc-login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
}

.krc-login-box {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.krc-login-box h2 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    color: #333;
}

/* ========== メッセージ ========== */
.krc-message {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 4px;
    display: none;
}

.krc-message.error {
    background: #ffebe8;
    border: 1px solid #dc3232;
    color: #dc3232;
    display: block;
}

.krc-message.success {
    background: #ecf7ed;
    border: 1px solid #46b450;
    color: #46b450;
    display: block;
}

/* ========== レスポンシブ ========== */
@media (max-width: 768px) {
    /* ナビゲーション */
    .krc-nav {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .krc-nav-brand {
        font-size: 16px;
    }
    
    .krc-nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .krc-nav-item a {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* ダッシュボードコンテナ */
    .krc-dashboard-container {
        padding: 10px;
    }
    
    /* ①ダッシュボードヘッダ - 横並び */
    .krc-dashboard-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    
    .krc-dashboard-header h1 {
        font-size: 18px;
        margin: 0;
    }
    
    .krc-dashboard-header .krc-btn {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    /* サマリーグリッド */
    .krc-summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .krc-summary-card {
        padding: 15px 12px;
    }
    
    .krc-summary-count {
        font-size: 28px;
    }
    
    .krc-summary-label {
        font-size: 12px;
    }
    
    /* クイックアクション */
    .krc-action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .krc-btn-large {
        width: 100%;
        padding: 15px;
    }
    
    /* フォーム */
    .krc-form-section {
        padding: 15px;
    }
    
    .krc-form-section h2 {
        font-size: 18px;
    }
    
    .krc-title-input-wrapper {
        flex-direction: column;
    }
    
    .krc-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .krc-form-actions .krc-btn {
        width: 100%;
    }
    
    /* 予約投稿フィールド */
    .krc-schedule-wrapper {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .krc-datetime-picker {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .krc-date-input {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box;
    }
    
    .krc-time-select {
        width: calc(50% - 15px);
        box-sizing: border-box;
    }
    
    .krc-schedule-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .krc-schedule-field input[type="text"],
    .krc-schedule-field input[type="datetime-local"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .krc-schedule-preview {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 投稿一覧 */
    .krc-filter-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .krc-filter-tab {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .krc-list-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .krc-post-table {
        font-size: 13px;
    }
    
    .krc-post-table th,
    .krc-post-table td {
        padding: 10px 8px;
    }
    
    /* サムネイル列を小さく */
    .krc-col-thumbnail {
        width: 50px;
    }
    
    .krc-list-thumbnail,
    .krc-col-thumbnail .krc-no-thumbnail-small {
        width: 50px;
        height: 50px;
    }
    
    /* 日付列を非表示 */
    .krc-col-date {
        display: none;
    }
    
    .krc-col-status {
        width: 80px;
    }
    
    .krc-col-actions {
        width: 120px;
    }
    
    .krc-action-btns {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .krc-action-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    /* 最新投稿リスト */
    .krc-recent-item {
        flex-wrap: wrap;
        padding: 12px 0;
    }
    
    .krc-recent-thumbnail {
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
    }
    
    .krc-recent-info {
        flex: 1;
        min-width: calc(100% - 65px);
    }
    
    .krc-recent-title {
        font-size: 14px;
    }
    
    .krc-recent-meta {
        font-size: 12px;
    }
    
    .krc-recent-actions {
        width: 100%;
        margin: 10px 0 0 0;
        padding-top: 10px;
        border-top: 1px dashed #eee;
    }
    
    /* 却下通知 */
    .krc-rejected-notice {
        padding: 15px;
    }
    
    .krc-rejected-notice h2 {
        font-size: 14px;
    }
    
    .krc-rejected-item {
        padding: 12px;
    }
    
    .krc-rejected-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .krc-rejected-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .krc-rejected-actions .krc-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* ナビゲーション */
    .krc-nav-menu {
        width: 100%;
    }
    
    .krc-nav-item {
        flex: 1;
        text-align: center;
    }
    
    .krc-nav-item a {
        display: block;
        padding: 10px 5px;
        font-size: 12px;
    }
    
    /* サマリー */
    .krc-summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .krc-summary-card {
        padding: 12px 10px;
    }
    
    .krc-summary-count {
        font-size: 24px;
    }
    
    .krc-summary-label {
        font-size: 11px;
    }
    
    /* フォーム */
    .krc-form-section {
        padding: 12px;
    }
    
    .krc-form-group label {
        font-size: 14px;
    }
    
    .krc-form-group input[type="text"],
    .krc-form-group input[type="datetime-local"],
    .krc-form-group select,
    .krc-form-group textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 予約投稿 */
    .krc-datetime-picker {
        width: 100%;
        gap: 5px;
    }
    
    .krc-date-input {
        flex: 1;
        min-width: 0;
    }
    
    .krc-time-select {
        width: 60px !important;
        flex: 0 0 60px;
        padding: 10px 5px;
    }
    
    .krc-time-separator {
        flex: 0 0 auto;
    }
    
    /* TinyMCEエディタ調整 */
    .wp-editor-wrap {
        width: 100% !important;
    }
    
    .mce-toolbar-grp {
        overflow-x: auto;
    }
    
    /* アイキャッチプレビュー */
    .krc-thumbnail-preview img {
        max-width: 100%;
        height: auto;
    }
    
    /* ①③フィルタタブ - 2列表示・均等配置 */
    .krc-filter-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100%;
    }
    
    .krc-filter-tab {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 8px !important;
        font-size: 12px !important;
        text-align: center !important;
        border-radius: 6px !important;
        min-height: 44px;
        box-sizing: border-box;
    }
    
    .krc-tab-count {
        display: inline-flex !important;
        margin-left: 4px !important;
        font-size: 10px !important;
    }
    
    /* ①表示オプション - 1段表示 */
    .krc-list-options {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
    }
    
    .krc-list-info {
        font-size: 11px;
        flex: 1;
    }
    
    .krc-list-controls {
        flex: 0 0 auto;
        gap: 5px;
    }
    
    .krc-list-controls label {
        font-size: 11px;
    }
    
    .krc-select-small {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    /* ===== 投稿一覧テーブル - カードデザイン ===== */
    .krc-post-table {
        display: block;
        border: none;
    }
    
    .krc-post-table thead {
        display: none;
    }
    
    .krc-post-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    /* ②カードレイアウト - 幅いっぱいに */
    .krc-post-table tr {
        display: grid;
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
        gap: 0 10px;
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 10px;
        padding: 12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .krc-post-table td {
        border: none;
        padding: 0;
    }
    
    .krc-post-table td::before {
        display: none;
    }
    
    /* サムネイル - 左上 */
    .krc-post-table .krc-col-thumbnail {
        grid-column: 1;
        grid-row: 1;
        display: block;
        width: 60px;
        height: 60px;
    }
    
    .krc-post-table .krc-col-thumbnail img,
    .krc-post-table .krc-col-thumbnail .krc-no-thumbnail-small {
        width: 60px;
        height: 60px;
        border-radius: 6px;
        object-fit: cover;
    }
    
    .krc-post-table .krc-no-thumbnail-small {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f5f5f5;
        font-size: 9px;
    }
    
    /* タイトル - 右上 */
    .krc-post-table .krc-col-title {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
    }
    
    .krc-post-table .krc-post-title {
        font-size: 13px;
        font-weight: 600;
        color: #333;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .krc-post-table .krc-post-chars {
        font-size: 11px;
        color: #999;
    }
    
    /* 日付 - 非表示 */
    .krc-post-table .krc-col-date {
        display: none;
    }
    
    /* ②ステータスとアクション - 幅いっぱいに横並び */
    .krc-post-table .krc-col-footer {
        grid-column: 1 / -1;
        grid-row: 2;
        display: block;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
        width: 100%;
    }
    
    .krc-post-table .krc-col-footer-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .krc-post-table .krc-col-footer .krc-status {
        font-size: 11px;
        padding: 4px 10px;
        flex-shrink: 0;
    }
    
    .krc-post-table .krc-col-footer .krc-action-btns {
        display: flex;
        gap: 6px;
        align-items: center;
        margin-left: auto;
    }
    
    .krc-post-table .krc-col-footer .krc-action-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    /* 最新投稿 */
    .krc-recent-thumbnail {
        width: 45px;
        height: 45px;
        flex: 0 0 45px;
    }
    
    .krc-recent-title {
        font-size: 13px;
    }
    
    /* ボタン */
    .krc-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .krc-btn-small {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* ページネーション */
    .krc-pagination {
        flex-wrap: wrap;
    }
    
    .krc-page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ==================================
   フロントエンド表示スタイル
   ================================== */

/* ========== アーカイブページ ========== */
.krc-diary-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* フィルタセクション */
.krc-diary-filter {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.krc-filter-form {
    margin: 0;
}

.krc-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.krc-filter-item {
    flex: 1;
    min-width: 200px;
}

.krc-filter-item label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.krc-filter-select,
.krc-filter-date {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
}

.krc-filter-select:focus,
.krc-filter-date:focus {
    outline: none;
    border-color: #0073aa;
}

.krc-date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.krc-date-range .krc-filter-date {
    flex: 1;
}

.krc-date-separator {
    color: #999;
}

.krc-filter-actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
    min-width: auto;
}

.krc-filter-result {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.krc-result-count {
    font-weight: bold;
    color: #0073aa;
}

/* グリッドレイアウト */
.krc-diary-grid {
    display: grid;
    gap: 25px;
}

.krc-diary-grid.krc-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.krc-diary-grid.krc-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.krc-diary-grid.krc-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* カード */
.krc-diary-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.krc-diary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.krc-diary-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.krc-diary-thumbnail {
    position: relative;
    padding-top: 66.67%; /* 3:2 アスペクト比 */
    overflow: hidden;
    background: #f5f5f5;
}

.krc-diary-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.krc-diary-card:hover .krc-diary-thumbnail img {
    transform: scale(1.05);
}

.krc-diary-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #999;
    font-size: 14px;
}

.krc-diary-card-content {
    padding: 15px;
}

.krc-diary-cast {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.krc-cast-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.krc-cast-name {
    font-size: 13px;
    color: #666;
}

.krc-diary-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.krc-diary-excerpt {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.krc-diary-meta {
    font-size: 12px;
    color: #999;
}

.krc-diary-meta time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.krc-diary-date {
    white-space: nowrap;
}

.krc-diary-time {
    white-space: nowrap;
}

/* ページネーション */
.krc-diary-pagination {
    margin-top: 40px;
    text-align: center;
}

.krc-pagination-list {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.krc-pagination-link {
    display: block;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.krc-pagination-link:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.krc-pagination-item.active .krc-pagination-link,
.krc-pagination-current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.krc-pagination-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #999;
}

/* 空状態 */
.krc-diary-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 10px;
    color: #999;
}

/* ========== タイムライン表示 ========== */
.krc-diary-timeline {
    max-width: 600px;
}

.krc-timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.krc-timeline-item {
    margin-bottom: 15px;
}

.krc-timeline-link {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.krc-timeline-link:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.krc-timeline-thumbnail {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.krc-timeline-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.krc-timeline-no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.krc-timeline-content {
    flex: 1;
    min-width: 0;
}

.krc-timeline-cast {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.krc-timeline-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.krc-timeline-cast-name {
    font-size: 12px;
    color: #666;
}

.krc-timeline-title {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.krc-timeline-excerpt {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.krc-timeline-meta {
    font-size: 11px;
    color: #999;
}

.krc-timeline-empty {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* ========== キャスト別写メ日記 ========== */
.krc-cast-diary {
    margin: 20px 0;
}

.krc-cast-diary-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

/* グリッドレイアウト */
.krc-cast-diary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.krc-cast-diary-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.krc-cast-diary-item:hover {
    transform: translateY(-3px);
}

.krc-cast-diary-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.krc-cast-diary-thumbnail {
    position: relative;
    padding-top: 100%; /* 1:1 アスペクト比 */
    overflow: hidden;
    background: #f5f5f5;
}

.krc-cast-diary-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.krc-cast-diary-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #999;
    font-size: 12px;
}

.krc-cast-diary-info {
    padding: 10px;
}

.krc-cast-diary-item-title {
    margin: 0 0 5px 0;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.krc-cast-diary-info time {
    font-size: 11px;
    color: #999;
}

/* リストレイアウト */
.krc-cast-diary-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.krc-cast-diary-list-item {
    margin-bottom: 12px;
}

.krc-cast-diary-list-item .krc-cast-diary-link {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.krc-cast-diary-list-thumbnail {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.krc-cast-diary-list-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* リストレイアウトのno-image */
.krc-cast-diary-list-thumbnail .krc-cast-diary-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    font-size: 10px;
}
}

.krc-cast-diary-list-content {
    flex: 1;
    min-width: 0;
}

.krc-cast-diary-excerpt {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.krc-cast-diary-meta {
    font-size: 11px;
    color: #999;
}

.krc-cast-diary-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #999;
}

/* ========== フロントエンド レスポンシブ ========== */
@media (max-width: 768px) {
    .krc-diary-archive {
        padding: 15px;
    }
    
    .krc-filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .krc-filter-item {
        min-width: 100%;
    }
    
    .krc-filter-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .krc-filter-actions .krc-btn {
        width: 100%;
    }
    
    .krc-date-range {
        flex-wrap: wrap;
    }
    
    .krc-diary-grid.krc-columns-3,
    .krc-diary-grid.krc-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .krc-diary-grid.krc-columns-2 {
        grid-template-columns: 1fr;
    }
    
    .krc-pagination-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .krc-timeline-link {
        padding: 12px;
        gap: 12px;
    }
    
    .krc-timeline-thumbnail {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
    }
    
    .krc-cast-diary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ========== 表示モード切替 ========== */
.krc-filter-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.krc-view-mode-toggle {
    display: flex;
    gap: 5px;
    background: #f0f0f0;
    padding: 4px;
    border-radius: 6px;
}

.krc-view-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.krc-view-mode-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.krc-view-mode-btn.active {
    background: #0073aa;
    color: #fff;
}

/* ========== モーダル（ポップアップ） ========== */

/* bodyがモーダル表示中の状態 */
body.krc-modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

.krc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.krc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    -webkit-overflow-scrolling: touch;
}

.krc-modal-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: krcModalFadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes krcModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.krc-modal-content {
    flex: 1;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.krc-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.krc-modal-close:hover {
    background: #fff;
    transform: scale(1.1);
}

.krc-modal-close svg {
    color: #333;
}

/* ローディング */
.krc-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #666;
}

.krc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: krcSpin 0.8s linear infinite;
}

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

/* モーダルボディ */
.krc-modal-body {
    display: flex;
    flex-direction: column;
}

.krc-modal-thumbnail {
    width: 100%;
    height: 350px;
    overflow: hidden;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.krc-modal-thumbnail img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.krc-modal-detail {
    padding: 25px 30px 30px;
}

.krc-modal-cast {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.krc-modal-cast-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.krc-modal-cast-name {
    font-size: 14px;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.krc-modal-cast-name:hover {
    text-decoration: underline;
}

.krc-modal-title {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.krc-modal-meta {
    margin-bottom: 20px;
    font-size: 14px;
    color: #888;
}

.krc-modal-text {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.krc-modal-text p {
    margin: 0 0 15px 0;
}

.krc-modal-text img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
}

.krc-modal-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* モーダル レスポンシブ */
@media (max-width: 768px) {
    .krc-modal-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 10px;
    }
    
    .krc-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
    
    .krc-modal-thumbnail {
        max-height: 250px;
    }
    
    .krc-modal-thumbnail img {
        max-height: 250px;
    }
    
    .krc-modal-detail {
        padding: 20px;
    }
    
    .krc-modal-title {
        font-size: 18px;
    }
    
    .krc-modal-text {
        font-size: 14px;
    }
    
    .krc-view-mode-toggle {
        order: -1;
        width: 100%;
        justify-content: flex-end;
    }
}

/* ========== 却下通知 ========== */
.krc-rejected-notice {
    background: #fff5f5;
    border: 1px solid #f5c6c6;
    border-left: 4px solid #dc3232;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.krc-rejected-notice h2 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #dc3232;
}

.krc-rejected-notice > p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.krc-rejected-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.krc-rejected-item {
    background: #fff;
    border: 1px solid #f0d0d0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 12px;
}

.krc-rejected-item:last-child {
    margin-bottom: 0;
}

.krc-rejected-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.krc-rejected-title {
    font-size: 15px;
    color: #333;
}

.krc-rejected-date {
    font-size: 12px;
    color: #999;
}

.krc-rejected-reason {
    background: #fafafa;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
}

.krc-rejected-reason-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.krc-rejected-reason p {
    margin: 0;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.krc-rejected-actions {
    display: flex;
    gap: 10px;
}

/* 却下ステータスバッジ */
.krc-status-rejected {
    background: #ffebe8;
    color: #dc3232;
    font-weight: bold;
}

/* 最新投稿リストの却下表示 */
.krc-recent-item.krc-rejected {
    border-left: 3px solid #dc3232;
    padding-left: 12px;
}

.krc-rejection-reason-preview {
    font-size: 12px;
    color: #dc3232;
    margin-top: 8px;
    padding: 6px 10px;
    background: #fff5f5;
    border-radius: 4px;
    display: block;
}

/* ========== 管理バー通知 ========== */
#wpadminbar .krc-admin-bar-count {
    display: inline-block;
    background: #d63638;
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    line-height: 17px;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9px;
    margin-left: 5px;
    text-align: center;
}
