/* 약관·처리방침: 코르크 위 종이 한 장 (소개 페이지와 같은 재료) */
@font-face {
  font-family: 'Typewriter';
  src: url(fonts/typewriter.woff) format('woff');
  font-display: swap;
}
@font-face {
  /* 위 글꼴에 없는 글자만 이걸로 (브라우저가 그럴 때만 받는다): 새로 쓴 글도 같은 글꼴로 */
  font-family: 'TypewriterAll';
  src: url(fonts/typewriter-all.woff) format('woff');
  font-display: swap;
}
:root { --frame: 10px; --ink: #1D1B18; --soft: #5b5248; --label: #EFE6D4; --link: #8E2C2C; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #2A2622; }
body {
  margin: 0; padding: 28px calc(var(--frame) + 14px) 48px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px; line-height: 1.65; color: var(--ink);
}
.cork { position: fixed; inset: 0; z-index: -1; background: #8a5a33 url(textures/felt.jpg) center / cover; }
.frame {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  border: var(--frame) solid #5E3B1F;
  border-image: linear-gradient(135deg, #8A5A33, #5E3B1F 40%, #74492A 70%, #4A2E17) 1;
}
.frame::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5); }
.top { max-width: 760px; margin: 0 auto 18px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.top a {
  font-family: 'Typewriter', 'TypewriterAll', 'Courier New', monospace; font-size: 14px; color: var(--ink); text-decoration: none;
  background: var(--label); padding: 6px 12px; box-shadow: 0.5px 2.4px 3.2px rgba(0, 0, 0, 0.42);
}
.top a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
.sheet {
  position: relative; max-width: 760px; margin: 0 auto; padding: 44px 40px 36px;
  background: var(--label);
  box-shadow: 0.5px 2.4px 3.2px rgba(0, 0, 0, 0.42), 0 4px 9px rgba(0, 0, 0, 0.12), 0 0.8px 1.1px rgba(0, 0, 0, 0.38);
}
.sheet::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url(textures/paper-grain.png) 0 0 / 240px repeat; opacity: 0.4;
}
.sheet > * { position: relative; }
.pin {
  position: absolute !important; top: 8px; left: 50%; width: 22px; height: 22px; margin-left: -11px;
  filter: drop-shadow(2.6px 3.6px 2.4px rgba(0, 0, 0, 0.5));
}
h1, h2 { font-family: 'Typewriter', 'TypewriterAll', 'Courier New', monospace; font-weight: normal; line-height: 1.25; }
h1 { font-size: 32px; margin: 0 0 6px; }
h1 + p { color: var(--soft); margin-top: 0; }
h2 { font-size: 20px; margin: 32px 0 10px; padding-top: 16px; border-top: 1px dashed rgba(0, 0, 0, 0.18); }
h3 { font-size: 16px; margin: 18px 0 4px; }
p { margin: 10px 0; }
ul { margin: 10px 0; padding-left: 22px; }
li { margin: 6px 0; }
a { color: var(--link); text-underline-offset: 2px; }
.table { overflow-x: auto; margin: 14px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 9px 10px; border-bottom: 1px solid rgba(0, 0, 0, 0.14); text-align: left; vertical-align: top; }
thead th { border-bottom: 2px solid var(--soft); }
footer { max-width: 760px; margin: 18px auto 0; font-size: 11px; line-height: 1.6; text-align: center; color: rgba(246, 241, 231, 0.85); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
footer p { margin: 0; }
@media (max-width: 600px) {
  .sheet { padding: 38px 18px 24px; }
  h1 { font-size: 26px; }
  h2 { font-size: 18px; }
}

/* 언어 전환: 구석에 작은 종이 태그 (구멍 하나) */
.lang-tag {
  display: flex; align-items: center; gap: 2px; padding: 4px 8px 4px 20px;
  font-family: 'Typewriter', 'TypewriterAll', 'Courier New', monospace; font-size: 13px; color: #1D1B18;
  transform: rotate(2deg); transform-origin: 100% 0;
  box-shadow: 0.5px 2.4px 3.2px rgba(0, 0, 0, 0.42), 0 0.8px 1.1px rgba(0, 0, 0, 0.38);
}
.lang-tag::after {
  content: ''; position: absolute; left: 7px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: #17120E; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6), 0 0.5px 0 rgba(255, 255, 255, 0.4);
}
.lang-tag button { font: inherit; color: inherit; background: none; border: 0; padding: 4px 5px; cursor: pointer; opacity: 0.5; }
html[data-lang="en"] .lang-tag [data-set-lang="en"], html[data-lang="ko"] .lang-tag [data-set-lang="ko"] {
  opacity: 1; text-decoration: underline; text-underline-offset: 3px;
}

/* 한국어 / English: 같은 페이지에 둘 다 있고, 고른 쪽만 보인다 */
html[data-lang="ko"] [lang="en"], html[data-lang="en"] [lang="ko"] { display: none !important; }
.top .lang-tag { position: relative; margin-left: auto; align-self: flex-start; }
.slip { position: relative; background: var(--label); }
.slip::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url(textures/paper-grain.png) 0 0 / 240px repeat; opacity: 0.4;
}
.slip > * { position: relative; }
