/* 홈페이지(index.html)와 공지사항·이벤트·자주 묻는 질문·보관함 페이지가 함께 쓰는 모양입니다.
   색, 머리 막대(로고·보관함·메뉴 단추), 메뉴 서랍, 꼬리말(사업자 정보), 글 페이지(제목·펼치는 목록·빈 칸).
   홈페이지의 배너·상품 칸은 index.html, 보관함 화면은 box.html 안에 있습니다. 서랍을 여닫는 일은 menu.js가 합니다. */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --meok: #26211e;
  --meok-2: #3a322d;
  --meok-3: #5b524c;
  --meok-4: #8a7f76;
  --muted: #978d85;
  --line: #ece6df;
  --inju: #c8402f;
  --paper: #f7f5f2;   /* 꼬리말·펼친 답의 바탕 */
  --gutter: 20px;
}

html, body { margin: 0; }
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

body {
  background: #fff;
  color: var(--meok-3);
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 480px;
  min-height: 100svh;
  margin: 0 auto;
  overflow: clip;
  background: #fff;
}

/* 머리 막대: 흰 바탕에 왼쪽 로고, 오른쪽 메뉴 단추(홈페이지는 그 왼쪽에 '보관함' 단추). 맨 위에서는 줄이 없고, 내리면 가는 줄이 생깁니다. */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(38, 33, 30, 0);
  transition: box-shadow 0.2s ease;
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}

.top.scrolled { box-shadow: 0 1px 0 var(--line); }

.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 var(--gutter);
}

/* 로고: 갓 쓴 까치 + 먹 글자 + 手相 인장을 구운 한 장(세 상품과 같은 그림). 높이 30px(사용자 결정 2026-10-23: 1.2배). */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.brand img { display: block; height: 30px; width: auto; }

/* 머리 오른쪽: '보관함' 단추와 메뉴 단추. */
.top-act { display: flex; align-items: center; gap: 6px; }

/* 보관함: 늘 보이고 누르면 보관함(box.html)이 열립니다(사용자 결정 2026-10-24: 예전 '다시 보기' 단추 자리).
   청월당 칩처럼 가는 테두리의 둥근 단추에 상자 아이콘. */
.top-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 12px 0 10px;
  border: 1px solid #e1e1e1;
  border-radius: 999px;
  background: #fff;
  color: var(--meok);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.3px;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.top-box:active { background: #f5f5f5; }
.top-box svg { display: block; flex: none; width: 18px; height: 18px; }

/* 메뉴 단추(≡): 누르기 쉽게 44px 칸에 그리고, 선의 오른쪽 끝을 글 줄(20px)에 맞춥니다. */
.menu-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -11px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--meok);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.menu-btn svg, .drawer-close svg { display: block; width: 22px; height: 22px; }

/* 메뉴 서랍(사용자 결정 2026-10-23: 포스텔러처럼): 화면을 어둡게 덮고 오른쪽에서 흰 판이 밀려 나옵니다.
   넓은 화면에서는 가운데 480px 칸의 오른쪽 끝에서 열립니다. */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  visibility: hidden;
  transition: visibility 0s linear 0.28s;
}

.drawer.open { visibility: visible; transition-delay: 0s; }

.drawer-dim {
  position: absolute;
  inset: 0;
  background: rgba(38, 33, 30, 0.42);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.drawer.open .drawer-dim { opacity: 1; }

.drawer-frame {
  position: absolute;
  inset: 0;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  pointer-events: none;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(296px, 78%);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  pointer-events: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.drawer.open .drawer-panel { transform: none; }

/* 닫기(×)는 메뉴 단추와 같은 자리에 둡니다. */
.drawer-top {
  display: flex;
  flex: none;
  justify-content: flex-end;
  align-items: center;
  height: 56px;
  padding: 0 9px;
}

.drawer-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--meok);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 로그인 칸(사용자 결정 2026-10-24): 보관함 칸 위에 보관함 페이지와 같은 노란 '카카오 로그인' 막대(카카오 디자인 가이드 색)와
   그 아래 회색 한 줄. 누르면 카카오 로그인을 거쳐 보관함이 열리고, 로그인한 브라우저에서는 menu.js가 칸째 감춥니다.
   막대와 글이 떠 보이지 않게 아래에 줄을 그어 보관함 칸과 나눕니다(사용자 결정 2026-10-24, 시안 C). */
.drawer-login { margin-top: 4px; padding: 0 12px 18px; border-bottom: 1px solid var(--line); }

.drawer-login:not([hidden]) + .drawer-box { margin-top: 14px; }

.drawer-login[hidden] { display: none; }

/* 로그인한 브라우저(menu.js가 .me를 붙임): 카카오 막대와 설명 대신 캐릭터 얼굴과 '유저번호'(사용자 결정 2026-10-25). */
.drawer-me { display: none; align-items: center; gap: 12px; padding: 4px 4px 0; }
.drawer-login.me .drawer-me { display: flex; }
.drawer-login.me .drawer-kakao, .drawer-login.me p { display: none; }
.drawer-me img { width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(38, 33, 30, 0.08); }
.drawer-me b { color: var(--meok); font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }

.drawer-kakao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  border-radius: 12px;
  background: #fee500;
  color: rgba(0, 0, 0, 0.85);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.drawer-kakao svg { width: 20px; height: 20px; }

.drawer-login p {
  margin: 10px 0 0;
  color: var(--meok-3);
  font-size: 13px;
  text-align: center;
  letter-spacing: -0.2px;
}

/* 보관함 칸: 서랍 맨 위에 늘 한지색 칸으로 보입니다.
   칸 안 글자가 아래 목록 글자와 같은 줄(왼쪽 28px)에서 시작하도록 바깥 12px + 안쪽 16px로 둡니다. */
.drawer-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 12px 10px;
  padding: 15px 16px;
  border-radius: 12px;
  background: #f5f0ea;
  color: var(--meok);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.drawer-box::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-top: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
  transform: rotate(45deg);
}

.drawer-list {
  margin: 0;
  padding: 6px 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.drawer-list a {
  display: block;
  padding: 14px 28px;
  color: var(--meok);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.3px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.drawer-list a:active, .drawer-box:active { background: var(--paper); }

/* 문의하기 아래 작은 메일 주소: 메일 앱이 없어도 보고 옮겨 적을 수 있게 둡니다. */
.drawer-list small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

/* 서랍이 열려 있는 동안 뒤 페이지가 같이 밀리지 않게 합니다. */
html.menu-open, html.menu-open body { overflow: hidden; }

/* 글 페이지(공지사항·이벤트·자주 묻는 질문): 큰 굵은 제목 아래 줄로 나눈 목록(포스텔러). 줄을 누르면 아래에 내용이 펼쳐집니다.
   글이 짧아도(이벤트 빈 칸) 꼬리말이 화면 아래에 붙게 글 칸이 남는 높이를 채웁니다. */
.page.docs { display: flex; flex-direction: column; }
.doc { flex: 1 0 auto; padding: 22px 0 0; }

.doc-title {
  margin: 0;
  padding: 6px var(--gutter) 22px;
  color: var(--meok);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.6px;
}

.rows { border-top: 1px solid var(--line); }

.row { border-bottom: 1px solid var(--line); }

.row > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px var(--gutter);
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.row > summary::-webkit-details-marker { display: none; }

/* 오른쪽 꺾쇠: 닫혀 있으면 아래, 펼치면 위를 봅니다. */
.row > summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin: -4px 4px 0 0;
  border-right: 1.6px solid #b3aaa1;
  border-bottom: 1.6px solid #b3aaa1;
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin 0.2s ease;
}

.row[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }

.row > summary:active { background: var(--paper); }

.q {
  flex: 1;
  min-width: 0;
  color: var(--meok);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.3px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 공지 줄: 왼쪽 확성기, 제목 아래 날짜. */
.notice-ico { flex: none; width: 22px; height: 22px; color: #b3aaa1; }
.q-date { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: 0; }

.ans {
  padding: 18px var(--gutter) 20px;
  background: var(--paper);
  color: var(--meok-3);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: -0.2px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ans p { margin: 0; }

.ans a {
  display: inline-block;
  margin-top: 10px;
  color: var(--meok-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(38, 33, 30, 0.25);
  text-underline-offset: 3px;
}

/* 이벤트가 없을 때: 가운데 흐린 까치와 두 줄. */
.empty {
  padding: 56px var(--gutter) 64px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.empty img { display: block; width: 64px; height: auto; margin: 0 auto 18px; opacity: 0.32; }

.empty-title { margin: 0; color: var(--meok-2); font-size: 17px; font-weight: 600; letter-spacing: -0.3px; }
.empty-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; letter-spacing: -0.2px; }

/* 자주 묻는 질문 맨 아래: 메일로 묻기. */
.ask-more {
  margin: 36px var(--gutter) 0;
  padding: 22px 20px;
  border-radius: 14px;
  background: var(--paper);
  text-align: center;
}

.ask-more p { margin: 0 0 12px; color: var(--meok-3); font-size: 15px; letter-spacing: -0.3px; word-break: keep-all; }

.ask-more a {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--meok);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}

/* 꼬리말: 인생손금 첫 화면 꼬리말과 같은 사업자 정보(전자상거래법상 첫 화면 표시 항목)를 청월당처럼 가운데 맞춘 작은 글씨로 둡니다.
   판매 상품 줄은 넣지 않습니다(사용자 결정 2026-10-21: 카드사 심사가 끝나 뺌). 맨 아래에 인스타그램 아이콘(사용자 결정 2026-10-23). */
.home-foot {
  margin-top: 48px;
  padding: 34px var(--gutter) max(44px, calc(env(safe-area-inset-bottom) + 28px));
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: -0.2px;
  text-align: center;
  word-break: keep-all;
}

.home-foot p, .home-foot ul { margin: 0; padding: 0; list-style: none; }
.home-foot b { color: #6f655e; font-weight: 600; }
.home-foot a { color: var(--meok-3); text-decoration: underline; text-decoration-color: rgba(38, 33, 30, 0.22); text-underline-offset: 3px; }

.foot-brand { display: flex; justify-content: center; align-items: center; gap: 4px; margin-bottom: 18px !important; }
.foot-brand img { display: block; height: 21px; width: auto; }

/* 한 줄에 둘이 들어가면 가는 세로 막대로 나눕니다. 좁아서 넘치면 막대 없이 다음 줄로 내려갑니다. */
.foot-biz li { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0; }
.foot-biz li > span { white-space: nowrap; }
.foot-biz li > span + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 10px;
  margin: 0 9px;
  vertical-align: -0.5px;
  background: #ddd5cc;
}
.foot-biz li > a { margin-left: 6px; white-space: nowrap; }

/* 아주 좁은 화면(320px 폭)에서는 두 항목이 한 줄에 안 들어가므로 막대 없이 한 줄에 하나씩 둡니다. */
@media (max-width: 359px) {
  .foot-biz li { flex-direction: column; align-items: center; }
  .foot-biz li > span + span::before { display: none; }
}

.foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; margin-top: 20px !important; font-size: 12.5px; font-weight: 600; }
.foot-links a { color: var(--meok-2); text-decoration: none; }
.foot-copy { margin-top: 8px !important; color: #aaa199; }

/* 인스타그램: 청월당 꼬리말 맨 아래처럼 흐린 동그라미 아이콘. */
.foot-sns { display: flex; justify-content: center; margin-top: 18px !important; }
.home-foot .foot-sns a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #d3cac0; color: #fff; text-decoration: none; }
.foot-sns svg { display: block; width: 22px; height: 22px; }
