:root {
  --ink: #1a1714;
  --paper: #f2e7d4;
  --paper-2: #fffaf0;
  --ground: #e4d8c5;
  --muted: #746b61;
  --line: rgba(47, 36, 28, 0.16);
  --wine: #762a32;
  --night: #161b1f;
  --blue: #294d63;
  --gold: #b48a45;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin-top: 0; }
button, input { font: inherit; }
[hidden] { display: none !important; }

.v4-header {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 78px;
  padding: 0 clamp(24px, 4.5vw, 72px);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 231, 212, 0.92);
  backdrop-filter: blur(16px);
}
.v4-mark { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.v4-mark b { font-family: var(--serif); font-size: 1.06rem; letter-spacing: 0.18em; }
.v4-mark span { color: var(--muted); font-size: 0.58rem; font-weight: 750; letter-spacing: 0.14em; }
.v4-header nav { display: flex; align-items: center; gap: 28px; }
.v4-header nav a, .future-account { color: var(--muted); font-size: 0.74rem; text-decoration: none; }
.v4-header nav a:hover { color: var(--wine); }
.header-enter { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; }

.v4-kicker { margin-bottom: 22px; color: var(--gold); font-size: 0.67rem; font-weight: 820; letter-spacing: 0.17em; }
.v4-kicker.pale { color: #d5ae73; }
.v4-button {
  display: inline-flex;
  min-height: 56px;
  padding: 0 25px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 2px;
  gap: 42px;
  text-decoration: none;
}
.v4-button.dark { color: #fff; background: var(--ink); }
.v4-button.light-button { color: var(--night); background: var(--paper-2); }
.v4-button strong { font-size: 0.86rem; }
.v4-button span { font-family: Georgia, serif; }
.v4-text-link {
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(26, 23, 20, 0.35);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}
.v4-text-link.light { border-color: rgba(255, 255, 255, 0.4); color: #fff; }

/* Public home */
.v4-hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 78px);
  padding: clamp(74px, 9vw, 132px) clamp(24px, 7vw, 110px) 90px;
  overflow: hidden;
  align-items: center;
  gap: clamp(45px, 7vw, 110px);
  grid-template-columns: minmax(0, 0.92fr) minmax(430px, 1.08fr);
  background:
    radial-gradient(circle at 17% 18%, rgba(118, 42, 50, 0.075), transparent 28%),
    linear-gradient(120deg, #f7eedf, #eadfcf 62%, #e2d4c0);
}
.v4-hero::before {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(73, 58, 42, 0.035) 25%);
  content: "";
  pointer-events: none;
}
.hero-words { position: relative; z-index: 2; max-width: 760px; }
.hero-words h1 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.04; }
.hero-words h1 > span {
  display: block;
  margin-bottom: 28px;
  color: var(--wine);
  font-size: clamp(4.8rem, 9vw, 9.5rem);
  letter-spacing: -0.07em;
}
.hero-words h1 em {
  display: block;
  max-width: 780px;
  font-size: clamp(2.5rem, 4.4vw, 5rem);
  font-style: normal;
  letter-spacing: -0.055em;
}
.hero-lead {
  max-width: 620px;
  margin: 34px 0 0;
  color: #554b42;
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.35vw, 1.22rem);
  line-height: 2.02;
}
.hero-actions { display: flex; margin-top: 36px; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-whisper { margin: 30px 0 0; color: var(--muted); font-family: var(--serif); font-size: 0.83rem; }

.hero-letter { position: relative; width: min(100%, 720px); margin: auto; }
.letter-scene {
  position: relative;
  height: min(68vh, 650px);
  min-height: 480px;
  border: 1px solid rgba(64, 48, 34, 0.16);
  background:
    radial-gradient(circle at 55% 35%, rgba(255, 251, 241, 0.78), transparent 42%),
    linear-gradient(145deg, rgba(255, 250, 240, 0.58), rgba(212, 195, 171, 0.34));
  box-shadow: 0 42px 95px rgba(65, 44, 27, 0.14);
}
.letter-scene::before {
  position: absolute;
  inset: -18px 22px 18px -22px;
  border: 1px solid rgba(71, 54, 39, 0.15);
  content: "";
}
.letter-paper {
  position: absolute;
  z-index: 3;
  top: 16%;
  left: -5%;
  width: 110%;
  padding: 22px;
  border: 1px solid rgba(48, 39, 31, 0.24);
  background: #e9e7df;
  box-shadow: 0 26px 50px rgba(39, 28, 20, 0.2);
  transform: rotate(-2.1deg);
}
.letter-paper img {
  width: 100%;
  filter: saturate(0.72) sepia(0.07) contrast(1.13) brightness(1.035);
}
.letter-envelope {
  position: absolute;
  z-index: 4;
  right: 3%;
  bottom: 5%;
  left: 3%;
  height: 46%;
  overflow: hidden;
  border: 1px solid rgba(61, 44, 31, 0.25);
  background: #d6c0a0;
  box-shadow: 0 24px 42px rgba(44, 31, 20, 0.18);
}
.letter-envelope::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, #e2ceb1, #c8aa83);
  clip-path: polygon(0 0, 50% 63%, 100% 0, 100% 100%, 0 100%);
  content: "";
}
.letter-envelope i {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: 68%;
  background: #ddc5a4;
  clip-path: polygon(0 100%, 0 0, 50% 67%, 100% 0, 100% 100%);
}
.letter-envelope b, .portal-envelope b {
  position: absolute;
  z-index: 5;
  right: 12%;
  bottom: 20%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid rgba(255, 229, 206, 0.26);
  border-radius: 50%;
  color: #f0d9c2;
  background: var(--wine);
  box-shadow: 0 8px 18px rgba(69, 22, 28, 0.34);
  font-family: var(--serif);
  font-size: 1.1rem;
}
.hero-letter figcaption, .portal-letter-art figcaption {
  display: flex;
  margin-top: 15px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
}
.seven-seals { position: absolute; z-index: 6; top: 10%; right: -20px; display: grid; gap: 9px; }
.seven-seals i {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(118, 42, 50, 0.36);
  border-radius: 50%;
  color: var(--wine);
  background: rgba(242, 231, 212, 0.9);
  font: italic 0.75rem Georgia;
}
.seven-seals i:nth-child(2), .seven-seals i:nth-child(5) { transform: translateX(10px); }

.v4-thesis {
  display: grid;
  max-width: 1260px;
  margin: auto;
  padding: clamp(110px, 15vw, 210px) 30px;
  gap: 55px;
  grid-template-columns: 70px minmax(300px, 0.85fr) minmax(320px, 1.15fr);
}
.thesis-index { color: var(--wine); font: italic 0.9rem Georgia; }
.thesis-title h2, .arrival-copy h2, .architecture-heading h2, .v4-closing h2 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.14;
}
.thesis-copy { padding-top: 52px; }
.thesis-copy p { max-width: 620px; color: #51473e; font-family: var(--serif); font-size: 1.12rem; line-height: 2.06; }

.arrival-system { display: grid; min-height: 940px; grid-template-columns: 1fr 1fr; background: var(--night); }
.arrival-art { position: relative; min-height: 760px; overflow: hidden; background: #e9dfcb; }
.arrival-art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.76) contrast(0.95); }
.arrival-art::after { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 70%, rgba(22, 27, 31, 0.38)); content: ""; }
.specimen-label {
  position: absolute;
  z-index: 2;
  left: 36px;
  bottom: 34px;
  padding: 12px 15px;
  color: var(--ink);
  background: rgba(248, 241, 227, 0.88);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1.65;
}
.arrival-copy { display: flex; padding: clamp(80px, 10vw, 155px) clamp(34px, 7vw, 110px); justify-content: center; flex-direction: column; color: #f4eee3; }
.arrival-copy .v4-kicker { color: #d5ae73; }
.arrival-copy h2 { font-size: clamp(2.5rem, 4.5vw, 4.8rem); }
.arrival-copy ol { max-width: 640px; margin: 48px 0 34px; padding: 0; list-style: none; }
.arrival-copy li { display: grid; padding: 24px 0; border-top: 1px solid rgba(255, 255, 255, 0.15); gap: 18px; grid-template-columns: 45px 1fr; }
.arrival-copy li > b { color: #d5ae73; font: italic 0.78rem Georgia; }
.arrival-copy li strong, .arrival-copy li span { display: block; }
.arrival-copy li strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.arrival-copy li span { margin-top: 4px; color: rgba(255, 255, 255, 0.62); font-size: 0.86rem; }

.course-architecture { padding: clamp(110px, 14vw, 190px) clamp(24px, 7vw, 110px); background: var(--paper-2); }
.architecture-heading { max-width: 950px; margin-bottom: 80px; }
.architecture-grid { display: grid; max-width: 1280px; margin: auto; gap: 1px; grid-template-columns: repeat(3, 1fr); background: var(--line); }
.architecture-grid article { min-height: 370px; padding: 46px 38px; background: var(--paper-2); }
.architecture-grid article span { color: var(--gold); font-size: 0.63rem; font-weight: 800; letter-spacing: 0.11em; }
.architecture-grid h3 { margin: 90px 0 18px; font-family: var(--serif); font-size: 2.15rem; font-weight: 500; }
.architecture-grid p { color: var(--muted); font-family: var(--serif); line-height: 1.9; }
.folio-link {
  display: grid;
  max-width: 1280px;
  margin: 55px auto 0;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  align-items: center;
  grid-template-columns: 1fr 1fr 30px;
  text-decoration: none;
}
.folio-link span { font-family: var(--serif); font-size: 1.2rem; }
.folio-link b { color: var(--muted); font-size: 0.62rem; letter-spacing: 0.13em; }
.folio-link i { color: var(--wine); font: italic 1rem Georgia; }
.v4-closing { padding: clamp(130px, 18vw, 250px) 24px; text-align: center; background: radial-gradient(circle at 50% 42%, rgba(118, 42, 50, 0.1), transparent 29%), var(--ground); }
.v4-closing h2 { margin-bottom: 16px; }
.v4-closing > p:not(.v4-kicker) { color: var(--muted); font-family: var(--serif); font-size: 1.2rem; }
.v4-closing .v4-button { margin-top: 30px; }
.v4-footer { display: flex; padding: 32px clamp(24px, 5vw, 72px); justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.7rem; }
.v4-footer a { text-decoration: none; }

/* Personal letter room */
.v4-portal { color: #f5efe5; background: var(--night); }
.portal-header { border-color: rgba(255, 255, 255, 0.11); background: rgba(22, 27, 31, 0.91); }
.portal-header .v4-mark b { color: #fff; }
.portal-header .v4-mark span, .portal-header nav a, .portal-header .future-account { color: rgba(255, 255, 255, 0.58); }
.future-account { padding: 6px 11px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; }
.portal-stage {
  display: grid;
  min-height: calc(100vh - 78px);
  padding: clamp(62px, 8vw, 120px) clamp(24px, 7vw, 110px);
  align-items: center;
  gap: clamp(50px, 8vw, 120px);
  grid-template-columns: minmax(0, 0.92fr) minmax(400px, 1.08fr);
  background: radial-gradient(circle at 14% 19%, rgba(118, 42, 50, 0.26), transparent 31%), var(--night);
}
.portal-current { max-width: 720px; }
.current-stage { margin-bottom: 0; color: rgba(255, 255, 255, 0.55); font-size: 0.74rem; font-weight: 750; letter-spacing: 0.04em; }
.portal-current h1 { margin: 17px 0 8px; font-family: var(--serif); font-size: clamp(3.3rem, 6vw, 6.7rem); font-weight: 500; letter-spacing: -0.06em; line-height: 1.08; }
.current-subtitle { margin: 0 0 25px; color: #d5ae73; font-family: var(--serif); font-size: clamp(1.05rem, 1.6vw, 1.35rem); }
.current-summary { max-width: 590px; color: rgba(255, 255, 255, 0.65); font-family: var(--serif); font-size: 1.08rem; }
.current-actions { display: flex; margin-top: 30px; gap: 10px; flex-wrap: wrap; }
.arrival-button { border: 1px solid rgba(213, 174, 115, 0.55); color: #f5efe5; background: transparent; cursor: pointer; }
.wait-message { display: grid; max-width: 610px; margin-top: 44px; padding-top: 25px; border-top: 1px solid rgba(255, 255, 255, 0.16); gap: 5px; }
.wait-message b { color: #d5ae73; font-family: var(--serif); font-size: 1rem; }
.wait-message span { color: rgba(255, 255, 255, 0.54); font-size: 0.8rem; }

.portal-letter-art { position: relative; width: min(100%, 700px); margin: auto; padding-bottom: 34px; }
.portal-paper {
  position: relative;
  z-index: 3;
  margin: 0 -3%;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #e7e4da;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.28);
  transform: rotate(-1.5deg);
}
.portal-paper img { width: 100%; max-height: 300px; object-fit: cover; filter: saturate(0.7) sepia(0.08) contrast(1.12) brightness(1.03); }
.portal-envelope {
  position: relative;
  z-index: 4;
  height: 285px;
  margin: -22px 3% 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, #d5bc98, #b99368);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.28);
}
.portal-envelope::before { position: absolute; inset: 0; background: #dcc5a3; clip-path: polygon(0 0, 50% 64%, 100% 0, 100% 100%, 0 100%); content: ""; }
.portal-envelope i { position: absolute; z-index: 2; inset: auto 0 0; height: 70%; background: #cfb187; clip-path: polygon(0 100%, 0 0, 50% 67%, 100% 0, 100% 100%); }
.portal-envelope b { right: 12%; bottom: 18%; }
.portal-letter-art figcaption { color: rgba(255, 255, 255, 0.43); }

.journey-folio { color: var(--ink); background: var(--paper-2); }
.journey-folio > header { display: flex; padding: 95px max(30px, calc((100vw - 1280px) / 2)) 55px; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 30px; }
.journey-folio h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.5rem, 4.2vw, 4.5rem); font-weight: 500; }
.journey-folio header p:last-child { max-width: 540px; margin: 12px 0 0; color: var(--muted); font-family: var(--serif); }
.folio-progress { width: min(330px, 100%); color: var(--muted); font-size: 0.72rem; }
.folio-progress i { position: relative; display: block; height: 2px; margin-top: 11px; background: var(--line); }
.folio-progress i b { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--wine); transition: width 0.4s; }
.journey-list { display: grid; max-width: 1320px; margin: auto; padding: 60px 30px 140px; gap: 24px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.journey-envelope {
  position: relative;
  min-height: 295px;
  overflow: hidden;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #eee1cd;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
a.journey-envelope:hover { transform: translateY(-4px); box-shadow: 0 20px 42px rgba(61, 43, 28, 0.12); }
.envelope-number { position: absolute; z-index: 7; top: 18px; left: 20px; color: var(--wine); font: italic 0.72rem Georgia; }
.envelope-paper {
  position: absolute;
  z-index: 2;
  top: 45px;
  right: 19px;
  left: 19px;
  min-height: 155px;
  padding: 27px 22px 45px;
  border: 1px solid rgba(47, 36, 28, 0.16);
  background: #fffaf0;
  box-shadow: 0 12px 25px rgba(50, 34, 23, 0.09);
  transition: transform 220ms ease, opacity 220ms ease;
}
.envelope-paper small, .envelope-paper strong { display: block; }
.envelope-paper small { color: var(--gold); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; }
.envelope-paper strong { margin-top: 10px; font-family: var(--serif); font-size: 1.15rem; font-weight: 500; line-height: 1.45; }
.envelope-shell { position: absolute; z-index: 4; right: 0; bottom: 0; left: 0; height: 57%; border-top: 1px solid rgba(47, 36, 28, 0.15); background: #d6bb93; }
.envelope-shell::before { position: absolute; inset: 0; background: #e0c8a5; clip-path: polygon(0 0, 50% 66%, 100% 0, 100% 100%, 0 100%); content: ""; }
.envelope-shell i { position: absolute; z-index: 2; inset: auto 0 0; height: 72%; background: #cfaf82; clip-path: polygon(0 100%, 0 0, 50% 72%, 100% 0, 100% 100%); }
.envelope-shell b { position: absolute; z-index: 5; right: 18px; bottom: 20px; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #f1d8c0; background: var(--wine); box-shadow: 0 7px 14px rgba(65, 19, 25, 0.25); font-family: var(--serif); font-size: 0.8rem; }
.envelope-state { position: absolute; z-index: 7; bottom: 25px; left: 20px; color: rgba(26, 23, 20, 0.58); font-size: 0.64rem; font-weight: 750; letter-spacing: 0.08em; }
.journey-envelope.is-sealed { background: #e8dfd2; }
.journey-envelope.is-sealed .envelope-paper { opacity: 0.3; transform: translateY(75px); }
.journey-envelope.is-sealed .envelope-shell { filter: grayscale(0.72); opacity: 0.72; }
.journey-envelope.is-arrived { border-color: rgba(118, 42, 50, 0.38); box-shadow: 0 22px 48px rgba(76, 34, 29, 0.14); }
.journey-envelope.is-arrived .envelope-paper { transform: translateY(-13px) rotate(-1deg); }
.journey-envelope.is-open .envelope-paper { transform: translateY(-20px) rotate(-1.3deg); }
.journey-envelope.is-open { border-color: rgba(118, 42, 50, 0.4); }
.journey-envelope.is-replied .envelope-shell b, .journey-envelope.is-returned .envelope-shell b { background: var(--blue); }
.journey-envelope.is-returned { background: #e8e3d9; }
.journey-envelope.is-returned .envelope-paper { transform: translateY(-5px); }

.portal-support {
  display: grid;
  padding: clamp(90px, 12vw, 150px) max(30px, calc((100vw - 1180px) / 2));
  align-items: end;
  gap: 45px;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1.1fr) auto;
  color: #f4eee3;
  background: radial-gradient(circle at 13% 18%, rgba(41, 77, 99, 0.35), transparent 32%), var(--night);
}
.portal-support h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 4.2rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1.25; }
.portal-support > p { margin: 0; color: rgba(255, 255, 255, 0.58); font-family: var(--serif); line-height: 2; }
.portal-note { padding: 35px 24px; text-align: center; color: rgba(255, 255, 255, 0.5); background: #101417; }
.portal-note p { margin: 0; font-size: 0.72rem; }
.dark-footer { border-color: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.46); background: var(--night); }

/* Complete library */
.v4-library { background: var(--paper-2); }
.library-hero {
  display: grid;
  min-height: 66vh;
  padding: clamp(90px, 12vw, 170px) clamp(24px, 7vw, 110px);
  align-items: end;
  gap: 70px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  background: radial-gradient(circle at 13% 12%, rgba(118, 42, 50, 0.1), transparent 28%), var(--paper);
}
.library-hero h1 { margin: 0; white-space: nowrap; font-family: var(--serif); font-size: clamp(4.3rem, 8vw, 8.4rem); font-weight: 500; letter-spacing: -0.075em; line-height: 0.95; }
.library-hero > p { max-width: 610px; margin: 0; color: #554a41; font-family: var(--serif); font-size: 1.13rem; line-height: 2; }
.library-section { padding: clamp(95px, 12vw, 165px) clamp(24px, 7vw, 110px); }
.library-section > header { display: grid; max-width: 1280px; margin: 0 auto 60px; gap: 28px; grid-template-columns: 55px 1fr; }
.library-section > header > span { color: var(--wine); font: italic 0.8rem Georgia; }
.library-section h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 5rem); font-weight: 500; letter-spacing: -0.055em; }
.library-section header p:last-child { max-width: 650px; margin: 16px 0 0; color: var(--muted); font-family: var(--serif); }
.prelude-section { background: var(--paper-2); }
.afterword-section { background: var(--paper); }
.library-grid { display: grid; max-width: 1280px; margin: auto; border-top: 1px solid var(--line); border-left: 1px solid var(--line); grid-template-columns: repeat(3, 1fr); }
.library-grid > a { display: flex; min-height: 265px; padding: 34px 31px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); justify-content: flex-end; flex-direction: column; background: rgba(255, 250, 240, 0.5); text-decoration: none; transition: background 160ms ease; }
.library-grid > a:hover { background: #fffaf0; }
.library-grid small { margin-bottom: auto; color: var(--gold); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; }
.library-grid strong { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; line-height: 1.4; }
.library-grid span { margin-top: 13px; color: var(--muted); font-family: var(--serif); font-size: 0.9rem; line-height: 1.75; }
.library-grid b { margin-top: 22px; color: var(--wine); font-size: 0.68rem; letter-spacing: 0.04em; }
.library-grid .featured-resource { min-height: 360px; grid-column: span 2; color: #f5efe5; background: radial-gradient(circle at 88% 15%, rgba(118, 42, 50, 0.34), transparent 28%), var(--night); }
.library-grid .featured-resource:hover { background: radial-gradient(circle at 88% 15%, rgba(118, 42, 50, 0.46), transparent 30%), #101417; }
.featured-resource small, .featured-resource b { color: #d5ae73; }
.featured-resource strong { font-size: clamp(2.5rem, 4vw, 4.2rem); }
.featured-resource span { max-width: 720px; color: rgba(255, 255, 255, 0.58); }
.library-seven { display: grid; min-height: 760px; padding: clamp(90px, 12vw, 155px) clamp(24px, 7vw, 110px); align-items: center; gap: clamp(55px, 9vw, 130px); grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.1fr); color: #f5efe5; background: var(--night); }
.library-seven-copy h2 { max-width: 720px; margin: 0; font-family: var(--serif); font-size: clamp(2.7rem, 5vw, 5.2rem); font-weight: 500; letter-spacing: -0.055em; line-height: 1.17; }
.library-seven-copy > p:not(.v4-kicker) { max-width: 610px; margin: 28px 0; color: rgba(255, 255, 255, 0.58); font-family: var(--serif); line-height: 2; }
.mini-envelopes { display: grid; gap: 15px; grid-template-columns: repeat(2, 1fr); transform: rotate(-2deg); }
.mini-envelopes i { position: relative; display: grid; min-height: 118px; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.14); color: #d8b47a; background: #c6a477; box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2); font: italic 0.85rem Georgia; }
.mini-envelopes i::before { position: absolute; inset: 0; background: #d7bd97; clip-path: polygon(0 0, 50% 68%, 100% 0, 100% 100%, 0 100%); content: ""; }
.mini-envelopes i::after { position: relative; z-index: 2; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: #f0d8bf; background: var(--wine); content: attr(data-letter); }
.mini-envelopes i:nth-child(7) { grid-column: 1 / -1; }
.mini-envelopes i { color: transparent; }
.mini-envelopes i::after { content: "七"; }
.library-reading { display: grid; padding: clamp(90px, 12vw, 150px) max(30px, calc((100vw - 1180px) / 2)); align-items: end; gap: 45px; grid-template-columns: 1fr 1fr auto; background: var(--paper-2); }
.library-reading h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 4rem); font-weight: 500; letter-spacing: -0.045em; }
.library-reading > p { margin: 0; color: var(--muted); font-family: var(--serif); }

@media (max-width: 980px) {
  .v4-hero, .portal-stage, .library-seven { grid-template-columns: 1fr; }
  .v4-hero { min-height: auto; padding: 80px 38px 110px; gap: 95px; }
  .hero-letter { width: min(88vw, 680px); }
  .v4-thesis { grid-template-columns: 56px minmax(0, 1fr); }
  .thesis-copy { grid-column: 2; padding-top: 0; }
  .portal-stage { padding-top: 90px; }
  .portal-letter-art { width: min(86vw, 650px); }
  .journey-list { grid-template-columns: repeat(2, 1fr); }
  .portal-support, .library-reading { align-items: start; grid-template-columns: 1fr; }
  .library-hero { min-height: auto; grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: repeat(2, 1fr); }
  .library-grid .featured-resource { grid-column: span 2; }
  .mini-envelopes { max-width: 680px; }
}

@media (max-width: 720px) {
  .v4-header { min-height: 64px; padding: 0 20px; }
  .v4-mark span { display: none; }
  .v4-header nav { gap: 14px; }
  .v4-header nav > a:first-child { display: none; }
  .future-account { display: none; }
  .v4-hero { padding: 70px 24px 95px; gap: 72px; }
  .hero-words { width: 100%; min-width: 0; }
  .hero-words h1 > span { font-size: clamp(4rem, 22vw, 5.6rem); }
  .hero-words h1 em {
    max-width: 100%;
    font-size: clamp(2.05rem, 10vw, 2.65rem);
    overflow-wrap: anywhere;
  }
  .hero-lead { max-width: 100%; font-size: 1rem; overflow-wrap: anywhere; }
  .hero-actions { gap: 20px; }
  .hero-letter { width: 100%; }
  .letter-scene { height: 480px; min-height: 0; }
  .letter-paper { top: 15%; left: -10%; width: 120%; padding: 12px; }
  .letter-envelope { right: 0; left: 0; height: 48%; }
  .letter-envelope b { width: 48px; height: 48px; }
  .seven-seals { right: -8px; }
  .v4-thesis { padding: 105px 24px; grid-template-columns: 1fr; gap: 18px; }
  .thesis-copy { grid-column: auto; padding-top: 18px; }
  .arrival-system { min-height: 0; grid-template-columns: 1fr; }
  .arrival-art { min-height: 680px; }
  .arrival-copy { padding: 90px 24px; }
  .architecture-grid { grid-template-columns: 1fr; }
  .architecture-grid article { min-height: 310px; }
  .architecture-grid h3 { margin-top: 60px; }
  .folio-link { grid-template-columns: 1fr 28px; }
  .folio-link b { display: none; }
  .portal-stage { padding: 72px 24px 100px; }
  .portal-current h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
  .portal-paper { margin: 0; padding: 11px; }
  .portal-paper img { max-height: 210px; }
  .portal-envelope { height: 220px; margin-top: -12px; }
  .journey-folio > header { padding: 75px 24px 35px; align-items: start; flex-direction: column; }
  .journey-list { padding: 35px 20px 90px; gap: 14px; grid-template-columns: 1fr; }
  .journey-envelope { min-height: 260px; }
  .portal-support { padding: 90px 24px; }
  .v4-footer { gap: 16px; flex-direction: column; }
  .library-hero { padding: 90px 24px 105px; gap: 42px; }
  .library-hero h1 { white-space: normal; font-size: clamp(3.25rem, 16vw, 4.6rem); }
  .library-section { padding: 90px 24px; }
  .library-section > header { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: 1fr; }
  .library-grid .featured-resource { grid-column: span 1; }
  .library-grid > a { min-height: 235px; }
  .library-seven { min-height: 0; padding: 95px 24px; }
  .mini-envelopes i { min-height: 90px; }
  .library-reading { padding: 90px 24px; }
  .group-hero h1 { white-space: normal; font-size: clamp(3.4rem, 18vw, 4.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .folio-progress i b, .journey-envelope, .envelope-paper { transition: none; }
}

/* Reading index */
.reading-hero { min-height: 58vh; }
.reading-catalog { padding: clamp(90px, 12vw, 160px) clamp(24px, 7vw, 110px); background: var(--paper-2); }
.reading-catalog > article { max-width: 1280px; margin: 0 auto clamp(95px, 12vw, 155px); }
.reading-catalog > article > header { display: grid; margin-bottom: 44px; gap: 28px; grid-template-columns: 54px 1fr; }
.reading-catalog > article > header > span { color: var(--wine); font: italic 0.78rem Georgia; }
.reading-catalog h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.4rem, 4.4vw, 4.6rem); font-weight: 500; letter-spacing: -0.05em; }
.reading-links { display: grid; border-top: 1px solid var(--line); grid-template-columns: repeat(2, 1fr); }
.reading-links a { display: grid; min-height: 150px; padding: 27px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); align-content: space-between; text-decoration: none; }
.reading-links a:nth-child(2n + 1) { border-left: 1px solid var(--line); }
.reading-links a:hover { background: var(--paper); }
.reading-links small { color: var(--gold); font-size: 0.61rem; font-weight: 800; letter-spacing: 0.08em; }
.reading-links strong { margin-top: 22px; font-family: var(--serif); font-size: 1.18rem; font-weight: 500; line-height: 1.55; }
.materials-banner { display: grid; max-width: 1280px; margin: auto; padding: clamp(55px, 8vw, 90px); align-items: end; gap: 45px; grid-template-columns: 1fr auto; color: #f5efe5; background: radial-gradient(circle at 15% 12%, rgba(118, 42, 50, 0.38), transparent 30%), var(--night); }
.materials-banner h2 { font-size: clamp(2.5rem, 4vw, 4.2rem); }
.materials-banner p:not(.v4-kicker) { margin: 14px 0 0; color: rgba(255, 255, 255, 0.55); font-family: var(--serif); }

@media (max-width: 720px) {
  .reading-catalog { padding: 85px 24px; }
  .reading-catalog > article > header { grid-template-columns: 1fr; }
  .reading-links { grid-template-columns: 1fr; }
  .reading-links a, .reading-links a:nth-child(2n + 1) { min-height: 135px; border-left: 1px solid var(--line); }
  .materials-banner { grid-template-columns: 1fr; padding: 55px 28px; }
}

/* Cohort portal */
.group-dashboard { color: #f5efe5; background: var(--night); }
.group-hero { display: grid; min-height: calc(100vh - 78px); padding: clamp(90px, 12vw, 170px) clamp(24px, 8vw, 125px); align-items: center; gap: 80px; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr); background: radial-gradient(circle at 13% 18%, rgba(41, 77, 99, 0.45), transparent 31%), var(--night); }
.group-hero > div:first-child { max-width: 850px; }
.group-hero h1 { margin: 0; white-space: nowrap; font-family: var(--serif); font-size: clamp(4.5rem, 9vw, 9rem); font-weight: 500; letter-spacing: -0.075em; line-height: 0.95; }
.group-hero p:not(.v4-kicker) { max-width: 680px; margin: 34px 0; color: rgba(255, 255, 255, 0.58); font-family: var(--serif); font-size: 1.08rem; line-height: 2; }
.group-seal { display: grid; min-height: 440px; padding: 35px; place-items: center; align-content: center; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.025); gap: 30px; }
.group-seal i { display: grid; width: 170px; height: 170px; place-items: center; border: 3px double rgba(245, 218, 194, 0.42); border-radius: 50%; color: #f0d9c2; background: var(--wine); box-shadow: 0 28px 55px rgba(0, 0, 0, 0.3); font-family: var(--serif); font-size: 3.1rem; font-style: normal; }
.group-seal span { color: rgba(255, 255, 255, 0.44); font-size: 0.61rem; font-weight: 800; letter-spacing: 0.16em; }
.group-grid { display: grid; color: var(--ink); background: var(--line); grid-template-columns: repeat(3, 1fr); gap: 1px; }
.group-grid article { min-height: 430px; padding: clamp(38px, 5vw, 70px); background: var(--paper-2); }
.group-grid small { color: var(--gold); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; }
.group-grid h2 { margin: 100px 0 20px; font-family: var(--serif); font-size: clamp(2rem, 3vw, 3.2rem); font-weight: 500; }
.group-grid p { color: var(--muted); font-family: var(--serif); line-height: 1.9; }
.group-grid a, .group-grid span { display: inline-block; margin-top: 20px; color: var(--wine); font-size: 0.72rem; font-weight: 750; text-decoration: none; }
.group-grid span { color: var(--muted); }

@media (max-width: 820px) {
  .group-hero { min-height: auto; padding: 90px 24px; grid-template-columns: 1fr; }
  .group-seal { min-height: 340px; }
  .group-grid { grid-template-columns: 1fr; }
  .group-grid article { min-height: 340px; }
  .group-grid h2 { margin-top: 65px; }
}
