@charset "utf-8";

/* ============================================================
   msub29 — 필사 노트형 (도서관 시리즈 서브)
   뷰포트 중앙 진입 시 하이라이트 + 우측 여백 주석 등장
   ============================================================ */

body.page-light-header #header,
body.page-light-header #header.on,
body.page-light-header #header.act {
	background-color: #f0ebe2 !important;
}

/* ── 히어로 ── */
.nr-hero {
	display: grid;
	grid-template-columns: 1fr 4px 1fr;
	height: 100vh;
	min-height: 600px;
	overflow: hidden;
}

/* 좌: 책 표지 (mmain21 색상 그대로) */
.nr-hero-left {
	background-image:
		repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.015) 3px, rgba(255,255,255,0.015) 4px),
		linear-gradient(170deg, #223d2a 0%, #1c3525 50%, #162c1e 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 80px clamp(32px, 6vw, 80px);
}

.nr-hero-left-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 16px;
}

.nr-series {
	font-size: clamp(14px, calc(10px + 0.5vw), 18px);
	font-family: "Pretendard Variable", sans-serif;
	font-weight: 300;
	color: rgba(201, 168, 76, 0.55);
}

.nr-ornament {
	display: flex;
	align-items: center;
	width: 100%;
	gap: 0;
}

.nr-ornament::before,
.nr-ornament::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(to right, transparent, rgba(201, 168, 76, 0.4));
}

.nr-ornament::after {
	background: linear-gradient(to left, transparent, rgba(201, 168, 76, 0.4));
}

.nr-ornament span {
	font-size: 10px;
	color: rgba(201, 168, 76, 0.6);
	padding: 0 8px;
}

.nr-hero-tit {
	font-size: clamp(36px, calc(20px + 3.5vw), 64px);
	font-family: "MaruBuri", serif;
	font-weight: 700;
	background: linear-gradient(160deg, #9a7b3a 0%, #c9a84c 25%, #f0d080 50%, #c9a84c 75%, #9a7b3a 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.nr-hero-sub {
	font-size: clamp(14px, calc(10px + 0.6vw), 18px);
	font-family: "MaruBuri", serif;
	color: rgba(220, 200, 160, 0.55);
}

.nr-hero-cat {
	font-size: clamp(14px, calc(10px + 0.5vw), 18px);
	font-family: "Pretendard Variable", sans-serif;
	font-weight: 300;
	color: rgba(201, 168, 76, 0.4);
}

/* 책등 */
.nr-hero-spine {
	background: linear-gradient(to right,
		rgba(0,0,0,0.3),
		rgba(201, 168, 76, 0.15) 40%,
		rgba(201, 168, 76, 0.15) 60%,
		rgba(0,0,0,0.2));
	position: relative;
}

.nr-hero-spine::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom,
		rgba(201,168,76,0.08),
		rgba(201,168,76,0.2) 50%,
		rgba(201,168,76,0.08));
}

/* 우: 내지 (크림) */
.nr-hero-right {
	background: repeating-linear-gradient(
		transparent, transparent 27px,
		rgba(160, 130, 80, 0.1) 27px,
		rgba(160, 130, 80, 0.1) 28px
	), #f5edd8;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 80px clamp(32px, 6vw, 80px);
}

.nr-hero-right-inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: 420px;
}

.nr-hero-pgnum {
	font-size: clamp(14px, calc(10px + 0.5vw), 18px);
	font-family: "Pretendard Variable", sans-serif;
	font-weight: 300;
	color: rgba(60, 45, 20, 0.4);
}

.nr-hero-author {
	font-size: clamp(14px, calc(10px + 0.6vw), 18px);
	font-family: "MaruBuri", serif;
	color: rgba(60, 45, 20, 0.6);
}

.nr-hero-lead {
	font-size: clamp(18px, calc(13px + 0.9vw), 22px);
	font-family: "MaruBuri", serif;
	font-weight: 400;
	color: #2c2010;
	border-left: 2px solid rgba(201, 168, 76, 0.5);
	padding-left: 20px;
}

.nr-scroll-hint {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	margin-top: 12px;
}

.nr-scroll-line {
	display: block;
	width: 1px;
	height: 40px;
	background: linear-gradient(to bottom, rgba(160,130,80,0.5), transparent);
	animation: nr-scroll-pulse 2s ease-in-out infinite;
}

@keyframes nr-scroll-pulse {
	0%, 100% { opacity: 0.4; }
	50% { opacity: 1; }
}

.nr-scroll-txt {
	font-size: clamp(14px, calc(10px + 0.4vw), 18px);
	font-family: "Pretendard Variable", sans-serif;
	font-weight: 300;
	color: rgba(60,45,20,0.4);
}

/* ── 본문 레이아웃 ── */
.nr-article {
	background: #f0ebe2;
	padding: 80px 0 120px;
}

.nr-layout {
	display: grid;
	grid-template-columns: 1fr 260px;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 40px;
	gap: 0;
	align-items: start;
}

.nr-main {
	padding-right: 60px;
	border-right: 1px solid rgba(160, 130, 80, 0.18);
}

/* 주석 컬럼 */
.nr-margin {
	position: relative;
	padding-left: 40px;
}

/* ── 작가의 말 ── */
.nr-intro {
	padding: 40px 0 60px;
	border-bottom: 1px solid rgba(160, 130, 80, 0.15);
	margin-bottom: 60px;
}

.nr-label {
	display: block;
	font-size: clamp(14px, calc(10px + 0.5vw), 18px);
	font-family: "Pretendard Variable", sans-serif;
	font-weight: 300;
	color: rgba(60, 45, 20, 0.4);
	margin-bottom: 16px;
}

.nr-intro-p {
	font-size: clamp(18px, calc(12px + 0.9vw), 20px);
	font-family: "MaruBuri", serif;
	color: rgba(44, 32, 16, 0.7);
}

/* ── 챕터 ── */
.nr-section {
	padding: 60px 0;
	border-bottom: 1px solid rgba(160, 130, 80, 0.12);
}

.nr-section:last-child {
	border-bottom: none;
}

.nr-ch-head {
	display: flex;
	align-items: baseline;
	gap: 20px;
	margin-bottom: 40px;
}

.nr-ch-num {
	font-size: clamp(18px, calc(12px + 1.2vw), 28px);
	font-family: "MaruBuri", serif;
	font-weight: 400;
	color: rgba(201, 168, 76, 0.6);
}

.nr-ch-tit {
	font-size: clamp(20px, calc(14px + 1.2vw), 28px);
	font-family: "MaruBuri", serif;
	font-weight: 700;
	color: #1c2412;
}

.nr-p {
	font-size: clamp(18px, calc(12px + 0.8vw), 21px);
	font-family: "MaruBuri", serif;
	color: #2c2010;
	margin-bottom: 28px;
}

.nr-p:last-of-type {
	margin-bottom: 0;
}

/* ── 하이라이트 ── */
.nr-hl {
	background-image: linear-gradient(rgba(201, 168, 76, 0.28), rgba(201, 168, 76, 0.28));
	background-size: 0% 42%;
	background-repeat: no-repeat;
	background-position: 0 88%;
	transition: background-size 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 진한 강조 하이라이트 */
.nr-hl--strong {
	background-image: linear-gradient(rgba(201, 168, 76, 0.42), rgba(201, 168, 76, 0.42));
	background-size: 0% 55%;
	background-position: 0 82%;
}

/* 포커스 구간 — 형광펜 활성 */
.nr-hl.is-active {
	background-size: 100% 42%;
}

.nr-hl--strong.is-active {
	background-size: 100% 55%;
}

/* 지나간 구간 — 읽은 흔적 (흐려짐) */
.nr-hl.is-past {
	background-size: 100% 42%;
	opacity: 0.55;
}

.nr-hl--strong.is-past {
	background-size: 100% 55%;
	opacity: 0.55;
}

/* ── 주석 ── */
.nr-ann {
	position: absolute;
	width: 200px;
	opacity: 0;
	transform: translateX(12px);
	transition:
		opacity 0.4s ease,
		transform 0.4s ease;
}

.nr-ann.is-active {
	opacity: 1;
	transform: translateX(0);
}

.nr-ann.is-past {
	opacity: 0.3;
	transform: translateX(0);
}

.nr-ann-connector {
	width: 32px;
	height: 1px;
	background: linear-gradient(to right, rgba(201, 168, 76, 0.6), rgba(201, 168, 76, 0.2));
	margin-bottom: 8px;
	transform-origin: left center;
	transform: scaleX(0);
	transition: transform 0.35s ease 0.25s;
}

.nr-ann.is-active .nr-ann-connector {
	transform: scaleX(1);
}

.nr-ann-txt {
	font-size: clamp(14px, calc(9px + 0.6vw), 16px);
	font-family: "MaruBuri", serif;
	font-weight: 400;
	color: #7a5c2a;
}

/* ── 클로징 ── */
.nr-closing {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding-top: 48px;
	margin-top: 48px;
	border-top: 1px solid rgba(160, 130, 80, 0.2);
}

.nr-closing-ornament {
	font-size: 10px;
	color: rgba(201, 168, 76, 0.5);
}

.nr-closing-bio {
	font-size: clamp(14px, calc(10px + 0.5vw), 18px);
	font-family: "MaruBuri", serif;
	color: rgba(44, 32, 16, 0.55);
}

.nr-closing-date {
	font-size: clamp(14px, calc(10px + 0.4vw), 18px);
	font-family: "Pretendard Variable", sans-serif;
	font-weight: 300;
	color: rgba(60, 45, 20, 0.35);
}

/* ── 아웃트로 ── */
.nr-outro {
	background: linear-gradient(170deg, #1c3525 0%, #162c1e 100%);
	padding: 80px 40px;
	position: relative;
}

.nr-outro::before {
	content: "";
	position: absolute;
	inset: 20px;
	border: 1px solid rgba(201, 168, 76, 0.12);
	pointer-events: none;
}

.nr-outro-inner {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	text-align: center;
}

.nr-outro-inner .nr-label {
	color: rgba(201, 168, 76, 0.5);
}

.nr-ornament--gold {
	font-size: 10px;
	color: rgba(201, 168, 76, 0.4);
}

.nr-ornament--gold::before,
.nr-ornament--gold::after { display: none; }

.nr-outro-links {
	display: flex;
	gap: 2px;
	width: 100%;
}

.nr-outro-link {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 28px 32px;
	border: 1px solid rgba(201, 168, 76, 0.2);
	text-decoration: none;
	transition: background 0.25s, border-color 0.25s;
}

.nr-outro-link:hover {
	background: rgba(201, 168, 76, 0.08);
	border-color: rgba(201, 168, 76, 0.4);
}

.nr-outro-cat {
	font-size: clamp(14px, calc(10px + 0.4vw), 18px);
	font-family: "Pretendard Variable", sans-serif;
	font-weight: 300;
	color: rgba(201, 168, 76, 0.5);
}

.nr-outro-tit {
	font-size: clamp(18px, calc(12px + 1vw), 22px);
	font-family: "MaruBuri", serif;
	font-weight: 700;
	color: #f5edd8;
}

.nr-outro-arr {
	font-size: clamp(18px, calc(12px + 0.8vw), 22px);
	color: rgba(201, 168, 76, 0.35);
	transition: color 0.2s, transform 0.3s;
}

.nr-outro-link:hover .nr-outro-arr {
	color: rgba(201, 168, 76, 0.7);
	transform: translateX(6px);
}

/* ── 반응형 ── */
@media (max-width: 999px) {
	.nr-layout {
		grid-template-columns: 1fr 220px;
		padding: 0 30px;
	}

	.nr-main {
		padding-right: 40px;
	}
}

@media (max-width: 768px) {
	/* 모바일: is-past 흐림 효과 제거 — 본문 가독성 유지 */
	.nr-hl.is-past,
	.nr-hl--strong.is-past {
		opacity: 1;
	}

	.nr-hero {
		grid-template-columns: 1fr;
		grid-template-rows: auto 4px auto;
		height: auto;
		min-height: 100vh;
	}

	.nr-hero-left {
		padding: 80px 32px 40px;
	}

	.nr-hero-spine {
		height: 4px;
	}

	.nr-hero-right {
		padding: 40px 32px 80px;
	}

	.nr-layout {
		grid-template-columns: 1fr;
		padding: 0 24px;
	}

	.nr-main {
		padding-right: 0;
		border-right: none;
	}

	/* 모바일: 주석 숨김 */
	.nr-margin {
		display: none;
	}

	.nr-article {
		padding: 60px 0 80px;
	}

	.nr-outro-links {
		flex-direction: column;
	}
}

@media (max-width: 499px) {
	.nr-outro {
		padding: 60px 20px;
	}

	.nr-outro::before {
		inset: 12px;
	}
}
