/* 転職相談チャット ｜ 白と金 ------------------------------------------ */

.nc-root {
	--nc-accent: #C9A961;
	--nc-accent-ink: #8A6A2F;
	--nc-cta: #1F1B16;

	--nc-ink: #23201B;
	--nc-sub: #4A4239;
	--nc-mute: #A09585;
	--nc-line: #ECE8E0;
	--nc-line2: #E2DBCB;
	--nc-tint: #F7F4ED;
	--nc-tint2: #FDFCF8;

	display: flex;
	flex-direction: column;
	height: 660px;
	max-width: 560px;
	margin: 28px auto;
	border: 1px solid var(--nc-line);
	border-radius: 18px;
	overflow: hidden;
	background: #fff;
	color: var(--nc-ink);
	font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic Medium", Meiryo, sans-serif;
	font-size: 15px;
	-webkit-text-size-adjust: 100%;
}

.nc-root *,
.nc-root *::before,
.nc-root *::after { box-sizing: border-box; }

.nc-mark { width: 24px; height: 24px; flex: none; }

/* ---- 会話エリア ---- */
.nc-body {
	flex: 1 1 auto;
	min-height: 180px;               /* 選択肢が増えても会話が潰れないようにする */
	overflow-y: auto; overscroll-behavior: contain;
	padding: 20px 18px 12px;
}
.nc-body::-webkit-scrollbar { width: 6px; }
.nc-body::-webkit-scrollbar-thumb { background: #E8E3D8; border-radius: 3px; }

.nc-msg { margin: 0 0 18px; animation: nc-fade .32s ease both; }
.nc-msg.nc-ai { display: flex; gap: 10px; align-items: flex-start; }
.nc-msg.nc-ai .nc-mark { width: 22px; height: 22px; margin-top: 6px; }

/* AIのセリフ */
.nc-msg.nc-ai .nc-text {
	position: relative;
	flex: 0 1 auto;
	max-width: calc(100% - 34px);
	padding: 12px 16px;
	background: var(--nc-tint2);
	border: 1px solid var(--nc-line);
	border-radius: 4px 16px 16px 16px;
	line-height: 1.9;
	white-space: pre-wrap; word-break: break-word;
}
/* しっぽ（枠線ぶんを2枚重ねで作る） */
.nc-msg.nc-ai .nc-text::before,
.nc-msg.nc-ai .nc-text::after {
	content: ""; position: absolute; top: 9px;
	width: 0; height: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-right: 8px solid;
}
.nc-msg.nc-ai .nc-text::before { left: -8px; border-right-color: var(--nc-line); }
.nc-msg.nc-ai .nc-text::after  { left: -7px; border-right-color: var(--nc-tint2); }

/* 相手のセリフ */
.nc-msg.nc-me { display: flex; justify-content: flex-end; }
.nc-msg.nc-me .nc-text {
	position: relative;
	max-width: 82%; padding: 11px 16px;
	background: var(--nc-tint); color: var(--nc-sub);
	border-radius: 16px 16px 4px 16px;
	line-height: 1.75; white-space: pre-wrap; word-break: break-word;
}
.nc-msg.nc-me .nc-text::after {
	content: ""; position: absolute; right: -7px; bottom: 9px;
	width: 0; height: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-left: 8px solid var(--nc-tint);
}
@keyframes nc-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- 考え中 ---- */
.nc-shimmer {
	height: 13px; border-radius: 7px; margin: 3px 0;
	min-width: 120px;
	background: linear-gradient(90deg, #F4F0E7 25%, #EAE3D2 50%, #F4F0E7 75%);
	background-size: 260% 100%;
	animation: nc-sweep 1.5s linear infinite;
}
.nc-shimmer.nc-w1 { width: 150px; }
.nc-shimmer.nc-w2 { width: 200px; margin-top: 8px; }
@keyframes nc-sweep { to { background-position: -260% 0; } }
.nc-thinking { margin-top: 10px; font-size: 12.5px; color: var(--nc-mute); }

/* ---- 検索中の進捗 ---- */
.nc-prog { min-width: 210px; }

.nc-prog-head {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 12px; margin-bottom: 9px;
}
.nc-prog-label { font-size: 13.5px; color: var(--nc-sub); }
.nc-prog-pct {
	font-size: 12px; color: var(--nc-mute);
	font-variant-numeric: tabular-nums;
}

.nc-prog-track {
	height: 6px; border-radius: 3px;
	background: #F1EDE3; overflow: hidden;
}
.nc-prog-fill {
	height: 100%; width: 0; border-radius: 3px;
	background: linear-gradient(90deg, #D9B76A, #C9A961);
	transition: width .5s cubic-bezier(.22,.61,.36,1);
}

/* ---- 引用（吹き出しの外に置く枠） ---- */
.nc-quotecard {
	margin: 2px 0 20px 32px;
	padding: 14px 14px 6px;
	border: 1px solid var(--nc-line);
	border-radius: 12px;
	background: #FCFBF7;
	animation: nc-fade .34s ease both;
}

.nc-quotecard-head {
	margin: 0 0 11px;
	padding-bottom: 9px;
	border-bottom: 1px solid var(--nc-line);
	font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
	color: var(--nc-mute);
}

.nc-quote {
	position: relative;
	margin: 0 0 12px;
	padding: 12px 14px 11px;
	border-radius: 9px;
	background: #fff;
	border: 1px solid var(--nc-line);
}
.nc-quote.nc-good { border-left: 3px solid #8FAE7A; }
.nc-quote.nc-bad  { border-left: 3px solid #D79A5B; }

.nc-quote-mark {
	margin: 0 0 6px;
	font-size: 10px; font-weight: 700; letter-spacing: .1em;
	text-transform: uppercase;
}
.nc-good .nc-quote-mark { color: #6E8C59; }
.nc-bad  .nc-quote-mark { color: #B7793C; }

.nc-quote-body {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.95;
	color: var(--nc-ink);
	white-space: pre-wrap;
	word-break: break-word;
}
.nc-quote-body::before { content: "「"; }
.nc-quote-body::after  { content: "」"; }

.nc-quote-from {
	margin: 8px 0 0;
	font-size: 11px;
	color: var(--nc-mute);
	text-align: right;
}

/* ---- 出典 ---- */
.nc-src {
	margin-top: 12px; padding-top: 9px;
	border-top: 1px dotted var(--nc-line);
	font-size: 11.5px; line-height: 1.8; color: var(--nc-mute);
}
.nc-src a { color: var(--nc-accent-ink); text-decoration: underline; word-break: break-all; }

/* ---- 会話内のカード ---- */
.nc-card {
	margin: 2px 0 20px 32px; padding: 16px;
	border: 1px solid var(--nc-line);
	border-top: 2px solid var(--nc-accent);
	border-radius: 3px 3px 14px 14px;
	background: var(--nc-tint2);
	animation: nc-fade .4s ease both;
}
.nc-name { margin: 0 0 12px; font-size: 15.5px; font-weight: 700; letter-spacing: .02em; }
.nc-logo {
	display: block;
	width: 100%;
	max-width: 240px;
	height: auto;
	max-height: 72px;
	margin: 0 auto 14px;
	object-fit: contain;
}

.nc-cta {
	display: block; padding: 14px 18px; border-radius: 4px;
	background: var(--nc-cta); color: #fff;
	font-size: 15.5px; font-weight: 700; text-align: center; text-decoration: none;
}
.nc-cta:hover, .nc-cta:focus-visible { filter: brightness(1.25); color: #fff; text-decoration: none; }

.nc-error {
	margin: 2px 0 20px 32px; padding: 12px 15px;
	border: 1px solid var(--nc-line); border-radius: 12px;
	font-size: 13px; line-height: 1.8; color: #6B6255;
}

/* ---- 下部ドック ---- */
.nc-dock {
	flex: 0 0 auto;
	max-height: 58%;                 /* 画面の半分以上を占めないようにする */
	display: flex; flex-direction: column;
	padding: 10px 14px 14px;
	border-top: 1px solid #F4F1EA;
	background: #fff;
}

.nc-chips {
	display: flex; flex-wrap: wrap; gap: 7px;
	margin: 0 0 10px;
	max-height: 156px;               /* 6件を超えたらここだけスクロール */
	overflow-y: auto;
	overscroll-behavior: contain;
}
.nc-chips::-webkit-scrollbar { width: 5px; }
.nc-chips::-webkit-scrollbar-thumb { background: #E8E3D8; border-radius: 3px; }
.nc-chips:empty { display: none; }
.nc-chips.nc-binary .nc-chip { flex: 1 1 0; min-width: 120px; justify-content: center; font-weight: 700; }
.nc-chip { flex: 0 1 auto; }
.nc-chip {
	display: inline-flex; align-items: center; padding: 8px 15px;
	border: 1px solid var(--nc-line2); border-radius: 4px; background: #fff;
	font: inherit; font-size: 13.5px; line-height: 1.55; color: var(--nc-sub);
	text-align: left; cursor: pointer;
	transition: background .16s, color .16s, border-color .16s;
}
.nc-chip:hover { border-color: var(--nc-accent); background: #FDFAF2; color: #1F1B16; }
.nc-chip:focus-visible { outline: 2px solid var(--nc-cta); outline-offset: 2px; }

/* 入力欄。待機中は沈み、入力を求めているときにはっきり立ち上がる */
/* ---- 選択パネル（会話の中央に出す） ---- */
.nc-sheet {
	margin: 4px 0 20px;
	animation: nc-fade .3s ease both;
}

.nc-sheet-card {
	border: 1px solid var(--nc-accent);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 26px rgba(31, 27, 22, .10), 0 0 0 5px #FBF6EA;
	overflow: hidden;
}

.nc-sheet-list {
	border-radius: 13px;
	max-height: 300px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
.nc-sheet-list::-webkit-scrollbar { width: 6px; }
.nc-sheet-list::-webkit-scrollbar-thumb { background: #E8E3D8; border-radius: 3px; }

.nc-sheet-row {
	display: block; width: 100%;
	padding: 13px 16px;
	border: 0; border-bottom: 1px solid #F4F1EA;
	background: #fff;
	font: inherit; font-size: 15px; line-height: 1.5;
	color: var(--nc-ink); text-align: left;
	cursor: pointer;
	transition: background .12s, padding-left .12s;
}
.nc-sheet-row:last-child { border-bottom: 0; }
.nc-sheet-row:hover,
.nc-sheet-row:focus-visible {
	background: #FDF9EF;
	padding-left: 20px;
	outline: none;
}

.nc-composer {
	display: flex; align-items: flex-end; gap: 8px;
	padding: 6px 6px 6px 18px;
	border: 1px solid var(--nc-line); border-radius: 26px;
	background: #FAF8F3;
	transition: border-color .2s, background .2s, box-shadow .2s;
}
.nc-composer textarea {
	flex: 1; border: 0; background: none; resize: none; outline: none;
	font: inherit; font-size: 16px; line-height: 1.6; color: var(--nc-ink);
	padding: 13px 0; max-height: 96px;
}
.nc-composer textarea::placeholder { color: #BFB6A4; opacity: 1; }

/* 入力を待っている状態 */
.nc-composer.nc-open {
	background: #fff;
	border-color: var(--nc-accent);
	box-shadow: 0 0 0 4px #F7F1E2, 0 2px 10px rgba(31,27,22,.05);
	animation: nc-invite .5s ease both;
}
.nc-composer.nc-open textarea::placeholder { color: #A3937A; }
.nc-composer.nc-open:focus-within {
	box-shadow: 0 0 0 4px #F2E9D2, 0 2px 10px rgba(31,27,22,.06);
}
@keyframes nc-invite {
	0%   { transform: translateY(4px); box-shadow: 0 0 0 0 rgba(201,169,97,0); }
	60%  { transform: translateY(0);   box-shadow: 0 0 0 7px rgba(201,169,97,.16); }
	100% { transform: translateY(0);   box-shadow: 0 0 0 4px #F7F1E2, 0 2px 10px rgba(31,27,22,.05); }
}

.nc-send {
	width: 42px; height: 42px; flex: none; margin-bottom: 3px;
	border: 0; border-radius: 50%; background: var(--nc-line); color: #B3A996;
	display: grid; place-items: center; cursor: pointer;
	transition: background .18s, color .18s, transform .18s;
}
.nc-send svg { width: 18px; height: 18px; }
.nc-send:disabled { cursor: default; }
.nc-send:not(:disabled) { background: var(--nc-accent); color: #1F1B16; }
.nc-send:not(:disabled):hover { transform: scale(1.06); }

.nc-counter { padding: 4px 14px 0; font-size: 11px; text-align: right; color: var(--nc-mute); }

@media (max-width: 560px) {
	.nc-root { height: 80vh; min-height: 540px; margin: 20px 0; border-radius: 14px; }
	.nc-chips { max-height: 140px; }
	.nc-body { padding: 12px 14px 8px; }
	.nc-dock { padding: 8px 11px 11px; }
	.nc-card, .nc-error, .nc-quotecard { margin-left: 0; }
	.nc-msg.nc-ai { gap: 10px; }
	.nc-chip { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
	.nc-msg, .nc-card { animation: none; }
	.nc-shimmer { animation: none; }
	.nc-prog-fill { transition: none; }
	.nc-composer.nc-open { animation: none; }
	.nc-send:not(:disabled):hover { transform: none; }
}
