/* ==============================================
   Sc VeRA - Mahjong Club Calendar CSS
   金×黒×赤 — 龍・麻雀牌テーマ
   ============================================== */

/* ---- カラーパレット ---- */
:root {
  --mj-gold:    #d4a843;
  --mj-gold2:   #f0c060;
  --mj-red:     #c0392b;
  --mj-red2:    #e84040;
  --mj-green:   #27ae60;
  --mj-blue:    #2980b9;
  --mj-purple:  #8e44ad;
  --mj-orange:  #e67e22;

  --mj-accent:      #d4a843;
  --mj-accent2:     #f0c060;
  --mj-accent-soft: rgba(212,168,67,0.15);
  --mj-accent-glow: rgba(212,168,67,0.30);
  --mj-red-soft:    rgba(192,57,43,0.18);
  --mj-bg-card:     rgba(212,168,67,0.05);
  --mj-border:      rgba(212,168,67,0.28);
  --mj-border-soft: rgba(212,168,67,0.12);
}

/* ================================================
   HERO
   ============================================== */
.mj-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  padding: 130px 40px 80px;
  overflow: hidden;
}

/* 背景：深い漆黒＋金のグラデーション */
.mj-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 85% 40%, rgba(212,168,67,0.14) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 15% 60%, rgba(192,57,43,0.10) 0%, transparent 55%),
    linear-gradient(180deg, #0a0a0a 0%, #111108 100%);
}

/* 斜線装飾 */
.mj-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 28px,
    rgba(212,168,67,0.025) 28px,
    rgba(212,168,67,0.025) 29px
  );
  pointer-events: none;
}

/* 龍の文字 */
.mj-hero-bg::after {
  content: '龍';
  position: absolute;
  right: -10px;
  bottom: -40px;
  font-size: clamp(8rem, 22vw, 20rem);
  font-weight: 900;
  color: rgba(212,168,67,0.055);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  font-family: 'Noto Sans JP', sans-serif;
}

/* 麻雀牌の浮遊装飾 */
.mj-hero-tiles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.mj-hero-tiles span {
  position: absolute;
  font-size: 2rem;
  opacity: 0.07;
  animation: mjTileFloat linear infinite;
  user-select: none;
}
.mj-hero-tiles span:nth-child(1)  { left:  5%; top: 20%; font-size: 2.5rem; animation-duration: 8s;  animation-delay: 0s;   opacity: 0.09; }
.mj-hero-tiles span:nth-child(2)  { left: 18%; top: 65%; font-size: 1.8rem; animation-duration: 11s; animation-delay: -3s;  }
.mj-hero-tiles span:nth-child(3)  { left: 30%; top: 12%; font-size: 2.2rem; animation-duration: 9s;  animation-delay: -1s;  opacity: 0.06; }
.mj-hero-tiles span:nth-child(4)  { left: 55%; top: 70%; font-size: 2rem;   animation-duration: 13s; animation-delay: -5s;  }
.mj-hero-tiles span:nth-child(5)  { left: 70%; top: 15%; font-size: 3rem;   animation-duration: 10s; animation-delay: -2s;  opacity: 0.06; }
.mj-hero-tiles span:nth-child(6)  { left: 82%; top: 55%; font-size: 1.6rem; animation-duration: 7s;  animation-delay: -4s;  }
.mj-hero-tiles span:nth-child(7)  { left: 92%; top: 30%; font-size: 2.4rem; animation-duration: 12s; animation-delay: -6s;  opacity: 0.05; }
.mj-hero-tiles span:nth-child(8)  { left: 42%; top: 40%; font-size: 1.5rem; animation-duration: 15s; animation-delay: -8s;  opacity: 0.06; }

@keyframes mjTileFloat {
  0%   { transform: translateY(0px) rotate(0deg); }
  25%  { transform: translateY(-18px) rotate(5deg); }
  50%  { transform: translateY(-8px) rotate(-3deg); }
  75%  { transform: translateY(-22px) rotate(4deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.mj-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.mj-hero-label {
  font-family: var(--font-en);
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.34em;
  color: var(--mj-gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.85;
}
.mj-hero-label::before,
.mj-hero-label::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--mj-gold);
  opacity: 0.5;
}
.mj-hero-title {
  font-family: var(--font-en);
  font-size: clamp(2.8rem, 9vw, 6rem);
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.03em;
  color: var(--white);
  line-height: 0.95;
  margin-bottom: 6px;
}
.mj-hero-title-kanji {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(1rem, 3vw, 1.6rem);
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--mj-gold);
  margin-bottom: 20px;
  opacity: 0.9;
}
.mj-hero-sub {
  font-size: 0.85rem;
  color: var(--gray-400);
  line-height: 1.9;
  max-width: 480px;
}

/* ---- MAIN ---- */
.mj-main {
  padding: 52px 0 90px;
}

/* ================================================
   カレンダーコントロール
   ============================================== */
.mj-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  background: var(--mj-bg-card);
  border: 1px solid var(--mj-border);
  border-radius: 10px;
  padding: 14px 20px;
}
.mj-month-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mj-nav-btn {
  width: 36px;
  height: 36px;
  background: var(--mj-accent-soft);
  border: 1px solid var(--mj-border);
  border-radius: 6px;
  color: var(--mj-gold);
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.mj-nav-btn:hover {
  background: var(--mj-accent-glow);
  border-color: var(--mj-gold2);
  color: var(--white);
}
.mj-month-label {
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.08em;
  color: var(--mj-gold2);
  min-width: 160px;
  text-align: center;
}
.mj-today-btn {
  font-family: var(--font-en);
  font-size: 0.58rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.16em;
  padding: 6px 16px;
  border-radius: 4px;
  border: 1px solid var(--mj-border);
  background: var(--mj-accent-soft);
  color: var(--mj-gold);
  cursor: pointer;
  transition: all var(--transition);
}
.mj-today-btn:hover {
  background: var(--mj-accent-glow);
  border-color: var(--mj-gold2);
  color: var(--white);
}

/* 追加ボタン */
.mj-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--mj-gold) 0%, var(--mj-gold2) 100%);
  border: none;
  border-radius: 6px;
  padding: 9px 22px;
  color: #1a1200;
  font-family: var(--font-en);
  font-size: 0.62rem;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 18px rgba(212,168,67,0.35);
}
.mj-add-btn:hover {
  opacity: 0.85;
  box-shadow: 0 6px 24px rgba(212,168,67,0.5);
  transform: translateY(-1px);
}

/* ================================================
   月間カレンダー グリッド
   ============================================== */
.mj-calendar {
  width: 100%;
  border: 1px solid var(--mj-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(212,168,67,0.07);
}

/* 曜日ヘッダー */
.mj-week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(135deg, rgba(212,168,67,0.22) 0%, rgba(192,57,43,0.14) 100%);
  border-bottom: 1px solid var(--mj-border);
}
.mj-week-header span {
  font-family: var(--font-en);
  font-size: 0.58rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.18em;
  text-align: center;
  padding: 12px 0;
  color: var(--mj-gold);
  opacity: 0.7;
}
.mj-week-header span:first-child { color: #e84040; opacity: 1; }
.mj-week-header span:last-child  { color: #60a5fa; opacity: 1; }

/* 日グリッド */
.mj-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

/* セル */
.mj-cell {
  min-height: 100px;
  border-right: 1px solid rgba(212,168,67,0.08);
  border-bottom: 1px solid rgba(212,168,67,0.08);
  padding: 6px 5px 5px;
  background: #0d0d0b;
  transition: background var(--transition);
  cursor: default;
  position: relative;
}
.mj-cell:nth-child(7n) { border-right: none; }
.mj-cell:hover { background: rgba(212,168,67,0.05); }
.mj-cell.has-event { cursor: pointer; }

/* 日付番号 */
.mj-day-num {
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  margin-bottom: 3px;
  line-height: 1;
  transition: all var(--transition);
}
.mj-cell.other-month .mj-day-num { color: var(--gray-800); }
.mj-cell.today .mj-day-num {
  background: linear-gradient(135deg, var(--mj-gold) 0%, var(--mj-gold2) 100%);
  color: #1a1200;
  font-weight: 900;
  box-shadow: 0 2px 12px rgba(212,168,67,0.5);
}
.mj-cell.sunday  .mj-day-num { color: #e84040; }
.mj-cell.saturday .mj-day-num { color: #60a5fa; }
.mj-cell.today.sunday  .mj-day-num { background: linear-gradient(135deg,#c0392b,#e84040); color: #fff; }
.mj-cell.today.saturday .mj-day-num { background: linear-gradient(135deg,#2980b9,#60a5fa); color: #fff; }

/* イベントチップ */
.mj-event-chip {
  display: block;
  width: 100%;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--transition);
  border-left: 3px solid;
}
.mj-event-chip:hover { opacity: 0.8; }

/* 色ごとのチップ */
.mj-chip-gold   { background: rgba(212,168,67,0.18); color: #f0c060; border-color: var(--mj-gold); }
.mj-chip-red    { background: rgba(192,57,43,0.20);  color: #e88080; border-color: var(--mj-red2); }
.mj-chip-green  { background: rgba( 39,174,96,0.18); color: #6ee7b7; border-color: var(--mj-green); }
.mj-chip-blue   { background: rgba( 41,128,185,0.18);color: #93c5fd; border-color: var(--mj-blue); }
.mj-chip-purple { background: rgba(142,68,173,0.18); color: #d8b4fe; border-color: var(--mj-purple); }
.mj-chip-orange { background: rgba(230,126,34,0.18); color: #fdba74; border-color: var(--mj-orange); }

/* "もっと見る" リンク */
.mj-more-link {
  font-family: var(--font-en);
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--mj-gold);
  cursor: pointer;
  display: block;
  margin-top: 2px;
  padding: 1px 4px;
  transition: color var(--transition);
  opacity: 0.6;
}
.mj-more-link:hover { opacity: 1; }

/* ================================================
   月別イベントリスト
   ============================================== */
.mj-list-section { margin-top: 52px; }
.mj-list-title {
  font-family: var(--font-en);
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.28em;
  color: var(--mj-gold);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mj-border);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.85;
}
.mj-list-title::before,
.mj-list-title::after {
  content: '🀄';
  font-size: 0.75rem;
}
.mj-list { display: flex; flex-direction: column; gap: 10px; }
.mj-list-item {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  background: var(--mj-bg-card);
  border: 1px solid var(--mj-border-soft);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.mj-list-item:hover {
  border-color: var(--mj-border);
  background: rgba(212,168,67,0.07);
  transform: translateX(5px);
}
.mj-list-item-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.mj-list-date-col {
  flex-shrink: 0;
  text-align: center;
  min-width: 48px;
}
.mj-list-day-num {
  font-family: var(--font-en);
  font-size: 1.6rem;
  font-weight: 900;
  font-style: normal;
  line-height: 1;
  color: var(--mj-gold2);
}
.mj-list-day-week {
  font-family: var(--font-en);
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--mj-gold);
  letter-spacing: 0.1em;
  opacity: 0.6;
}
.mj-list-color-bar {
  width: 3px;
  flex-shrink: 0;
  border-radius: 100px;
  align-self: stretch;
  min-height: 40px;
}
.mj-list-body { flex: 1; min-width: 0; }
.mj-list-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mj-list-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.mj-list-meta span {
  font-size: 0.66rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
}
.mj-list-meta i { font-size: 0.58rem; color: var(--mj-gold); opacity: 0.7; }
.mj-list-empty {
  text-align: center;
  padding: 44px 0;
  color: var(--gray-600);
  font-size: 0.82rem;
}

/* ================================================
   動画セクション
   ============================================== */
.mj-video-section {
  margin-top: 64px;
  padding-top: 52px;
  border-top: 1px solid var(--mj-border);
}
.mj-video-section-label {
  font-family: var(--font-en);
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.32em;
  color: var(--mj-gold);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.85;
}
.mj-video-section-label::before,
.mj-video-section-label::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--mj-gold);
  opacity: 0.5;
}
.mj-video-section-title {
  font-family: var(--font-en);
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 10px;
}
.mj-video-section-sub {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-bottom: 32px;
}

/* アップロードエリア */
.mj-video-upload-area {
  border: 2px dashed var(--mj-border);
  border-radius: 10px;
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  margin-bottom: 36px;
  background: var(--mj-bg-card);
}
.mj-video-upload-area:hover,
.mj-video-upload-area.drag-over {
  border-color: var(--mj-gold2);
  background: rgba(212,168,67,0.07);
}
.mj-video-upload-area.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.mj-video-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.mj-video-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  pointer-events: none;
}
.mj-video-upload-label i {
  font-size: 2.2rem;
  color: var(--mj-gold);
  opacity: 0.55;
}
.mj-video-upload-main {
  font-family: var(--font-en);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gray-300);
}
.mj-video-upload-sub {
  font-size: 0.68rem;
  color: var(--gray-600);
}

/* 動画グリッド */
.mj-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* 動画カード */
.mj-video-card {
  background: var(--mj-bg-card);
  border: 1px solid var(--mj-border-soft);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.mj-video-card:hover {
  border-color: var(--mj-border);
  transform: translateY(-2px);
}
.mj-video-card video {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #090908;
}
.mj-video-card-footer {
  padding: 10px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mj-video-card-name {
  font-size: 0.72rem;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.mj-video-card-remove {
  background: transparent;
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: 4px;
  color: var(--mj-gold);
  font-size: 0.62rem;
  padding: 3px 12px;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  opacity: 0.7;
}
.mj-video-card-remove:hover {
  border-color: var(--mj-gold);
  background: var(--mj-accent-soft);
  opacity: 1;
}

/* ================================================
   イベント詳細モーダル
   ============================================== */
.mj-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 3100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mj-detail-overlay.open { opacity: 1; pointer-events: all; }

.mj-detail-box {
  background: #0f0f0d;
  border: 1px solid var(--mj-border);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(212,168,67,0.15);
}
.mj-detail-overlay.open .mj-detail-box { transform: translateY(0) scale(1); }

.mj-detail-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--mj-border-soft);
  position: sticky;
  top: 0;
  background: #0f0f0d;
  z-index: 2;
}
.mj-detail-color-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}
.mj-detail-cat {
  font-family: var(--font-en);
  font-size: 0.58rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.16em;
  vertical-align: middle;
}
.mj-detail-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: var(--mj-accent-soft);
  border: 1px solid var(--mj-border);
  border-radius: 4px;
  color: var(--mj-gold);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.mj-detail-close:hover { background: var(--mj-accent-glow); color: var(--white); }

.mj-detail-body {
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mj-detail-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.5;
}
.mj-detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mj-detail-info-item {
  background: rgba(212,168,67,0.06);
  border: 1px solid var(--mj-border-soft);
  border-radius: 6px;
  padding: 10px 12px;
}
.mj-detail-info-label {
  font-family: var(--font-en);
  font-size: 0.52rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.14em;
  color: var(--mj-gold);
  opacity: 0.7;
  margin-bottom: 4px;
}
.mj-detail-info-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-200);
}
.mj-detail-desc {
  font-size: 0.82rem;
  color: var(--gray-300);
  line-height: 2;
  border-top: 1px solid var(--mj-border-soft);
  padding-top: 16px;
}
.mj-detail-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--mj-border-soft);
}
.mj-btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mj-accent-soft);
  border: 1px solid var(--mj-border);
  border-radius: 4px;
  padding: 8px 18px;
  color: var(--mj-gold);
  font-family: var(--font-en);
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all var(--transition);
}
.mj-btn-edit:hover { background: var(--mj-accent-glow); color: var(--white); }
.mj-btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,100,100,0.35);
  border-radius: 4px;
  padding: 8px 18px;
  color: rgba(255,120,120,0.8);
  font-family: var(--font-en);
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all var(--transition);
}
.mj-btn-delete:hover { border-color: rgba(255,100,100,0.8); color: #ff6b6b; }

/* ================================================
   フォームモーダル
   ============================================== */
.mj-form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.94);
  z-index: 3200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mj-form-overlay.open { opacity: 1; pointer-events: all; }
.mj-form-box {
  background: #0f0f0d;
  border: 1px solid var(--mj-border);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(212,168,67,0.12);
}
.mj-form-overlay.open .mj-form-box { transform: translateY(0) scale(1); }

.mj-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--mj-border-soft);
  position: sticky;
  top: 0;
  background: #0f0f0d;
  z-index: 2;
}
.mj-form-title {
  font-family: var(--font-en);
  font-size: 0.7rem;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.2em;
  color: var(--mj-gold2);
}
.mj-form-close {
  width: 30px; height: 30px;
  background: var(--mj-accent-soft);
  border: 1px solid var(--mj-border);
  border-radius: 4px;
  color: var(--mj-gold);
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.mj-form-close:hover { background: var(--mj-accent-glow); color: var(--white); }

.mj-form-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mj-field { display: flex; flex-direction: column; gap: 6px; }
.mj-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mj-label {
  font-family: var(--font-en);
  font-size: 0.56rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.16em;
  color: var(--mj-gold);
  opacity: 0.8;
}
.mj-label .mj-req { color: var(--mj-red2); margin-left: 3px; }
.mj-input,
.mj-select,
.mj-textarea {
  background: rgba(212,168,67,0.04);
  border: 1px solid var(--mj-border-soft);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--white);
  font-family: var(--font-jp);
  font-size: 0.82rem;
  width: 100%;
  transition: border-color var(--transition), background var(--transition);
}
.mj-input:focus,
.mj-select:focus,
.mj-textarea:focus {
  outline: none;
  border-color: var(--mj-gold);
  background: rgba(212,168,67,0.07);
}
.mj-input::placeholder,
.mj-textarea::placeholder { color: var(--gray-700); }
.mj-select option { background: #0f0f0d; }
.mj-textarea { min-height: 100px; resize: vertical; line-height: 1.7; }

/* カラーピッカー */
.mj-color-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.mj-color-swatch {
  width: 28px; height: 28px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.mj-color-swatch:hover { transform: scale(1.18); }
.mj-color-swatch.selected {
  border-color: var(--white);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* エラー */
.mj-form-error {
  font-size: 0.72rem;
  color: var(--mj-red2);
  display: none;
  padding: 8px 12px;
  background: var(--mj-red-soft);
  border: 1px solid rgba(192,57,43,0.4);
  border-radius: 6px;
}
.mj-form-error.show { display: block; }

.mj-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--mj-border-soft);
}
.mj-btn-cancel {
  background: transparent;
  border: 1px solid var(--mj-border-soft);
  border-radius: 4px;
  padding: 8px 22px;
  color: var(--gray-400);
  font-family: var(--font-en);
  font-size: 0.62rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all var(--transition);
}
.mj-btn-cancel:hover { border-color: var(--gray-400); color: var(--gray-200); }
.mj-btn-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--mj-gold) 0%, var(--mj-gold2) 100%);
  border: none;
  border-radius: 4px;
  padding: 8px 26px;
  color: #1a1200;
  font-family: var(--font-en);
  font-size: 0.62rem;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(212,168,67,0.35);
}
.mj-btn-save:hover { opacity: 0.85; box-shadow: none; }
.mj-btn-save:disabled { opacity: 0.4; pointer-events: none; }

/* ================================================
   トースト
   ============================================== */
.mj-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #0f0f0d;
  border: 1px solid var(--mj-border);
  border-radius: 6px;
  padding: 10px 28px;
  font-size: 0.75rem;
  color: var(--white);
  white-space: nowrap;
  z-index: 9999;
  transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 30px rgba(212,168,67,0.2);
}
.mj-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ================================================
   index.html ヒーローボタン
   ============================================== */
.mj-hero-btn-wrap { margin-top: 12px; }

/* ================================================
   イベント中止バナー・ボタン
   ============================================== */
.mj-list-item.cancelled {
  opacity: 0.65;
  border-color: rgba(255,80,80,0.45) !important;
}
.ec-cancelled-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(255,80,80,0.10);
  border: 1px solid rgba(255,80,80,0.45);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ff6b6b;
}
.ec-cancelled-banner i { font-size: 0.75rem; }
.ec-cancel-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(255,80,80,0.45);
  border-radius: 5px;
  color: rgba(255,120,120,0.85);
  font-family: var(--font-jp);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  width: 100%;
  justify-content: center;
}
.ec-cancel-btn:hover {
  background: rgba(255,80,80,0.10);
  border-color: rgba(255,80,80,0.75);
  color: #ff6b6b;
}
.ec-cancel-btn.ec-cancel-undo {
  border-color: rgba(212,168,67,0.5);
  color: var(--mj-gold);
}
.ec-cancel-btn.ec-cancel-undo:hover {
  background: rgba(212,168,67,0.10);
  border-color: rgba(212,168,67,0.8);
}

/* ================================================
   イベントカウンター
   ============================================== */
.ec-counter {
  margin-top: 10px;
  border-top: 1px solid rgba(212,168,67,0.18);
  padding-top: 10px;
}
.ec-counter-header {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ec-counter-icon {
  font-size: 0.72rem;
  color: var(--mj-gold);
  opacity: 0.75;
}
.ec-counter-label {
  font-family: var(--font-en);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gray-500);
  flex: 1;
}
.ec-counter-toggle {
  font-size: 0.6rem;
  color: var(--gray-600);
  transition: transform 0.22s;
}
.ec-counter.open .ec-counter-toggle {
  transform: rotate(180deg);
}
.ec-counter-body {
  display: none;
  margin-top: 10px;
  flex-direction: column;
  gap: 10px;
  animation: ecFadeIn 0.22s ease;
}
.ec-counter.open .ec-counter-body {
  display: flex;
}
.ec-status-row {
  display: flex;
  gap: 6px;
}
.ec-status-btn {
  flex: 1;
  padding: 6px 4px;
  border-radius: 5px;
  border: 1px solid var(--mj-border-soft);
  background: var(--mj-bg-card);
  color: var(--gray-400);
  font-family: var(--font-jp);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  line-height: 1.3;
}
.ec-status-btn:hover { border-color: var(--mj-gold); color: var(--gray-200); }
.ec-status-btn.ec-active-attend {
  background: rgba(39,174,96,0.16);
  border-color: rgba(39,174,96,0.65);
  color: #27ae60;
}
.ec-status-btn.ec-active-absent {
  background: rgba(192,57,43,0.14);
  border-color: rgba(192,57,43,0.6);
  color: #e84040;
}
.ec-status-btn.ec-active-undecided {
  background: rgba(212,168,67,0.12);
  border-color: rgba(212,168,67,0.55);
  color: var(--mj-gold);
}
.ec-comment-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ec-comment-input {
  flex: 1;
  background: var(--mj-bg-card);
  border: 1px solid var(--mj-border-soft);
  border-radius: 5px;
  padding: 6px 10px;
  color: var(--white);
  font-family: var(--font-jp);
  font-size: 0.72rem;
  outline: none;
  transition: border-color 0.18s;
}
.ec-comment-input::placeholder { color: var(--gray-600); font-size: 0.68rem; }
.ec-comment-input:focus { border-color: var(--mj-gold); }
.ec-comment-save-btn {
  background: var(--mj-gold);
  border: none;
  border-radius: 5px;
  padding: 6px 12px;
  color: #0a0a08;
  font-family: var(--font-en);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.18s;
}
.ec-comment-save-btn:hover { opacity: 0.8; }
.ec-comment-save-btn:disabled { opacity: 0.4; pointer-events: none; }
.ec-summary {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--mj-bg-card);
  border: 1px solid var(--mj-border-soft);
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ec-summary.visible {
  display: flex;
}
.ec-summary-status {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}
.ec-summary-comment {
  font-size: 0.68rem;
  color: var(--gray-400);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ec-summary-edit {
  font-size: 0.55rem;
  color: var(--gray-600);
  flex-shrink: 0;
}

/* ================================================
   カード内 参加者ピル + チップパネル
   ============================================== */
.ec-peek-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 8px 3px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.62rem;
  color: var(--gray-400);
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.ec-peek-pill:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}
.ec-peek-att {
  color: #27ae60;
  font-weight: 700;
}
.ec-peek-und {
  color: #eab308;
  font-weight: 700;
}
.ec-peek-arrow {
  font-size: 0.5rem;
  color: var(--gray-600);
  transition: transform 0.2s;
}
.ec-peek-arrow.up {
  transform: rotate(180deg);
}
.ec-peek-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
  overflow: hidden;
}
.ec-peek-panel.open {
  grid-template-rows: 1fr;
}
.ec-peek-panel > * {
  min-height: 0;
  overflow: hidden;
}
.ec-peek-panel .ec-peek-group {
  padding: 8px 0 4px;
}
.ec-peek-group + .ec-peek-group {
  padding-top: 4px;
}
.ec-peek-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.ec-peek-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ================================================
   ENTRY COUNTER — メンバーチップ一覧
   ============================================== */
.ec-members-wrap {
  margin-top: 4px;
}
.ec-member-section {
  margin-top: 6px;
}
.ec-member-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.ec-member-hd-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0.04em;
}
.ec-member-toggle {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--gray-500);
  font-size: 0.58rem;
  font-family: var(--font-jp);
  cursor: pointer;
  transition: all 0.15s;
}
.ec-member-toggle:hover {
  background: rgba(255,255,255,0.1);
  color: var(--gray-300);
}
.ec-member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ec-member-list.ec-mlist-hidden {
  display: none;
}
.ec-member-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px 3px 3px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  font-size: 0.62rem;
}
.ec-member-chip.ec-chip-att {
  border-color: rgba(39,174,96,0.35);
  background: rgba(39,174,96,0.07);
}
.ec-member-chip.ec-chip-und {
  border-color: rgba(234,179,8,0.3);
  background: rgba(234,179,8,0.06);
}
.ec-member-av {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.ec-member-name {
  color: var(--gray-300);
  font-size: 0.62rem;
  white-space: nowrap;
}
.ec-chip-cmt {
  color: var(--gray-500);
  font-size: 0.58rem;
  margin-left: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* ================================================
   RESPONSIVE
   ============================================== */
@media (max-width: 768px) {
  .mj-hero       { padding: 100px 24px 56px; }
  .mj-controls   { padding: 12px 16px; }
  .mj-cell       { min-height: 68px; padding: 4px 3px; }
  .mj-day-num    { width: 22px; height: 22px; font-size: 0.62rem; }
  .mj-event-chip { font-size: 0.5rem; padding: 1px 3px; }
  .mj-detail-info-grid { grid-template-columns: 1fr; }
  .mj-field-row  { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .mj-cell       { min-height: 50px; padding: 3px 2px; }
  .mj-month-label { font-size: 1rem; min-width: 120px; }
  .mj-event-chip { display: none; }
  .mj-cell.has-event::after {
    content: '🀄';
    font-size: 0.55rem;
    display: block;
    text-align: center;
    margin-top: 1px;
    opacity: 0.7;
  }
}
