@charset "utf-8";
/* -------------------------------------------------------------------
 切り抜き人物作成
 建築パース.com 共通スタイル（/common/css/*）の上に、本文の中だけを足す。
 このページはサイドバーを置かず、本文をコンテナ全幅（910px）で使う。
 既存スタイルとぶつからないよう、すべて #hg の中に限定している。
 ------------------------------------------------------------------ */

/* サイドバーなしで本文を全幅に（スマホ時は共通の local_sp.css が 100% にする） */
#maincontainer #main.hg-main {
	float: none;
	width: auto;
}

#hg {
	--hg-text: #333333;
	--hg-sub: #666666;
	--hg-line: #CCCCCC;
	--hg-line-dark: #BBBBBB;
	--hg-chip: #EEEEEE;
	--hg-chip-on: #999999;
	--hg-panel: #F6F6F6;
	--hg-dark: #333333;
	--hg-accent: #2AA7B5;   /* 見出しの青緑ラインに合わせたアクセント */
	--hg-error: #CC0000;
	color: var(--hg-text);
}
#hg [hidden] { display: none !important; }
#hg *, #hg *::before, #hg *::after { box-sizing: border-box; }

#hg p.hg-lead { margin: 15px 0 10px 0; }

/* 見出し（既存の h2.choice を利用。インデックスと同じ見た目に） */
#main.hg-main h2.choice {
	margin: 28px 0 12px 0;
	padding-bottom: 4px;
	border-bottom: 3px solid #CCCCCC;
	font-size: 130%;
	font-weight: bold;
}

/* 条件の選択（カテゴリボタンと同じ見た目） */
#hg fieldset {
	display: flex;
	gap: 0 10px;
	margin: 0;
	padding: 8px 0;
	border: 0;
	border-bottom: 1px dotted var(--hg-line);
	min-width: 0;
}
#hg legend {
	float: left;
	width: 7.5em;
	flex: none;
	padding: 5px 0 0 0;
	font-weight: bold;
	line-height: 1.5;
}
#hg fieldset[disabled] { opacity: 0.45; }
#hg .chips { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; min-width: 0; }
#hg .chip { position: relative; margin: 0; }
#hg .chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
#hg .chip span {
	display: inline-block;
	min-width: 4.5em;
	padding: 4px 10px;
	border: 1px solid var(--hg-line);
	border-radius: 10px;
	background: var(--hg-chip);
	text-align: center;
	line-height: 1.6;
	cursor: pointer;
	user-select: none;
}
#hg .chip input:hover + span { background: #E2E2E2; }
#hg .chip input:checked + span { background: var(--hg-chip-on); border-color: var(--hg-chip-on); color: #FFFFFF; font-weight: bold; }
#hg .chip input:focus-visible + span { outline: 2px solid var(--hg-accent); outline-offset: 2px; }
#hg .chip input:disabled + span { opacity: 0.4; cursor: not-allowed; }

/* 細かく指定 */
#hg .hg-field { display: block; margin: 8px 0 0 0; }
#hg .hg-field span { display: block; color: var(--hg-sub); }
#hg .hg-field input, #hg .hg-count select {
	width: 100%;
	padding: 5px 8px;
	border: 1px solid var(--hg-line-dark);
	border-radius: 3px;
	background: #FFFFFF;
	font: inherit;
	color: var(--hg-text);
}

/* 生成ボタン */
#hg .hg-submit {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	margin: 16px 0 0 0;
	padding: 12px;
	border: 1px solid var(--hg-line-dark);
	background: var(--hg-panel);
}
#hg .hg-count { width: 6em; flex: none; margin: 0; }
#hg .hg-count span { display: block; color: var(--hg-sub); }
#hg #go {
	flex: 1;
	padding: 9px 16px;
	border: 0;
	border-radius: 4px;
	background: var(--hg-dark);
	color: #FFFFFF;
	font: inherit;
	font-size: 115%;
	font-weight: bold;
	cursor: pointer;
}
#hg #go:hover { background: #000000; }
#hg #go:disabled { background: #888888; cursor: progress; }
#hg .hg-error { margin: 8px 0 0 0; color: var(--hg-error); font-weight: bold; }

/* 結果：地面線と身長目盛のあるシート */
#hg .hg-sheet {
	position: relative;
	height: 440px;
	border: 1px solid var(--hg-line-dark);
	background-color: #FFFFFF;
	background-image:
		linear-gradient(#F0F0F0 1px, transparent 1px),
		linear-gradient(90deg, #F0F0F0 1px, transparent 1px);
	background-size: 30px 30px;
	overflow: hidden;
}
#hg .hg-ground {
	position: absolute; left: 0; right: 0; bottom: 44px; z-index: 1;
	border-top: 1px solid #666666;
}
#hg .hg-scale {
	position: absolute; left: 14px; bottom: 44px; z-index: 2;
	height: calc((100% - 74px) * 0.85); /* = 大人の人物の高さ */
	border-left: 1px solid var(--hg-accent);
	font-size: 10px; color: var(--hg-accent);
}
#hg .hg-scale::before, #hg .hg-scale::after { content: ""; position: absolute; left: -4px; width: 7px; border-top: 1px solid var(--hg-accent); }
#hg .hg-scale::before { top: 0; }
#hg .hg-scale::after { bottom: 0; }
#hg .hg-scale span { position: absolute; top: 50%; left: 5px; transform: translateY(-50%) rotate(-90deg); transform-origin: left center; white-space: nowrap; }

#hg .hg-figures {
	position: absolute; z-index: 2;
	left: 40px; right: 12px; top: 30px; bottom: 44px;
	display: flex; align-items: flex-end; justify-content: safe center; gap: 24px;
	overflow-x: auto; overflow-y: hidden; /* 5枚・10枚のときは横にスクロール（人物の大きさは揃えたまま） */
	padding: 0 8px;
}
#hg .empty { align-self: center; margin: 0; color: var(--hg-sub); text-align: center; }

#hg .figure {
	height: calc(85% * var(--h, 1));
	flex: none;
	display: flex; align-items: flex-end;
	position: relative;
	padding: 0; border: 0; background: none; cursor: pointer;
}
#hg .figure img { height: 100%; width: auto; object-fit: contain; object-position: bottom; display: block; }
#hg .figure[aria-pressed="true"]::after {
	content: ""; position: absolute; left: -6px; right: -6px; bottom: -8px;
	border-bottom: 3px solid var(--hg-accent);
}
#hg .figure:focus-visible { outline: 2px dashed var(--hg-accent); outline-offset: 5px; }

#hg .ghost {
	flex: none;
	height: 85%; aspect-ratio: 0.42;
	border: 1px dashed #999999;
	border-radius: 40% 40% 4px 4px / 14% 14% 4px 4px;
	opacity: 0.6;
	animation: hg-breathe 1.6s ease-in-out infinite;
}
@keyframes hg-breathe { 50% { opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) { #hg .ghost { animation: none; } }

/* 選択中の素材とダウンロード */
#hg .hg-detail {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
	margin: 10px 0 0 0;
	padding: 10px 12px;
	border: 1px solid var(--hg-line-dark);
	background: var(--hg-panel);
}
#hg .hg-detail-meta { color: var(--hg-sub); }
#hg .hg-detail-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#hg .dl {
	display: inline-block;
	padding: 5px 12px;
	border: 1px solid var(--hg-dark);
	border-radius: 4px;
	background: var(--hg-dark);
	color: #FFFFFF !important;
	font: inherit;
	font-weight: bold;
	text-decoration: none !important;
	line-height: 1.6;
	cursor: pointer;
}
#hg .dl.secondary { background: #FFFFFF; color: var(--hg-dark) !important; }
#hg .dl.secondary:disabled { opacity: 0.5; cursor: progress; }
#hg .hg-note, #hg .note { margin: 8px 0 0 0; font-size: 92%; color: var(--hg-sub); }


/* 関連ページ（他の素材ページの「関連ページ」と同じ並び） */
#hg .hg-related { margin: 30px 0 0 0; padding: 10px 12px; border: 1px solid var(--hg-line-dark); }
#hg .hg-related p { margin: 0 0 4px 0; font-weight: bold; }
#hg .hg-related ul { margin: 0; padding: 0 0 0 1.2em; list-style: disc; }
#hg .hg-related li { margin: 4px 0; }

/* スマートフォン（サイト共通の切り替え幅 750px に合わせる） */
@media (max-width: 750px) {
	#hg fieldset { display: block; }
	#hg legend { float: none; width: auto; padding: 0 0 4px 0; }
	#hg .chip span { min-width: 0; }
	#hg .hg-sheet { height: 300px; }
	#hg .hg-figures { left: 32px; }
	#hg .hg-submit { position: sticky; bottom: 0; z-index: 5; }
}

#hg .hg-scroll-hint { color: var(--hg-text); font-weight: bold; }

/* ストック（作成済みの素材） */
#hg .hg-stock {
	margin: 14px 0 0 0;
	padding: 10px 12px 8px;
	border: 1px solid var(--hg-line-dark);
	border-left: 4px solid var(--hg-accent);
	background: #FFFFFF;
}
#hg .hg-stock-head { margin: 0 0 6px 0; }
#hg .hg-stock-note { margin: 4px 0 0 0; font-size: 92%; color: var(--hg-sub); }
#hg .hg-stock-list,
#hg .hg-recent ul { display: flex; gap: 8px; overflow-x: auto; margin: 0; padding: 0 0 6px 0; list-style: none; }
#hg .hg-stock-list:empty { display: none; }
#hg .hg-stock-list li,
#hg .hg-recent li { margin: 0; padding: 0; background: none; flex: none; }
#hg .hg-tile {
	display: flex; flex-direction: column; align-items: center; gap: 3px;
	padding: 5px 5px 3px;
	border: 1px solid var(--hg-line);
	border-radius: 3px;
	background: #FFFFFF;
	font: inherit;
	cursor: pointer;
}
#hg .hg-tile:hover { border-color: var(--hg-accent); }
#hg .hg-tile:focus-visible { outline: 2px solid var(--hg-accent); outline-offset: 2px; }
#hg .hg-tile img {
	height: 110px; width: auto; display: block;
	background: repeating-conic-gradient(#EEEEEE 0 25%, #FFFFFF 0 50%) 0 0 / 10px 10px;
}
#hg .hg-tile-meta { font-size: 11px; line-height: 1.4; color: var(--hg-sub); white-space: nowrap; }
#hg .hg-field small { display: block; margin-top: 3px; color: var(--hg-sub); }

/* 建築パース.com の掲載中素材 */
#hg .hg-existing { margin: 0 0 10px 0; padding: 0 0 8px 0; border-bottom: 1px dotted var(--hg-line); }
#hg a.hg-tile { text-decoration: none; color: inherit; }
#hg .hg-existing .hg-tile img { height: 90px; width: 90px; object-fit: contain; background: #FFFFFF; }
#hg .hg-existing-pages a, #hg #existing-pages a { white-space: nowrap; }

/* 掲載中素材の Vol 一覧（関連ページ内） */
#hg .hg-vols { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 6px 0 0 0; }
#hg .hg-vols dt { color: var(--hg-sub); }
#hg .hg-vols dd { margin: 0; }
#hg .hg-vols dd a { margin-right: 6px; }

/* シーンセット */
#hg .hg-setbox {
	margin: 6px 0 4px 7.5em;
	padding: 8px 12px;
	border: 1px solid var(--hg-accent);
	border-radius: 3px;
	background: #F2FAFB;
}
#hg .hg-set-toggle { display: flex; gap: 8px; align-items: flex-start; margin: 0; cursor: pointer; }
#hg .hg-set-toggle input { margin-top: 0.35em; }
#hg .hg-set-counts { margin: 10px 0 2px 0; }
#hg .hg-set-counts-title { margin: 0 0 6px 0; font-weight: bold; }
#hg .hg-set-count-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
#hg .hg-set-count {
	display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
	padding: 6px 10px; text-align: left; line-height: 1.5;
	border: 1px solid #CCCCCC; border-radius: 3px; background: #FFFFFF; color: inherit; font: inherit; cursor: pointer;
}
#hg .hg-set-count strong { font-size: 110%; }
#hg .hg-set-count span { font-size: 90%; color: var(--hg-sub); }
#hg .hg-set-count:hover { border-color: var(--hg-accent); }
#hg .hg-set-count.is-on { border: 2px solid var(--hg-accent); padding: 5px 9px; background: #FFFFFF; box-shadow: 0 0 0 2px rgba(0,0,0,0.03); }
#hg .hg-set-count.is-on strong { color: var(--hg-accent); }
#hg .hg-set-count:disabled { opacity: 0.45; cursor: default; }
#hg fieldset.hg-auto legend::after { content: "自動で設定"; display: block; font-weight: normal; font-size: 85%; color: var(--hg-accent); }
#hg fieldset.hg-auto { opacity: 1; }
#hg fieldset.hg-auto .chips { opacity: 0.35; }
@media (max-width: 750px) {
	#hg .hg-setbox { margin-left: 0; }
}

/* 生成枠の上限に達したときの案内（エラーではなく、待てば使えることを伝える） */
#hg .hg-limit {
	margin: 10px 0 0 0;
	padding: 10px 14px;
	border: 1px solid #E0C46C;
	border-left: 4px solid #D9A400;
	background: #FFFBEA;
}
#hg .hg-limit p { margin: 0; }
#hg .hg-limit-title { font-weight: bold; margin-bottom: 2px !important; }
#hg .hg-limit-sub { margin-top: 4px !important; font-size: 92%; color: var(--hg-sub); }
#hg #go.is-paused { background: #999999; cursor: not-allowed; }

/* X（旧Twitter）のポストボタン */
#hg .hg-share { margin: 0 0 8px 0; min-height: 20px; line-height: 1; }
#hg .hg-share-bottom { margin: 24px 0 0 0; }
