/* =================================================================
   JUN CONTENT MANAGER - テーマCSS
   全カラー・フォント・角丸はCSS変数で動的切替可能
================================================================= */

:root {
    /* デフォルト値（settings.jsから上書きされる） */
    --bg:           #f3efe7;
    --bg-card:      #fdfbf5;
    --bg-soft:      #ebe5d8;
    --bg-hover:     #e8e1d0;
    --ink:          #2a2418;
    --ink-soft:     #5a5240;
    --ink-mute:     #8a8270;
    --accent:       #a8341a;
    --accent-soft:  #d4a89c;
    --rule:         #d4ccba;
    --rule-soft:    #e5dfd0;

    --base-font-size: 14px;
    --card-radius:    8px;
    --font-family:    'Noto Sans JP', sans-serif;

    /* 派生値 */
    --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow:     0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-lg:  0 8px 32px rgba(0, 0, 0, 0.1);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-family);
    font-size: var(--base-font-size);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--rule);
    border-radius: 6px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }
::selection { background: var(--accent); color: var(--bg-card); }

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

/* =================================================================
   コンテナ
================================================================= */
.jcm-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =================================================================
   ナビゲーション
================================================================= */
.jcm-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--rule-soft);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.jcm-nav-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.jcm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
}

.jcm-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.jcm-nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.jcm-nav-link {
    padding: 8px 14px;
    border-radius: var(--card-radius);
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.jcm-nav-link:hover {
    background: var(--bg-soft);
    color: var(--ink);
}

.jcm-nav-link.active {
    background: var(--ink);
    color: var(--bg-card);
}

.jcm-nav-link.active:hover {
    background: var(--ink);
    color: var(--bg-card);
}

/* =================================================================
   メインコンテンツ
================================================================= */
.jcm-main {
    padding: 32px 0 80px;
}

.jcm-page-head {
    margin-bottom: 32px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.jcm-page-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
}

.jcm-page-subtitle {
    color: var(--ink-mute);
    font-size: 13px;
    margin-top: 4px;
}

/* =================================================================
   カード
================================================================= */
.jcm-card {
    background: var(--bg-card);
    border: 1px solid var(--rule-soft);
    border-radius: var(--card-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.jcm-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--rule-soft);
}

.jcm-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

/* =================================================================
   ボタン
================================================================= */
.jcm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--card-radius);
    border: 1px solid var(--rule);
    background: var(--bg-card);
    color: var(--ink);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.jcm-btn:hover {
    background: var(--bg-soft);
    border-color: var(--ink-mute);
}

.jcm-btn-primary {
    background: var(--ink);
    color: var(--bg-card);
    border-color: var(--ink);
}

.jcm-btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-card);
}

.jcm-btn-accent {
    background: var(--accent);
    color: var(--bg-card);
    border-color: var(--accent);
}

.jcm-btn-accent:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg-card);
}

.jcm-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ink-soft);
}

.jcm-btn-ghost:hover {
    background: var(--bg-soft);
    color: var(--ink);
}

.jcm-btn-danger {
    background: transparent;
    border-color: var(--rule);
    color: var(--ink-soft);
}

.jcm-btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: white;
}

.jcm-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.jcm-btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
}

/* =================================================================
   フォーム
================================================================= */
.jcm-input,
.jcm-select,
.jcm-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--rule);
    border-radius: var(--card-radius);
    background: var(--bg-card);
    color: var(--ink);
    font-family: var(--font-family);
    font-size: 13px;
    transition: var(--transition);
}

.jcm-input:focus,
.jcm-select:focus,
.jcm-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.jcm-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.jcm-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.jcm-form-row {
    margin-bottom: 16px;
}

.jcm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 700px) {
    .jcm-form-grid { grid-template-columns: 1fr; }
}

/* =================================================================
   バッジ
================================================================= */
.jcm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--bg-soft);
    color: var(--ink-soft);
    border: 1px solid var(--rule-soft);
}

.jcm-badge-status-planning { background: var(--bg-soft);   color: var(--ink-soft); }
.jcm-badge-status-recording { background: #fef3c7;          color: #92400e; }
.jcm-badge-status-editing  { background: #dbeafe;          color: #1e40af; }
.jcm-badge-status-review   { background: #ddd6fe;          color: #5b21b6; }
.jcm-badge-status-published { background: #d1fae5;          color: #065f46; }

/* =================================================================
   モーダル
================================================================= */
.jcm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.jcm-modal-backdrop.show {
    display: flex;
    animation: jcm-fade-in 0.2s ease;
}

.jcm-modal {
    background: var(--bg-card);
    border-radius: calc(var(--card-radius) * 1.5);
    border: 1px solid var(--rule-soft);
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-lg);
    animation: jcm-slide-up 0.25s ease;
}

.jcm-modal-lg { max-width: 920px; }

.jcm-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--rule-soft);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.jcm-modal-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}

.jcm-modal-close {
    background: transparent;
    border: none;
    color: var(--ink-mute);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
}

.jcm-modal-close:hover { background: var(--bg-soft); color: var(--ink); }

.jcm-modal-body { padding: 24px; }

.jcm-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--rule-soft);
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
}

@keyframes jcm-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes jcm-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =================================================================
   コンテンツ企画 - リストビュー
================================================================= */
.jcm-content-list {
    display: grid;
    gap: 12px;
}

.jcm-content-item {
    background: var(--bg-card);
    border: 1px solid var(--rule-soft);
    border-radius: var(--card-radius);
    padding: 16px;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 16px;
    align-items: start;
    transition: var(--transition);
    cursor: pointer;
}

.jcm-content-item:hover {
    border-color: var(--ink-mute);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.jcm-thumb {
    width: 100px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-mute);
    font-size: 11px;
}

.jcm-thumb-empty {
    width: 100px;
    height: 60px;
    border-radius: 6px;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-mute);
    font-size: 22px;
}

.jcm-content-body { min-width: 0; }

.jcm-content-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jcm-content-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--ink-mute);
    font-size: 12px;
    margin-top: 6px;
    align-items: center;
}

.jcm-content-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .jcm-content-item {
        grid-template-columns: 80px 1fr;
    }
    .jcm-content-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px dashed var(--rule-soft);
    }
    .jcm-thumb,
    .jcm-thumb-empty {
        width: 80px;
        height: 48px;
    }
}

/* =================================================================
   フィルターバー
================================================================= */
.jcm-filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--card-radius);
    border: 1px solid var(--rule-soft);
}

.jcm-filter-bar .jcm-input,
.jcm-filter-bar .jcm-select {
    padding: 7px 11px;
    font-size: 12px;
    width: auto;
    min-width: 140px;
}

.jcm-filter-bar .jcm-input { flex: 1; min-width: 200px; }

/* =================================================================
   空ステート
================================================================= */
.jcm-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--ink-mute);
}

.jcm-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.jcm-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 8px;
}

/* =================================================================
   リンクストック - グリッド
================================================================= */
.jcm-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.jcm-link-card {
    background: var(--bg-card);
    border: 1px solid var(--rule-soft);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.jcm-link-card:hover {
    border-color: var(--ink-mute);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.jcm-link-thumb {
    aspect-ratio: 16 / 9;
    background: var(--bg-soft);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-mute);
    font-size: 32px;
    position: relative;
}

.jcm-link-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: gold;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.jcm-link-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.jcm-link-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jcm-link-desc {
    font-size: 12px;
    color: var(--ink-mute);
    margin-bottom: 10px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jcm-link-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--ink-mute);
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--rule-soft);
}

/* =================================================================
   スケジュール - カレンダー
================================================================= */
.jcm-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.jcm-cal-month {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.jcm-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--rule-soft);
    border: 1px solid var(--rule-soft);
    border-radius: var(--card-radius);
    overflow: hidden;
}

.jcm-cal-day-head {
    background: var(--bg-soft);
    padding: 10px 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: 0.05em;
}

.jcm-cal-day-head.sun { color: #c0392b; }
.jcm-cal-day-head.sat { color: #1e40af; }

.jcm-cal-cell {
    background: var(--bg-card);
    min-height: 100px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: var(--transition);
}

.jcm-cal-cell.other-month {
    background: var(--bg);
    opacity: 0.5;
}

.jcm-cal-cell.today {
    background: var(--accent-soft);
}

.jcm-cal-day-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 2px;
}

.jcm-cal-cell.today .jcm-cal-day-num {
    color: var(--accent);
    font-weight: 800;
}

.jcm-cal-event {
    background: var(--ink);
    color: var(--bg-card);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
    transition: var(--transition);
}

.jcm-cal-event:hover {
    background: var(--accent);
}

.jcm-cal-event.status-planning  { background: var(--ink-mute); }
.jcm-cal-event.status-recording { background: #d97706; }
.jcm-cal-event.status-editing   { background: #2563eb; }
.jcm-cal-event.status-review    { background: #7c3aed; }
.jcm-cal-event.status-published { background: #059669; }

@media (max-width: 700px) {
    .jcm-cal-cell { min-height: 70px; padding: 4px; }
    .jcm-cal-day-num { font-size: 11px; }
    .jcm-cal-event { font-size: 9px; padding: 1px 4px; }
}

/* =================================================================
   設定ページ
================================================================= */
.jcm-settings-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}

@media (max-width: 800px) {
    .jcm-settings-grid { grid-template-columns: 1fr; }
}

.jcm-settings-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 80px;
    align-self: start;
}

@media (max-width: 800px) {
    .jcm-settings-nav { flex-direction: row; flex-wrap: wrap; position: static; }
}

.jcm-settings-nav-item {
    padding: 10px 14px;
    border-radius: var(--card-radius);
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-soft);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.jcm-settings-nav-item:hover {
    background: var(--bg-soft);
    color: var(--ink);
}

.jcm-settings-nav-item.active {
    background: var(--ink);
    color: var(--bg-card);
}

.jcm-settings-section { display: none; }
.jcm-settings-section.active { display: block; }

.jcm-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.jcm-theme-card {
    border: 2px solid var(--rule);
    border-radius: var(--card-radius);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.jcm-theme-card:hover { border-color: var(--ink-mute); }

.jcm-theme-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.jcm-theme-name {
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

.jcm-theme-swatches {
    display: flex;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.jcm-theme-swatch { flex: 1; }

.jcm-color-row {
    display: grid;
    grid-template-columns: 1fr 80px 60px;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--rule-soft);
}

.jcm-color-row:last-child { border-bottom: none; }

.jcm-color-row label {
    font-size: 12px;
    color: var(--ink-soft);
    margin: 0;
}

.jcm-color-row input[type="color"] {
    width: 60px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 4px;
    cursor: pointer;
}

.jcm-color-row input[type="text"] {
    padding: 4px 8px;
    font-size: 11px;
    font-family: monospace;
}

/* =================================================================
   トースト
================================================================= */
.jcm-toast-container {
    position: fixed;
    bottom: 60px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9998;
    pointer-events: none;
}

.jcm-toast {
    background: var(--ink);
    color: var(--bg-card);
    padding: 10px 16px;
    border-radius: var(--card-radius);
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    max-width: 320px;
    animation: jcm-toast-in 0.25s ease;
    pointer-events: auto;
}

.jcm-toast.success { background: #16a34a; }
.jcm-toast.error   { background: #dc2626; }
.jcm-toast.warn    { background: #d97706; }

@keyframes jcm-toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* =================================================================
   ユーティリティ
================================================================= */
.jcm-hidden { display: none !important; }
.jcm-flex { display: flex; }
.jcm-flex-1 { flex: 1; }
.jcm-gap-1 { gap: 4px; }
.jcm-gap-2 { gap: 8px; }
.jcm-gap-3 { gap: 12px; }
.jcm-mt-1 { margin-top: 4px; }
.jcm-mt-2 { margin-top: 8px; }
.jcm-mt-3 { margin-top: 12px; }
.jcm-mt-4 { margin-top: 16px; }
.jcm-mb-2 { margin-bottom: 8px; }
.jcm-mb-3 { margin-bottom: 12px; }
.jcm-mb-4 { margin-bottom: 16px; }
.jcm-text-mute { color: var(--ink-mute); }
.jcm-text-sm { font-size: 12px; }
.jcm-text-xs { font-size: 11px; }
.jcm-text-right { text-align: right; }

.jcm-warning-box {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: 12px 16px;
    border-radius: var(--card-radius);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.jcm-info-box {
    background: var(--bg-soft);
    border: 1px solid var(--rule);
    color: var(--ink-soft);
    padding: 12px 16px;
    border-radius: var(--card-radius);
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* =================================================================
   スケジュール行（モーダル内）
================================================================= */
.jcm-schedule-row {
    display: grid;
    grid-template-columns: 28px 130px 1fr 28px;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}

.jcm-schedule-row input[type="date"],
.jcm-schedule-row input[type="text"] {
    padding: 6px 9px;
    font-size: 12px;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--ink);
    font-family: var(--font-family);
    width: 100%;
}

.jcm-schedule-row input:focus {
    outline: none;
    border-color: var(--accent);
}

.jcm-schedule-color-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--rule);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
}

.jcm-schedule-color-btn:hover { transform: scale(1.1); }

.jcm-schedule-color-popup {
    position: absolute;
    top: 36px;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-radius: var(--card-radius);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 1100;
    width: 168px;
}

.jcm-schedule-color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    padding: 0;
}

.jcm-schedule-color-swatch:hover { transform: scale(1.15); }
.jcm-schedule-color-swatch.active {
    border-color: var(--ink);
    box-shadow: 0 0 0 2px var(--bg-card);
}

.jcm-schedule-remove {
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink-mute);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.jcm-schedule-remove:hover {
    border-color: #dc2626;
    color: #dc2626;
}

@media (max-width: 700px) {
    .jcm-schedule-row {
        grid-template-columns: 28px 1fr 28px;
    }
    .jcm-schedule-row input[type="text"] { grid-column: 1 / -1; }
}

/* カレンダーイベント色（インラインstyleで上書き） */
.jcm-cal-event { background: var(--ink); }
