/* --- 本家 CSS 完全同期 --- */
/*body { font-family: "Helvetica Neue", Arial, sans-serif; margin: 0; padding: 0; font-size: 14px; color: #333; background-color: #f4f7f9; display: flex; flex-direction: column; min-height: 150vh; }
body::before { content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 150vh; z-index: -1; background: url('https://mksoul-pro.com/showroom/tool/event_gift_cal/img/logo_back_004-2_new.png') repeat; background-position: 50% 0%; }*/

/* --- body自体の設定を見直す --- */
body { 
	font-family: "Helvetica Neue", Arial, sans-serif; 
	margin: 0; 
	padding: 0; 
	font-size: 14px; 
	color: #333; 

	/* ▼【重要】bodyの背景設定を完全に無効化して白にする */
	background-image: none !important; 
	background-attachment: scroll !important;
	background-color: #fff; 

	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* --- ::before にすべての背景を任せる --- */
body::before {
	content: "";
	position: fixed;
	top: 0; 
	left: 0; 
	width: 100%; 
	/* 150vhに設定して、隙間が出ないように余裕を持たせる */
	height: 150vh; 
	z-index: -1;

	/* 背景画像の設定 */
	background-image: url('https://mksoul-pro.com/showroom/tool/event_gift_cal/img/logo_back_004-2_new.png');
	background-repeat: repeat;
	background-position: 50% 0%;
	background-color: #fff; /* 画像の隙間から見えないように白を敷く */

	/* iPhoneのガタつきを止める魔法 */
	-webkit-transform: translate3d(0, 0, 0);
	transform: translate3d(0, 0, 0);
}

.container { max-width: 1000px; width: 100%; margin: 0 auto; padding: 20px 15px 40px; background: rgba(244, 247, 249, 0.75); backdrop-filter: blur(2.5px); -webkit-backdrop-filter: blur(8px); border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); box-sizing: border-box; flex: 1; }
@media screen and (min-width: 1025px) { .container { margin-top: 30px; margin-bottom: 30px; } }
@media screen and (max-width: 1024px) { .container { margin-top: 0; margin-bottom: 0; border-radius: 0; backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(1px); background: rgba(244, 247, 249, 0.75); padding: 12px 10px 30px; } }

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(25, 25, 25, 0.9); backdrop-filter: blur(4px); color: #fff; padding: 15px; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.site-header a { color: #fff; text-decoration: none; font-size: 20px; font-weight: bold; }
.site-header a.site-header-sub { font-size: 11px; font-weight: normal; color: #cbd5e1; }
.site-header a.site-header-sub:hover { color: #fff; text-decoration: underline; }
.site-header-sub-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.site-header-sub-links .site-header-sub-sep { font-size: 11px; color: #6b7280; }

/* お気に入り登録ボタンのスタイルは、下記の共通 .fav-star-btn を使用する
   （event_monitor.php / room_history.php / favorites.php で完全に統一） */

/*================================================
 *  お気に入り一覧ページ（favorites.php）
 ================================================*/
.fav-summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.fav-count { font-size: 12px; color: #6b7280; }
.fav-clear-all-btn {
    padding: 6px 12px; background: #fff; border: 1px solid #d1d5db; border-radius: 4px;
    font-size: 12px; color: #dc2626; cursor: pointer;
}
.fav-empty { background: #fff; padding: 25px; border: 1px solid #ddd; border-radius: 8px; text-align: center; color: #666; font-size: 13px; }
.fav-empty a { color: #2563eb; }
.fav-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); overflow: hidden; }
.fav-card-header {
    display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 12px; border-bottom: 1px solid #eee; background: #f8f9fa;
}
/* ルーム名＋参加履歴アイコン＋お気に入り解除アイコンをひとまとまりにし、event_monitor.phpのランキング行と同じ並びに揃える */
.fav-card-title { flex: 1; min-width: 120px; }
.fav-card-title a.fav-room-name-link { color: #2563eb; text-decoration: none; font-weight: bold; font-size: 13.5px; word-break: break-all; }

/* 参加履歴アイコン（④のリンクルール：ルーム名はSHOWROOMプロフィール、アイコンは参加履歴へ） */
.room-history-icon {
    display: inline-block;
    margin-left: 4px;
    text-decoration: none;
    font-size: 12px;
    opacity: 0.7;
}
.room-history-icon:hover { opacity: 1; }

/* 暫定結果ラベル（終了後、翌正午より前のイベントに表示。event_monitor.phpと共通仕様） */
.provisional-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 3px;
    font-size: 10px;
    font-weight: normal;
    padding: 1px 5px;
    margin-left: 6px;
    white-space: nowrap;
    vertical-align: middle;
}
/* event_monitor.phpのランキング行と同デザインの☆/★ボタン（お気に入り一覧では常に★＝解除アクション） */
.fav-star-btn {
    display: inline-block;
    margin-left: 4px;
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 1px 4px;
    vertical-align: middle;
}
.fav-star-btn.is-active { color: #f59e0b; border-color: #f59e0b; background: #fffbeb; }
.fav-star-btn:hover { color: #f59e0b; border-color: #f59e0b; }

/* ウォッチリスト登録ボタン（お気に入り☆と同系統の意匠。対象がイベント単位なので📌で区別） */
.watch-star-btn {
    display: inline-block;
    margin-left: 4px;
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 1px 4px;
    vertical-align: middle;
}
.watch-star-btn.is-active { color: #2563eb; border-color: #2563eb; background: #eff6ff; }
.watch-star-btn:hover { color: #2563eb; border-color: #2563eb; }

/* 並び替え（▲▼）は、誤操作防止のためタイトルから分離し右端に配置 */
.fav-btn-group { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.fav-move-btn {
    background: #fff; border: 1px solid #d1d5db; border-radius: 4px; color: #4b5563;
    font-size: 11px; width: 26px; height: 26px; cursor: pointer; line-height: 1;
}
.fav-move-btn:disabled { color: #d1d5db; cursor: default; background: #f8f9fa; }
.fav-move-btn:not(:disabled):hover { border-color: #2563eb; color: #2563eb; }
.fav-card-body { padding: 10px 12px; }
.fav-no-event { font-size: 12px; color: #9ca3af; }
.fav-event-row { padding: 8px 0; border-bottom: 1px dashed #eee; }
.fav-event-row:last-child { border-bottom: none; }
.fav-event-row a { color: #2563eb; text-decoration: none; font-size: 13px; }
.fav-event-meta { font-size: 12px; color: #374151; margin-top: 3px; }
.fav-event-period { font-size: 11px; color: #9ca3af; margin-top: 2px; }

.section-title { 
	font-size: 19px;
	border-left: 7px solid #ff2d55;
	padding-left: 7px; 
	margin: 40px 0 20px; 
	font-weight: 900;
	color: #000; 
	/* 背景との境界をはっきりさせるため、文字に薄い白の影をつける */
	text-shadow: 2px 2px 2px rgba(255, 255, 255, 0.8), -1px -1px 0 rgba(255, 255, 255, 0.8);
}
.section-title span { font-size: 0.65em; color: #666; }
.section-title-top { font-size: 19px; border-left: 7px solid #ff2d55; padding-left: 7px; margin: 20px 0 20px; font-weight: 900; color: #000; text-shadow: 2px 2px 2px rgba(255, 255, 255, 0.8), -1px -1px 0 rgba(255, 255, 255, 0.8); }
.section-title-top span { font-size: 0.65em; color: #666; }

.accordion-btn { background: rgba(238, 238, 238, 0.9); border: 1.5px solid #bbb; padding: 14px; width: 100%; text-align: left; cursor: pointer; font-weight: bold; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; color: #222; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.accordion-content { display: none; margin-top: 15px; }
.accordion-content.open { display: block; }

/* 画像一覧（Grid）の修正：中央配置を徹底 */
.new-avatar-grid-scroll { max-height: 70vh; overflow-y: auto; border: 1px solid #ddd; border-radius: 8px; background: #000; padding: 15px; box-sizing: border-box; margin-bottom: 25px; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; margin-bottom: 0px; }
@media screen and (max-width: 768px) { .avatar-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); } }

.avatar-card { background: #fff; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); transition: all 0.2s ease; }
.avatar-card a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.avatar-card img { width: 85%; height: 85%; object-fit: contain; display: block; }
.avatar-card:hover { transform: scale(1.3); z-index: 10; animation: shake 0.4s infinite; box-shadow: 0 8px 20px rgba(0,0,0,0.3); }

/* ルーム名一覧（Table）の修正：本家の rank-table / new-avatar-table 仕様に合致 */
.scroll-container { max-height: 70vh; overflow-y: auto; border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.new-avatar-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.new-avatar-table th { position: sticky; top: 0; background: #eee; z-index: 5; padding: 10px; font-size: 13px; border-bottom: 2px solid #ddd; border-right: 1px solid #ddd; }
.new-avatar-table td { padding: 8px; border-bottom: 1px solid #eee; vertical-align: middle; border-right: 1px solid #ddd; }
.new-avatar-table td:last-child { border-right: none; }

.new-img { width: 70px; text-align: center; padding: 5px !important; }
/* 本家の .room-previews img や .mini-grid img のスタイルを適用 */
.new-avatar-table img { width: 50px; height: 50px; display: block; margin: 0 auto; border-radius: 4px; border: 1px solid #eee; object-fit: contain; aspect-ratio: 1/1; background: #fff; }

.room-link { color: #007bff; text-decoration: none; font-weight: bold; font-size: 15px; display: inline-block; word-break: break-all; }

@media screen and (min-width: 769px) { 
	.new-img { width: 120px; min-width: 120px; } 
	.new-avatar-table img { width: 100px; height: 100px; } 
	.room-link { font-size: 16px; } 
	.new-avatar-table td { padding: 10px 15px; box-sizing: border-box; }
}

/* ページネーション & リンク */
.pager { margin: 30px 0; display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; align-items: center; }
.pager a { display: flex; align-items: center; justify-content: center; min-width: 35px; height: 35px; background: #fff; border: 1px solid #ddd; text-decoration: none; color: #333; border-radius: 4px; font-weight: bold; }
.pager a.current { background: #ff2d55; color: #fff; border-color: #ff2d55; }

/* --- 関連リンク：控えめなスタイル --- */
.related-links {
	margin-top: 50px;
	padding-top: 30px;
	border-top: 1px dashed #ccc; /* 境界を点線にして圧迫感を減らす */
}
.related-links-title {
	font-size: 14px;
	font-weight: bold;
	color: #666;
	margin-bottom: 15px;
}
.link-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px; /* 横に並べる */
}
.link-list li {
	font-size: 13px;
	display: flex;          /* 中の要素を制御しやすくする */
	align-items: center;    /* 垂直方向の中央に揃える */
	line-height: 1.2;       /* 行の高さを一定にする */
}
.link-list a {
	color: #007bff;
	text-decoration: none;
}
.link-list a:hover {
	text-decoration: underline;
}
/* スマホでは縦並びに近い形にする */
@media screen and (max-width: 768px) {
	.link-list { flex-direction: column; gap: 8px; }
}

/* --- ここから追加：ライバー募集案内用の専用スタイル --- */

/* 案内エリア全体の箱 */
.recruitment-container {
	background-image: url(https://mksoul-pro.com/images/ffffff.png);
	border: 2px solid #ff9000;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	border-radius: 8px;
	padding: 20px 30px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 25px; /* 下の「関連リンク」タイトルとの距離 */
	text-align: center;
}

/* テキスト部分 */
.recruitment-container .info-block { flex: 1; }
.recruitment-container .info-title { font-weight: bold; font-size: 1.4em; color: #333; line-height: 1.5; margin: 0 0 12px 0; }
.recruitment-container .info-text { font-size: 1.05em; color: #555; line-height: 1.5; margin: 0; }
.recruitment-container .info-text2 { font-size: 1.05em; color: #0000ff; line-height: 1.5; margin: 10px 0 0 0; }

/* バナーボタン */
.banner-button-wrap { flex-shrink: 0; }
.banner-button { 
	display: inline-block; 
	transition: all 0.3s ease; 
	filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4)); 
}
.banner-button img { display: block; max-width: 320px; height: auto; border-radius: 0px; }
.banner-button:hover { filter: brightness(1.1) drop-shadow(0 3px 5px rgba(0,0,0,0.5)); transform: translateY(2px); }

/* 改行制御 */
.pc-none { display: none; }

/* スマホ・タブレット（1024px以下）の調整 */
@media screen and (max-width: 1024px) {
	.pc-none { display: inline; }
}

/* スマホ（767px以下）のレイアウト切り替え */
@media screen and (max-width: 767px) {
	.recruitment-container { flex-direction: column; padding: 15px 10px; }
	.recruitment-container .info-title { font-size: 1.15em; }
	.recruitment-container .info-text, 
	.recruitment-container .info-text2 { font-size: 0.9em; }
	.banner-button img { width: 100%; max-width: 300px; }
}


.copyright { padding: 25px 0; font-size: 11px; text-align: center; color: #efede9; background: #2e2e2e; }

@keyframes shake { 0% { transform: scale(1.3) rotate(0deg); } 25% { transform: scale(1.3) rotate(3deg); } 50% { transform: scale(1.3) rotate(0deg); } 75% { transform: scale(1.3) rotate(-3deg); } 100% { transform: scale(1.3) rotate(0deg); } }

a.guide {
	color: #007bff;
	text-decoration: none;
}
a.guide:hover {
	text-decoration: underline;
}


/* --- アコーディオン全体 --- */
.mksoul-accordion {
  width: 100%;
}

/* --- バナー全体の基本設定（スマホ） --- */
summary.mksoul-line-banner {
  display: flex !important; 
  align-items: center;
  justify-content: center;
  background: linear-gradient(93deg, #2CCA13 6.42%, #009C48 100%);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.05em;
  border-radius: 14px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
  padding: 8px 16px;
  font-family: "Noto Sans JP", sans-serif;
  transition: opacity 0.3s;
  width: 100%; /* 全幅表示 */
  box-sizing: border-box;
  margin-bottom: 18px;
  font-size: 1.1rem;
  
  cursor: pointer;
  list-style: none;
  outline: none;
  position: relative;
}

summary.mksoul-line-banner::-webkit-details-marker { display: none; }
summary.mksoul-line-banner:hover { opacity: 0.8; }

/* LINEアイコン */
summary.mksoul-line-banner::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 8px;
  background: url("https://mksoul-pro.com/images/line.webp") no-repeat center;
  background-size: contain;
  flex-shrink: 0;
}

/* 「by MKsoul」を小さくする設定（元の比率を維持） */
.mksoul-line-banner .small-text {
  font-size: 0.7em;
  font-weight: 400;
  margin-left: 5px;
  opacity: 0.9;
}

/* アコーディオン矢印アイコン */
.acc-icon-2 {
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
  transition: 0.3s;
  margin-right: 5px;
}
details[open] .acc-icon-2 {
  transform: rotate(-135deg);
  margin-top: 6px;
}

/* --- 中身のコンテンツデザイン --- */
.acc-content {
  background: #fff;
  border: 2px solid #2CCA13;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 20px 15px 7px 15px;
  text-align: left;
  box-sizing: border-box;
  margin-top: -18px; 
  margin-bottom: 18px;
}

.acc-header { text-align: center; margin-bottom: 15px; }
.acc-badge {
  display: inline-block;
  background: #f2fff0;
  color: #2CCA13;
  border: 1px solid #2CCA13;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: bold;
  margin-bottom: 8px;
}
.main-copy { font-size: 0.95rem; font-weight: bold; line-height: 1.5; color: #333; margin: 0; }

.acc-section { margin-bottom: 15px; padding: 12px; background: #f8f8f8; border-radius: 8px; }
.section-title-2 { display: block; font-size: 0.9rem; font-weight: bold; color: #009C48; margin-bottom: 10px; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.case-item { background: #fff; border: 1px solid #e0e0e0; padding: 6px; font-size: 0.8rem; border-radius: 4px; text-align: center; color: #555; }

.acc-section.alert { background: #fff5f5; border: 1px solid #ffeded; }
.acc-section.alert p { margin: 0; font-size: 0.8rem; line-height: 1.5; color: #d63031; }

.mksoul-line-btn-real {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #06C755;
  color: #fff !important;
  text-decoration: none !important;
  padding: 14px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.acc-footer { margin-top: 15px; font-size: 0.75rem; text-align: center; color: #999; }
.sp-only { display: block; }

/* --- PC表示の調整（PCでも100%幅を維持） --- */
@media screen and (min-width: 768px) {
  .mksoul-accordion {
	width: 100%; /* 親要素に合わせて100%に */
	margin: 0 auto;
  }
  
  .main-copy { font-size: 1.0rem; font-weight: bold; line-height: 1.5; color: #333; margin: 0; }
  
  .section-title-2 { display: block; font-size: 1.0rem; font-weight: bold; color: #009C48; margin-bottom: 10px; }
  
  .acc-section.alert p { margin: 0; font-size: 0.9rem; line-height: 1.5; color: #d63031; }
  
  summary.mksoul-line-banner {
	display: flex !important; /* inline-flexからflexに変更し全幅へ */
	width: 100%;
	font-size: 1.5rem;
	padding: 12px 24px;
	border-radius: 30px;
	margin-bottom: 21px; 
  }
  
  summary.mksoul-line-banner::before {
	width: 1.8rem;
	height: 1.8rem;
	margin-right: 12px;
  }
  
  .acc-content { 
	margin-top: -21px; 
	margin-bottom: 21px; 
	padding: 20px 20px 7px 20px; /* PCは少し広めに */
  }

  .sp-only-2 { display: none; }
  .case-grid { grid-template-columns: repeat(4, 1fr); }
}

/*================================================
 *  ページトップへの戻り
 ================================================*/
.totop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.totop.is-show {
    opacity: 1;
    visibility: visible;
}
.totop a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #ff9000;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background 0.2s;
}
.totop a:hover {
    background: #a12a00;
}
/* 矢印アイコンの簡易CSS（画像を使用しない場合のフォールバックとしても機能） */
.totop a::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: translateY(3px) rotate(-45deg);
}

/*================================================
 *  スクロール追従の「最新の状況に更新」ボタン
 ================================================*/
.refresh-fab {
    position: fixed;
    /* totopボタン（bottom:20px, height:45px）の少し上に重ねて配置 */
    bottom: 75px;
    right: 20px;
    z-index: 100;
}
.refresh-fab button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.15s;
    padding: 0;
}
.refresh-fab button:hover {
    background: #1d4ed8;
}
.refresh-fab button:active {
    transform: scale(0.92);
}
.refresh-fab button:disabled {
    cursor: default;
    opacity: 0.85;
}
/* 更新アイコン（circular arrow）をCSSのみで表現 */
.refresh-fab .refresh-icon {
    display: block;
    width: 18px;
    height: 18px;
    border: 2.5px solid #fff;
    border-right-color: transparent;
    border-radius: 50%;
    position: relative;
}
.refresh-fab .refresh-icon::before {
    content: "";
    position: absolute;
    top: -4px;
    right: -1px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid #fff;
    transform: rotate(45deg);
}
/* 更新中はアイコンを回転させてローディング表現に */
.refresh-fab button.is-loading .refresh-icon {
    animation: refresh-spin 0.8s linear infinite;
}
@keyframes refresh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* 更新完了時に一瞬フラッシュさせるフィードバック */
.refresh-fab button.is-done {
    background: #16a34a;
}