/* AI Seichi CMS - 基本スタイル（特定テーマに依存しない最小限のCSS） */

.asc-usage-box {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-left: 4px solid #2271b1;
	padding: 10px 14px;
	margin: 16px 0;
}

.asc-usage-table {
	margin-top: 8px;
	border-collapse: collapse;
}
.asc-usage-table th,
.asc-usage-table td {
	padding: 4px 12px 4px 0;
	text-align: left;
	font-weight: normal;
}
.asc-usage-table th {
	color: #555;
	white-space: nowrap;
}

.asc-generate-spinner.spinner {
	visibility: hidden;
	float: none;
	margin: 0 0 0 6px;
	vertical-align: middle;
}
.asc-generate-spinner.is-active {
	visibility: visible;
}

.asc-generate-result {
	font-size: 12px;
	line-height: 1.5;
	white-space: pre-line;
}
.asc-generate-result.is-error {
	color: #b32d2e;
}
.asc-generate-result.is-success {
	color: #1a7a1a;
}

.asc-debug-output {
	background: #1e1e1e;
	color: #d0d0d0;
	padding: 8px;
	border-radius: 4px;
	font-size: 11px;
	max-height: 260px;
	overflow: auto;
	margin-top: 8px;
}
.asc-debug-output pre {
	white-space: pre-wrap;
	word-break: break-word;
	margin: 4px 0 10px;
}

.asc-history-box {
	margin-top: 16px;
	border-top: 1px solid #e2e2e2;
	padding-top: 10px;
}
.asc-history-box h4 {
	margin: 0 0 6px;
}
.asc-history-list {
	margin: 0;
	padding-left: 18px;
	font-size: 12px;
	color: #555;
}
.asc-history-list li {
	margin-bottom: 4px;
}

/* ---- 実行前確認モーダル ---- */
.asc-confirm-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.asc-confirm-modal {
	background: #fff;
	border-radius: 6px;
	padding: 20px 24px;
	max-width: 420px;
	width: 90%;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.asc-confirm-modal h3 {
	margin-top: 0;
}

.asc-confirm-table {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0;
}
.asc-confirm-table th,
.asc-confirm-table td {
	text-align: left;
	padding: 6px 8px;
	border-bottom: 1px solid #eee;
	font-weight: normal;
}
.asc-confirm-table th {
	color: #555;
	width: 45%;
}

.asc-confirm-buttons {
	margin-top: 16px;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

/* ---- フロント表示（作品ページ・聖地ページ） ---- */

.asc-work-page,
.asc-location-page {
	max-width: 760px;
	margin: 0 auto;
	padding: 20px;
}

.asc-tag-archive-wrap {
	/* テーマ（Astra等）のサイドバー用レイアウトが、この要素を#primaryを
	   経由しない生のflex子要素として扱うと、幅がコンテンツの最小幅まで
	   縮んでしまうことがあるため、明示的に幅いっぱいを指定して防ぐ。 */
	width: 100%;
	box-sizing: border-box;
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px;
}
/* サイドバーを表示しない設定（asc_show_sidebar OFF）の場合、テーマ（Astra等）側の
   「サイドバーあり」前提の幅指定CSSがそのまま残ってしまい、記事が中央からずれて
   左寄りに表示されることがあるため、明示的に幅いっぱいへ上書きする。 */
.asc-full-width {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.asc-tag-archive-title {
	font-size: 1.6em;
	margin-bottom: 1em;
}

.asc-work-title,
.asc-location-title {
	font-size: 1.8em;
	margin-bottom: 0.4em;
}

.asc-work-thumbnail img,
.asc-location-thumbnail img {
	width: 100%;
	height: auto;
	border-radius: 6px;
}

.asc-work-meta,
.asc-location-area {
	color: #666;
	font-size: 0.9em;
}

.asc-section {
	margin: 1.8em 0;
}

.asc-section h2 {
	font-size: 1.2em;
	border-left: 4px solid #2271b1;
	padding-left: 0.5em;
	margin-bottom: 0.6em;
}

/* テーマ側のCSSリセットで p の既定マージンが失われている場合でも、
   段落間（例：聖地紹介文章とその続きの「作品との関係」等、別フィールドとして
   個別のpタグで出力される文章）に必ず空白行分の余白ができるようにする。 */
.asc-section p,
.asc-work-article-body p {
	margin: 0 0 1.2em;
	line-height: 1.9;
}
.asc-section p:last-child,
.asc-work-article-body p:last-child {
	margin-bottom: 0;
}

/* 聖地紹介文中の『作品名』リンク（テーマ側のリンク色に関わらず青字にする）。
   ボタン類（.asc-affiliate-button等）を巻き込んで文字色を上書きしないよう、
   ボタンクラスを明示的に除外する。 */
.asc-section p a:not(.asc-affiliate-button):not(.asc-map-button) {
	color: #2271b1;
	text-decoration: underline;
}
.asc-section p a:not(.asc-affiliate-button):not(.asc-map-button):hover {
	color: #1a5a8a;
}

/* ---- 聖地カード（聖地スポット一覧・近隣聖地スポット・観光スポットで共用） ---- */
.asc-location-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.asc-location-card {
	display: block;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	background: #fff;
	transition: box-shadow 0.15s ease;
}

.asc-location-card:hover {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.asc-location-card-thumb {
	display: block;
}

.asc-location-card-thumb img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	display: block;
}

.asc-location-card-body {
	display: block;
	padding: 10px 12px 14px;
}

.asc-location-card-title {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.asc-location-card-address {
	display: block;
	font-size: 0.82em;
	color: #666;
	margin-bottom: 6px;
}

.asc-location-card-excerpt {
	display: block;
	font-size: 0.85em;
	color: #555;
	line-height: 1.5;
}

.asc-disclosure {
	font-size: 0.8em;
	color: #777;
	border-top: 1px solid #eee;
	padding-top: 10px;
}

.asc-affiliate-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}

.asc-map-embed-wrap {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	margin-bottom: 12px;
	border-radius: 6px;
	overflow: hidden;
}
.asc-map-embed-wrap iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.asc-affiliate-button,
.asc-map-button {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 4px;
	background: #2271b1;
	color: #fff;
	text-decoration: none;
	font-size: 0.95em;
}

.asc-location-map .asc-map-button,
.asc-location-map .asc-affiliate-button {
	margin: 0 8px 8px 0;
}

.asc-affiliate-button:hover,
.asc-map-button:hover {
	background: #1a5a8a;
	color: #fff;
}

.asc-sns-button {
	background: #000;
}
.asc-sns-button:hover {
	background: #333;
}

.asc-share-button {
	display: inline-block;
	margin-bottom: 16px;
	padding: 6px 14px;
	border-radius: 4px;
	background: #000;
	color: #fff;
	text-decoration: none;
	font-size: 0.85em;
}
.asc-share-button:hover {
	background: #333;
	color: #fff;
}

.asc-course-item-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.asc-course-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}
.asc-course-item-number {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #2271b1;
	color: #fff;
	font-weight: bold;
	font-size: 0.9em;
}
.asc-course-item .asc-location-card {
	flex: 1 1 auto;
}

.asc-hotel-button {
	background: #b1652a;
}
.asc-hotel-button:hover {
	background: #8a4d1f;
}

/* ---- レスポンシブ対応 ---- */
@media (max-width: 600px) {
	.asc-work-page,
	.asc-location-page {
		padding: 12px;
	}
	.asc-affiliate-links {
		flex-direction: column;
	}
	.asc-affiliate-button,
	.asc-map-button {
		text-align: center;
	}
}

/* ==========================================================
   Phase2 追加分：管理画面 - 段階実行UI
   ========================================================== */

.asc-force-refresh-label {
	margin-left: 10px;
	font-size: 12px;
	color: #555;
}

.asc-ai-off-notice {
	font-weight: 600;
}

/* ---- 候補一覧（採用/却下） ---- */
.asc-candidates-list {
	margin: 10px 0;
}

.asc-candidate-row {
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	padding: 10px 12px;
	margin-bottom: 8px;
	background: #fff;
}

.asc-candidate-main {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.asc-candidate-confidence {
	background: #eef3f8;
	color: #2271b1;
	border-radius: 3px;
	padding: 1px 6px;
	font-size: 12px;
}

.asc-candidate-source,
.asc-candidate-timestamp {
	font-size: 12px;
	color: #777;
}

.asc-candidate-status-badge {
	margin-left: auto;
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 10px;
	background: #eee;
	color: #555;
}
.asc-candidate-status-badge.asc-status-approved {
	background: #d7f3d7;
	color: #1a7a1a;
}
.asc-candidate-status-badge.asc-status-rejected {
	background: #f6d6d6;
	color: #a32323;
}

.asc-candidate-evidence {
	font-size: 12px;
	color: #666;
	margin: 6px 0 0;
}

.asc-candidate-actions {
	margin-top: 8px;
	display: flex;
	gap: 6px;
}

/* ---- 一括生成結果 ---- */
.asc-batch-list {
	margin: 10px 0 0;
	padding-left: 18px;
	font-size: 12px;
}
.asc-batch-success {
	color: #1a7a1a;
}
.asc-batch-failed {
	color: #b32d2e;
}

/* ---- 確認モーダルの追加行 ---- */
.asc-confirm-batch-row td {
	font-weight: 600;
}

/* ==========================================================
   Phase2 追加分：フロント表示
   ========================================================== */

.asc-work-attributes,
.asc-tag-list {
	list-style: none;
	padding: 0;
	margin: 6px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 0.85em;
}

.asc-work-attributes li {
	background: #f3f3f3;
	border-radius: 3px;
	padding: 2px 8px;
	color: #555;
}

.asc-tag-list li a {
	background: #eef3f8;
	color: #2271b1;
	border-radius: 12px;
	padding: 3px 10px;
	text-decoration: none;
	font-size: 0.9em;
}
.asc-tag-list li a:hover {
	background: #d9e8f5;
}

.asc-tag-list li.asc-tag-attribute {
	background: #f3f3f3;
	color: #666;
	border-radius: 12px;
	padding: 3px 10px;
	font-size: 0.9em;
}

.asc-work-article-body {
	line-height: 1.9;
}

.asc-gourmet-button {
	background: #b17c2a;
}
.asc-gourmet-button:hover {
	background: #8a611f;
}

.asc-furusato-button {
	background: #a13a4e;
}
.asc-furusato-button:hover {
	background: #7d2d3d;
}

/* ---- 聖地巡礼診断クイズ（[asc_fortune_quiz]） ---- */
.asc-quiz-widget {
	max-width: 700px;
	margin: 0 auto;
}

.asc-quiz-question {
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 16px 20px;
	margin-bottom: 16px;
}
.asc-quiz-question legend {
	font-weight: bold;
	padding: 0 6px;
}

.asc-quiz-answers {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
}

.asc-quiz-answer {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
}
.asc-quiz-answer:hover {
	background: #f5f8fb;
}

.asc-quiz-submit {
	display: block;
	width: 100%;
	padding: 12px;
	font-size: 1.05em;
}

.asc-quiz-result {
	text-align: center;
}
.asc-quiz-result-lead {
	font-size: 1.1em;
	font-weight: bold;
	margin-bottom: 16px;
}
.asc-quiz-result-card {
	max-width: 320px;
	margin: 0 auto 16px;
}
.asc-quiz-retry {
	display: inline-block;
	margin-top: 12px;
}

.asc-store-button,
.asc-experience-button,
.asc-inbound-button {
	background: #4a7c59;
}
.asc-store-button:hover,
.asc-experience-button:hover,
.asc-inbound-button:hover {
	background: #386345;
}

.asc-store-links-label {
	font-size: 0.85em;
	color: #666;
	margin: 12px 0 6px;
}

/* ---- Amazon 2x2ボタングリッド（作品ページ「ストーリー」直後） ---- */
.asc-amazon-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin: 16px 0;
}
.asc-amazon-grid .asc-affiliate-button {
	text-align: center;
}
@media (max-width: 480px) {
	.asc-amazon-grid {
		grid-template-columns: 1fr;
	}
}

.asc-adsense-slot {
	margin: 24px 0;
	text-align: center;
}
.asc-adsense-placeholder {
	border: 1px dashed #ccc;
	color: #999;
	font-size: 0.85em;
	padding: 16px;
	border-radius: 4px;
}

/* ---- 検索・一覧ウィジェット（[asc_work_search] 等） ---- */
.asc-search-widget {
	max-width: 900px;
	margin: 0 auto;
}

.asc-search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
	margin-bottom: 20px;
	padding: 14px;
	background: #f7f7f7;
	border-radius: 6px;
}

.asc-search-field {
	display: flex;
	flex-direction: column;
	font-size: 0.85em;
	gap: 4px;
}

.asc-search-results {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px;
}

.asc-search-result-item a {
	display: block;
	text-decoration: none;
	color: inherit;
	text-align: center;
}

.asc-search-thumb img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	margin-bottom: 6px;
}

.asc-search-pagination {
	margin-top: 20px;
	text-align: center;
}

/* ---- [asc_home_gallery]：トップページ用ギャラリー ---- */
.asc-home-gallery {
	max-width: 1100px;
	margin: 0 auto;
}

.asc-gallery-section {
	padding: 28px 20px;
}
.asc-gallery-section-alt {
	background: #f7f7f8;
}

.asc-gallery-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.asc-gallery-badge {
	display: inline-block;
	background: #d6336c;
	color: #fff;
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 0.95em;
	font-weight: 600;
}
.asc-badge-new {
	background: #d6336c;
}
.asc-badge-tags {
	background: #d6336c;
}

.asc-gallery-viewall {
	color: #d6336c;
	text-decoration: none;
	font-size: 0.9em;
	font-weight: 600;
	white-space: nowrap;
}
.asc-gallery-viewall:hover {
	text-decoration: underline;
}

.asc-gallery-carousel-wrap {
	position: relative;
}

.asc-gallery-carousel {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 6px;
	scrollbar-width: thin;
}

.asc-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
}

.asc-gallery-work-card {
	flex: 0 0 auto;
	width: 170px;
	scroll-snap-align: start;
	display: block;
	text-decoration: none;
	color: inherit;
}
.asc-gallery-grid .asc-gallery-work-card {
	width: auto;
}

.asc-gallery-work-thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: 8px;
	overflow: hidden;
	background: #eee;
}

.asc-gallery-work-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.asc-gallery-no-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #999;
	font-size: 0.85em;
	letter-spacing: 0.05em;
}

.asc-gallery-rank {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #666;
	color: #fff;
	font-size: 0.78em;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
}
.asc-gallery-rank-1 {
	background: #d4a017;
}
.asc-gallery-rank-2 {
	background: #9aa0a6;
}
.asc-gallery-rank-3 {
	background: #b5651d;
}

.asc-gallery-work-body {
	display: block;
	padding-top: 8px;
}

.asc-gallery-work-year {
	display: block;
	font-size: 0.78em;
	color: #999;
}

.asc-gallery-work-title {
	display: block;
	font-weight: 600;
	font-size: 0.95em;
	margin: 2px 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.asc-gallery-work-spots {
	display: block;
	font-size: 0.8em;
	color: #888;
}

.asc-gallery-nav {
	position: absolute;
	top: 40%;
	right: -6px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	font-size: 1em;
	color: #444;
}
.asc-gallery-nav:hover {
	background: #f5f5f5;
}

.asc-gallery-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 10px;
}
.asc-gallery-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ddd;
}
.asc-gallery-dot.is-active {
	background: #d6336c;
	width: 16px;
	border-radius: 3px;
}

.asc-gallery-tag-cloud {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.asc-gallery-tag-cloud li a {
	display: inline-block;
	background: #fff;
	border: 1px solid #eee;
	color: #555;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 0.88em;
	text-decoration: none;
}
.asc-gallery-tag-cloud li a:hover {
	background: #fbe4ec;
	border-color: #f3c4d6;
	color: #d6336c;
}

@media (max-width: 480px) {
	.asc-gallery-work-card {
		width: 130px;
	}
	.asc-gallery-section {
		padding: 20px 14px;
	}
}

/* ---- 聖地ページ：周辺ホテルカルーセル（楽天トラベル） ---- */
.asc-hotel-section .asc-gallery-carousel-wrap {
	margin-bottom: 10px;
}

.asc-hotel-card {
	flex: 0 0 auto;
	width: 200px;
	scroll-snap-align: start;
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.asc-hotel-card-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #eee;
}
.asc-hotel-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.asc-hotel-card-body {
	display: block;
	padding: 8px 10px 12px;
}

.asc-hotel-card-name {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	line-height: 1.4;
	margin-bottom: 4px;
}

.asc-hotel-card-price {
	display: block;
	font-size: 0.85em;
	color: #b1652a;
	font-weight: 600;
}

.asc-hotel-disclaimer {
	margin: 4px 0 14px;
}

/* ---- 管理画面：周辺ホテル一覧 ---- */
.asc-hotel-admin-items {
	margin: 6px 0;
	padding-left: 18px;
	font-size: 13px;
}

/* ---- 管理画面：観光スポット管理 ---- */
.asc-tourist-fetch-form {
	background: #fff;
	border: 1px solid #ccd0d4;
	padding: 14px 16px;
	margin: 12px 0;
}
.asc-tourist-fetch-form label {
	margin-right: 16px;
	font-weight: 600;
}
.asc-tourist-fetch-form input[type="text"] {
	margin-left: 6px;
	font-weight: normal;
}
.asc-tourist-spot-thumb {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 4px;
	margin-right: 4px;
	vertical-align: middle;
}

/* ---- 管理画面：聖地自体の写真プレビュー ---- */
.asc-location-photo-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0;
}
.asc-location-photo-thumbs img {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #ddd;
}

/* ---- フロント表示：聖地について欄への挿入写真 ---- */
.asc-location-story-photos {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 14px 0;
}
.asc-location-story-photos img {
	width: 100%;
	max-width: 260px;
	height: 180px;
	object-fit: cover;
	border-radius: 8px;
	flex: 1 1 220px;
}
