/* SENTIENCE 홈 시안 (2026.10.16)
   가운데 제호 마스트헤드와 그 아래 섹션 띠, 첫 화면(사진 | 인사)과 공개 자료, 양옆까지 닿는 표지 띠.
   서체는 fonts/에 둔 원본 파일을 그대로 쓴다(라이선스는 fonts/의 txt. 글꼴 파일을 고치거나 줄이지 않는다).
   Pretendard는 공식 배포본의 나눠 받는 파일(fonts/pretendard/)이라 @font-face가 그 폴더의 pretendard.css에 있고, 각 페이지가 따로 불러온다. */

/* ---------- 서체 ---------- */
/* font-display: block — 대체 글꼴로 먼저 그렸다가 바뀌어 보이지 않게, 글꼴이 올 때까지(길어야 3초) 글자를 비워 둔다.
   글꼴은 _headers에서 1년 동안 브라우저에 저장하게 했으므로 두 번째 방문부터는 바로 나온다 */
@font-face {
  font-family: "Sentient";
  src: url("fonts/Sentient-Variable.woff2") format("woff2");
  font-weight: 200 700;
  font-display: block;
}
/* 홈 표지 칸의 남은 시간 숫자: 애플 기기에 깔린 Apple SD Gothic Neo의 Light를 이름으로 집어 쓴다(파일을 내려보내지 않는다).
   굵기(300)로만 고르면 Mac의 Chrome이 Thin을 고른다. 없는 기기에서는 이 글꼴을 건너뛰고 Pretendard Light */
@font-face {
  font-family: "SD Gothic Light";
  src: local("AppleSDGothicNeo-Light"), local("Apple SD Gothic Neo Light");
  font-weight: 300;
}

/* ---------- 토큰 ---------- */
:root {
  --ink: #121417;
  --ink-2: #3A3F47;
  --muted: #646B75;
  --line: #DADDE2;
  --soft: #F2F3F5;
  --paper: #fff;
  --cream: #F6F1E7;
  --navy: #0E2342;
  --accent: #119911;  /* 2026-11-08 운영자 결정으로 주황(#DB4F27)에서 초록으로(같은 날 #01A119, #22BB22를 거쳐 #119911로). 흰 바탕 대비 3.8:1이라 작은 글자에는 --accent-hover */
  --accent-hover: #0E810E;  /* #119911을 어둡게. 흰 바탕 대비 5:1(예전 주황 #C4421D와 같은 정도) */
  --accent-soft: color-mix(in srgb, var(--accent) 50%, #fff);  /* 연한 초록(#88CC88): 독자 질문 주소에 마우스를 올렸을 때 */
  --ask-bg: #001741;  /* 독자 질문 띠의 짙은 남색. 맨 위로 버튼도 같은 색 */

  /* 섹션 색(전 호 고정). -ink는 흰 바탕 위 작은 글자용으로 어둡게 낮춘 값(대비 5:1 이상) */
  --frontline: #BB8C2E;  --frontline-bg: #F8F0D3;  --frontline-ink: #8A6512;
  --excavate:  #438F9D;  --excavate-bg:  #C4E1E6;  --excavate-ink:  #2E6F7B;
  --examples:  #AA4C2A;  --examples-bg:  #F6C9B9;  --examples-ink:  #9A4223;
  --insights:  #4B5057;  --insights-bg:  #E8EFF6;  --insights-ink:  #4B5057;

  --font-sans: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-serif: "Sentient", "Pretendard", Georgia, serif;

  --wrap: 1120px;
  /* 홈 섹션 사이 여백(앞 섹션의 글 끝에서 다음 섹션의 제목이나 글까지). 모든 사이가 150px, 맨 위(메뉴 띠 → Value)만 75px(2026-11-10 운영자).
     섹션마다 위아래에 이 값의 절반씩 두므로, 바탕색이 바뀌는 곳에서는 바탕 경계가 가운데에 온다(맨 아래 독자 질문 띠만 띠 안 여백 --ask-edge를 빼고 맞춘다) */
  --sec-gap: 150px;
  --ask-edge: clamp(28px, 3vw, 44px);  /* 독자 질문 띠의 안쪽 위아래 여백 */
  --gutter: clamp(20px, 5vw, 64px);
  --icon-inset: 11px;  /* 메뉴 버튼 왼쪽 끝에서 아이콘 선이 시작하기까지. 마스트헤드 여백에서 빼서 선을 본문 왼쪽 끝에 맞춘다 */
  --header-h: 98px;                  /* 위에 붙어 있는 마스트헤드 높이 */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* 홈: 맨 위에서 더 끌어올려도 페이지가 고무줄처럼 늘어나 큰 제호 위로 빈 곳이 드러나지 않게(맨 아래에서도 같이 멈춘다) */
html:has(.masthead-grand) { overscroll-behavior-y: none; }

/* 페이지 사이 이동: 같은 사이트 안에서 페이지를 옮길 때 하얗게 깜빡이지 않고 본문이 서서히 바뀐다(페이드만).
   헤더는 따로 떼어 제자리에 둔다. 이 기능(View Transitions)을 지원하지 않는 브라우저에서는 평소처럼 바로 바뀐다 */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out .32s ease-in both; }
::view-transition-new(root) { animation: page-in .6s ease-out both; }
::view-transition-group(masthead) { animation: none; }
::view-transition-old(masthead) { display: none; }
::view-transition-new(masthead) { animation: none; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; } }

/* 페이지를 열 때: 글꼴과 로그인, 구독 상태가 갖춰질 때까지 비워 두었다가 한 번에 보인다(boot.js가 붙이고 main.js가 뗀다. 길어도 1초).
   사이트 안에서 옮길 때(is-booting)는 제호와 메뉴 버튼을 두고 본문, 섹션 띠, 헤더 오른쪽 버튼, 푸터만 비운다.
   새로고침이나 다른 사이트에서 들어올 때(is-booting-all)는 페이지 전체를 비운다. 그동안 브라우저는 이전 화면을 그대로 둔다 */
.is-booting :is(main, .sec-nav, .mh-actions, .site-footer),
.is-booting-all body { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h2, h3 { text-wrap: balance; }  /* 제목 줄 길이를 고르게 */
/* 본문 글(문단, 목록, 설명 값)은 양쪽 정렬(2026-11-01 운영자 결정). 한 줄짜리 글은 마지막 줄이라 그대로 왼쪽이다.
   낱말 중간에서 줄을 바꾸지 않으므로(keep-all) 좁은 칸에서는 낱말 사이가 조금 벌어진다.
   :where()로 우선순위를 0으로 두어, 칸마다 정한 정렬(가운데, 오른쪽)이 그대로 이긴다.
   가운데 정렬한 상자(묻는 창, 리더의 안내 칸, 탈퇴 인사) 안의 글과 바닥글은 상자의 정렬을 따른다 */
:where(p, li, dd) { text-align: justify; }
:where(.ask-dialog, .rd-lock, .rd-gate, .farewell-body, .site-footer) :where(p, li, dd) { text-align: inherit; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }  /* width·height 속성은 비율 예약용. 실제 높이는 aspect-ratio나 칸이 정한다 */
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
/* 끌어서 고른 글: 연한 초록 바탕(2026-11-25 운영자 요청). 글자는 어느 바탕에서나 읽히게 검정으로
   (짙은 남색 구역의 흰 글씨, 초록 강조 글씨는 연한 초록 위에서 흐리다) */
::selection { background: var(--accent-soft); color: var(--ink); }

.container { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.s-frontline { --sec: var(--frontline); --sec-bg: var(--frontline-bg); --sec-ink: var(--frontline-ink); }
.s-excavate  { --sec: var(--excavate);  --sec-bg: var(--excavate-bg);  --sec-ink: var(--excavate-ink); }
.s-examples  { --sec: var(--examples);  --sec-bg: var(--examples-bg);  --sec-ink: var(--examples-ink); }
.s-insights  { --sec: var(--insights);  --sec-bg: var(--insights-bg);  --sec-ink: var(--insights-ink); }

/* ---------- 버튼 ---------- */
/* 본 사이트와 같은 비대칭 모서리(좌상·우상·좌하 : 우하 = 12 : 5).
   기본 버튼은 바탕 없이 강조색(초록) 테두리와 글씨. 테두리는 box-shadow로 그려 버튼 크기가 바뀌지 않게 한다 */
.btn-cta {
  --k: 1px;  /* 모서리: 좌상, 우상, 좌하 12 : 우하 5 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: calc(12 * var(--k)) calc(12 * var(--k)) calc(5 * var(--k)) calc(12 * var(--k));
  background-color: transparent;
  box-shadow: inset 0 0 0 1.5px var(--accent);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, box-shadow .1s, transform .1s;
}
.btn-cta:hover { background-color: rgba(17, 153, 17, .1); }
.btn-cta:active { transform: translateY(2px); }
.btn-cta-lg { --k: 1.2px; height: 52px; padding: 0 26px; font-size: 17px; }
.btn-cta-lg:active { transform: translateY(3px); }
.btn-block { width: 100%; }
/* 검은 테두리 버튼: 흰 바탕 위에서 흰 테두리 버튼(.btn-hollow) 대신 쓰는 둘째 버튼(상세 페이지의 '주제 제안하기', 구독자의 메뉴 서랍 'Mypage' 등) */
.btn-ink { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ink:hover { background-color: var(--soft); }
/* 흰 테두리 버튼: 기본 버튼의 강조색 대신 흰 테두리와 흰 글씨(어두운 띠 위의 '샘플 호 읽기') */
.btn-hollow { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .75); }
.btn-hollow:hover { background-color: rgba(255, 255, 255, .1); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.icon-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* 더 보기 링크: 강조색 글자 + 꺾쇠 */
.more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}
.more::after {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s;
}
.more:hover::after { transform: translateX(3px) rotate(45deg); }
.more-light { color: #fff; }

/* ---------- 마스트헤드 ---------- */
.mh {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);  /* minmax(0, ..): 긴 닉네임이 양옆 칸을 밀어 제호를 옮기지 않게 */
  align-items: center;
  gap: 16px;
  /* 양 끝을 본문(.container)과 같은 여백에 맞춘다: 왼쪽은 메뉴 아이콘 선, 오른쪽은 구독 버튼 끝 */
  padding: 26px var(--gutter) 24px calc(var(--gutter) - var(--icon-inset));
}
.mh-logo { justify-self: center; margin-left: var(--icon-inset); color: var(--ink); }  /* 왼쪽 여백이 좁은 만큼 보정해 화면 가운데에 */
.mh-logo svg { height: 48px; width: auto;  /* 휴대폰(600px 이하)에서만 한 줄에 맞춰 줄인다 */ aspect-ratio: 1133.86 / 214; fill: currentColor; }
.mh-actions { justify-self: end; display: flex; align-items: center; gap: 14px; min-width: 0; max-width: 100%; }
.mh-login { font-size: 15px; font-weight: 700; text-decoration: none; padding: 0 4px; }
.mh-login:hover { color: var(--accent-soft); }  /* 마우스를 올리면 밑줄 대신 연한 초록(2026-11-11 운영자 요청) */
.mh-login[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
/* 오른쪽 위 '구독하기': 테두리 없이 강조색 글씨만(로그인과 같은 크기) */
.mh-actions .btn-cta { height: auto; padding: 0 4px; box-shadow: none; }
.mh-actions .btn-cta:hover { background: none; color: var(--accent-soft); }
.mh-actions .btn-cta[aria-current="page"] { background: none; text-decoration: underline; text-underline-offset: 5px; }
.mh-actions .btn-cta:active { transform: none; }

/* 마스트헤드는 스크롤해도 위에 붙어 있다. 반투명 흰 바탕 뒤로 지나가는 내용은 흐리게 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  view-transition-name: masthead;  /* 페이지를 옮길 때 헤더는 움직이지 않는다 */
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
}

.mh-left { display: flex; align-items: center; }

/* 홈: 맨 위에서는 제호가 2.8배(134px). 내리는 만큼 바로 줄어 원래 크기(48px)가 된다.
   줄어든 정도(--mh-p, 맨 위 0 ~ 다 줄면 1)는 main.js가 스크롤할 때마다 바꾼다. 커진 만큼(최대 86px) 내리면 다 준다.
   줄어든 만큼 헤더 아래에 여백을 두어 헤더가 차지하는 자리는 그대로다. 그래서 헤더 아래 끝이 본문과 함께 올라가고 본문은 평소처럼 움직인다.
   다 키울 자리가 없으면 덜 키운다: 양옆 칸(오른쪽 검색, 로그인, 구독 211px)이 줄지 않을 만큼만. 휴대폰(600px 이하)은 그대로 */
@property --mh-grand { syntax: "<length>"; inherits: true; initial-value: 48px; }  /* main.js가 px 값으로 읽게 */
.masthead-grand {
  --mh-p: 0;
  --mh-grand: clamp(48px, 16.98vw - 90px, 134px);
  margin-bottom: calc(var(--mh-p) * (var(--mh-grand) - 48px));
}
.masthead-grand .mh-logo svg { height: calc(var(--mh-grand) - var(--mh-p) * (var(--mh-grand) - 48px)); }

/* 로그인한 뒤: 로그인, 구독하기 대신 '닉네임님, 안녕하세요'. 닉네임을 누르면 마이페이지 */
.mh-greet { display: none; margin: 0; font-size: 15px; line-height: 1.4; white-space: nowrap; }
.is-signed-in .mh-greet { display: flex; align-items: baseline; min-width: 0; }  /* 칸이 좁으면 닉네임이 말줄임으로 줄어든다 */
.mh-hello { flex: none; }
.is-signed-in .mh-actions .mh-login,
.is-signed-in .mh-actions .btn-cta { display: none; }
.mh-nick {
  display: inline-block;
  max-width: 9em;  /* 긴 닉네임은 말줄임 */
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  color: var(--ink);
  text-decoration: none;
}
.mh-nick strong { font-weight: 800; }
.mh-nick:hover { color: var(--accent-soft); }

/* ---------- 검색 ---------- */
/* 헤더 바로 아래에 겹쳐 내려온다(본문을 밀지 않는다).
   바깥 틀(.search-panel)이 헤더 아래 경계에서 잘라 주고, 안쪽 판(.search-sheet)이 그 밑에서 미끄러져 나오고 들어간다 */
.search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  overflow: hidden;
  padding-bottom: 40px;  /* 판의 그림자가 잘리지 않을 자리 */
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear .32s;  /* 닫힐 때는 미끄러져 들어간 뒤에 숨긴다 */
}
.search-panel[hidden] { display: none; }
.search-panel.is-open { visibility: visible; transition: none; }
.search-sheet {
  border-bottom: 1px solid var(--line);
  background: #fff;  /* 결과가 뒤 내용과 겹쳐 보이지 않게 불투명 */
  box-shadow: 0 16px 32px rgba(18, 20, 23, .08);
  pointer-events: auto;
  transform: translateY(calc(-100% - 2px));
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.search-panel.is-open .search-sheet { transform: none; transition-timing-function: cubic-bezier(.2, .8, .2, 1); }
.search-in { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; padding: 18px 0 20px; }
.search-form { position: relative; display: flex; align-items: center; gap: 10px; padding-bottom: 4px; }
/* 밑줄: 열릴 때 왼쪽에서 오른쪽으로 그어진다 */
.search-form::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ink);
  transform-origin: left;
}
.search-form > svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  outline: none;
}
.search-form input::placeholder { color: var(--muted); font-weight: 500; }
.search-form input::-webkit-search-cancel-button { display: none; }
.search-close { margin-right: -10px; }
.search-close svg { width: 22px; height: 22px; }
.search-status { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.search-status:empty { display: none; }
.search-results { max-height: min(56vh, 460px); overflow-y: auto; margin-top: 6px; }
.search-results button {
  display: block;
  width: 100%;
  padding: 12px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  cursor: pointer;
}
.search-results li:last-child button { border-bottom: 0; }
.search-results button:hover,
.search-results button:focus-visible { background: var(--soft); outline: none; }
.sr-label { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.sr-title { display: block; margin-top: 2px; font-size: 16px; font-weight: 650; line-height: 1.45; }
.sr-title mark { padding: 0 1px; border-radius: 2px; background: #DBF0DB; color: inherit; }

.search-panel.is-open .search-form::after { animation: line-grow .38s ease-out; }
@keyframes line-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 검색 결과로 옮겨 간 자리를 잠깐 강조색 테두리로 짚어 준다 */
.is-found { animation: found-flash 1.8s ease-out; }
@keyframes found-flash {
  0%, 45% { outline: 3px solid var(--accent); outline-offset: 6px; }
  100% { outline: 3px solid rgba(17, 153, 17, 0); outline-offset: 6px; }
}


/* ---------- 섹션 띠(관리 화면을 뺀 모든 페이지) ---------- */
/* 마스트헤드 바로 아래 영문 이름 다섯(Magazine | Deepfield | Pioneer | About | Subscribe). 마스트헤드와 달리 위에 붙지 않아서
   스크롤하면 반투명 헤더 뒤로 지나가 사라진다(스크립트 없이) */
.sec-nav { border-bottom: 1px solid var(--line); }
.sec-nav ul { display: flex; justify-content: center; gap: clamp(10px, 3.9vw, 56px); padding: 0 var(--gutter); }  /* 좁은 화면에서는 사이부터 줄인다 */
.sec-nav a {
  display: block;
  padding: 10px 2px 11px;
  font-size: 16px;  /* 430px 이하 휴대폰에서만 줄인다(아래) */
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s;
}
.sec-nav .sec-nav-cta { color: var(--accent); }
.sec-nav .sec-nav-cta.is-mypage { color: var(--ink); }  /* 구독자: 검은 'Mypage'(supabase-client.js) */
/* 지금 보고 있는 페이지의 이름은 초록(aria-current="page". Magazine, Deepfield, Pioneer, About은 각 페이지의 HTML, 마이페이지의 'Mypage'는 supabase-client.js가 붙인다) */
.sec-nav a[aria-current="page"], .sec-nav .sec-nav-cta.is-mypage[aria-current="page"] { color: var(--accent); }
/* 마우스를 올리면 밑줄 없이 연한 초록(독자 질문 주소 .ask-mail과 같다), 누르는 동안은 강조색 */
.sec-nav a:hover, .sec-nav .sec-nav-cta.is-mypage:hover { color: var(--accent-soft); }
.sec-nav a:active, .sec-nav .sec-nav-cta.is-mypage:active { color: var(--accent); }
/* 로그인한 사람의 구독 상태를 읽는 동안은 비워 둔다(구독자에게 'Subscribe'가 보였다가 'Mypage'로 바뀌지 않게. supabase-client.js) */
.sec-nav-cta[data-pending] { visibility: hidden; }
/* 430px 이하: 이름이 한 줄에 들도록 글자(최대 16px)와 사이, 양옆 여백을 화면 폭에 맞춰 줄인다(320px에서 13px) */
@media (max-width: 430px) {
  .sec-nav ul { gap: 2.6vw; padding: 0 12px; }
  .sec-nav a { font-size: min(16px, 4.1vw); }
}

/* ---------- 공통: 머리말(kicker), 기사 링크 ---------- */
.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
  color: var(--muted);
}
.kicker > * + *::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: .95em;
  margin: 0 9px;
  background: currentColor;
  opacity: .35;
  vertical-align: -1px;
}
.kicker .sec { color: var(--sec-ink); text-transform: uppercase; }

.story { display: block; color: inherit; text-decoration: none; }
.story h3 { transition: color .15s; }
.story:hover h3 { color: var(--accent-soft); }  /* 밑줄 대신 연한 초록(2026-11-11 운영자 요청) */

/* 섹션 머리: 영문(세리프)과 한글. 위의 굵은 선은 2026-11-10 운영자 요청으로 뺐다 */
.sec-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 20px;
  margin-bottom: 24px;
}
.sec-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 2.5vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.sec-head .ko {
  margin-left: 10px;
  font-family: var(--font-sans);
  font-size: .6em;
  font-weight: 700;
  letter-spacing: -.01em;
}
.sec-head .note { font-size: 15px; opacity: .75; }

/* ---------- 첫 화면: 사진 | 인사 ---------- */
/* 사진과 글의 폭은 같게(2026-11-10 운영자, 전에는 1.22 : 1). 사진 칸은 글 칸 높이에 맞춰 늘고, 사진은 그 칸을 채우게 잘린다.
   아래 소개 칸도 같은 두 칸(글 | 사진)이라 칸 경계가 위아래로 맞는다 */
.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 2.4vw, 30px);
  padding: calc(var(--sec-gap) / 2) 0;  /* 위: 메뉴 띠에서 75px. 아래: 섹션 사이 여백의 절반 */
}
.hero-media { position: relative; align-self: center; aspect-ratio: 3 / 2; overflow: hidden; background: #916B4A; }  /* 사진 원래 비율(3:2)이라 위아래가 잘리지 않는다(2026-11-10 운영자, 전에는 글 높이에 맞춰 납작했다). 글이 두 편이 되어 글 칸이 더 길어져 사진을 글 높이의 가운데에 둔다(2026-11-25 운영자). 바탕은 사진이 늦게 떠도 비슷한 나무 책상 색(사진의 평균색) */
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }  /* 공부방의 두 우주인(2026-11-10 교체). 넓은 칸에서는 위아래가 잘리므로 헬멧부터 책상 위 공책까지 보이게 */
.hero-intro { align-self: center; }  /* 'Value 가치'부터 글 끝까지를 사진 높이의 가운데에(2026-11-10 운영자) */
.hero-intro h3 { font-size: clamp(24px, 2.2vw, 30px); font-weight: 800; line-height: 1.25; letter-spacing: -.025em; }
.hero-intro p + h3 { margin-top: clamp(28px, 3vw, 40px); font-size: clamp(20px, 1.9vw, 24px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }  /* 둘째 글. 위 여백은 소개 칸의 .about-block 사이와, 제목 크기는 소개 칸의 제목(.about h3)과 같다(2026-11-25 운영자 요청) */
/* 양끝 맞춤. 시안처럼 글자 단위로 줄을 바꿔 줄 끝이 고르게 맞는다(본문 다른 곳은 낱말 단위) */
.hero-intro p { margin-top: clamp(12px, 1.2vw, 16px); font-size: clamp(15px, 1.25vw, 17px); line-height: 1.8; text-align: justify; word-break: normal; }

/* ---------- 공개 자료: 매거진 띠 바로 아래에 같은 어두운 바탕으로 잇는다(흰 글씨). 위 여백은 매거진 띠의 아래 여백이 맡는다 ---------- */
.public { padding: calc(var(--sec-gap) / 2) 0; background: #101317; color: #fff; }
/* Deepfield 주제 특강, Pioneer 멘토링: 매거진과 공개 자료 사이의 어두운 칸. 두 칸(.split)은 위 Value, About, Magazine과 같은 폭과 사이 */
.dark-sec { padding: calc(var(--sec-gap) / 2) 0; color: #fff; }
.dark-sec :focus-visible { outline-color: #fff; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 2.4vw, 30px); align-items: center; }
.split-media { position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; background: #2A2A2A; }  /* 사진 원래 비율(정사각형) */
.split-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-text p { margin-bottom: 28px; font-size: clamp(15px, 1.25vw, 17px); line-height: 1.8; color: rgba(255, 255, 255, .78); }
.nowrap { white-space: nowrap; }  /* '온/오프라인'처럼 빗금에서 줄이 갈리지 않게 */
.split-actions { display: flex; flex-wrap: wrap; gap: 12px 14px; }  /* 초록 '신청하기' + 흰 '제안, 요청'(매거진 칸의 두 버튼과 같은 모양) */
.public :focus-visible { outline-color: #fff; }
/* 넓은 화면: 네 장이 보이는 가로 줄(최신이 왼쪽). 그보다 많으면 옆으로 넘기고, 사진 양옆 꺾쇠로 한 장씩 옮긴다(main.js) */
.public-rail { --public-gap: clamp(20px, 3.6vw, 46px); position: relative; container-type: inline-size; }
.public-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * var(--public-gap)) / 4);
  gap: 36px var(--public-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;  /* 넘기는 것은 꺾쇠와 가로 밀기로 */
}
.public-list::-webkit-scrollbar { display: none; }
.public-card { scroll-snap-align: start; }
/* 꺾쇠: 본문 바깥 여백의 가운데, 사진 높이의 가운데에(사진은 정사각형이라 한 장 폭의 절반) */
.public-nav {
  position: absolute;
  top: calc((100cqi - 3 * var(--public-gap)) / 8);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 56px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.public-prev { left: calc(var(--gutter) / -2); }
.public-next { left: calc(100% + var(--gutter) / 2); }
.public-nav svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.public-nav:hover:not(:disabled) { color: var(--accent); }
.public-nav:disabled { opacity: .2; cursor: default; }  /* 더 옮길 자료가 없는 쪽 */
.public-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }  /* 세로 사진을 정사각형으로. 보일 자리는 사진마다 아래에서 */
.public-card .crop-top { object-position: 50% 0; }
.public-card .crop-low { object-position: 50% 75%; }
.public-card h3 { margin-top: 14px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 400; line-height: 1.4; letter-spacing: -.015em; }  /* 첫 화면에서 굵은 글자는 인사 제목 하나만 */
.public-card p { margin-top: 6px; font-size: clamp(14px, 1.2vw, 16px); line-height: 1.7; color: rgba(255, 255, 255, .72); word-break: normal; }  /* 시안처럼 글자 단위로 줄을 바꿔 사진 폭까지 채운다 */


/* ---------- 별바다 배경: 매거진과 공개 자료를 한 장의 배경으로 잇는다(index.html의 .starfield) ---------- */
/* 그림(1672×941, AI 생성)을 원래 크기로 가운데부터 깔고, 띠가 그림보다 길면 아래로 이어 붙인다(크게 키우면 별이 번진다).
   화면이 그림보다 넓으면 옆으로 이어 붙이지 않고 화면 폭에 맞춰 조금 키운다.
   글이 있는 본문 폭(.container)에서는 그림 위에 검정을 덮어 어둡게 하고(--star-dim), 양옆 여백으로 갈수록 원래 밝기로 풀어 준다.
   본문 폭보다 좁은 화면에서는 전체가 어둡다.
   그림이 늦게 떠도 같은 검정 바탕. 두 칸의 바탕은 비워 이 배경이 보이게 한다 */
.starfield {
  --star-dim: rgba(0, 0, 0, .62);
  --star-edge: calc(50% - var(--wrap) / 2);  /* 본문 폭의 왼쪽 끝 */
  background:
    linear-gradient(90deg,
      transparent calc(var(--star-edge) - 120px),
      var(--star-dim) calc(var(--star-edge) + 40px),
      var(--star-dim) calc(100% - var(--star-edge) - 40px),
      transparent calc(100% - var(--star-edge) + 120px)),
    url("img/bg-starfield.webp") center top / max(1672px, 100%) auto repeat-y,
    #000;
}
.starfield > .cover-band, .starfield > .public { background: transparent; }

/* ---------- 매거진(이번 호 표지): 양옆까지 닿는 어두운 띠. 아래 공개 자료가 같은 바탕으로 잇는다 ---------- */
.cover-band {
  padding: calc(var(--sec-gap) / 2) 0;
  background: #101317;
  color: #fff;
}
.cover-band :focus-visible { outline-color: #fff; }
.cover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));  /* 왼쪽 글 | 오른쪽 표지. 위 Value, About과 같은 두 칸(2026-11-10 운영자) */
  gap: clamp(24px, 2.4vw, 30px);
  align-items: center;
}
/* 표지는 오른쪽 칸 가운데에. 칸을 다 채우면 A4 세로라 너무 길어 폭을 줄인다 */
.cover { position: relative; justify-self: center; width: min(100%, 380px); margin: 0; aspect-ratio: 794 / 1123; overflow: hidden; background: #0B0C0B; }
.cover img { width: 100%; height: 100%; object-fit: cover; }  /* Helium이 그린 표지 그대로(A4 비율) */
.cover-info .kicker { color: rgba(255, 255, 255, .7); }
/* 다음 호까지 남은 시간(호수 위): 설명 아래에 큰 숫자. 숫자 폭을 고르게 해 초가 바뀌어도 글자가 흔들리지 않게.
   숫자는 72px까지 키우되 칸이 좁으면 칸 폭에 맞춰 줄인다(12cqi: 숫자 열네 자가 칸 폭 안에 든다).
   글꼴은 Apple SD Gothic Neo Light(맨 위 @font-face). 이 글꼴은 숫자마다 폭이 달라(1이 좁다) 시:분:초의 숫자 하나하나를 같은 폭 칸(.d, main.js)에 넣는다 */
.cover-next { container-type: inline-size; margin-bottom: 22px; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.cover-next[hidden] { display: none; }
.cover-next-left { display: block; margin-top: 2px; font-family: "SD Gothic Light", var(--font-sans); font-size: min(72px, 12cqi); font-weight: 300; line-height: 1.15; letter-spacing: -.03em; color: #fff; white-space: nowrap; }
.cover-next-left .d { display: inline-block; width: .55em; text-align: center; }  /* 가장 넓은 0(.62em)의 글자 자체는 칸 안에 든다 */
.cover-headline {
  margin: 12px 0 32px;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
  max-width: 12em;  /* 제목은 issue.md에서 한 줄로 오므로, 폭을 줄여 두 줄로 나누고 */
  word-break: keep-all;
  text-wrap: balance;  /* 두 줄 길이를 고르게 맞춘다 */
}
/* 요약: 제목과 버튼 사이. 제목의 아래 여백(32px) 안으로 당겨 붙인다 */
.cover-deck { max-width: 34em; margin: -14px 0 32px; font-size: clamp(15px, 1.3vw, 17px); line-height: 1.8; color: rgba(255, 255, 255, .78); word-break: keep-all; }
.cover-deck:empty { display: none; }
.cover-band[hidden] { display: none; }
.cover-actions { display: flex; flex-wrap: wrap; gap: 12px 14px; }
.cover-actions .btn-cta[hidden] { display: none; }

/* ---------- 호 한 줄(매거진 페이지, reader.js) ---------- */
.past-item {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.past-item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.past-item .kicker .sec { color: var(--navy); }
.past-item .kicker .sample { color: var(--accent); }  /* 체험용 샘플 호: 누구나 끝까지 본다 */
.past-item.is-pass .kicker .locked { color: var(--accent); }  /* 구독 전에 발행된 호: 열람권으로 본다(pass.html) */
/* 보이는 호는 구독 상태에 따라 reader.js가 정한다. 로그인한 사람의 구독 상태를 읽는 동안은 목록을 가려 둔다 */
.past-item[hidden], .past-list > .my-empty[hidden] { display: none; }
.past-list[aria-busy="true"] { visibility: hidden; }
/* 지금의 구독을 시작하기 전에 발행된 호: 표지와 제목만 흐리게 보여 주고 열지 않는다 */
.past-item.is-locked { opacity: .45; cursor: default; }
.past-item.is-locked:hover h3 { color: inherit; }
.past-item h3 { margin: 8px 0 10px; font-size: clamp(21px, 1.8vw, 25px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.past-item .deck { max-width: 640px; font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.past-soon .kicker .sec { color: var(--accent); }  /* 구독 안내 칸(구독하지 않은 사람에게, 목록 맨 아래) */

/* ---------- 상세 페이지(about.html, deepfield.html, pioneer.html) ---------- */
/* 배너에 걸친 넓은 상자(.page-card) 안에: 제목 → 소개(글 | 사진) → 가는 선으로 나뉜 칸들 */
.auth-banner.detail-banner img { object-position: center 50%; }
.auth-banner.deepfield-banner { background: #324E71; }  /* 해 질 녘 등대 사진의 바탕색(이미지가 늦게 떠도 비슷한 색) */
.auth-banner.deepfield-banner img { object-position: center 50%; }  /* 등대와 불빛, 걸어가는 두 사람이 상자에 덮이지 않게 */
.auth-banner.pioneer-banner { background: #B47960; }  /* 화성 탐사차 사진의 바탕색(이미지가 늦게 떠도 비슷한 색) */
.auth-banner.pioneer-banner img { object-position: center 60%; }  /* 지평선의 고원과 탐사차가 상자에 덮이지 않게 */
.auth-banner.about-banner { background: #858353; }  /* 온실 사진의 바탕색(이미지가 늦게 떠도 비슷한 색) */
.auth-banner.about-banner img { object-position: center 55%; }  /* 작업대 위의 화분과 모종이 상자에 덮이지 않게 */
.detail-intro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); align-items: center; }
.detail-sub { margin-bottom: 14px; font-size: clamp(22px, 2vw, 26px); font-weight: 800; line-height: 1.3; letter-spacing: -.025em; }
.detail-lead + .detail-sub { font-size: clamp(20px, 1.8vw, 23px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }  /* About의 둘째 글 제목은 아래 칸 제목(.detail-sec h2)과 같은 크기(2026-11-25 운영자 요청) */
.detail-lead { margin-bottom: 28px; font-size: clamp(15.5px, 1.3vw, 17px); line-height: 1.85; word-break: normal; }
.detail-intro > div > .detail-lead:last-child { margin-bottom: 0; }
.detail-intro.is-text { grid-template-columns: minmax(0, 1fr); }  /* 사진 없이 글만(Deepfield, Pioneer): 상자 폭 전체(2026-11-10 운영자 요청) */
.detail-media { position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; background: var(--soft); }
.detail-media.square { aspect-ratio: 1; }
.detail-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-sec { margin-top: clamp(44px, 5vw, 64px); padding-top: clamp(28px, 3vw, 36px); border-top: 1px solid var(--line); }
.detail-sec h2 { margin-bottom: 14px; font-size: clamp(20px, 1.8vw, 23px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.detail-sec > p { font-size: 16px; line-height: 1.85; color: var(--ink-2); word-break: normal; }  /* 글도 가는 선과 목록처럼 상자 폭 전체(2026-11-10 운영자 요청, 예전에는 760px) */
.detail-sec > .split-actions { margin-top: 22px; }
/* 차례(About의 매거진 구성): 이름 | 하는 일 */
.detail-flow { margin-top: 14px; border-bottom: 1px solid var(--line); }
.detail-flow li { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.detail-flow b { font-weight: 700; color: var(--ink); }
/* 항목 | 설명 */
.detail-terms { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 10px 12px; margin-top: 6px; }
.detail-terms dt { font-size: 16px; font-weight: 700; line-height: 1.75; }
.detail-terms dd { margin: 0; font-size: 16px; line-height: 1.75; color: var(--ink-2); }
/* 집필진: 우주인 인형과 소속(예전 홈 Editors 칸) */
.detail-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.detail-people li { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 18px; padding: 16px 20px; border: 1px solid var(--line); }
.detail-people img { justify-self: center; width: auto; height: 118px; }
.detail-people b { display: block; margin-bottom: 4px; font-size: 16px; }
.detail-people p { font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* ---------- 회차 신청과 제안(deepfield.html, pioneer.html, program.js) ---------- */
/* 구독을 확인할 때까지, 구독하지 않았으면 본문을 가린다(main.js의 구독자 확인 창이 뜬다) */
.detail[data-gate="wait"] > :not(.sec-head), .detail[data-gate="closed"] > :not(.sec-head) { visibility: hidden; }
.prog-status { margin-top: 14px; padding: 12px 16px; background: var(--soft); font-size: 15px; line-height: 1.7; }
.prog-status.is-error { background: #FDECEC; color: #9B1C1C; }
.prog-status[hidden] { display: none; }
.prog-list { margin-top: 20px; border-top: 1px solid var(--line); }
.prog-list[aria-busy="true"] { visibility: hidden; }
.prog-row { display: grid; grid-template-columns: 11.5em minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 20px 2px; border-bottom: 1px solid var(--line); }
.prog-row.is-ended, .prog-row.is-canceled { color: var(--muted); }
.prog-when b { display: block; font-size: 15px; font-weight: 700; }
.prog-when time, .prog-when .prog-hours { display: block; margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.prog-when .prog-hours { margin-top: 0; }
.prog-body h3 { font-size: 17px; font-weight: 700; line-height: 1.45; }
.prog-meta { margin-top: 4px; font-size: 14px; color: var(--muted); }
.prog-summary { margin-top: 6px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.prog-side { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.prog-tag { padding: 4px 10px; font-size: 13px; font-weight: 700; background: var(--soft); color: var(--ink-2); }
.prog-tag.is-paid, .prog-tag.is-confirmed { background: #E7F5E7; color: var(--accent-hover); }
.prog-empty { padding: 28px 2px; font-size: 15px; color: var(--muted); border-bottom: 1px solid var(--line); }
/* 회색 버튼: 시작한 회차('종료됨'), 정원이 찬 회차('마감'). 누르지 못한다 */
.btn-cta.btn-off, .btn-cta.btn-off:hover { background-color: var(--soft); box-shadow: inset 0 0 0 1px var(--line); color: #9AA0A8; cursor: default; transform: none; }
.prog-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 20px; }
.prog-pages[hidden] { display: none; }
.prog-page { min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--line); background: #fff; font-size: 14px; cursor: pointer; }
.prog-page:hover { border-color: var(--ink); }
.prog-page.is-current { border-color: var(--ink); background: var(--ink); color: #fff; }
/* 제안, 요청: 입력창 하나와 제출 버튼 */
.prog-ask { display: flex; gap: 10px; margin-top: 18px; }
.prog-ask input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border: 1px solid #C9CDD3; font-size: 16px; }
.prog-ask input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
/* 신청서 창 */
.prog-dialog { width: min(560px, 100vw - 24px); max-height: calc(100vh - 32px); padding: 28px 26px 24px; border: 0; background: #fff; color: var(--ink); box-shadow: 0 18px 48px rgba(10, 25, 48, .25); }
.prog-dialog::backdrop { background: rgba(10, 25, 48, .45); }
.prog-dialog h2 { font-size: 21px; font-weight: 800; }
.prog-sum { display: grid; grid-template-columns: 3.5em minmax(0, 1fr); gap: 4px 12px; margin-top: 14px; padding: 14px 16px; background: var(--soft); font-size: 14.5px; line-height: 1.6; }
.prog-sum dt { color: var(--muted); }
.prog-sum dd { margin: 0; }
.prog-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-top: 18px; }
.prog-fields label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.prog-fields .prog-wide { grid-column: 1 / -1; }
.prog-fields input, .prog-fields textarea { width: 100%; padding: 10px 12px; border: 1px solid #C9CDD3; font: inherit; font-size: 15px; font-weight: 400; }
.prog-fields textarea { resize: vertical; }
.prog-notice { margin-top: 16px; padding-left: 18px; list-style: disc; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.prog-notice [hidden] { display: none; }
.prog-check { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 14px; line-height: 1.6; }
.prog-check[hidden] { display: none; }
/* 신청서 개인정보 동의 문안(program_consent.md): 표를 접지 않고 체크박스 바로 위에 펼친다 */
.prog-consent { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.prog-consent h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.prog-consent p { margin: 0 0 8px; }
.prog-consent table { width: 100%; border-collapse: collapse; }
.prog-consent th, .prog-consent td { padding: 7px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.prog-consent th { width: 7.5em; font-weight: 700; color: var(--ink); white-space: normal; }
.prog-consent ul { margin: 10px 0 0; padding-left: 18px; list-style: disc; }
.prog-consent a { text-decoration: underline; text-underline-offset: 2px; }
/* 중요한 내용(보관 기간, 받는 사람이 쓰는 목적): 굵게, 밑줄(개인정보 보호법 제22조 제2항, 시행령 제17조 제3항) */
.prog-key { font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
[data-prog="guardian-agree"][hidden] { display: none; }
.prog-check input { flex: none; margin-top: 4px; }
/* 약관 조항 링크(신청하기 문단, 신청서 안내) */
.detail-sec > p a, .prog-notice a { text-decoration: underline; text-underline-offset: 2px; }
/* 제안, 요청 입력 칸 아래 안내 */
.prog-hint { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.prog-dialog .ask-actions { justify-content: flex-end; }
@media (max-width: 760px) {
  .prog-row { grid-template-columns: minmax(0, 1fr); }
  .prog-side { justify-content: flex-start; }
  .prog-fields { grid-template-columns: minmax(0, 1fr); }
  .prog-ask { flex-direction: column; }
}

/* ---------- 공고(notice.html) ---------- */
.auth-banner.notice-banner { background: #25252A; }  /* 은하 사진의 바탕색(이미지가 늦게 떠도 비슷한 색). 뒤에 있는 .auth-banner보다 앞서도록 한 단계 높인다 */
.auth-banner.notice-banner img { object-position: center 50%; }  /* 은하 한가운데의 밝은 핵이 띠 가운데 오도록 */
/* 공고 한 건 = details 하나. 줄에는 게시일, 제목, 게시 기간. 누르면 본문이 펼쳐진다(자주 묻는 질문과 같은 + 표시) */
.notice-list { margin-top: 28px; border-top: 1px solid var(--line); }
.notice-item { border-bottom: 1px solid var(--line); }
.notice-item > summary {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 4px 24px;
  align-items: baseline;
  padding: 18px 44px 18px 2px;
  list-style: none;
  cursor: pointer;
}
.notice-item > summary::-webkit-details-marker { display: none; }
.notice-item > summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform .2s;
}
.notice-item[open] > summary::after { transform: rotate(45deg); }
.notice-item > summary:hover .notice-title { color: var(--accent); }
.notice-date, .notice-until { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--muted); }
.notice-title { font-size: 17px; font-weight: 650; line-height: 1.5; }
.notice-body { padding: 0 8px 24px 130px; }
.notice-body p, .notice-body li { font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.notice-body p + p, .notice-body p + table, .notice-body table + p { margin-top: 10px; }
.notice-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.notice-body th, .notice-body td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.notice-body td.num { text-align: right; }
.notice-empty { margin-top: 16px; }
.notice-body :is(p, li) { text-align: left; word-break: keep-all; }
.notice-list:has(.notice-item) + .notice-empty { display: none; }  /* 공고가 하나라도 있으면 '아직 없습니다'를 감춘다 */

/* ---------- 웹 리더(자리) ---------- */
.reader-gate { display: grid; justify-items: start; gap: 14px; padding: clamp(56px, 8vw, 120px) 0 clamp(72px, 10vw, 140px); }
.reader-gate h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
.reader-gate .kicker .sec { color: var(--navy); }
.reader-msg { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.reader-gate [hidden] { display: none; }
.reader-gate .btn-cta { margin-top: 10px; }
.reader-sample { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.reader-sample:hover { color: var(--accent); }
.reader-gate[hidden], .reader-view[hidden], .reader-shelf[hidden] { display: none; }
/* 매거진(주소에 호수가 없을 때, reader.js): 구독하지 않은 사람에게는 표지 배경 사진(3:2)과 함께 열 수 있는 호와 구독 안내 칸,
   구독자에게는 사진 대신 표지(A4 세로, .shelf-list)로 모든 호. 표지 높이가 사진(380px 폭, 3:2)과 비슷하다.
   읽을 수 없는 호는 흐리게(.past-item.is-locked) */
.auth-banner.reader-banner { background: #CD8450; }  /* 나이테 사진의 바탕색(이미지가 늦게 떠도 비슷한 색). 뒤에 있는 .auth-banner보다 앞서도록 한 단계 높인다 */
.auth-banner.reader-banner img { object-position: center bottom; }  /* 사진의 아래쪽(짙은 안쪽 나이테)이 보이게 아래에 맞춘다(2026-11-10 운영자 요청) */
.shelf-card > .reader-msg { margin-bottom: 4px; }
.shelf-card > [hidden] { display: none; }
.mag-list { margin-top: 28px; }
.mag-list > .past-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }  /* 맨 아래 줄은 밑줄 없이 */
.shelf-list .past-item { grid-template-columns: 180px minmax(0, 1fr); }
.shelf-list .past-item img { aspect-ratio: 794 / 1123; border: 1px solid var(--line); }
.shelf-list .past-item.is-buy { cursor: pointer; }  /* 흐리지만 누르면 열람권을 살지 묻는다 */
/* 열람권을 살지 묻는 창 */
/* 모서리는 버튼과 같은 모양(좌상, 우상, 좌하 12 : 우하 5)을 두 배로. 글과 버튼은 가운데 */
.ask-dialog {
  --k: 2px;
  width: min(400px, 100vw - 32px);
  padding: 30px 24px 24px;
  border: 0;
  border-radius: calc(12 * var(--k)) calc(12 * var(--k)) calc(5 * var(--k)) calc(12 * var(--k));
  background: #fff;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 18px 48px rgba(10, 25, 48, .25);
}
.ask-dialog::backdrop { background: rgba(10, 25, 48, .45); }
.ask-dialog p { font-size: 17px; font-weight: 600; line-height: 1.6; word-break: keep-all; }
.ask-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.ask-actions .btn-cta { min-width: 88px; }
.ask-actions .btn-no { box-shadow: inset 0 0 0 1.5px #A3A9B1; color: var(--muted); }  /* '아니요': '예'와 같은 모양, 색만 회색 */
.ask-actions .btn-no:hover { background-color: var(--soft); }
.ask-dialog .ask-note { margin-top: 8px; font-size: 14px; font-weight: 400; color: var(--muted); }
/* 이용약관 다시 동의 창(supabase-client.js의 showTerms): 같은 창 모양에 글은 왼쪽 맞춤, 버튼은 오른쪽 */
.terms-ask { width: min(480px, 100vw - 32px); text-align: left; }
.terms-ask:focus { outline: none; }  /* 창 자체에 첫 초점을 둔다(supabase-client.js의 dlg.focus). 키보드로 옮기면 각 칸에 초점 표시가 보인다 */
.terms-ask p { font-size: 16px; }
.terms-ask a { color: inherit; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.terms-ask .terms-ask-line { margin-top: 18px; font-size: 15.5px; }
.terms-ask .terms-ask-line label { cursor: pointer; }
.terms-ask .terms-ask-line input { margin-right: 6px; vertical-align: -2px; }
.terms-ask .terms-ask-msg { min-height: 1.4em; margin-top: 8px; font-size: 14px; font-weight: 400; color: #B3261E; }
.terms-ask .ask-actions { justify-content: flex-end; }

/* ---------- 알림 메일 수신거부(unsubscribe.html) ---------- */
.unsub { display: grid; justify-items: start; gap: 12px; padding: clamp(56px, 8vw, 120px) 0 clamp(72px, 10vw, 140px); }
.unsub h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
.unsub .kicker .sec { color: var(--navy); }
.unsub [hidden] { display: none; }
.unsub .btn-cta { margin-top: 10px; }
.unsub-msg { max-width: 640px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.unsub-msg.is-error { color: #B3261E; }
.unsub-en { max-width: 640px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.unsub-note { font-size: 14.5px; color: var(--ink-2); }
.unsub-note a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* 쪽 보기: 책처럼 펼친 면을 넘긴다. 머리글 아래 화면을 꽉 채우고, 위에 호 이름과 지금 쪽 번호를 둔다 */
.is-reading body { overflow: hidden; }
.is-reading .site-footer, .is-reading .to-top { display: none; }
.reader-view { display: flex; flex-direction: column; height: calc(100vh - var(--rd-chrome, var(--header-h))); height: calc(100dvh - var(--rd-chrome, var(--header-h))); background: #E9ECF0; -webkit-user-select: none; user-select: none; }
.rd-bar { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px clamp(14px, 3vw, 28px); border-bottom: 1px solid var(--line); background: #fff; }
.rd-title { min-width: 0; overflow: hidden; font-size: 15px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.rd-no { margin-right: 8px; color: var(--navy); }
.rd-count { justify-self: end; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
/* 머리글 접기/펴기 버튼(제목과 쪽 번호 사이). 접으면 사이트 머리글이 위로 올라가고 쪽 보기가 화면을 다 쓴다 */
.rd-head { display: grid; place-items: center; width: 40px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.rd-head:hover { background: var(--soft); }
.rd-head svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.rd-full .rd-head svg { transform: rotate(180deg); }
.is-reading .masthead { position: relative; transition: margin-top .25s ease; }  /* 리더는 페이지가 스크롤되지 않으므로 붙여 둘 필요가 없다. 붙어 있으면(sticky) 위로 올라가지 않는다 */
.is-reading .reader-view { transition: height .25s ease; }
/* 머리글 접기: 마스트헤드와 섹션 띠를 함께 위로 올린다(--rd-chrome은 reader.js가 둘의 높이를 잰 값) */
.rd-full .masthead { margin-top: calc(-1 * var(--rd-chrome, var(--header-h))); }
.rd-full .reader-view { height: 100vh; height: 100dvh; }
@media (prefers-reduced-motion: reduce) { .is-reading .masthead, .is-reading .reader-view, .rd-head svg { transition: none; } }
.rd-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: pan-y; }
.rd-book { display: flex; align-items: center; justify-content: center; }
.rd-page, .rd-gate { display: none; }
.rd-page.is-on { position: relative; display: block; flex: none; width: var(--pw); height: var(--ph); overflow: hidden; background: #fff; box-shadow: 0 6px 24px rgba(18, 20, 23, .16); }
.rd-page.is-left { box-shadow: -6px 6px 24px rgba(18, 20, 23, .16); }
.rd-page.is-right { box-shadow: 6px 6px 24px rgba(18, 20, 23, .16); }
.rd-page.is-left::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 18px; background: linear-gradient(to left, rgba(0, 0, 0, .08), transparent); pointer-events: none; }  /* 가운데 접힌 자리 */
.rd-page.is-right::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 18px; background: linear-gradient(to right, rgba(0, 0, 0, .08), transparent); pointer-events: none; }
.rd-page iframe { position: absolute; top: 0; left: 0; border: 0; transform: scale(var(--s, 1)); transform-origin: 0 0; }
.rd-nav { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 44px; height: 64px; margin-top: -32px; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .8); color: var(--ink); cursor: pointer; }
.rd-nav svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rd-nav:hover { background: #fff; }
.rd-nav:disabled { opacity: .25; cursor: default; }
.rd-prev { left: clamp(6px, 1.5vw, 14px); }
.rd-next { right: clamp(6px, 1.5vw, 14px); }
@media (max-width: 899px), (orientation: portrait) {
  .rd-nav { width: 36px; height: 52px; margin-top: -26px; background: rgba(255, 255, 255, .6); }
}
/* 흐린 목차와 '계속 읽기' 안내(열람 전) */
.rd-page.is-locked img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rd-lock { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; }
.rd-lock p, .rd-gate p { max-width: 30em; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.rd-lock p { padding: 12px 16px; background: rgba(255, 255, 255, .9); }
.rd-gate.is-on { display: grid; place-content: center; justify-items: center; gap: 14px; width: min(var(--pw), 520px); min-height: min(var(--ph), 360px); padding: 28px; border: 1px solid var(--line); background: #fff; text-align: center; }
.rd-gate p strong { display: block; margin-bottom: 4px; color: var(--ink); }
@media print { .reader-view { display: none !important; } }

/* ---------- 소개: 첫 화면 아래, 흰 바탕. 왼쪽에 사진, 오른쪽에 글 두 편을 위아래로 ---------- */
/* 두 칸은 첫 화면(.hero)과 같은 폭과 사이. 사진 칸은 글 칸 높이에 맞춰 늘어난다. 좁은 화면에서는 제목과 글 다음에 사진 */
.about { padding: calc(var(--sec-gap) / 2) 0; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 2.4vw, 30px); }
.about-block + .about-block { margin-top: clamp(28px, 3vw, 40px); }
.about-more { margin-top: 28px; }  /* 소개 상세(about.html)로 */
/* 사진(우주 관제실의 우주인): 칸을 채우게 잘린다. 우주인이 가운데라 가로로 잘려도 보인다 */
.about-media { position: relative; min-height: 280px; margin: 0; overflow: hidden; background: #3F3936; }  /* 사진이 늦게 떠도 비슷한 색(사진의 평균색) */
.about-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }  /* 우주인이 가운데보다 조금 오른쪽에(2026-11-10 운영자) */
/* 칠해지는 하이라이트(data-draw-line): 스크롤을 내리면 바탕이 왼쪽부터 칠해진다(--draw 0→1, main.js). 다 칠한 뒤에는 남는다.
   글자(위 층, 글자 모양으로 자름)와 바탕(아래 층)을 한 요소의 두 배경으로 그려 칠한 경계와 글자색 경계가 늘 같은 자리에 온다.
   --draw를 등록해(@property) 값이 바뀔 때 부드럽게 따라가고, 처음부터 화면에 있는 글도 열릴 때 한 번 칠해진다.
   지금은 소개의 '서울대 의대, 사회대 멘토' 하나: 남색 글자 → 조금 파란 남색 바탕에 흰 글자 */
@property --draw { syntax: "<number>"; inherits: false; initial-value: 0; }
.draw-line {
  --hl: #0F2E78;  /* 2026-11-10 운영자: 남색(#001741)보다 조금 파란 쪽(처음 #1E45B0은 너무 밝아 둘의 가운데로) */
  --hl-ink: #fff;  /* 칠해진 곳의 글자 */
  --base-ink: var(--ask-bg);  /* 칠하기 전 글자(독자 질문 띠와 같은 남색) */
  --hl-at: calc(var(--draw) * 100%);
  padding: 0 .12em;
  margin-left: -.12em;
  white-space: nowrap;
  color: var(--base-ink);
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(90deg, var(--hl-ink) var(--hl-at), var(--base-ink) var(--hl-at)), linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-size: 100% 100%, var(--hl-at) 100%;
  -webkit-background-clip: text, padding-box;
  background-clip: text, padding-box;
  transition: --draw .6s ease-out;
}
@media (prefers-reduced-motion: reduce) { .draw-line { transition: none; } }
.about h3 { margin-bottom: 12px; font-size: clamp(20px, 1.9vw, 24px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; word-break: keep-all; }
.about p { font-size: clamp(15px, 1.25vw, 16.5px); line-height: 1.8; color: var(--ink); word-break: normal; }  /* 첫 화면 인사처럼 글자 단위로 줄을 바꿔 양끝 맞춤의 빈틈을 줄인다 */

/* ---------- 구독 | 자주 묻는 질문 ---------- */
.subfaq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));  /* 구독과 자주 묻는 질문을 절반씩(2026-11-10 운영자). 사이도 위 Value, About과 같아 칸 경계가 위아래로 맞는다 */
  gap: clamp(24px, 2.4vw, 30px);
  align-items: start;
  padding: calc(var(--sec-gap) / 2) 0 calc(var(--sec-gap) - var(--ask-edge));  /* 아래: 독자 질문 띠의 글까지 150px */
}
/* 구독 중이면(is-subscribed, supabase-client.js) 요금 안내를 빼고 자주 묻는 질문을 전체 폭으로 둔다(답 글은 읽기 좋은 폭까지) */
.is-subscribed .plans-box { display: none; }
.is-subscribed .subfaq { grid-template-columns: minmax(0, 1fr); }
.is-subscribed .faq-a { max-width: 760px; }
.plans { display: grid; gap: 12px; margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.plan {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.plan:hover { border-color: #C3C8CF; }
.plan:has(input:checked) { border-color: var(--accent); background: #ECF7EC; }
.plan input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.plan-dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}
.plan-dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform .15s;
}
.plan input:checked + .plan-dot::after { transform: scale(1); }
.plan input:focus-visible + .plan-dot { outline: 2px solid var(--navy); outline-offset: 3px; }
.plan-info { flex: 1 1 140px; display: flex; flex-direction: column; }
.plan-name { font-size: 17px; font-weight: 700; line-height: 1.4; }
.plan-desc { font-size: 14px; color: var(--muted); }
.plan-price { margin-left: auto; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.plan-price small { margin-left: 2px; font-size: 14px; font-weight: 600; }
/* 요금제가 하나뿐이라 고르는 동그라미 없이 상자만 보여 준다 */
.plan-only, .plan-only:hover { border-color: transparent; background: #ECF7EC; cursor: default; }  /* 테두리 없이 바탕색만(크기는 그대로) */
.plan-note { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.sub-sample a { font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.sub-sample a:hover { color: var(--accent); }
.is-subscribed .sub-sample { display: none; }  /* 이미 구독 중이면 '결제하기 전에 샘플 호를…' 안내를 뺀다(supabase-client.js) */
/* 개조식 안내: 작은 회색 네모 */
.plan-points { display: grid; gap: 2px; }
.plan-points li { position: relative; padding-left: 13px; }
.plan-points li::before { content: ""; position: absolute; left: 1px; top: .66em; width: 5px; height: 5px; border-radius: 1px; background: #A3A9B1; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  position: relative;
  padding: 18px 44px 18px 2px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
/* 오른쪽 + 표시. 열리면 45도 돌아 ×가 된다 */
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 8px 20px 2px; }
.faq-a p, .faq-a li { font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.faq-a p + ul, .faq-a ul + p, .faq-a p + p { margin-top: 8px; }
.faq-a ul { display: grid; gap: 6px; padding-left: 1.2em; list-style: disc; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 로그인, 회원가입 ---------- */
.auth { padding-bottom: clamp(64px, 8vw, 104px); }
/* 배너: 노을 속 전파망원경. 위아래를 낮게 잘라 지평선과 안테나가 걸린 띠만 보인다(넓은 화면에서도 안테나가 잘리지 않게 높이 상한 280px) */
.auth-banner { height: clamp(140px, 15vw, 280px); overflow: hidden; background: #E9A07E; }
.auth-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 65%; }
/* 입력 상자: 배너 아래쪽에 살짝 걸쳐 올린다 */
.auth-card {
  position: relative;
  width: min(440px, 100% - 2 * var(--gutter));
  margin: calc(-1 * clamp(40px, 5vw, 64px)) auto 0;
  padding: clamp(28px, 4vw, 40px) clamp(20px, 4vw, 36px) clamp(26px, 3.4vw, 32px);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 40px rgba(18, 20, 23, .08);
}
.auth-card h1 { font-size: 28px; font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
/* 넓은 상자: 매거진, 마이페이지, 관리 화면, 공고. 로그인 상자처럼 배너에 걸쳐 올리고, 폭은 본문 폭(.container)과 같다 */
.page-card {
  position: relative;
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin: calc(-1 * clamp(40px, 5vw, 64px)) auto clamp(64px, 8vw, 104px);
  padding: clamp(28px, 4vw, 44px) clamp(20px, 4vw, 44px) clamp(28px, 4vw, 44px);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 40px rgba(18, 20, 23, .08);
}
.auth-lead { margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.auth-form { display: grid; gap: 18px; margin-top: 26px; }

.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #C9CDD3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;  /* 16px 미만이면 아이폰이 입력할 때 화면을 확대한다 */
  transition: border-color .15s, box-shadow .15s;
}
.field input:hover { border-color: #A9AFB8; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #DBF0DB; }
.field.has-error input { border-color: #C2362B; }
.field.has-error input:focus { box-shadow: 0 0 0 3px #F8D7D3; }
.field-hint { margin-top: 6px; font-size: 13px; color: var(--muted); }
.field-msg { margin-top: 6px; font-size: 13px; color: #B3261E; }
.field-msg:empty { display: none; }

/* 비밀번호 보기 버튼 */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 50px; }
.pw-toggle {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); }
.pw-toggle svg { width: 24px; height: 24px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .pupil { fill: currentColor; stroke: none; }
/* 눈 아이콘: 비밀번호가 가려져 있으면 감은 눈, 보이면 뜬 눈.
   뜰 때는 감은 선이 사라지며 눈이 위아래로 벌어지고, 감을 때는 눈이 가운데로 닫힌 뒤 감은 선이 나타난다 */
.pw-toggle .eye-open { transform-box: view-box; transform-origin: 12px 12px; }
.pw-toggle[aria-pressed="false"] .eye-open {
  opacity: 0;
  transform: scaleY(.08);
  transition: transform .2s ease-in, opacity .06s linear .17s;
}
.pw-toggle[aria-pressed="false"] .eye-closed { opacity: 1; transition: opacity .12s linear .17s; }
.pw-toggle[aria-pressed="true"] .eye-open {
  opacity: 1;
  transform: none;
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.2) .05s, opacity .06s linear .05s;
}
.pw-toggle[aria-pressed="true"] .eye-closed { opacity: 0; transition: opacity .08s linear; }
@media (prefers-reduced-motion: reduce) {
  .pw-toggle .eye-open, .pw-toggle .eye-closed { transition: none !important; }
}

.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.check a { color: inherit; text-underline-offset: 3px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: -4px; font-size: 14px; }
.auth-row a { color: var(--ink-2); text-underline-offset: 3px; }

.agree { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.agree.has-error { border-color: #C2362B; }
.check-all { padding-bottom: 12px; border-bottom: 1px solid var(--line); font-weight: 700; }
.req { color: var(--accent-hover); font-weight: 700; }
.opt { color: var(--muted); font-weight: 700; }

/* 가입 화면의 미성년자 취소 고지(이용약관 제7조 제2항). 모든 가입자에게 보인다 */
.age-notice { padding: 12px 14px; border-radius: 8px; background: var(--soft); font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }

.auth-form .btn-cta { margin-top: 4px; }
.auth-form .btn-cta[disabled] { opacity: .7; cursor: progress; }
.auth-status { font-size: 14px; line-height: 1.6; color: var(--ink-2); text-align: center; }
.auth-status:empty { display: none; }
/* 봇 막기 확인 상자(Turnstile) 자리. 평소에는 보이지 않는 상자만 있으므로 띄워 두어 폼의 간격이 늘지 않게 하고,
   사람인지 확인이 필요할 때만(is-on, supabase-client.js) 제자리에 상자가 나타난다 */
.captcha { position: absolute; }
.captcha.is-on { position: static; }
.auth-status.is-error { color: #B3261E; }
.auth-switch { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); text-align: center; }
.auth-switch a { margin-left: 8px; color: var(--accent-hover); font-weight: 700; text-underline-offset: 3px; }

/* ---------- 구독 ---------- */
.sub-page { padding-bottom: clamp(64px, 8vw, 104px); }
/* 플라스크 배너: 가운데 플라스크의 주황 액체와 수면의 기포가 상자 위로 보이도록 조금 아래쪽을 자른다 */
.sub-banner { background: #AFCDDA; }  /* 사진의 바탕색(이미지가 늦게 떠도 비슷한 색) */
.sub-banner img { object-position: center 58%; }
/* 배너에 살짝 걸쳐 올린 큰 상자(로그인 상자와 같은 결, 폭만 넓다) */
.sub-card {
  position: relative;
  width: min(1000px, 100% - 2 * var(--gutter));
  margin: calc(-1 * clamp(40px, 5vw, 64px)) auto 0;
  padding: clamp(28px, 4vw, 44px) clamp(20px, 4vw, 44px) clamp(24px, 3.4vw, 36px);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 40px rgba(18, 20, 23, .08);
}
.sub-card h1 { font-size: 28px; font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
.sub-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: clamp(24px, 4vw, 48px); align-items: start; margin-top: 28px; }
.sub-step { display: block; margin-bottom: 12px; padding: 0; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
/* 왼쪽 월 구독 상자의 윗변이 오른쪽 요약 상자의 윗변과 같은 높이에 온다 */
.sub-main { display: grid; gap: 28px; }
.sub-main .plans { margin: 0; }
.sub-prelaunch { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink); }  /* 정식 출시 전 안내(2026-11-30). 결제를 열 때 지운다 */
.sub-include ul { display: grid; gap: 14px; }  /* 항목마다 길이가 크게 달라(2026-11-30 결제 전 표시를 더함) 같은 높이로 맞추면 짧은 항목 아래가 비어 보인다 */
.sub-include li { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); text-align: left; }  /* 긴 항목에서 양끝 맞춤이 낱말 사이를 벌리지 않게 */
.sub-include li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px 2px 1px 2px; background: var(--accent); }
.sub-include li strong { display: block; font-size: 15.5px; color: var(--ink); }
/* 결제 요약: 스크롤해도 헤더 아래에 붙어 따라온다 */
.sub-summary { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; padding: 22px; border: 1px solid var(--line); background: var(--soft); }
.sub-summary .sub-step { margin-bottom: 0; }
.sum-dl { display: grid; gap: 8px; margin: 0; }
.sum-dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; }
.sum-dl dt { color: var(--muted); }
.sum-dl dd { margin: 0; font-weight: 600; text-align: right; }
.sum-total { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.sum-total dd { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.sum-calc { margin: -6px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
/* 구독 상태에 따라 숨기는 칸: 자기 display 값(grid, flex)이 있어도 숨긴다 */
.sub-summary [hidden], .my-card [hidden] { display: none; }
.sub-current:not([hidden]) { display: grid; gap: 16px; }
.sub-current .sum-calc { margin: 0; }
.sub-self-note { margin-top: -8px; }
/* 보호자 결제 화면(guardian.html, 2026-11-08). 로그인 없이 링크로 연다 */
.guardian [hidden] { display: none !important; }
.g-lead { margin-top: 8px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.g-msg { margin-top: 12px; }
.g-view { margin-top: 24px; }
.g-steps { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.g-step { display: grid; gap: 12px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.g-step.is-off { opacity: .45; pointer-events: none; }
.g-step.is-done { background: var(--soft); }
.g-step .sub-step { margin-bottom: 0; }
.g-note { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.g-test { display: grid; gap: 12px; padding: 14px 16px; border: 1px dashed #A9AFB8; border-radius: 8px; background: #FFFBEA; }
.g-test p { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.g-test p strong { display: block; color: var(--ink); }
.g-wait { font-size: 14.5px; font-weight: 700; color: #B3261E; }
.g-done { font-size: 14.5px; font-weight: 700; color: var(--accent-hover); }
.g-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.g-field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 700; }
.g-field input { height: 44px; padding: 0 12px; border: 1px solid #C9CDD3; border-radius: 8px; background: #fff; font: inherit; font-size: 16px; font-weight: 400; }
.g-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #DBF0DB; }
.g-grow { flex: 1 1 240px; }
.g-grow input { width: 100%; }
.g-row .btn-cta { height: 44px; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px #A3A9B1; }
.btn-ghost:hover { background-color: var(--soft); }
.g-terms { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.g-terms li { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.g-terms li > strong:first-child { display: block; color: var(--ink); }
.g-terms .g-inline { display: inline; }
.g-terms a { color: var(--accent-hover); text-underline-offset: 3px; }
.g-agree .check { font-size: 13.5px; }
.g-end { font-size: 15.5px; line-height: 1.75; }
.g-view[data-g-view="end"] { display: grid; gap: 18px; justify-items: start; }
.g-card { display: grid; gap: 12px; margin-bottom: 18px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.g-card .sub-step { margin-bottom: 0; }
.g-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.g-sub { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.g-sub p { font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.g-period { margin-top: 6px; font-size: 14px; font-weight: 800; }
.g-issues { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.g-issues li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.g-state { flex: none; color: var(--muted); font-weight: 700; }
.g-state.is-on { color: var(--ink); }
.g-table-wrap { overflow-x: auto; }
.g-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.g-table th, .g-table td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.g-table th { font-size: 13px; color: var(--muted); white-space: nowrap; }
.g-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-table a { color: var(--accent-hover); text-underline-offset: 3px; }
.g-pass { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.g-pass li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.g-pass .btn-cta { height: 36px; font-size: 14px; }

/* 구독 화면의 보호자 결제 요청(2026-11-08): 링크 만들기 */
.sub-request { display: grid; gap: 12px; }
.sub-share { display: grid; gap: 6px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sub-share > div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 1.55; }
.sub-share dt { color: var(--muted); font-weight: 700; }
.sub-share dd { margin: 0; color: var(--ink-2); text-align: left; }  /* 좁은 칸이라 양쪽 정렬하면 글자 사이가 벌어진다 */
.sub-share-note { font-size: 13px; line-height: 1.6; color: var(--muted); }
.sub-request .check { font-size: 13.5px; }
.sub-link { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sub-link input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #C9CDD3; border-radius: 6px; font: inherit; font-size: 13px; color: var(--ink-2); background: var(--soft); }
.sub-link .g-row .btn-cta { height: 38px; font-size: 14px; }
.sub-switch { justify-self: start; padding: 0; border: 0; background: none; color: var(--accent-hover); font: inherit; font-size: 13.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sub-guardian:not([hidden]) { display: grid; gap: 12px; }
.sub-guardian .sum-calc { margin: 0; }
.sub-guardian .sum-calc a { color: var(--accent-hover); font-weight: 700; text-underline-offset: 3px; }
.sum-dl dt { white-space: nowrap; }
.sub-agree { background: #fff; }
/* 휴대폰 본인확인(구독 화면의 직접 결제 칸, 보호자 결제 1단계. 2026-11-30) */
.sub-identity { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sub-id-title { font-size: 15px; font-weight: 800; }
.sub-identity .g-note a { color: inherit; text-underline-offset: 3px; }
.sub-id-form { display: grid; gap: 12px; }
.sub-identity p, .sub-identity .auth-status { text-align: left; }  /* 좁은 칸에서 양끝 맞춤이 낱말 사이를 벌리지 않게 */
.id-go { justify-self: start; }
/* 직접 결제로 이어받기(구독 화면의 구독 상태 칸, 이용약관 제19조의2 제8항. 2026-11-30). 본인확인 칸을 안으로 옮기면 겹 테두리를 없앤다 */
.sub-handover { display: grid; gap: 10px; margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sub-handover p, .sub-handover .auth-status { text-align: left; }
.sub-handover .sub-identity { padding: 0; border: 0; }
.sub-agree .check { font-size: 13.5px; }
.sub-status { text-align: justify; }
.sub-refund { margin-top: 32px; border-top: 1px solid var(--line); }
.sub-refund summary {
  position: relative;
  padding: 16px 32px 16px 2px;
  font-size: 15px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.sub-refund summary::-webkit-details-marker { display: none; }
.sub-refund summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform .2s;
}
.sub-refund[open] summary::after { transform: rotate(45deg); }
.sub-refund ul { display: grid; gap: 6px; padding-left: 1.2em; list-style: disc; }
.sub-refund li, .sub-refund p { font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.sub-refund p { margin: 8px 0 4px; }
.btn-cta[aria-current="page"] { pointer-events: none; }

/* ---------- 마이페이지 ---------- */
/* 시계 톱니바퀴 배너: 왼쪽 바퀴의 축과 오른쪽 밸런스 휠이 보이도록 가운데보다 조금 위를 자른다 */
.mypage-banner { background: #766141; }  /* 사진의 바탕색(이미지가 늦게 떠도 비슷한 색) */
.mypage-banner img { object-position: center 42%; }
.sec-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 2.5vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.01em;
}
/* 나란한 카드는 높이를 맞추고(stretch), 안쪽 줄도 같은 줄 높이(--my-row)로 맞춘다 */
.my-grid { --my-row: 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.my-card { display: flex; flex-direction: column; padding: 24px clamp(18px, 3vw, 28px); border: 1px solid var(--line); background: #fff; }
.my-card-wide { grid-column: 1 / -1; }
.my-card[hidden], #my-device [hidden] { display: none; }
/* 지정 기기: 항목 이름이 길어 이름 칸을 넓힌다 */
#my-device .my-dl > div { grid-template-columns: 7.5em minmax(0, 1fr); }
#my-device .my-note a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.my-card h2 { margin-bottom: 14px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
/* 카드 맨 아래의 버튼은 바닥에 붙여, 옆 카드의 마지막 줄과 아래 끝을 맞춘다(받침 단 3px까지 포함) */
.my-card > .btn-cta { align-self: flex-start; margin-top: auto; margin-bottom: 3px; }
.my-card > .my-empty { margin-bottom: 14px; }
.my-dl { display: grid; gap: 10px; margin: 0; }
.my-dl > div { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 12px; align-items: baseline; }
.my-dl dt { font-size: 14px; line-height: var(--my-row); color: var(--muted); }
.my-dl dd { margin: 0; font-size: 15.5px; line-height: var(--my-row); overflow-wrap: anywhere; }
.my-dl dd strong { font-weight: 800; }
.my-dd-note { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); }  /* 학생 회원 아래 한 줄 설명 */
.my-link {
  margin-left: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-hover);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.nick-form { display: grid; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.nick-form[hidden] { display: none; }
.nick-actions { display: flex; align-items: center; gap: 4px; }
[data-pw-page] [hidden] { display: none; }   /* 비밀번호 찾기: 단계마다 폼을 바꿔 보여 준다(.auth-form, .btn-cta의 display보다 앞서게) */
[data-pw-page] [data-pw="done"] { margin-top: 24px; }
.my-link.my-link-solo { margin-left: 0; }   /* 앞에 값 없이 버튼만 있는 칸(비밀번호) */
#pw-form .field-hint a { color: var(--accent-hover); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.my-status { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.my-status:empty { display: none; }
.my-status.is-error { color: #B3261E; }
.my-empty { font-size: 15.5px; line-height: var(--my-row, 26px); color: var(--muted); }
.consent-list { display: grid; }
.consent-list li:not(.my-empty) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.consent-list li:not(.my-empty):last-child { border-bottom: 0; }
.consent-name { font-size: 15px; font-weight: 650; }
.consent-state { justify-self: end; font-size: 14px; font-weight: 700; color: var(--muted); }
.consent-state.is-on { color: var(--excavate-ink); }
.consent-meta { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
/* 새 호 알림 메일 받기/그만 받기(동의 내역 위) */
.nl-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.nl-row[hidden] { display: none; }
.nl-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 15px; }
.nl-state strong { font-weight: 650; }
.nl-state span { font-size: 14px; font-weight: 700; color: var(--muted); }
.nl-state span.is-on { color: var(--excavate-ink); }
.nl-hint { flex-basis: 100%; font-size: 13px; line-height: 1.6; color: var(--muted); }

.my-foot { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 28px; }
.my-logout {
  height: 44px;
  padding: 0 20px;
  border: 1px solid #C9CDD3;
  border-radius: 12px 12px 5px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.my-logout:hover { border-color: var(--ink); }
/* 구독 칸: 구독 중 표시, 청약철회 안내, 해지 버튼(로그아웃 버튼과 같은 모양) */
.sub-badge { display: inline-block; margin-left: 10px; padding: 3px 9px; border-radius: 999px; background: #ECF7EC; color: var(--accent-hover); font-size: 13px; font-weight: 700; line-height: 1.4; vertical-align: 2px; }
.sub-badge.is-ending { background: var(--soft); color: var(--muted); }
.my-note { margin-top: 14px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.my-sub-actions { margin-top: auto; padding-top: 18px; }  /* 옆 칸보다 짧아도 버튼은 칸 아래에 붙는다 */
.my-sub-cancel { height: 40px; padding: 0 16px; border: 1px solid #C9CDD3; border-radius: 12px 12px 5px 12px; background: #fff; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.my-sub-cancel:hover { border-color: var(--ink); }
.my-sub-cancel:disabled { opacity: .5; cursor: default; }
.my-sub-actions .my-sub-cancel + .my-sub-cancel { margin-left: 8px; }
/* 결제 안내(결제를 마쳤다, 결제가 안 됐다): 칸 맨 위 */
.my-alert { margin-bottom: 14px; padding: 12px 14px; background: var(--soft); font-size: 14px; line-height: 1.6; color: var(--ink); }
.my-alert.is-error { background: #FBEDEC; color: #8C1D18; }
/* 해지 고르기(일반 해지, 중도 해지와 환불 금액) */
.my-cancel { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.my-cancel-opt { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); }
.my-cancel-opt h3 { font-size: 15.5px; font-weight: 800; }
.my-cancel-opt p, .my-cancel-opt li { font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.my-cancel-opt ul { display: grid; gap: 2px; padding-left: 1.1em; list-style: disc; }
.my-cancel-opt .my-sub-cancel { justify-self: start; }
.my-cancel-opt[hidden] { display: none; }
/* 결제 내역(구독, 열람권) */
.pay-list { display: grid; }
.pay-list li:not(.my-empty) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pay-list li:not(.my-empty):last-child { border-bottom: 0; }
.pay-name { font-size: 15px; font-weight: 650; }
.pay-amount { justify-self: end; font-size: 15px; font-weight: 700; }
.pay-meta { grid-column: 1 / -1; font-size: 13px; line-height: 1.6; color: var(--muted); }
.pay-meta a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.pay-list .my-sub-cancel { grid-column: 1 / -1; justify-self: start; height: 34px; margin-top: 6px; font-size: 13.5px; }
/* 열람권 화면: 야광 파도 배너. 빛나는 물마루가 상자 위로 보이도록 가운데쯤을 자른다 */
.pass-banner { background: #1A3343; }  /* 사진의 바탕색(이미지가 늦게 떠도 비슷한 색) */
.pass-banner img { object-position: center 50%; }
.pass-page .sub-include ul { grid-auto-rows: auto; }  /* 열람권 안내는 항목마다 길이가 크게 달라, 구독 화면처럼 같은 높이로 맞추면 짧은 항목 아래가 비어 보인다 */
/* 열람권 화면: 고른 호(표지와 제목) */
.pass-issue { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 28px; }
.pass-issue[hidden] { display: none; }
.pass-issue img { width: 100%; height: auto; border: 1px solid var(--line); }
.pass-issue .kicker .sec { color: var(--navy); }
.pass-issue h2 { margin: 8px 0 8px; font-size: clamp(20px, 1.8vw, 24px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.pass-issue .deck { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
/* 회원탈퇴는 눈에 덜 띄게 접어 둔다 */
.my-leave { flex: 0 1 440px; }
.my-leave summary {
  width: max-content;
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  list-style: none;
  cursor: pointer;
}
.my-leave summary::-webkit-details-marker { display: none; }
.my-leave[open] summary { margin-bottom: 12px; color: var(--ink); }
.my-leave-body { padding: 20px; border: 1px solid #E8B4AE; background: #FFF8F6; }
.my-leave-body > p { margin-bottom: 16px; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.leave-form { display: grid; gap: 12px; }
.btn-danger {
  justify-self: start;
  height: 44px;
  padding: 0 20px;
  border: 1px solid #C2362B;
  border-radius: 12px 12px 5px 12px;
  background: #fff;
  color: #B3261E;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.btn-danger:hover { background: #FCEBE8; }
.btn-danger[disabled] { opacity: .7; cursor: progress; }

/* 탈퇴 뒤 작별 인사 */
.farewell { padding-bottom: clamp(80px, 10vw, 140px); }
.auth-banner.farewell-banner { background: #696636; }  /* 정원의 빈 의자 두 개 사진의 바탕색(탈퇴한 뒤에야 받으므로 그림이 늦게 떠도 비슷한 색) */
.auth-banner.farewell-banner img { object-position: center 42%; }  /* 두 의자의 등받이와 앉는 자리가 띠 안에 오도록 */
.farewell-body { display: grid; justify-items: center; gap: 28px; padding: clamp(56px, 8vw, 96px) var(--gutter) 0; text-align: center; }
.farewell-msg { font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.6; letter-spacing: -.02em; outline: none; }

/* 가입 환영: 인증 메일에서 돌아온 첫 페이지에 1.5초 */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(255, 255, 255, .82);
  pointer-events: none;  /* 떠 있는 동안에도 뒤 페이지를 쓸 수 있다 */
  opacity: 0;
  transition: opacity .35s ease;
}
.welcome.is-on { opacity: 1; }
.welcome-msg {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -.02em;
  text-align: center;
  transform: translateY(8px);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.welcome.is-on .welcome-msg { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .welcome, .welcome-msg { transition: none; }
}

/* ---------- 이용약관, 개인정보처리방침 ---------- */
.legal { padding: clamp(36px, 5vw, 64px) 0 clamp(64px, 8vw, 104px); }
.legal-head { margin-bottom: clamp(28px, 3.4vw, 40px); padding-bottom: 20px; border-bottom: 3px solid var(--ink); }
.legal-head h1 { font-size: clamp(30px, 3vw, 40px); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; }
.legal-meta { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.legal-grid { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: clamp(32px, 4vw, 56px); align-items: start; }
/* 차례: 넓은 화면에서는 왼쪽에 붙어 따라온다 */
.legal-toc { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; font-size: 14px; }
.legal-toc-title { margin-bottom: 10px; font-size: 13px; font-weight: 800; letter-spacing: .04em; color: var(--muted); }
.legal-toc > ol > li { margin-bottom: 6px; }
.legal-toc > ol > li > a { font-weight: 700; color: var(--ink); }
.legal-toc ol ol { margin: 2px 0 8px 2px; padding-left: 12px; border-left: 1px solid var(--line); }
.legal-toc a { display: block; padding: 3px 0; color: var(--ink-2); line-height: 1.45; text-decoration: none; }
.legal-toc a:hover { color: var(--accent-hover); }
.legal-doc { max-width: 760px; font-size: 15.5px; line-height: 1.85; color: var(--ink-2); }
.legal-doc h2 { margin: 44px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 22px; font-weight: 800; line-height: 1.4; letter-spacing: -.015em; color: var(--ink); }
.legal-doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-doc h3 { margin: 28px 0 10px; font-size: 17px; font-weight: 800; line-height: 1.5; color: var(--ink); }
.legal-doc h2 + h3 { margin-top: 18px; }
.legal-doc p { margin-bottom: 12px; }
.legal-doc ol, .legal-doc ul { margin-bottom: 14px; padding-left: 1.6em; }
.legal-doc ol { list-style: decimal; }
.legal-doc ul { list-style: disc; }
.legal-doc li { margin: 5px 0; padding-left: 2px; }
.legal-doc li > ol, .legal-doc li > ul { margin: 6px 0 4px; }
.legal-doc li::marker { color: var(--muted); }
.legal-doc strong { color: var(--ink); }
.legal-doc code { padding: 1px 5px; border-radius: 4px; background: var(--soft); font-size: .88em; }
.legal-doc a { color: var(--accent-hover); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-table { margin-bottom: 16px; overflow-x: auto; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.65; }
.legal-table th, .legal-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table thead th { border-top: 2px solid var(--ink); border-bottom-color: var(--ink); background: var(--soft); font-weight: 700; color: var(--ink); white-space: nowrap; }
/* 게시 전에 채울 자리 */
mark.todo { padding: 0 4px; border-radius: 3px; background: #FFF1C2; color: #6E4A00; font-weight: 600; }

/* ---------- 바닥글 ---------- */
/* ---------- 독자 질문(홈, 푸터 바로 위) ---------- */
/* 양옆까지 닿는 짙은 남색 띠에 흰 글자. 주소는 본문 폭에 맞춰 줄어든다(cqi) */
/* 띠 높이는 처음(위 22px, 아래 28~44px)의 1.6배쯤. 안내 글은 위에, 주소는 아래에 붙이고 위아래 여백(--ask-edge)은 같게 한다.
   늘린 높이는 안내 글과 주소 사이(--ask-room)에 둔다 */
.ask {
  --ask-room: calc(min(42px + 4vw, 100px) + min(54px + 5.5vw, 135px) - 2 * var(--ask-edge));
  padding: var(--ask-edge) 0;
  background: var(--ask-bg);  /* 2026-11-08 더 짙고 선명하게(전 #052344) */
  color: #fff;
}
.ask :focus-visible { outline-color: #fff; }
.ask .container { container-type: inline-size; }
.ask-lead { font-size: clamp(20.4px, 1.92vw, 26.4px); font-weight: 400; line-height: 1.5; color: #fff; }
.ask-mail { display: block; margin-top: calc(10px + var(--ask-room)); font-family: var(--font-serif); font-size: min(102px, 8cqi); font-weight: 400; line-height: 1.02; letter-spacing: -.02em; text-align: right; white-space: nowrap; color: #fff; text-decoration: none; }  /* 8cqi: 긴 줄(sentiencemag.com)이 칸 폭의 4분의 3쯤 */
.ask-mail { width: fit-content; margin-left: auto; transition: color .15s; }  /* 링크 칸을 글자 폭만큼만(왼쪽 빈 자리에서는 반응하지 않게), 오른쪽 정렬은 그대로 */
.ask-mail:hover { color: var(--accent-soft); }  /* 밑줄 대신 연한 초록(흰 글씨와 강조색의 가운데, #88CC88) */
.ask-mail:active { color: var(--accent); }  /* 누르는 동안은 강조색 그대로 */

.site-footer { padding: 56px 0 28px; background: #000; color: #fff; }  /* 순수 검정 */
.site-footer :focus-visible { outline-color: #fff; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 48px; }
.footer-brand > svg { width: 220px; height: auto; fill: #fff; }
.footer-brand p { margin-top: 12px; font-size: 14px; color: rgba(255, 255, 255, .72); }
/* 인스타그램, 이메일: 선 아이콘 + 주소 */
.footer-contact { display: grid; gap: 10px; margin-top: 22px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: rgba(255, 255, 255, .88); text-decoration: none; }
.footer-contact svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer-contact .dot { fill: currentColor; stroke: none; }
/* 세 열을 가장 넓은 열에 맞춘 같은 폭으로 두어, 열이 시작하는 위치의 간격이 똑같게 */
.footer-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: clamp(32px, 4vw, 56px); }
.footer-nav div { display: flex; flex-direction: column; gap: 8px; }
.footer-nav h2 { margin-bottom: 4px; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: rgba(255, 255, 255, .6); }
.footer-nav a { font-size: 15px; text-decoration: none; }
/* 사업자 정보: 항목 사이를 세로줄로 나눈다 */
.footer-biz { margin-top: 44px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 12.5px; line-height: 1.9; color: rgba(255, 255, 255, .5); }  /* 2026-11-08 더 회색으로(전 .6, 검정 위 대비 5.3:1) */
.footer-biz p { display: flex; flex-wrap: wrap; }
.footer-biz span:not(:last-child)::after { content: ""; display: inline-block; width: 1px; height: .9em; margin: 0 10px; background: rgba(255, 255, 255, .25); vertical-align: -1px; }
.footer-biz a { color: rgba(255, 255, 255, .6); text-underline-offset: 3px; }  /* '회사 공고'(notice.html)도 이 줄에 있다(2026-11-08 법적 고지 칸에서 옮김). 상법 시행령 제6조 제3항(첫 화면에서 쉽게 찾게) 때문에 이 링크는 이보다 흐리게 하거나 밑줄을 빼지 않고, 휴대폰에서도 이 줄을 접거나 숨기지 않는다(3_Webpage/README.md '회사 공고') */
.footer-biz b { font-weight: 700; color: rgba(255, 255, 255, .6); }
.footer-biz mark.todo { padding: 0 4px; }
/* 푸터 링크: 마우스를 올리면 밑줄 대신 연한 초록, 누르는 동안 초록(홈 readers@ 주소와 같다). 사업자 정보 줄의 링크는 글 속 링크라 평소 밑줄은 그대로 둔다 */
.site-footer a { transition: color .15s; }
.site-footer a:hover { color: color-mix(in srgb, var(--accent) 50%, #fff); }
.site-footer a:active { color: var(--accent); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
}

/* ---------- 맨 위로 ---------- */
.to-top {
  --k: 1px;
  position: fixed;
  right: var(--gutter);
  bottom: 24px;
  z-index: 15;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: calc(12 * var(--k)) calc(12 * var(--k)) calc(5 * var(--k)) calc(12 * var(--k));
  background: var(--ask-bg);  /* 독자 질문 띠와 같은 색 */
  color: #fff;
  box-shadow: 0 8px 20px rgba(10, 25, 48, .25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.to-top.is-on { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 메뉴 서랍 ---------- */
.drawer {
  width: min(340px, 88vw);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--ink);
}
.drawer::backdrop { background: rgba(10, 25, 48, .45); }
.drawer[open] { animation: drawer-in .22s ease-out; }
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
.drawer-in { min-height: 100%; padding: 14px 24px 32px; display: flex; flex-direction: column; gap: 22px; }
.drawer-close { margin-left: -10px; }
/* 서랍의 검색: 검색창처럼 생긴 버튼 */
.drawer-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #C9CDD3;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.drawer-search:hover { border-color: var(--ink); color: var(--ink-2); }
.drawer-search svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.drawer-links { display: grid; border-top: 1px solid var(--line); }
.drawer-links a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); font-weight: 600; text-decoration: none; }
.drawer-meta { font-size: 13px; font-weight: 500; color: var(--muted); }
.drawer-links a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .to-top, .faq summary::after { transition: none; }
  .drawer[open] { animation: none; }
  .search-panel, .search-sheet { transition: none !important; }
  .search-panel.is-open .search-form::after { animation: none; }
  .is-found { animation: none; outline: 3px solid var(--accent); outline-offset: 6px; }
}

/* ---------- 반응형 ---------- */
@media (max-width: 960px) {
  /* 차례는 본문 위에 장(조) 단위 칩으로 */
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .legal-toc { position: static; max-height: none; overflow: visible; }
  .legal-toc > ol { display: flex; flex-wrap: wrap; gap: 6px 8px; }
  .legal-toc > ol > li { margin: 0; }
  .legal-toc ol ol { display: none; }
  .legal-toc > ol > li > a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 600; }
  .sub-grid { grid-template-columns: minmax(0, 1fr); }
  .sub-summary { position: static; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .about-media { order: 1; min-height: 0; aspect-ratio: 16 / 9; }  /* 한 줄로 쌓이면 Value처럼 제목과 글 다음에 사진 */
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .detail-intro, .detail-people { grid-template-columns: minmax(0, 1fr); }
  .detail-media { order: 1; }
  .split-media { order: 1; }  /* 한 줄로 쌓이면 제목과 글 다음에 사진 */
  .subfaq { grid-template-columns: minmax(0, 1fr); }

  /* 사진 아래에 인사, 공개 자료는 두 장씩 두 줄 */
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-media { aspect-ratio: 16 / 9; }
  /* 꺾쇠 없이 최신 네 장만(목록의 앞 네 장) */
  .public-list { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .public-card:nth-child(n + 5), .public-nav { display: none; }
}

@media (max-width: 760px) {
  /* 제호(48px)가 가운데에 머물도록 오른쪽에는 구독 버튼(로그인했으면 인사)만 남긴다. 검색과 로그인은 왼쪽 메뉴 서랍에서 쓴다 */
  .mh-actions .icon-btn, .mh-actions .mh-login { display: none; }
  .masthead-grand { --mh-grand: clamp(48px, 16.98vw - 45px, 134px); }  /* 오른쪽에 구독 버튼(92px)만 남아 제호를 더 키울 수 있다 */

  .cover-grid { grid-template-columns: minmax(0, 1fr); }
  .cover { width: min(100%, 320px); }
  .cover-headline { margin-bottom: 24px; }
  .cover-deck { margin: -10px 0 24px; }
  .past-item { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .shelf-list .past-item { grid-template-columns: 104px minmax(0, 1fr); gap: 16px; }  /* 리더의 호 목록은 표지를 작게 왼쪽에 */
  .shelf-list .past-item h3 { margin: 4px 0 6px; font-size: 17px; }
  .shelf-list .past-item .deck { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 14px; line-height: 1.6; }
}

@media (max-width: 600px) {
  :root { --header-h: 70px; }
  /* 한 줄: 메뉴 | 제호 | 구독하기(로그인했으면 '닉네임님').
     양옆 칸을 구독 버튼 폭으로 고정하고 제호는 가운데 칸에 맞춰 줄인다.
     왼쪽 칸은 메뉴 아이콘 안쪽 여백(--icon-inset)만큼 넓혀 제호가 화면 정가운데에 오게 한다 */
  .mh {
    --mh-side: 78px;  /* 오른쪽 '구독하기'(로그인했으면 '닉네임님')가 들어가는 폭 */
    grid-template-columns: calc(var(--mh-side) + var(--icon-inset)) minmax(0, 1fr) var(--mh-side);
    gap: 10px;
    padding: 12px var(--gutter) 12px calc(var(--gutter) - var(--icon-inset));
  }
  .mh-logo { justify-self: stretch; display: flex; justify-content: center; min-width: 0; margin-left: 0; }
  .mh-logo svg { width: 100%; max-width: 253px; height: auto; }
  .masthead-grand .mh-logo svg { height: auto; }  /* 제호가 이미 가운데 칸을 채워 키우지 않는다 */
  .masthead-grand { margin-bottom: 0; }
  .mh-hello { display: none; }  /* 좁은 칸에는 '닉네임님'만 */
  .mh-actions .btn-cta { font-size: 14px; }

  /* 사진은 화면 양옆까지, 공개 자료는 두 장씩 좁게 */
  .hero-media { margin-inline: calc(-1 * var(--gutter)); aspect-ratio: 3 / 2; }
  .public-list { gap: 28px 14px; }
  .public-card h3 { margin-top: 10px; font-size: 16px; line-height: 1.38; }
  .public-card p { margin-top: 4px; font-size: 13.5px; line-height: 1.6; }

  /* 배너에 걸친 넓은 상자: 안쪽 여백을 줄여 글 폭을 넓힌다 */
  .page-card { padding: 24px 16px 28px; }
  /* 공고: 게시일, 제목, 게시 기간을 한 칸에 위아래로 */
  .notice-item > summary { grid-template-columns: minmax(0, 1fr); }
  .notice-body { padding-left: 2px; }

  .cover-info .btn-cta { display: flex; width: 100%; }

  .sec-head .ko { display: block; margin: 4px 0 0; font-size: .58em; }
  .plan { padding: 16px; }
  .plan-price { margin-left: 38px; font-size: 20px; }
  .plan-only .plan-price { margin-left: 0; }
  .faq summary { font-size: 16px; }

  /* 휴대폰에서는 세 열이 한 줄에 다 들어가지 않아 같은 폭 두 열로 */
  .my-grid { grid-template-columns: minmax(0, 1fr); }
  .my-leave { flex-basis: 100%; }
  .footer-nav { width: 100%; grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
}
