@charset "UTF-8";

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CSS カスタムプロパティ（カラーパレット）
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.drama-cal {
	/* ▼ 基本カラー */
	--cal-gold:        #a78956;
	--cal-gold-dark:   #8a6e3e;
	--cal-gold-light:  #d0bf97;
	--cal-gold-pale:   rgba(167, 137, 86, 0.08);
	--cal-gold-today:  rgba(167, 137, 86, 0.16);
	--cal-text:        #333;
	--cal-text-light:  #888;
	--cal-border:      #e8e0d0;
	--cal-bg:          #fff;
	--cal-bg-empty:    #fafaf8;
	--cal-sat:         #1a5fb4;
	--cal-sun:         #c0392b;

	/* ▼ VODブランドカラー (HEX値) */
	--vod-unext:   #31C6E6;
	--vod-netflix: #E50914;
	--vod-prime:   #00A8E1;
	--vod-hulu:    #1DB745;
	--vod-disney:  #113CCF;
	--vod-lemino:  #ff5056;
	--vod-telasa:  #7B2D8B;
	--vod-fod:     #C80025;

	/* ▼ VODブランドカラー (RGB値・背景透過用) */
	--vod-unext-rgb:   49, 198, 230;
	--vod-netflix-rgb: 229, 9, 20;
	--vod-prime-rgb:   0, 168, 225;
	--vod-hulu-rgb:    29, 183, 69;
	--vod-disney-rgb:  17, 60, 207;
	--vod-lemino-rgb:  255, 80, 86;
	--vod-telasa-rgb:  123, 45, 139;
	--vod-fod-rgb:     200, 0, 37;

	/* ▼ 一部VODのタブテキスト用調整カラー */
	--vod-unext-text:  #0fa8cc;
	--vod-prime-text:  #007db3;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   カレンダー全体ラッパー
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.drama-cal {
	max-width: 1000px;
	margin: 0 auto 2rem;
	font-size: 0.95rem;
	color: var(--cal-text);
}

.drama-cal__header {
	display: flex;
	align-items: center;
	position: relative; /* 年月の中央配置の基準点にするため追加 */
	margin-bottom: 14px;
	padding: 12px 16px;
	background: var(--cal-gold);
	border-radius: 10px;
	/* justify-content と gap は削除します */
}

.drama-cal__month {
	font-family: "游ゴシック体", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif !important;
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	letter-spacing: 0.03em;
	
	/* ▼ 絶対配置で左右のボタン幅に影響されず完全に中央へ */
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.drama-cal__nav {
	flex-shrink: 0;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 600;
	text-decoration: none;
	padding: 6px 12px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 20px;
	white-space: nowrap;
	line-height: 1.4;
	transition: background 0.18s;
}

.drama-cal__nav:hover {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   表示切り替えボタン（PC・スマホ共通）
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.drama-cal__view-switch {
	display: flex;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	padding: 2px;
	
	/* ▼ 右側に押しやり、次月ボタンとの間に余白を作る */
	margin-left: auto;
	margin-right: 12px;
}

.drama-cal__view-switch .view-btn {
	background: transparent;
	border: none;
	color: #fff;
	padding: 4px 10px;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.6;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.drama-cal__view-switch .view-btn:hover {
	opacity: 1;
}

.drama-cal__view-switch .view-btn.is-active {
	background: #fff;
	color: var(--cal-gold);
	opacity: 1;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.drama-cal-wrapper[data-view="grid"] .drama-cal__view-list { display: none; }
.drama-cal-wrapper[data-view="list"] .drama-cal__view-grid { display: none; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VOD フィルタータブ
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.drama-cal__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
	padding: 0 2px;
}

.drama-cal__tab {
	padding: 8px 16px;
	border: 2px solid var(--cal-gold-light);
	border-radius: 20px;
	background: #fff;
	color: var(--cal-gold);
	font-size: 0.84rem;
	font-weight: 700;
	cursor: pointer;
	line-height: 1.2;
	transition: background 0.18s, border-color 0.18s, color 0.18s;
	min-height: 38px;
}

.drama-cal__tab:hover { background: var(--cal-gold-pale); }
.drama-cal__tab.is-active { background: var(--cal-gold); border-color: var(--cal-gold); color: #fff; }

.drama-cal__tab--unext { border-color: var(--vod-unext); color: var(--vod-unext-text); }
.drama-cal__tab--unext.is-active, .drama-cal__tab--unext:hover { background: var(--vod-unext); border-color: var(--vod-unext); color: #fff; }

.drama-cal__tab--netflix { border-color: var(--vod-netflix); color: var(--vod-netflix); }
.drama-cal__tab--netflix.is-active, .drama-cal__tab--netflix:hover { background: var(--vod-netflix); border-color: var(--vod-netflix); color: #fff; }

.drama-cal__tab--prime { border-color: var(--vod-prime); color: var(--vod-prime-text); }
.drama-cal__tab--prime.is-active, .drama-cal__tab--prime:hover { background: var(--vod-prime); border-color: var(--vod-prime); color: #fff; }

.drama-cal__tab--hulu { border-color: var(--vod-hulu); color: var(--vod-hulu); }
.drama-cal__tab--hulu.is-active, .drama-cal__tab--hulu:hover { background: var(--vod-hulu); border-color: var(--vod-hulu); color: #fff; }

.drama-cal__tab--disney { border-color: var(--vod-disney); color: var(--vod-disney); }
.drama-cal__tab--disney.is-active, .drama-cal__tab--disney:hover { background: var(--vod-disney); border-color: var(--vod-disney); color: #fff; }

.drama-cal__tab--lemino { border-color: var(--vod-lemino); color: var(--vod-lemino); }
.drama-cal__tab--lemino.is-active, .drama-cal__tab--lemino:hover { background: var(--vod-lemino); border-color: var(--vod-lemino); color: #fff; }

.drama-cal__tab--telasa { border-color: var(--vod-telasa); color: var(--vod-telasa); }
.drama-cal__tab--telasa.is-active, .drama-cal__tab--telasa:hover { background: var(--vod-telasa); border-color: var(--vod-telasa); color: #fff; }

.drama-cal__tab--fod { border-color: var(--vod-fod); color: var(--vod-fod); }
.drama-cal__tab--fod.is-active, .drama-cal__tab--fod:hover { background: var(--vod-fod); border-color: var(--vod-fod); color: #fff; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   【ビューA】グリッド（カレンダー）表示
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.dc-grid {
	border: 1px solid var(--cal-border);
	border-radius: 10px;
	background: var(--cal-bg);
}

.dc-grid__weekdays {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	background: var(--cal-bg-empty);
	border-bottom: 1px solid var(--cal-border);
	border-radius: 9px 9px 0 0;
}

.dc-grid__wd {
	text-align: center;
	padding: 8px 0;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--cal-text-light);
	border-right: 1px solid var(--cal-border);
}
.dc-grid__wd:last-child { border-right: none; }
.dc-grid__wd--sun { color: var(--cal-sun); background: rgba(192, 57, 43, 0.05); }
.dc-grid__wd--sat { color: var(--cal-sat); background: rgba(26, 95, 180, 0.05); }

.dc-grid__cells {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dc-grid__cell {
	min-height: 100px;
	border-right: 1px solid var(--cal-border);
	border-bottom: 1px solid var(--cal-border);
	padding: 4px 4px 34px 4px; /* 右下のボタン領域を確保 */
	position: relative;
}
.dc-grid__cell:nth-child(7n) { border-right: none; }
.dc-grid__cell--empty { background: var(--cal-bg-empty); }

.dc-grid__cell--today { background: var(--cal-gold-today); }
.dc-grid__cell--today .dc-grid__date {
	background: var(--cal-gold);
	color: #fff;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: -2px auto 2px;
}

.dc-grid__date {
	font-size: 0.8rem;
	font-weight: 700;
	text-align: center;
	margin-bottom: 4px;
	color: var(--cal-text);
}
.dc-grid__cell--sun .dc-grid__date { color: var(--cal-sun); }
.dc-grid__cell--sat .dc-grid__date { color: var(--cal-sat); }

.dc-grid__items {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

/* グリッド内の個別アイテム（ボーダーなし） */
.dc-grid__item {
	display: block;
	font-size: 0.72rem;
	line-height: 1.3;
	padding: 3px 6px;
	border-radius: 4px;
	color: var(--cal-text);
	text-decoration: none;
	background: var(--cal-gold-pale);
	border-left: none; /* ボーダー除去 */
	transition: opacity 0.2s;
	overflow: hidden;
}
.dc-grid__item:hover { opacity: 0.8; text-decoration: none; color: var(--cal-text); }
.dc-grid__item.is-hidden { display: none !important; }

.dc-grid__item-compact {
	display: flex;
	align-items: center;
	white-space: nowrap;
}

.dc-grid__title {
	overflow: hidden;
	text-overflow: ellipsis;
}
/* 新着の文字色（共通） */
.dc-grid__item--new .dc-grid__title { color: #fff; }

/* ▼ 新着のみ各VODカラーで塗りつぶし（透過なし） */
.dc-grid__item--new.drama-cal__item--unext   { background: var(--vod-unext) !important; }
.dc-grid__item--new.drama-cal__item--netflix { background: var(--vod-netflix) !important; }
.dc-grid__item--new.drama-cal__item--prime   { background: var(--vod-prime) !important; }
.dc-grid__item--new.drama-cal__item--hulu    { background: var(--vod-hulu) !important; }
.dc-grid__item--new.drama-cal__item--disney  { background: var(--vod-disney) !important; }
.dc-grid__item--new.drama-cal__item--lemino  { background: var(--vod-lemino) !important; }
.dc-grid__item--new.drama-cal__item--telasa  { background: var(--vod-telasa) !important; }
.dc-grid__item--new.drama-cal__item--fod     { background: var(--vod-fod) !important; }

/* ▼▼ 詳細表示用ボタン（常にPC/スマホ共通表示） ▼▼ */
.dc-grid__expand-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	bottom: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	background: #fff;
	border: 1px solid var(--cal-border);
	border-radius: 50%;
	color: var(--cal-text-light);
	font-size: 0.7rem;
	cursor: pointer;
	padding: 0;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: background 0.2s, color 0.2s;
	z-index: 2;
}
.dc-grid__expand-btn:hover {
	background: var(--cal-gold);
	color: #fff;
	border-color: var(--cal-gold);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   【ポップアップ モーダル】
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.dc-modal {
	position: fixed;
	top: 0; left: 0;
	width: 100vw; height: 100vh;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.dc-modal.is-open {
	opacity: 1;
	pointer-events: auto;
}

.dc-modal__overlay {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(3px);
}

.dc-modal__window {
	position: relative;
	background: var(--cal-bg);
	width: 92%;
	max-width: 500px;
	max-height: 85vh;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.2);
	display: flex;
	flex-direction: column;
	transform: translateY(15px) scale(0.98);
	transition: transform 0.25s ease;
}

.dc-modal.is-open .dc-modal__window {
	transform: translateY(0) scale(1);
}

.dc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid var(--cal-border);
	background: var(--cal-gold-pale);
	border-radius: 12px 12px 0 0;
}

.dc-modal__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--cal-text);
}
.dc-modal__weekday--日 { color: var(--cal-sun); }
.dc-modal__weekday--土 { color: var(--cal-sat); }

.dc-modal__close-btn {
	background: none;
	border: none;
	font-size: 1.2rem;
	color: var(--cal-text-light);
	cursor: pointer;
	padding: 4px;
	line-height: 1;
	transition: color 0.2s;
}
.dc-modal__close-btn:hover { color: var(--cal-text); }

.dc-modal__body {
	padding: 16px;
	overflow-y: auto;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   【ビューB】タイムライン（リスト）表示 ＆ モーダル内のリスト共通
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.drama-cal__body {
	border: 1px solid var(--cal-border);
	border-radius: 10px;
	overflow: hidden;
}

.drama-cal__day {
	display: flex;
	align-items: stretch;
	border-bottom: 1px solid var(--cal-border);
	background: var(--cal-bg);
	min-height: 52px;
}
.drama-cal__day:last-child { border-bottom: none; }
.drama-cal__day--empty { background: var(--cal-bg-empty); opacity: 0.65; }
.drama-cal__day--today { background: var(--cal-gold-today) !important; opacity: 1 !important; }
.drama-cal__day--today .drama-cal__date-label { background: var(--cal-gold); }
.drama-cal__day--today .drama-cal__date-num, .drama-cal__day--today .drama-cal__weekday { color: #fff; }

.drama-cal__date-label {
	flex-shrink: 0;
	width: 60px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px 4px;
	border-right: 2px solid var(--cal-border);
	gap: 2px;
	background: inherit;
}
.drama-cal__day--sat .drama-cal__date-label { background: rgba(26, 95, 180, 0.05); }
.drama-cal__day--sun .drama-cal__date-label { background: rgba(192, 57, 43, 0.05); }

.drama-cal__date-num { font-size: 0.88rem; font-weight: 700; line-height: 1; color: var(--cal-text); }
.drama-cal__weekday { font-size: 0.72rem; line-height: 1; color: var(--cal-text-light); }
.drama-cal__weekday--土 { color: var(--cal-sat); }
.drama-cal__weekday--日 { color: var(--cal-sun); }
.drama-cal__day--sat .drama-cal__date-num { color: var(--cal-sat); }
.drama-cal__day--sun .drama-cal__date-num { color: var(--cal-sun); }

.drama-cal__items {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 7px 10px;
	justify-content: center;
}

/* リスト用の個別アイテム（左ボーダーあり） */
.drama-cal__item {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px 6px;
	padding: 8px 12px;
	border-radius: 6px;
	background: var(--cal-gold-pale);
	border-left: 3px solid var(--cal-gold);
	text-decoration: none;
	color: var(--cal-text);
	font-size: 0.88rem;
	line-height: 1.45;
	min-height: 44px;
	transition: background 0.15s, transform 0.1s;
}
.drama-cal__item:hover { background: rgba(167, 137, 86, 0.14); color: var(--cal-text); text-decoration: none; transform: translateX(2px); }
.drama-cal__item.is-hidden { display: none !important; }

/* ▼ VOD別アイテムカラー（リスト表示・グリッド表示共通） */
.drama-cal__item--unext { border-left-color: var(--vod-unext); background: rgba(var(--vod-unext-rgb), 0.08); }
.drama-cal__item--netflix { border-left-color: var(--vod-netflix); background: rgba(var(--vod-netflix-rgb), 0.07); }
.drama-cal__item--prime { border-left-color: var(--vod-prime); background: rgba(var(--vod-prime-rgb), 0.07); }
.drama-cal__item--hulu { border-left-color: var(--vod-hulu); background: rgba(var(--vod-hulu-rgb), 0.07); }
.drama-cal__item--disney { border-left-color: var(--vod-disney); background: rgba(var(--vod-disney-rgb), 0.07); }
.drama-cal__item--lemino { border-left-color: var(--vod-lemino); background: rgba(var(--vod-lemino-rgb), 0.07); }
.drama-cal__item--telasa { border-left-color: var(--vod-telasa); background: rgba(var(--vod-telasa-rgb), 0.07); }
.drama-cal__item--fod { border-left-color: var(--vod-fod); background: rgba(var(--vod-fod-rgb), 0.07); }

.drama-cal__title { font-weight: 600; flex: 1; min-width: 0; }

/* バッジ類 */
.drama-cal__badge {
	display: inline-flex; align-items: center; gap: 3px;
	padding: 2px 9px; border-radius: 10px; font-size: 0.76rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.drama-cal__badge--new { color: #fff; }
.drama-cal__badge--final { background: #fff3e0; color: #bf360c; border: 1px solid #ffcc80; }

/* ▼ 新着バッジがオンの時の全体カラー */
.drama-cal__item:has(.drama-cal__badge--new) { color: #fff; }
.drama-cal__item:has(.drama-cal__badge--new) .drama-cal__vod { background: #fff; }

.drama-cal__item--unext:has(.drama-cal__badge--new) { background: var(--vod-unext); }
.drama-cal__item--netflix:has(.drama-cal__badge--new) { background: var(--vod-netflix); }
.drama-cal__item--prime:has(.drama-cal__badge--new) { background: var(--vod-prime); }
.drama-cal__item--hulu:has(.drama-cal__badge--new) { background: var(--vod-hulu); }
.drama-cal__item--disney:has(.drama-cal__badge--new) { background: var(--vod-disney); }
.drama-cal__item--lemino:has(.drama-cal__badge--new) { background: var(--vod-lemino); }

/* ▼ 新着バッジがオンの時のVOD名テキストカラー反転 */
.drama-cal__item--unext:has(.drama-cal__badge--new) .drama-cal__vod { color: var(--vod-unext); }
.drama-cal__item--netflix:has(.drama-cal__badge--new) .drama-cal__vod { color: var(--vod-netflix); }
.drama-cal__item--prime:has(.drama-cal__badge--new) .drama-cal__vod { color: var(--vod-prime); }
.drama-cal__item--hulu:has(.drama-cal__badge--new) .drama-cal__vod { color: var(--vod-hulu); }
.drama-cal__item--disney:has(.drama-cal__badge--new) .drama-cal__vod { color: var(--vod-disney); }
.drama-cal__item--lemino:has(.drama-cal__badge--new) .drama-cal__vod { color: var(--vod-lemino); }

/* ▼ VODラベル（右下の小さいバッジ） */
.drama-cal__vod {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 66px;
	height: 20px;
	box-sizing: border-box;
	padding: 0 4px;
	border-radius: 10px;
	font-size: 0.6rem;
	font-weight: 700;
	white-space: nowrap;
	background: var(--cal-gold-light);
	color: #5a3d00;
	line-height: normal;
}
.drama-cal__vod--unext { background: var(--vod-unext); color: #fff; }
.drama-cal__vod--netflix { background: var(--vod-netflix); color: #fff; }
.drama-cal__vod--prime { background: var(--vod-prime); color: #fff; }
.drama-cal__vod--hulu { background: var(--vod-hulu); color: #fff; }
.drama-cal__vod--disney { background: var(--vod-disney); color: #fff; }
.drama-cal__vod--lemino { background: var(--vod-lemino); color: #fff; }
.drama-cal__vod--telasa { background: var(--vod-telasa); color: #fff; }
.drama-cal__vod--fod { background: var(--vod-fod); color: #fff; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   レスポンシブ
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media ( max-width: 600px ) {
	.drama-cal__header { padding: 10px 12px; }
	.drama-cal__view-switch { margin-right: 6px; }
	
	/* ▼ スマホ時：年月の中央配置を解除し、前月ボタンの右横へ */
	.drama-cal__month {
		position: static;      /* 絶対配置を解除 */
		transform: none;       /* ズレをリセット */
		margin-left: 8px;      /* 前月ボタンとの隙間 */
		font-size: 0.95rem;
	}
	
	.drama-cal__nav { font-size: 0.72rem; padding: 5px 9px; }
	.dc-grid__cell { padding: 2px 2px 42px 2px; min-height: 60px; }
}