/* =========================================================
   SIREN 추모관 v2 — 선생님 개별 화면 (2026-08-28 재구축)
   ---------------------------------------------------------
   맨 위 한 화면만 어스름한 밤으로 예를 갖추고,
   그 아래부터는 아침빛으로 밝아진다.
   추모의 예의는 지키되 어둠에 잠기지 않게 —
   내려갈수록 밝아지는 흐름이 곧 이 화면의 태도다.

   색·글꼴은 memorial.css 의 값을 그대로 쓴다(두 화면이 한 세계처럼 보이게).
   이 화면의 요소는 모두 mt2- 로 시작한다(다른 화면 스타일에 기대지 않는다).
   ========================================================= */

.mt2 { background: var(--m2-morn-1); color: var(--m2-earth); }
.mt2 * { box-sizing: border-box; }
.mt2-wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.mt2-center { text-align: center; margin-top: 32px; }

/* ══ 1. 첫 화면 — 어스름한 밤 ═══════════════════════════ */
.mt2-hero {
  position: relative; padding: 72px 0 104px; overflow: hidden;
  color: var(--m2-ink);
  background:
    radial-gradient(88% 62% at 50% 4%, rgba(72, 96, 150, .30), transparent 66%),
    radial-gradient(64% 48% at 12% 96%, rgba(232, 168, 85, .12), transparent 68%),
    linear-gradient(180deg, var(--m2-night-1) 0%, var(--m2-night-2) 60%, var(--m2-night-3) 100%);
}
/* 밤이 아침으로 풀리는 자리 */
.mt2-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 140px;
  background: linear-gradient(180deg, transparent, rgba(251, 248, 243, .10) 44%, var(--m2-morn-1) 100%);
  pointer-events: none;
}
.mt2-hero-sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mt2-hero-inner { position: relative; z-index: 1; }

.mt2-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: rgba(238, 241, 247, .58); text-decoration: none;
  margin-bottom: 46px; transition: color .2s ease;
}
.mt2-back:hover { color: var(--m2-candle); }

/* 한 사람에게 오롯이 집중하도록 가운데로 모은다.
   숫자·약력을 늘어놓지 않고 얼굴과 이름과 한 문장만 남긴다. */
.mt2-head { text-align: center; max-width: 700px; margin: 0 auto; }

.mt2-lead-line {
  font-size: 12.5px; letter-spacing: .16em;
  color: rgba(238, 241, 247, .5); margin: 0 0 24px; word-break: keep-all;
}

.mt2-quote {
  font-family: var(--m2-serif); font-weight: 700;
  font-size: clamp(20px, 3.5vw, 32px); line-height: 1.74;
  color: #F7EEE0; margin: 0 0 50px; word-break: keep-all; text-wrap: balance;
}
.mt2-quote::before { content: '\201C'; margin-right: 2px; }
.mt2-quote::after  { content: '\201D'; margin-left: 2px; }

.mt2-frame { margin: 0 0 36px; }
.mt2-portrait {
  width: 100%; max-width: 440px; aspect-ratio: 4 / 3;
  margin: 0 auto; border-radius: 16px; overflow: hidden; position: relative;
  background:
    radial-gradient(circle at 50% 36%, rgba(232, 168, 85, .20), rgba(12, 20, 36, .96) 66%),
    var(--m2-night-2);
  border: 1px solid rgba(255, 255, 255, .11);
  box-shadow: 0 26px 64px rgba(0, 0, 0, .46);
  display: flex; align-items: center; justify-content: center;
}
.mt2-portrait img { width: 100%; height: 100%; object-fit: cover; }
.mt2-portrait .m2-silhouette { width: 84px; height: 84px; opacity: .32; }
.mt2-frame-cap {
  font-size: 12px; color: rgba(238, 241, 247, .38);
  margin-top: 15px; word-break: keep-all;
}

.mt2-name {
  font-family: var(--m2-serif); font-weight: 700; color: #FFFFFF;
  font-size: clamp(27px, 4.6vw, 40px); line-height: 1.3;
  margin: 0 0 18px; letter-spacing: -.035em; word-break: keep-all;
}

/* 두 해 사이에 가는 선을 둔다 — 한 생애가 지나간 자리 */
.mt2-years {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 13.5px; letter-spacing: .1em; color: var(--m2-candle);
}
.mt2-years::before, .mt2-years::after {
  content: ''; height: 1px; width: 48px;
  background: linear-gradient(90deg, transparent, rgba(232, 168, 85, .55), transparent);
}

.mt2-meta {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center;
  font-size: 13px; color: rgba(238, 241, 247, .5); margin-top: 16px;
}

/* ══ 아래는 아침빛 — 구간 공통 ══════════════════════════ */
.mt2-sec { padding: 76px 0; }
.mt2-sec + .mt2-sec { border-top: 1px solid rgba(44, 49, 45, .08); }
.mt2-sec-head { margin-bottom: 40px; text-align: center; }

.mt2-tag {
  display: inline-block; margin-bottom: 14px;
  font-size: 11.5px; letter-spacing: .08em; color: var(--m2-bloom);
  background: rgba(214, 142, 58, .09);
  border: 1px solid rgba(214, 142, 58, .26);
  padding: 5px 13px; border-radius: 999px;
}
.mt2-h2 {
  font-family: var(--m2-serif); font-weight: 700; color: var(--m2-earth);
  font-size: clamp(22px, 3.4vw, 29px); margin: 0 0 12px;
  letter-spacing: -.03em; word-break: keep-all;
}
.mt2-desc {
  font-size: 14px; line-height: 1.9; color: var(--m2-earth-mute);
  margin: 0 auto; word-break: keep-all; max-width: 54ch;
}

/* 소개는 제목 없이 글만 — 조용히 읽히도록 */
.mt2-sec-bio { padding: 62px 0 14px; }
.mt2-sec-bio .mt2-wrap { max-width: 690px; }
.mt2-bio {
  font-family: var(--m2-serif);
  font-size: 15.5px; line-height: 2.15; color: rgba(44, 49, 45, .86);
  word-break: keep-all; text-align: center;
}
/* 여러 줄로 이어지는 글은 왼쪽에서 읽는 편이 훨씬 편하다.
   짧은 한두 줄만 가운데에 둔다(JS가 길이를 보고 붙여준다). */
.mt2-bio.is-long, .mt2-free-body.is-long { text-align: left; }
.mt2-bio.is-long p { text-indent: 0; }
.mt2-bio p { margin: 0 0 18px; }
.mt2-bio p:last-child { margin-bottom: 0; }
.mt2-bio img { max-width: 100%; height: auto; border-radius: 12px; }

/* ══ 2-1. 운영자가 직접 늘린 구간 ═══════════════════════ */
.mt2-sec-free .mt2-wrap { max-width: 700px; }
.mt2-free-title { text-align: center; margin-bottom: 26px; }
.mt2-free-img {
  border-radius: 14px; overflow: hidden; margin-bottom: 24px;
  border: 1px solid rgba(44, 49, 45, .10);
  box-shadow: 0 4px 18px rgba(44, 49, 45, .07);
}
.mt2-free-img img { width: 100%; height: auto; display: block; }
.mt2-free-body {
  font-family: var(--m2-serif);
  font-size: 15.5px; line-height: 2.15; color: rgba(44, 49, 45, .86);
  word-break: keep-all; text-align: center;
}

/* ══ 빈 자리 — 비어 있음을 알리되, 채워달라고 청한다 ════ */
.mt2-blank { text-align: center; padding: 30px 20px 8px; }
.mt2-blank-line {
  font-family: var(--m2-serif); font-size: 16px; font-weight: 700;
  color: var(--m2-earth); margin: 0 0 12px; word-break: keep-all;
}
.mt2-blank-sub {
  font-size: 13.5px; line-height: 1.95; color: var(--m2-earth-mute);
  margin: 0; word-break: keep-all; white-space: pre-line;
}
.mt2-blank .mt2-ghost { display: inline-block; text-decoration: none; }

/* ══ 3. 선생님의 어느 하루 — 폴라로이드 ═════════════════ */
.mt2-polas {
  display: grid; gap: 30px 24px;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  padding-top: 6px;
}
.mt2-pola {
  appearance: none; padding: 13px 13px 20px; cursor: pointer; font: inherit;
  color: inherit; display: block; width: 100%;
  background: #FFFFFF; border: 1px solid rgba(44, 49, 45, .10);
  border-radius: 3px;
  box-shadow: 0 10px 26px rgba(44, 49, 45, .11);
  transition: transform .34s cubic-bezier(.2, .7, .3, 1), box-shadow .3s ease;
}
/* 손으로 놓아둔 것처럼 조금씩 기울여 둔다 */
.mt2-pola:nth-child(4n+1) { transform: rotate(-1.3deg); }
.mt2-pola:nth-child(4n+2) { transform: rotate(.9deg); }
.mt2-pola:nth-child(4n+3) { transform: rotate(-.6deg); }
.mt2-pola:nth-child(4n+4) { transform: rotate(1.5deg); }
.mt2-pola:hover, .mt2-pola:focus-visible {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 22px 44px rgba(44, 49, 45, .18);
}
.mt2-pola-img {
  aspect-ratio: 1 / 1; background: var(--m2-morn-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.mt2-pola-img img { width: 100%; height: 100%; object-fit: cover; }
.mt2-pola-cap {
  font-family: var(--m2-serif); font-weight: 700;
  font-size: 13.5px; line-height: 1.65; text-align: center;
  color: rgba(44, 49, 45, .88); margin: 15px 2px 0; word-break: keep-all;
}
.mt2-pola-when {
  display: block; text-align: center; margin-top: 7px;
  font-size: 11px; color: var(--m2-earth-mute);
}

/* ══ 4. 기억의 편지 — 봉투 ══════════════════════════════ */
.mt2-sec-letters { background: var(--m2-morn-2); }
.mt2-envelopes {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.mt2-env {
  appearance: none; cursor: pointer; font: inherit; text-align: left;
  display: flex; flex-direction: column; min-height: 208px;
  padding: 24px 24px 20px; position: relative; overflow: hidden;
  background: #FFFFFF; border: 1px solid rgba(44, 49, 45, .11);
  border-radius: 14px; box-shadow: 0 3px 14px rgba(44, 49, 45, .06);
  transition: transform .3s cubic-bezier(.2, .7, .3, 1), box-shadow .3s ease, border-color .3s ease;
}
/* 봉투 덮개 */
.mt2-env::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 54px;
  background: linear-gradient(180deg, rgba(214, 142, 58, .12), rgba(214, 142, 58, 0));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: none;
}
.mt2-env:hover, .mt2-env:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(214, 142, 58, .4);
  box-shadow: 0 20px 40px rgba(44, 49, 45, .14);
}
.mt2-env-title {
  font-family: var(--m2-serif); font-size: 16.5px; font-weight: 700;
  color: var(--m2-earth); margin: 6px 0 12px; word-break: keep-all; line-height: 1.55;
}
.mt2-env-peek {
  font-size: 13.5px; line-height: 1.95; color: rgba(44, 49, 45, .66);
  margin: 0 0 auto; word-break: keep-all;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mt2-env-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(44, 49, 45, .08);
  font-size: 12.5px; color: var(--m2-earth-mute);
}
.mt2-env-open { color: var(--m2-bloom); font-weight: 500; }

/* 열린 편지 */
.mt2-sheet {
  max-width: 640px; padding: 40px 38px 34px;
  background:
    repeating-linear-gradient(180deg, transparent, transparent 37px, rgba(44, 49, 45, .05) 38px),
    #FFFDF8;
}
.mt2-sheet-top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 12.5px; color: var(--m2-earth-mute); margin-bottom: 16px;
}
.mt2-sheet-to { color: var(--m2-bloom); }
.mt2-sheet-title {
  font-family: var(--m2-serif); font-size: 21px; font-weight: 700;
  color: var(--m2-earth); margin: 0 0 22px; word-break: keep-all; line-height: 1.6;
}
.mt2-sheet-body {
  font-family: var(--m2-serif);
  font-size: 15px; line-height: 2.35; color: rgba(44, 49, 45, .86);
  white-space: pre-line; word-break: keep-all; margin: 0 0 26px;
}
.mt2-sheet-from {
  text-align: right; font-size: 13.5px; color: var(--m2-earth);
  padding-top: 16px; border-top: 1px solid rgba(44, 49, 45, .09);
}

/* ══ 5·6. 남기는 자리 ═══════════════════════════════════ */
.mt2-sec-offer { background: var(--m2-morn-2); }
.mt2-paper {
  border-radius: 20px; padding: 32px 30px;
  background: #FFFFFF; border: 1px solid rgba(44, 49, 45, .10);
  box-shadow: 0 4px 20px rgba(44, 49, 45, .06);
  max-width: 700px; margin: 0 auto;
}
.mt2-field { margin-bottom: 20px; }
.mt2-field label {
  display: block; font-size: 13.5px; font-weight: 500;
  color: var(--m2-earth); margin-bottom: 9px;
}
.mt2-opt { font-weight: 400; color: var(--m2-earth-mute); }
.mt2-input {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--m2-earth);
  background: var(--m2-morn-1); border: 1px solid rgba(44, 49, 45, .14);
  border-radius: 11px; padding: 13px 15px; line-height: 1.7;
  transition: border-color .2s ease, background .2s ease;
}
.mt2-input::placeholder { color: rgba(110, 118, 112, .72); }
.mt2-input:focus { outline: none; border-color: var(--m2-bloom); background: #FFFFFF; }
.mt2-area { min-height: 128px; resize: vertical; }
.mt2-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-top: 6px;
}
.mt2-check {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--m2-earth-mute); cursor: pointer;
}
.mt2-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 500;
  background: var(--m2-bloom); color: #FFFFFF; border: 1px solid transparent;
  padding: 13px 26px; border-radius: 11px;
  transition: background .22s ease, transform .22s ease;
}
.mt2-btn:hover { background: #C07E2C; }
.mt2-btn:active { transform: translateY(1px); }
.mt2-btn[disabled] { opacity: .55; cursor: default; }
.mt2-ghost {
  appearance: none; cursor: pointer; font: inherit; font-size: 13.5px;
  background: none; color: var(--m2-earth); border: 1px solid rgba(44, 49, 45, .2);
  padding: 11px 24px; border-radius: 999px;
  transition: border-color .22s ease, color .22s ease;
}
.mt2-ghost:hover { border-color: var(--m2-bloom); color: var(--m2-bloom); }
.mt2-hint {
  font-size: 12.5px; line-height: 1.85; color: var(--m2-earth-mute);
  margin: 18px 0 0; word-break: keep-all;
}

/* 무엇을 남길지 고르는 두 갈래 — 남는 모습이 서로 다르다는 걸 보여준다 */
.mt2-ways {
  display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 26px;
}
.mt2-way {
  appearance: none; cursor: pointer; font: inherit; text-align: center;
  border: 1px solid rgba(44, 49, 45, .15); background: none; color: var(--m2-earth);
  padding: 19px 14px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.mt2-way .m2-emoji { font-size: 22px; line-height: 1; color: var(--m2-bloom); }
.mt2-way b { font-size: 15px; font-weight: 600; }
.mt2-way small { font-size: 12px; line-height: 1.6; color: var(--m2-earth-mute); word-break: keep-all; }
.mt2-way[aria-selected="true"] {
  border-color: var(--m2-bloom); background: rgba(214, 142, 58, .09); transform: translateY(-2px);
}
.mt2-way[aria-selected="true"] small { color: var(--m2-bloom); }
.mt2-area-sm { min-height: 92px; }

/* ══ 7. 남겨진 한마디 ═══════════════════════════════════ */
.mt2-notes {
  display: grid; gap: 15px;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
}
.mt2-note {
  background: #FFFFFF; border: 1px solid rgba(44, 49, 45, .10);
  border-radius: 14px; padding: 21px 22px;
  box-shadow: 0 2px 10px rgba(44, 49, 45, .04);
}
.mt2-note-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 11px;
}
.mt2-note-name { font-size: 13.5px; font-weight: 500; color: var(--m2-earth); }
.mt2-note-date { font-size: 12px; color: var(--m2-earth-mute); }
.mt2-note-body {
  font-size: 14px; line-height: 1.95; color: rgba(44, 49, 45, .82);
  margin: 0; word-break: keep-all; white-space: pre-line;
}

/* ══ 겹쳐 뜨는 화면 ═════════════════════════════════════ */
.mt2-lightbox {
  position: fixed; inset: 0; z-index: 80; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(28, 32, 29, .8);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.mt2-lightbox.on { display: flex; }
.mt2-lb-inner {
  max-width: 760px; width: 100%; max-height: 90vh; overflow: auto;
  background: var(--m2-morn-1); border: 1px solid rgba(44, 49, 45, .12);
  border-radius: 20px;
}
.mt2-lb-img { width: 100%; max-height: 56vh; object-fit: contain; background: var(--m2-morn-2); display: block; }
.mt2-lb-body { padding: 26px 28px 30px; }
.mt2-lb-when { font-size: 12px; color: var(--m2-bloom); display: block; margin-bottom: 10px; }
.mt2-lb-cap {
  font-family: var(--m2-serif); font-size: 18px; font-weight: 700;
  line-height: 1.6; margin: 0 0 14px; word-break: keep-all; color: var(--m2-earth);
}
.mt2-lb-detail {
  font-size: 14px; line-height: 2; color: rgba(44, 49, 45, .8);
  word-break: keep-all; margin: 0; white-space: pre-line;
}
.mt2-lb-close {
  position: absolute; top: 22px; right: 24px;
  appearance: none; border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(0, 0, 0, .35);
  color: #fff; width: 42px; height: 42px; border-radius: 50%;
  cursor: pointer; font-size: 18px; line-height: 1;
}

/* ══ 상태 ═══════════════════════════════════════════════ */
.mt2-empty, .mt2-loading {
  text-align: center; padding: 44px 20px; font-size: 14px;
  color: var(--m2-earth-mute); line-height: 1.9;
}

/* ══ 반응형 ═════════════════════════════════════════════ */
@media (max-width: 640px) {
  .mt2-hero { padding: 48px 0 84px; }
  .mt2-back { margin-bottom: 32px; }
  .mt2-quote { margin-bottom: 36px; }
  .mt2-sec { padding: 56px 0; }
  .mt2-polas { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 14px; }
  .mt2-pola { padding: 9px 9px 15px; }
  .mt2-envelopes { grid-template-columns: 1fr; }
  .mt2-notes { grid-template-columns: 1fr; }
  .mt2-paper { padding: 25px 20px; }
  .mt2-ways { grid-template-columns: 1fr; gap: 10px; }
  .mt2-way { flex-direction: row; gap: 12px; text-align: left; padding: 15px 16px; }
  .mt2-way b { flex: none; }
  .mt2-way small { display: none; }
  .mt2-sheet { padding: 30px 22px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .mt2-pola, .mt2-env, .mt2-btn { transition: none; }
  .mt2-pola { transform: none; }
}
