.m21_caly_wrap { max-width: 1200px; margin: 1.5rem auto; }
.m21_caly_form, .m21_caly_creator_summary, .m21_caly_creator_debug, .m21_caly_preview, .m21_caly_calendar_panel, .m21_caly_generated_list_panel, .m21_caly_notice { background:#fff; border:1px solid #d9d9de; border-radius:14px; padding:1.25rem; box-shadow:0 2px 6px rgba(0,0,0,.04); margin-bottom:1rem; }
.m21_caly_grid { display:grid; gap:1rem; margin-bottom:1rem; }
.m21_caly_grid_two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.m21_caly_field { display:flex; flex-direction:column; gap:.4rem; }
.m21_caly_field label { font-weight:600; }
.m21_caly_field input, .m21_caly_field select, .m21_caly_field textarea { width:100%; padding:.75rem .9rem; border:1px solid #c9ccd4; border-radius:10px; background:#fff; box-sizing:border-box; font:inherit; }
.m21_caly_field textarea { min-height:120px; resize:vertical; }
.m21_caly_help, .m21_caly_preview_hint, .m21_caly_generated_meta { margin:0; font-size:.92rem; color:#5f6470; }
.m21_caly_mode_panel { border:1px solid #d9d9de; border-radius:14px; padding:1rem; background:#fafbfc; margin-bottom:1rem; }
.m21_caly_mode_panel h3, .m21_caly_preview h3, .m21_caly_calendar_panel h3, .m21_caly_generated_list_panel h3, .m21_caly_creator_summary h3, .m21_caly_creator_debug h3 { margin-top:0; }
.m21_caly_is_hidden { display:none; }
.m21_caly_preview_box { background:#f6f8fb; border:1px dashed #c8ced9; border-radius:12px; padding:1rem; }
.m21_caly_preview_line { margin-bottom:.45rem; }
.m21_caly_actions { display:flex; justify-content:flex-end; }
.m21_caly_button { border:0; border-radius:999px; padding:.85rem 1.2rem; font:inherit; cursor:pointer; background:#eef2f8; color:#24324a; }
.m21_caly_button_small { padding:.45rem .75rem; font-size:.9rem; }
.m21_caly_button_primary { background:#0b57d0; color:#fff; }
.m21_caly_notice { background:#f6f8fb; }
.m21_caly_notice_error { border-color:#d93025; background:#fff1f0; }
.m21_caly_summary_table { width:100%; border-collapse:collapse; }
.m21_caly_summary_table th, .m21_caly_summary_table td { padding:.65rem .75rem; border-bottom:1px solid #eceff4; text-align:left; vertical-align:top; }
.m21_caly_creator_debug pre { background:#10131a; color:#f4f7fb; padding:1rem; border-radius:12px; overflow-x:auto; }
.m21_caly_calendar_header { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; margin-bottom:1rem; }
.m21_caly_calendar_stats { display:flex; gap:.75rem; flex-wrap:wrap; justify-content:flex-end; }
.m21_caly_stat { min-width:82px; background:#f6f8fb; border:1px solid #d8dee8; border-radius:12px; padding:.6rem .8rem; text-align:center; }
.m21_caly_stat span { display:block; font-size:.78rem; color:#5f6470; margin-bottom:.2rem; }
.m21_caly_stat strong { font-size:1rem; }
.m21_caly_stat_wide { min-width:180px; }
.m21_caly_calendar_box { max-height:70vh; overflow:auto; padding-right:.25rem; }
.m21_caly_calendar_weeks { display:flex; flex-direction:column; gap:1rem; }
.m21_caly_week { border:1px solid #e3e7ef; border-radius:14px; background:#fbfcfe; overflow:hidden; }
.m21_caly_week_label { background:#eef3fb; color:#334155; font-weight:600; padding:.7rem 1rem; border-bottom:1px solid #dde6f2; }
.m21_caly_week_grid { display:grid; grid-template-columns:repeat(7,minmax(150px,1fr)); }
.m21_caly_weekday_row { display:grid; grid-template-columns:repeat(7,minmax(150px,1fr)); position:sticky; top:0; z-index:5; }
.m21_caly_weekday_header { background:#f6f8fb; border-right:1px solid #eef1f5; border-bottom:1px solid #dfe5ee; color:#475569; font-size:.82rem; font-weight:700; letter-spacing:.02em; padding:.55rem .75rem; text-align:center; text-transform:uppercase; }
.m21_caly_weekday_header:nth-child(7n) { border-right:0; }
.m21_caly_day { min-height:180px; border-right:1px solid #eef1f5; border-bottom:1px solid #eef1f5; background:#fff; display:flex; flex-direction:column; }
.m21_caly_day:last-child { border-right:0; }
.m21_caly_day_today { background:#f8fbff; }
.m21_caly_day_has_conflict { background:#fff8f1; }
.m21_caly_day_has_blocked { background:linear-gradient(to bottom, rgba(217,48,37,.04), rgba(217,48,37,.01)); }
.m21_caly_day_head { display:flex; justify-content:space-between; gap:.5rem; align-items:center; padding:.65rem .75rem; border-bottom:1px solid #eef1f5; }
.m21_caly_day_body { padding:.6rem; display:flex; flex-direction:column; gap:.45rem; }
.m21_caly_badge { border-radius:12px; padding:.55rem .65rem; display:flex; flex-direction:column; gap:.2rem; border:1px solid transparent; font-size:.88rem; }
.m21_caly_badge strong { font-size:.9rem; }
.m21_caly_badge_existing { background:#f2f4f7; border-color:#d5dbe5; color:#334155; }
.m21_caly_badge_blocked { background:#fff1f0; border-color:#f1b5b1; color:#8a1f17; }
.m21_caly_badge_generated { background:#eef5ff; border-color:#b9d2fb; color:#163b70; cursor:pointer; }
.m21_caly_badge_modified { background:#edf7ff; border-color:#98c7ff; }
.m21_caly_badge_skipped { background:#f7f7f8; border-color:#d6d8dd; color:#6b7280; }
.m21_caly_badge_conflict { box-shadow:inset 0 0 0 2px rgba(217,48,37,.35); }
.m21_caly_badge_selected { box-shadow:0 0 0 2px #0b57d0; }
.m21_caly_chip_edit { margin-top:.3rem; align-self:flex-start; border:0; background:#fff; border-radius:999px; padding:.35rem .65rem; cursor:pointer; font-size:.8rem; }
.m21_caly_generated_list { display:flex; flex-direction:column; gap:.75rem; }
.m21_caly_generated_row { border:1px solid #dbe2eb; border-radius:14px; background:#fff; padding:.8rem .9rem; display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.m21_caly_generated_row_modified { background:#f7fbff; }
.m21_caly_generated_row_skipped { background:#f8f8f9; color:#6b7280; }
.m21_caly_generated_row_conflict { border-color:#f0b39d; background:#fff8f1; }
.m21_caly_generated_row_selected { box-shadow:0 0 0 2px #0b57d0; }
.m21_caly_generated_actions { display:flex; flex-direction:column; align-items:flex-end; gap:.55rem; }
.m21_caly_shift_controls { display:flex; flex-direction:column; gap:.3rem; align-items:center; }
.m21_caly_shift_mid { display:flex; gap:.3rem; align-items:center; }
.m21_caly_shift_btn { border:1px solid #cfd7e3; background:#fff; color:#1f2937; border-radius:999px; padding:.35rem .6rem; font-size:.8rem; cursor:pointer; }
.m21_caly_shift_skip { background:#fff1f0; border-color:#f1b5b1; color:#a61b12; }

.m21_caly_datetime_compound { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,220px); gap:.65rem; align-items:center; }
.m21_caly_time_select { width:100%; }
@media (max-width: 980px) {
  .m21_caly_grid_two, .m21_caly_week_grid, .m21_caly_weekday_row, .m21_caly_datetime_compound, .m21_caly_date_parts, .m21_caly_time_parts { grid-template-columns:1fr; }
  .m21_caly_weekday_row, .m21_caly_weekday_header { display:none; }
  .m21_caly_calendar_header, .m21_caly_generated_row { flex-direction:column; }
  .m21_caly_generated_actions { align-items:flex-start; }
}
.m21_caly_preview {display:none;}

.m21_caly_date_parts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.65rem; }
.m21_caly_date_select { width:100%; font-variant-numeric:tabular-nums; }

.m21_caly_field_hidden { display:none; }
.m21_caly_time_parts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem; align-items:center; }
.m21_caly_day_head_month_even { background:#eef5ff; }
.m21_caly_day_head_month_odd { background:#f2f4f7; }
