/* オーダーメイド宇宙カレンダー（/calendar/maker/） */
.cal-privacy { display: block; margin: 14px 0 0; padding: 10px 16px; border-radius: 16px; background: rgba(93, 255, 176, 0.09); box-shadow: inset 0 0 0 1px rgba(93, 255, 176, 0.32); color: #d8ffec; font-size: 15.5px; line-height: 1.7; max-width: 40em; }
.cal-privacy b { color: #fff; }

.cm-app { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 10px; }
@media (max-width: 960px) { .cm-app { grid-template-columns: minmax(0, 1fr); } }

/* 設定 */
.cm-set { padding: 22px; display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 961px) { .cm-set { position: sticky; top: 120px; max-height: calc(100vh - 140px); overflow: auto; scrollbar-width: thin; } }
.cm-set fieldset { border: 0; margin: 0; padding: 12px 0 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.cm-set fieldset:last-child { border-bottom: 0; }
.cm-set legend { display: flex; align-items: center; gap: 8px; padding: 0; margin-bottom: 10px; font-weight: 900; font-size: 17px; color: #fff; }
.cm-set legend i { font-style: normal; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, #ffe39d, var(--gold2)); color: #2a1600; font-family: var(--ff-x); font-size: 13px; font-weight: 800; flex: none; }
.cm-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cm-set .field { min-width: 0; }
.cm-set .inp { width: 100%; padding: 10px 12px; font-size: 16px; }
.cm-set select.inp { padding-right: 32px; }
.cm-other { margin-top: 10px; }
.cm-note { font-size: 14px; color: var(--mut); line-height: 1.7; margin: 8px 0 0; }

.cm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.cm-cards label { position: relative; cursor: pointer; min-width: 0; }
.cm-cards input, .cm-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cm-cards span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 10px 9px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line2); transition: 0.2s; line-height: 1.35; }
.cm-cards b { font-size: 15px; color: #fff; }
.cm-cards small { font-size: 12px; color: var(--mut); }
.cm-cards input:checked + span { background: rgba(255, 210, 122, 0.13); box-shadow: inset 0 0 0 2px var(--gold); }
.cm-cards input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cm-themes { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.sw { display: block; height: 30px; border-radius: 8px; margin-bottom: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.sw-navy { background: radial-gradient(circle at 75% 40%, #fff0c2 0 5px, transparent 6px), radial-gradient(circle at 20% 70%, #fff 0 1px, transparent 2px), radial-gradient(circle at 45% 25%, #fff 0 1px, transparent 2px), linear-gradient(180deg, #0e1745, #03050f); }
.sw-kraft { background: radial-gradient(circle at 75% 45%, #3d2918 0 5px, transparent 6px), repeating-linear-gradient(35deg, rgba(110, 70, 30, 0.12) 0 2px, transparent 2px 6px), linear-gradient(135deg, #d2a874, #bf8f58); }
.sw-white { background: radial-gradient(circle at 75% 45%, #3a4363 0 5px, transparent 6px), linear-gradient(180deg, #fff, #eef1f8); }

.cm-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.cm-seg label { position: relative; cursor: pointer; }
.cm-seg span { display: block; padding: 7px 16px; border-radius: 999px; font-weight: 800; font-size: 15px; color: var(--tx2); }
.cm-seg input:checked + span { background: linear-gradient(180deg, #6fb0ff, #3a6dff); color: #fff; }
.cm-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 15.5px; color: var(--tx); padding: 4px 0; }
.cm-check input { width: 20px; height: 20px; accent-color: var(--gold); flex: none; }
.cm-set .field + .cm-note, .cm-check + .field { margin-top: 8px; }
.cm-shows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.cm-shows .cm-check { font-size: 14.5px; line-height: 1.45; }
@media (max-width: 400px) { .cm-shows { grid-template-columns: minmax(0, 1fr); } }

.cm-marks { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cm-marks li { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-radius: 12px; background: rgba(255, 159, 216, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 159, 216, 0.28); font-size: 15px; min-width: 0; }
.cm-marks li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-mk-d { font-family: var(--ff-x); font-size: 12.5px; color: var(--pink); white-space: nowrap; }
.cm-marks button { border: 0; background: rgba(255, 255, 255, 0.07); color: var(--tx2); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.cm-marks .cm-mk-none { background: none; box-shadow: none; color: var(--mut); padding-left: 0; }
.cm-addmark { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 78px) minmax(0, 72px); gap: 6px; }
.cm-addmark .btn { grid-column: 1 / -1; }
.cm-addmark .inp { padding: 9px 10px; }
.cm-addmark select.inp { padding-right: 24px; background-position: calc(100% - 14px) 52%, calc(100% - 8px) 52%; }

/* 操作バー */
.cm-main { min-width: 0; }
.cm-bar { position: sticky; top: 76px; z-index: 5; padding: 16px 18px; margin-bottom: 18px; background: rgba(14, 22, 52, 0.9); }
@media (min-width: 1021px) { .cm-bar { top: 112px; } }
.cm-bar-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.cm-bar .btn[disabled] { opacity: 0.55; pointer-events: none; }
.cm-sum { margin: 10px 0 0; font-size: 14px; }
.cm-prog { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 14.5px; font-weight: 700; color: var(--tx2); flex-wrap: wrap; }
.cm-prog-bar { flex: 1 1 160px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.cm-prog-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--gold)); transition: width 0.3s; }

/* プレビュー */
.cm-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 18px; }
.cm-thumbs[data-land='1'] { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cm-card { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cm-cv { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #0b1130; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08); cursor: zoom-in; transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), box-shadow 0.25s; }
.cm-cv:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55), 0 0 0 2px var(--gold); }
.cm-cv canvas { display: block; width: 100%; height: 100%; }
.cm-spin { position: absolute; inset: 0; display: none; place-items: center; background: rgba(4, 6, 15, 0.35); }
.cm-spin::after { content: ''; width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: var(--gold); animation: cm-rot 0.8s linear infinite; }
.cm-card.busy .cm-spin { display: grid; }
@keyframes cm-rot { to { transform: rotate(360deg); } }
.cm-card figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; font-size: 15px; }
.cm-card figcaption b { font-weight: 900; }
.cm-card-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.cm-card-btns button { border: 0; border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 800; background: rgba(255, 255, 255, 0.07); color: var(--tx2); box-shadow: inset 0 0 0 1px var(--line); }
.cm-card-btns button:hover { background: rgba(255, 210, 122, 0.16); color: var(--gold); }

/* ダイアログ */
.cm-dlg { width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 22px; background: #0a1028; color: var(--tx); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line2); }
.cm-dlg::backdrop { background: rgba(2, 3, 10, 0.78); backdrop-filter: blur(4px); }
.cm-dlg-in { padding: 18px 20px 22px; }
.cm-dlg-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cm-dlg-hd h2 { margin: 0; }
.cm-x { border: 0; background: rgba(255, 255, 255, 0.08); width: 42px; height: 42px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--tx); flex: none; }
.cm-gal-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-file { position: relative; overflow: hidden; cursor: pointer; }
.cm-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cm-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); gap: 10px; margin-top: 14px; }
.cm-gal-i { display: flex; flex-direction: column; gap: 4px; border: 0; padding: 0 0 6px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); text-align: left; min-width: 0; }
.cm-gal-i img { width: 100%; aspect-ratio: 3/2; object-fit: cover; background: #000; }
.cm-gal-i span { padding: 0 8px; font-size: 12.5px; line-height: 1.45; color: var(--tx2); }
.cm-gal-i:hover, .cm-gal-i.on { box-shadow: inset 0 0 0 3px var(--gold); }
.cm-big-cv { display: flex; justify-content: center; }
.cm-big-cv canvas { display: block; max-width: 100%; max-height: calc(100vh - 200px); width: auto; height: auto; border-radius: 6px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6); }
.cm-big-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.cm-big-acts .btn[disabled] { opacity: 0.55; }
@media (max-width: 600px) { .cm-dlg-in { padding: 14px 12px 16px; } .cm-big-acts .btn { flex: 1 1 40%; } }

/* コツ */
.cm-tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .cm-tips { grid-template-columns: minmax(0, 1fr); } }
.cm-tiplist { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.8; }
.cm-tiplist b { color: var(--gold); }
@media (max-width: 600px) {
  .cm-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .cm-thumbs[data-land='1'] { grid-template-columns: minmax(0, 1fr); }
  .cm-card figcaption { font-size: 14px; }
  .cm-card-btns button { padding: 4px 9px; font-size: 12.5px; }
  .cm-bar { padding: 12px; top: 70px; }
  .cm-bar-btns .btn { flex: 1 1 auto; padding: 10px 14px; font-size: 15.5px; min-height: 44px; }
  .cm-sum { font-size: 13px; margin-top: 6px; }
}
