/* 선비검객 — 한지 · 먹 · 인주. 인주(seal)는 게임처럼 신호(예고 · 판정 · 인장)에만 쓴다. */
:root {
  color-scheme: light;
  --hanji: #e7e1d3;
  --hanji-deep: #dcd4c2;
  --ink: #1b1916;
  --ink-soft: #3d3934;
  --wash: #6f675c;
  --seal: #b3261e;
  --gold: #8e7230;
  --brush: 'East Sea Dokdo', 'Gowun Batang', serif;
  --serif: 'Gowun Batang', 'Noto Serif KR', serif;
  --measure: 34rem;
}
.latin {
  --brush: 'Kaushan Script', 'Gowun Batang', serif;
}
.lang-ja {
  --brush: 'Yuji Syuku', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --serif: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', 'Gowun Batang', serif;
}
.lang-zh-Hant {
  --brush: 'LXGW WenKai TC', 'PMingLiU', 'Noto Serif TC', serif;
  --serif: 'LXGW WenKai TC', 'Noto Serif TC', 'PMingLiU', 'Gowun Batang', serif;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--hanji);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  /* 한지: 섬유 결(SVG 잡음) + 위쪽 빛 · 아래쪽 먹물 번짐 */
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.10 0 0 0 0 0.09 0 0 0 0.085 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(ellipse 90% 55% at 70% 8%, rgba(255, 252, 244, 0.7), transparent 70%),
    linear-gradient(180deg, var(--hanji) 0%, var(--hanji) 72%, var(--hanji-deep) 100%);
  background-attachment: scroll;
  min-height: 100dvh;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.brush {
  font-family: var(--brush);
  font-weight: 400;
}

/* ── 위 줄 ─────────────────────────────────────────── */
.bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 18px 0;
  font-size: 15px;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink-soft);
}
.seal-sm {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--seal);
  color: #f3ecdd;
  font-family: 'East Sea Dokdo', serif;
  font-size: 20px;
  line-height: 1;
}
/* 언어 고르기 — 위 줄 오른쪽, 기기 기본 고르기 창을 쓴다 */
.langsel {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--ink-soft);
}
.langsel svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  pointer-events: none;
}
.langsel select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%233d3934' stroke-width='1.6'/></svg>")
    right 2px center / 10px no-repeat;
  padding: 8px 18px 8px 0;
  font: inherit;
  font-size: 15px;
  color: inherit;
  cursor: pointer;
}
.langsel select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── 첫 화면: 검객 그림 + 세로 제목 ─────────────────── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'stage title'
    'pitch pitch';
  align-items: start;
  gap: 0 6px;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(56px + env(safe-area-inset-top)) 16px 8px;
}
.stage {
  grid-area: stage;
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1;
  justify-self: center;
  user-select: none;
  -webkit-user-select: none;
}
.stage .sword {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.title-col {
  grid-area: title;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}
.vtitle {
  margin: 0;
  font-family: var(--brush);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}
.cjk .vtitle {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: clamp(54px, 15vw, 108px);
  letter-spacing: 0.02em;
}
.lang-ja .vtitle,
.lang-zh-Hant .vtitle {
  font-size: clamp(46px, 12.5vw, 92px);
  letter-spacing: 0.08em;
}
.seal {
  display: grid;
  place-items: center;
  width: clamp(38px, 9vw, 58px);
  height: clamp(38px, 9vw, 58px);
  border-radius: 6px;
  background: var(--seal);
  color: #f3ecdd;
  font-family: 'East Sea Dokdo', serif;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1;
  transform: rotate(-3deg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}
/* 라틴 언어: 세로쓰기 대신 무대 아래 큰 가로 제목 */
.latin .hero {
  grid-template-columns: 1fr;
  grid-template-areas:
    'stage'
    'title'
    'pitch';
}
.latin .title-col {
  flex-direction: row;
  justify-content: center;
  gap: 14px;
  margin-top: -6px;
}
.latin .vtitle {
  font-size: clamp(52px, 15vw, 96px);
  letter-spacing: 0.01em;
}
.latin .seal {
  width: clamp(34px, 7vw, 48px);
  height: clamp(34px, 7vw, 48px);
  font-size: clamp(26px, 5.5vw, 38px);
}
.pitch {
  grid-area: pitch;
  max-width: var(--measure);
  margin: 6px auto 0;
  text-align: center;
}
.lead {
  margin: 0;
  font-size: clamp(20px, 5.2vw, 26px);
  line-height: 1.55;
  font-weight: 700;
  color: var(--ink);
}
.sub {
  margin: 8px 0 0;
  color: var(--wash);
  font-size: 15px;
}
.stores {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: 330px;
  margin: 26px auto 0;
}
.store {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.store.primary {
  background: var(--ink);
  color: var(--hanji);
  min-height: 58px;
  font-size: 17px;
}
.store.soon {
  cursor: default;
  border-color: rgba(27, 25, 22, 0.28);
  color: var(--wash);
  background: transparent;
}
.store.primary.soon {
  background: rgba(27, 25, 22, 0.09);
  border-color: transparent;
  color: var(--ink-soft);
}
.store-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
}
.store-mark.android {
  --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3.6 1.8 13.8 12 3.6 22.2c-.4-.2-.6-.6-.6-1.1V2.9c0-.5.2-.9.6-1.1Zm11.6 11.6 2.6 2.6-11.1 6.3 8.5-8.9Zm0-2.8L6.7 1.7l11.1 6.3-2.6 2.6Zm4-1.6 3 1.7c.8.5.8 1.6 0 2.1l-3 1.7-2.9-2.8 2.9-2.7Z'/></svg>");
}
.store-mark.ios {
  --m: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M16.4 12.6c0-2.6 2.1-3.8 2.2-3.9-1.2-1.8-3.1-2-3.7-2-1.6-.2-3.1.9-3.9.9-.8 0-2-.9-3.4-.9-1.7 0-3.3 1-4.2 2.6-1.8 3.1-.5 7.7 1.3 10.2.9 1.2 1.9 2.6 3.2 2.6 1.3-.1 1.8-.8 3.3-.8 1.6 0 2 .8 3.4.8 1.4 0 2.3-1.3 3.1-2.5 1-1.4 1.4-2.8 1.4-2.9-.1 0-2.7-1-2.7-4.1ZM13.9 4.9c.7-.9 1.2-2.1 1.1-3.3-1 0-2.3.7-3 1.6-.7.8-1.2 2-1.1 3.2 1.1.1 2.3-.6 3-1.5Z'/></svg>");
}
.note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--wash);
}

/* ── 플레이 영상 + 공격마다 손이 다르다 ───────────────── */
.reel {
  max-width: 1000px;
  margin: 76px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 64px;
}
.reel.solo {
  margin-top: 64px;
}
.film {
  margin: 0;
  width: min(100%, 320px);
  text-align: center;
}
.film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 26px;
  border: 1.5px solid rgba(27, 25, 22, 0.75);
  background: var(--hanji-deep);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 34px 60px -28px rgba(27, 25, 22, 0.55);
  cursor: pointer;
}
/* 그림 귀퉁이에 찍은 낙관 — 오른쪽 아래(위는 게임 체력 칸, 아래 가운데는 자막) */
.frame {
  position: relative;
}
.frame::after {
  content: '검';
  position: absolute;
  z-index: 1;
  bottom: -12px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 5px;
  background: var(--seal);
  color: #f3ecdd;
  font-family: 'East Sea Dokdo', serif;
  font-size: 36px;
  line-height: 1;
  transform: rotate(6deg);
  box-shadow: 0 6px 14px -6px rgba(27, 25, 22, 0.5);
}
.film figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--wash);
}
.verbs {
  width: 100%;
  max-width: 680px;
}
@media (min-width: 900px) {
  .reel {
    grid-template-columns: 340px minmax(0, 1fr);
    align-items: center;
    justify-items: stretch;
    gap: 76px;
  }
  .film {
    width: 100%;
  }
  .reel .verbs h2 {
    text-align: left;
  }
  .reel.solo {
    grid-template-columns: 340px;
    justify-content: center;
  }
}
.verbs h2,
.closing h2 {
  margin: 0 0 22px;
  font-size: clamp(40px, 10.5vw, 72px);
  line-height: 1.05;
  text-align: center;
}
.latin .verbs h2,
.latin .closing h2 {
  font-size: clamp(32px, 8vw, 56px);
}
.lang-ja .verbs h2,
.lang-zh-Hant .verbs h2,
.lang-ja .closing h2,
.lang-zh-Hant .closing h2 {
  font-size: clamp(30px, 7.5vw, 52px);
}
dl#verbs {
  margin: 0 auto;
  max-width: 680px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 22px;
  row-gap: 0;
}
dl#verbs dt,
dl#verbs dd {
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid rgba(27, 25, 22, 0.14);
}
dl#verbs dt {
  font-family: var(--brush);
  font-size: 30px;
  line-height: 1.15;
  white-space: nowrap;
}
.latin dl#verbs dt {
  font-size: 22px;
}
.lang-ja dl#verbs dt,
.lang-zh-Hant dl#verbs dt {
  font-size: 24px;
}
dl#verbs dd {
  align-self: center;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
}
@media (max-width: 420px) {
  dl#verbs {
    grid-template-columns: 1fr;
  }
  dl#verbs dt {
    border-bottom: 0;
    padding-bottom: 0;
  }
  dl#verbs dd {
    padding-top: 2px;
  }
}

/* ── 두루마리: 큰 화면 사진 + 붓 제목 ───────────────── */
.scroll {
  max-width: 860px;
  margin: 96px auto 0;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}
.panel {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}
.panel.flip {
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
}
.panel.flip figure {
  order: 2;
}
.panel figure {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 300px;
}
.panel img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1.5px solid rgba(27, 25, 22, 0.7);
  background: var(--hanji-deep);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 26px 50px -24px rgba(27, 25, 22, 0.45);
}
.panel-text {
  max-width: 26rem;
}
.panel-text h3 {
  margin: 0 0 10px;
  font-size: clamp(38px, 9vw, 60px);
  line-height: 1.05;
}
.latin .panel-text h3 {
  font-size: clamp(30px, 7vw, 46px);
}
.lang-ja .panel-text h3,
.lang-zh-Hant .panel-text h3 {
  font-size: clamp(28px, 6.5vw, 42px);
}
.panel-text p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
}
@media (max-width: 720px) {
  .panel,
  .panel.flip {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .panel.flip figure {
    order: 0;
  }
  .panel figure {
    max-width: 280px;
  }
  .panel-text {
    max-width: none;
    text-align: center;
  }
}

/* ── 맺음 ─────────────────────────────────────────── */
.closing {
  max-width: var(--measure);
  margin: 110px auto 0;
  padding: 0 20px;
  text-align: center;
}
.closing p {
  margin: 0;
  color: var(--ink-soft);
}
footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 90px;
  padding: 26px 16px calc(30px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--wash);
  border-top: 1px solid rgba(27, 25, 22, 0.12);
}

/* ── 넓은 화면: 무대 왼쪽 · 제목과 말 오른쪽 ────────── */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 600px) auto minmax(0, 380px);
    grid-template-areas: 'stage title pitch';
    align-items: center;
    gap: 0 28px;
    min-height: 92vh;
    padding-top: 72px;
  }
  .pitch {
    text-align: left;
    margin: 0;
  }
  .hero .stores {
    margin-left: 0;
  }
  .latin .hero {
    grid-template-columns: minmax(0, 600px) minmax(0, 440px);
    grid-template-areas:
      'stage title'
      'stage pitch';
    align-content: center;
  }
  .latin .title-col {
    justify-content: flex-start;
    align-self: end;
    margin: 0 0 6px;
  }
  .latin .pitch {
    align-self: start;
  }
}

/* ── 공유 착지 ──────────────────────────────────────── */
.share {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(64px + env(safe-area-inset-top)) 16px 0;
  text-align: center;
}
.share .invite {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--seal);
  font-weight: 700;
}
.card {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 14px;
  border: 1.5px solid rgba(27, 25, 22, 0.7);
  box-shadow: 0 26px 50px -24px rgba(27, 25, 22, 0.45);
  background: var(--hanji-deep);
}
.share .share-title {
  margin: 28px 0 0;
  font-size: clamp(48px, 13vw, 72px);
  line-height: 1;
}
.more {
  display: inline-block;
  margin-top: 20px;
  font-size: 15px;
  color: var(--ink-soft);
  text-underline-offset: 4px;
}
.doc {
  max-width: 680px;
  margin: 0 auto;
  padding: calc(72px + env(safe-area-inset-top)) 20px 0;
}
.doc h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
/* 개인정보처리방침 */
.policy {
  max-width: 680px;
  margin: 0 auto;
  padding: calc(76px + env(safe-area-inset-top)) 20px 0;
}
.policy h1 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.3;
}
.policy .date {
  margin: 0 0 30px;
  color: var(--wash);
  font-size: 14px;
}
.policy h2 {
  margin: 34px 0 8px;
  font-size: 19px;
  line-height: 1.4;
}
.policy p,
.policy li {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}
.policy ul {
  padding-left: 1.2em;
  margin: 8px 0 0;
}
.policy [hidden] {
  display: none;
}
