@charset "utf-8";
/* =================================================================
   Brief Sheet  ―  共通スタイル
   やわらかく親しみやすい / 可愛すぎない / 白ベース / 淡いアクセント
   ================================================================= */

:root {
	/* --- カラー --- */
	--bg:          #faf7f2;   /* 紙のような温かい白 */
	--surface:     #ffffff;
	--surface-2:   #fcf9f4;
	--ink:         #423b34;   /* 文字（黒に近い温かいグレー）*/
	--ink-2:       #7c7269;
	--ink-3:       #a89e92;
	--line:        #ece3d6;
	--line-2:      #f3ece0;

	--accent:      #e2a07c;   /* メイン：あたたかいクレイ/ピーチ */
	--accent-deep: #cd875e;
	--accent-tint: #fbeee2;
	--accent-tint2:#f7e3d3;

	--teal:        #8ab0aa;   /* 差し色：くすんだティール（控えめに）*/
	--teal-tint:   #e9f1ef;

	--ok:          #6aa888;
	--danger:      #cf7b6f;

	/* --- かたち --- */
	--r-lg: 22px;
	--r-md: 14px;
	--r-sm: 10px;
	--shadow-sm: 0 1px 2px rgba(66,59,52,.05);
	--shadow:    0 1px 2px rgba(66,59,52,.04), 0 10px 30px -16px rgba(102,77,53,.22);
	--shadow-lg: 0 2px 6px rgba(66,59,52,.05), 0 24px 60px -28px rgba(102,77,53,.30);

	--maxw: 760px;
	--font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
	--font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--ink);
	background-color: var(--bg);
	/* ほんのり紙のテクスチャ（やわらかい光のにじみ）*/
	background-image:
		radial-gradient(1100px 540px at 12% -8%, var(--accent-tint) 0%, transparent 55%),
		radial-gradient(900px 500px at 105% 4%, var(--teal-tint) 0%, transparent 50%);
	background-attachment: fixed;
	line-height: 1.7;
	font-size: 16px;
	letter-spacing: .01em;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { color: var(--accent-deep); }

/* ---------- レイアウト ---------- */
.wrap {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 28px 20px 140px;
}

.site-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 26px;
}
.brand-mark {
	width: 42px;
	height: 42px;
	border-radius: 13px;
	flex: none;
	background: linear-gradient(150deg, var(--accent) 0%, var(--accent-deep) 100%);
	box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.4);
	position: relative;
}
/* ブランドマーク：ちいさな筆先のような円 */
.brand-mark::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background:
		radial-gradient(7px 7px at 31% 33%, rgba(255,255,255,.95), transparent 70%),
		radial-gradient(4px 4px at 64% 62%, rgba(255,255,255,.55), transparent 70%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 19px;
	letter-spacing: .02em;
}
.brand-sub { font-size: 12.5px; color: var(--ink-2); }

/* ---------- 見出し ---------- */
.page-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(23px, 5.4vw, 30px);
	letter-spacing: .015em;
	margin: 6px 0 8px;
}
.page-lead {
	color: var(--ink-2);
	margin: 0 0 22px;
	font-size: 14.5px;
}
.step-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.step-pill {
	font-size: 12px;
	color: var(--ink-2);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 6px 13px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	box-shadow: var(--shadow-sm);
}
.step-pill b {
	font-family: var(--font-display);
	color: var(--accent-deep);
	font-weight: 700;
}

/* ---------- カード（アコーディオン1項目） ---------- */
.cards { display: flex; flex-direction: column; gap: 14px; }

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card.is-checked {
	border-color: var(--accent-tint2);
	box-shadow: var(--shadow), 0 0 0 3px var(--accent-tint);
}
.card.is-open { box-shadow: var(--shadow-lg); }

.card-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	cursor: pointer;
}

/* トグル（含める / 含めない）*/
.toggle { position: relative; flex: none; display: inline-flex; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle .track {
	width: 46px; height: 27px;
	border-radius: 999px;
	background: #e7ddcf;
	transition: background .22s ease;
	position: relative;
	flex: none;
	box-shadow: inset 0 1px 2px rgba(66,59,52,.12);
}
.toggle .track::after {
	content: "";
	position: absolute; top: 3px; left: 3px;
	width: 21px; height: 21px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(66,59,52,.28);
	transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::after { transform: translateX(19px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--accent-deep); outline-offset: 2px; }

.card-titles { flex: 1 1 auto; min-width: 0; cursor: pointer; user-select: none; }
.card-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 17px;
	display: flex;
	align-items: baseline;
	gap: 9px;
}
.card-title .id-chip {
	font-family: var(--font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--accent-deep);
	background: var(--accent-tint);
	border-radius: 6px;
	padding: 1px 7px;
	text-transform: uppercase;
}
.card-hint { font-size: 12.5px; color: var(--ink-2); }

.card-chevron {
	flex: none;
	width: 30px; height: 30px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--surface-2);
	display: grid; place-items: center;
	cursor: pointer;
	color: var(--ink-2);
	transition: transform .28s ease, background .2s, color .2s;
}
.card-chevron:hover { background: var(--accent-tint); color: var(--accent-deep); }
.card-chevron svg { width: 15px; height: 15px; }
.card.is-open .card-chevron { transform: rotate(180deg); }

/* アコーディオン本体 */
.card-body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .3s ease;
}
.card.is-open .card-body { grid-template-rows: 1fr; }
.card-body > .inner { overflow: hidden; }
.card-body .pad { padding: 4px 18px 20px; border-top: 1px dashed var(--line); margin-top: 0; }
.card.is-open .card-body .pad { padding-top: 16px; }

/* ---------- 画像オプション（ラジオ／チェックを画像で選ぶ） ---------- */
.opt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
	gap: 10px;
}
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.opt-card {
	border: 1.5px solid var(--line);
	border-radius: var(--r-md);
	background: var(--surface);
	padding: 7px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: border-color .18s, background .18s, transform .12s, box-shadow .18s;
}
.opt:hover .opt-card { border-color: var(--accent-tint2); transform: translateY(-1px); }
.opt input:focus-visible + .opt-card { outline: 2px solid var(--accent-deep); outline-offset: 2px; }

.opt-thumb {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: 9px;
	overflow: hidden;
	background:
		linear-gradient(135deg, var(--accent-tint) 0%, var(--teal-tint) 100%);
	display: grid;
	place-items: center;
}
/* 画像が空でも形が崩れないプレースホルダ（後で src を入れれば写真に置き換わる） */
.opt-thumb::before {
	content: "";
	width: 26px; height: 26px;
	border-radius: 7px;
	border: 1.5px solid rgba(205,135,94,.45);
	background:
		radial-gradient(6px 6px at 35% 38%, rgba(205,135,94,.55), transparent 70%);
}
.opt-thumb img {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	background: var(--surface);
}
.opt-thumb img:not([src]),
.opt-thumb img[src=""] { opacity: 0; }

.opt-name {
	font-size: 13px;
	text-align: center;
	color: var(--ink);
	font-weight: 500;
	padding-bottom: 2px;
}

/* 選択中の見た目 */
.opt input:checked + .opt-card {
	border-color: var(--accent);
	background: var(--accent-tint);
	box-shadow: 0 0 0 1px var(--accent);
}
.opt-card .check-dot {
	position: absolute;
	top: 12px; right: 12px;
	width: 20px; height: 20px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	display: grid; place-items: center;
	opacity: 0;
	transform: scale(.5);
	transition: opacity .16s, transform .16s cubic-bezier(.34,1.56,.64,1);
	box-shadow: 0 2px 6px rgba(205,135,94,.5);
}
.opt-card .check-dot svg { width: 12px; height: 12px; }
.opt input:checked + .opt-card .check-dot { opacity: 1; transform: scale(1); }

/* ---------- URL入力 ---------- */
.field-label { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; display: block; }
.text-input {
	width: 100%;
	font: inherit;
	font-size: 15px;
	color: var(--ink);
	background: var(--surface-2);
	border: 1.5px solid var(--line);
	border-radius: var(--r-sm);
	padding: 12px 14px;
	transition: border-color .18s, background .18s, box-shadow .18s;
}
.text-input::placeholder { color: var(--ink-3); }
.text-input:focus {
	outline: none;
	border-color: var(--accent);
	background: var(--surface);
	box-shadow: 0 0 0 3px var(--accent-tint);
}
.url-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.url-row .text-input { flex: 1 1 auto; }
.mini-btn {
	flex: none;
	font: inherit; font-size: 13px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--ink-2);
	border-radius: var(--r-sm);
	padding: 9px 12px;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.mini-btn:hover { background: var(--accent-tint); color: var(--accent-deep); border-color: var(--accent-tint2); }
.add-url { color: var(--accent-deep); }

/* ---------- 下部固定バー ---------- */
.actionbar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 30;
	background: rgba(255,255,255,.82);
	backdrop-filter: blur(14px) saturate(1.1);
	-webkit-backdrop-filter: blur(14px) saturate(1.1);
	border-top: 1px solid var(--line);
	box-shadow: 0 -10px 30px -22px rgba(102,77,53,.4);
}
.actionbar .inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 13px 20px calc(13px + env(safe-area-inset-bottom));
	display: flex;
	align-items: center;
	gap: 14px;
}
.actionbar .count { font-size: 13px; color: var(--ink-2); flex: 1 1 auto; }
.actionbar .count b { font-family: var(--font-display); color: var(--accent-deep); font-size: 16px; }

/* ---------- ボタン ---------- */
.btn {
	font: inherit;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 15.5px;
	letter-spacing: .03em;
	border: none;
	border-radius: 999px;
	padding: 13px 26px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	transition: transform .12s, box-shadow .2s, background .2s, opacity .2s;
	white-space: nowrap;
}
.btn-primary {
	color: #fff;
	background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
	box-shadow: 0 8px 20px -8px rgba(205,135,94,.7);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(205,135,94,.8); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost {
	color: var(--accent-deep);
	background: var(--surface);
	border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--accent-tint); }
.btn svg { width: 18px; height: 18px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- 生成されたURL表示パネル ---------- */
.result-panel {
	margin-top: 26px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow);
	padding: 22px;
	display: none;
	animation: pop .35s cubic-bezier(.2,.7,.3,1);
}
.result-panel.show { display: block; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.result-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 16px;
	display: flex; align-items: center; gap: 8px;
	margin-bottom: 4px;
}
.result-title .badge {
	width: 24px; height: 24px; border-radius: 50%;
	background: var(--ok); color: #fff; display: grid; place-items: center;
}
.result-title .badge svg { width: 14px; height: 14px; }
.result-desc { font-size: 13px; color: var(--ink-2); margin: 0 0 14px; }

.url-box {
	display: flex;
	gap: 8px;
	align-items: stretch;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	padding: 7px 7px 7px 14px;
}
.url-box .url-text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	font-size: 13.5px;
	color: var(--ink);
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: thin;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.copy-btn {
	flex: none;
	font: inherit; font-weight: 700; font-size: 13.5px;
	font-family: var(--font-display);
	border: none; cursor: pointer;
	border-radius: var(--r-sm);
	padding: 0 16px;
	color: #fff;
	background: var(--accent);
	display: inline-flex; align-items: center; gap: 7px;
	transition: background .18s, transform .1s;
}
.copy-btn:hover { background: var(--accent-deep); }
.copy-btn:active { transform: scale(.97); }
.copy-btn.copied { background: var(--ok); }
.copy-btn svg { width: 15px; height: 15px; }

.note {
	margin-top: 14px;
	font-size: 12.5px;
	color: var(--ink-2);
	background: var(--teal-tint);
	border-radius: var(--r-md);
	padding: 11px 14px;
	display: flex; gap: 9px;
}
.note svg { width: 16px; height: 16px; flex: none; color: var(--teal); margin-top: 2px; }

/* ---------- 回答画面（brief）専用 ---------- */
.q-card { /* card を再利用しつつ、常時openで使う */ }
.req-badge {
	font-size: 11px; color: var(--accent-deep);
	background: var(--accent-tint); border-radius: 6px;
	padding: 1px 8px; font-weight: 700;
}

/* ---------- 確認画面（form）専用：プレビュー ---------- */
.preview-stage { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.brief-card {
	width: 100%;
	max-width: 640px;
	background: #fffdfa;
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
	border: 1px solid var(--line);
}
.brief-card__head {
	padding: 26px 30px 22px;
	background:
		radial-gradient(120% 140% at 0% 0%, var(--accent-tint) 0%, transparent 60%),
		linear-gradient(135deg, #fff 0%, var(--surface-2) 100%);
	border-bottom: 1px solid var(--line);
	position: relative;
}
.brief-card__eyebrow {
	font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
	color: var(--accent-deep); font-weight: 700;
}
.brief-card__title {
	font-family: var(--font-display);
	font-weight: 700; font-size: 24px; margin: 4px 0 2px;
}
.brief-card__meta { font-size: 12.5px; color: var(--ink-2); }
.brief-card__list { padding: 8px 30px 26px; }
.brief-row {
	display: flex;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px dashed var(--line);
	align-items: flex-start;
}
.brief-row:last-child { border-bottom: none; }
.brief-row__label {
	flex: none;
	width: 92px;
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--ink-2);
	font-size: 14px;
	display: flex; align-items: center; gap: 8px;
}
.brief-row__label .dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--accent); flex: none;
}
.brief-row__value { flex: 1 1 auto; font-size: 15.5px; color: var(--ink); padding-top: 1px; word-break: break-word; }
.brief-row__value .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.brief-row__value .chip {
	background: var(--accent-tint); color: var(--accent-deep);
	border-radius: 999px; padding: 3px 12px; font-size: 13.5px; font-weight: 500;
}
.brief-row__value a { word-break: break-all; }
.brief-card__foot {
	padding: 14px 30px 22px;
	display: flex; align-items: center; justify-content: space-between;
	gap: 10px;
	border-top: 1px solid var(--line);
	background: var(--surface-2);
}
.brief-card__foot .mark {
	display: flex; align-items: center; gap: 9px;
	font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--ink-2);
}
.brief-card__foot .mark .m {
	width: 22px; height: 22px; border-radius: 7px;
	background: linear-gradient(150deg, var(--accent), var(--accent-deep));
}
.brief-card__foot .stamp { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 状態表示（読み込み / エラー） ---------- */
.state {
	text-align: center;
	padding: 60px 20px;
	color: var(--ink-2);
}
.state .ic {
	width: 58px; height: 58px; border-radius: 50%;
	display: grid; place-items: center; margin: 0 auto 16px;
	background: var(--accent-tint); color: var(--accent-deep);
}
.state .ic svg { width: 28px; height: 28px; }
.state h2 { font-family: var(--font-display); font-size: 19px; color: var(--ink); margin: 0 0 6px; }
.state p { font-size: 14px; margin: 0; }
.spinner {
	width: 34px; height: 34px; border-radius: 50%;
	border: 3px solid var(--accent-tint); border-top-color: var(--accent);
	animation: spin .8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* トースト */
.toast {
	position: fixed;
	left: 50%; bottom: 96px;
	transform: translateX(-50%) translateY(20px);
	background: var(--ink); color: #fff;
	font-size: 13.5px; font-weight: 500;
	padding: 11px 20px; border-radius: 999px;
	box-shadow: var(--shadow-lg);
	opacity: 0; pointer-events: none;
	transition: opacity .25s, transform .25s;
	z-index: 50;
	display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 16px; height: 16px; color: var(--accent); }

/* 入力エラーの強調 */
.card.is-error { box-shadow: var(--shadow), 0 0 0 3px rgba(207,123,111,.28); border-color: rgba(207,123,111,.5); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 560px) {
	.wrap { padding: 22px 15px 150px; }
	.card-head { padding: 14px 14px; gap: 11px; }
	.card-body .pad { padding-left: 14px; padding-right: 14px; }
	.opt-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
	.brief-card__head, .brief-card__list, .brief-card__foot { padding-left: 18px; padding-right: 18px; }
	.brief-row__label { width: 76px; font-size: 13px; }
	.actionbar .inner { gap: 10px; }
	.btn { padding: 12px 18px; font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
