/* ぬい活投稿画面（create_spot.html）専用のスタイル。
   ヘッダー・トークンはmap.css/events.css/gallery.cssと同じ値をそのまま複製している
   （各画面が独立したCSSファイルを持つ既存方針を踏襲）。
   この画面はタブバーに属さないサブ画面のため、ヘッダーは部章マーク＋タイトルのみとし、
   右上に「戻る」ボタン（.btn-back）を置く構成にした（今後の他サブ画面でも同じ構成を再利用する想定）。 */

:root {
	--ink: #2F5233;
	--ink-soft: #6D8670;
	--bg: #F6F3E8;
	--bg-soft: #FDFEFD;
	--line: #DEE3DE;
	--accent: #8FBFA0;
	--badge-bg: #E6EAE7;
}

body {
	font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
	background: var(--bg);
	color: var(--ink);
	margin: 0;
	padding: 20px;
}
.container { max-width: 1000px; margin: 0 auto; }

/* --- ヘッダー（フルブリード。タブバーの代わりに「戻る」ボタンを右上に配置） --- */
.header-area {
	background: var(--bg-soft);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	margin-left: -20px;
	margin-right: -20px;
	margin-bottom: 18px;
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 18px;
	max-width: 1000px;
	margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .club-mark { width: 60px; height: auto; flex: none; }
.brand .title-block h1 { font-size: 16px; font-weight: 700; margin: 0; line-height: 1.3; color: var(--ink); }
.brand .title-block .en { font-size: 8.5px; letter-spacing: 0.1em; color: var(--ink-soft); margin: 2px 0 0; font-weight: 700; }

.btn-back {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	background: var(--badge-bg);
	color: var(--ink);
	border: none;
	font-size: 12.5px;
	font-weight: 700;
	padding: 8px 14px;
	border-radius: 999px;
	white-space: nowrap;
	cursor: pointer;
	font-family: inherit;
}
.btn-back svg { width: 13px; height: 13px; flex: none; }
.btn-back:hover { background: var(--accent); color: var(--bg-soft); }

/* --- レイアウト --- */
.layout-wrapper { display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 900px) {
	.layout-wrapper { flex-direction: row; align-items: flex-start; gap: 28px; }
	.form-side, .map-side { flex: 1; min-width: 0; }
}

.section-title { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0 0 3px; display: flex; align-items: center; gap: 6px; }
.section-required { font-size: 10px; font-weight: 700; color: var(--ink-soft); background: var(--badge-bg); padding: 2px 8px; border-radius: 999px; }
.section-note { font-size: 11.5px; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.5; }

/* --- 写真アップロード --- */
.upload-card {
	border: 1.5px dashed var(--accent);
	background: var(--badge-bg);
	border-radius: 14px;
	padding: 14px;
	margin-bottom: 18px;
}
.upload-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	aspect-ratio: 1;
	max-width: 260px;
	margin: 0 auto;
	border-radius: 10px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	color: var(--ink-soft);
	cursor: pointer;
	text-align: center;
	padding: 16px;
}
.upload-dropzone:hover { border-color: var(--accent); }
.upload-dropzone svg { width: 30px; height: 30px; color: var(--accent); }
.upload-dropzone .label { font-size: 13px; font-weight: 700; color: var(--ink); }
.upload-dropzone .hint { font-size: 10.5px; color: var(--ink-soft); }
.upload-dropzone input[type="file"] {
	position: absolute;
	width: 1px; height: 1px;
	opacity: 0;
	overflow: hidden;
}

.crop-editor-label { font-size: 11px; color: var(--ink-soft); margin: 0 0 8px; font-weight: 400; line-height: 1.5; }
.crop-viewport {
	width: 100%;
	max-width: 260px;
	aspect-ratio: 1;
	margin: 0 auto;
	overflow: hidden;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: var(--badge-bg);
	position: relative;
	touch-action: none;
	cursor: grab;
}
.crop-viewport:active { cursor: grabbing; }
#crop-image {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
	transform-origin: 50% 50%;
	user-select: none;
	-webkit-user-drag: none;
	pointer-events: none;
}
.crop-controls { display: flex; align-items: center; gap: 8px; margin: 10px auto 0; max-width: 260px; }
.btn-crop-zoom {
	width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
	border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink);
	cursor: pointer; font-size: 15px; line-height: 1; padding: 0;
}
.btn-crop-zoom:hover { background: var(--accent); color: var(--bg-soft); border-color: var(--accent); }
#crop-zoom-range { flex: 1; min-width: 0; accent-color: var(--accent); }
.btn-crop-reset {
	display: block; margin: 8px auto 0;
	background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-soft);
	padding: 5px 12px; border-radius: 999px; font-size: 11px; cursor: pointer; font-family: inherit;
}
.btn-crop-reset:hover { border-color: var(--accent); color: var(--ink); }

/* --- 写真の色味フィルター（プリセット＋手動スライダー）。crop-editorの下に増設 ---
   「filter」はgallery.htmlのアイドル絞り込み機能で既に使われている語のため、混同を避けて
   クラス名は.photo-fx-*、CSS変数は--fx-*とする */
.photo-fx-editor { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.photo-fx-presets { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.photo-fx-preset {
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	background: none; border: none; padding: 2px; cursor: pointer; font-family: inherit;
}
.photo-fx-preset-thumb {
	width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
	border: 2px solid var(--line); background: var(--badge-bg);
}
.photo-fx-preset:hover .photo-fx-preset-thumb { border-color: var(--accent); }
.photo-fx-preset.active .photo-fx-preset-thumb { border-color: var(--ink); border-width: 3px; }
.photo-fx-preset span { font-size: 10px; color: var(--ink-soft); }
.photo-fx-preset.active span { color: var(--ink); font-weight: 700; }
.photo-fx-sliders { display: flex; flex-direction: column; gap: 6px; max-width: 260px; margin: 0 auto; }
.photo-fx-sliders label { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-soft); }
.photo-fx-sliders input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }

/* --- 入力欄 --- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field input[type="text"], .field textarea, .field select {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--ink);
	background: var(--bg-soft);
	box-sizing: border-box;
}
.field textarea { height: 100px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(143,191,160,0.25); }
.char-count { font-size: 10.5px; color: var(--ink-soft); margin: 4px 0 0; text-align: right; }

/* --- アイドルの複数選択（チップ選択） --- */
.idol-chip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 500px) { .idol-chip-grid { grid-template-columns: repeat(3, 1fr); } }
/* .field labelの display:block（詳細度 0,1,1）が.idol-chip単体（詳細度 0,1,0）に勝ってしまい
   中央寄せが効かなくなるため、.idol-chip-gridを親にした詳細度 0,2,0 で確実に上書きする */
.idol-chip-grid .idol-chip {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--line);
	background: var(--bg-soft);
	color: var(--ink-soft);
	border-radius: 999px;
	padding: 8px 6px;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	user-select: none;
	transition: background 220ms ease, border-color 220ms ease;
}
.idol-chip input {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
/* 選択中はそのアイドルのブランドカラーをパステル変換した色に（JS側でチップごとに--chip-activeを設定）。
   フォトギャラリーのアイドルフィルターと同じ変換ロジックだが、こちらは画面全体ではなくボタン単体だけが変わる */
.idol-chip-grid .idol-chip:has(input:checked) {
	background: var(--chip-active, var(--ink));
	border-color: var(--chip-active, var(--ink));
	color: var(--ink);
}
.idol-chip-grid .idol-chip:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(143,191,160,0.5); }

/* --- 位置検索・ミニマップ --- */
.search-wrapper { display: flex; gap: 8px; margin-bottom: 5px; }
.search-wrapper input[type="text"] {
	flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px;
	font-size: 12.5px; background: var(--bg-soft); color: var(--ink); font-family: inherit;
}
.search-wrapper input:focus { outline: none; border-color: var(--accent); }
.btn-search {
	flex: none; background: var(--badge-bg); color: var(--ink); border: none;
	border-radius: 999px; padding: 9px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.btn-search:hover { background: var(--accent); color: var(--bg-soft); }

.search-results {
	background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
	max-height: 160px; overflow-y: auto; margin-top: 6px; padding: 0; list-style: none;
	display: none; position: absolute; width: 100%; max-width: 500px; z-index: 1000;
	box-shadow: 0 8px 20px -10px rgba(47,82,51,0.3);
}
.search-results li { padding: 9px 12px; cursor: pointer; font-size: 12.5px; color: var(--ink); border-bottom: 1px solid var(--line); }
.search-results li:last-child { border-bottom: none; }
.search-results li:hover { background: var(--badge-bg); }
.relative-container { position: relative; }

#preview-map {
	width: 100%;
	height: 260px;
	background-color: var(--badge-bg);
	border-radius: 12px;
	border: 1px solid var(--line);
}
.map-instruction { font-size: 11px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }

/* --- 注意書き・投稿ボタン --- */
.posting-guideline {
	font-size: 11px; color: var(--ink-soft); margin: 18px 0 14px; line-height: 1.7;
	background: var(--badge-bg); border-radius: 10px; padding: 10px 12px;
}
.posting-guideline a { color: var(--ink); font-weight: 700; }

.btn-submit {
	display: block; width: 100%;
	background: var(--ink); color: var(--bg-soft); border: none;
	padding: 14px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.btn-submit:hover { opacity: 0.88; }

.link-back-text {
	display: block; text-align: center; background: none; border: none;
	font-size: 12px; color: var(--ink-soft); font-weight: 700; margin-top: 12px;
	cursor: pointer; font-family: inherit; width: 100%; padding: 4px 0;
}
.link-back-text:hover { color: var(--ink); }

@media (max-width: 600px) {
	body { padding: 12px; }
	.brand .club-mark { width: 48px; }
	.brand .title-block h1 { font-size: 14px; }
	.header-area { margin-bottom: 14px; margin-left: -12px; margin-right: -12px; }
}
