/* nannaninna.app — upstairs 공식 사이트.
   색·모양은 앱 디자인 토큰(src/components/tokens.ts)을 그대로 따른다:
   라벤더 #8B7BE6 · 민트 #56C9AE · 잉크 #2E2A3B · 카드 반경 20 · 버튼 반경 16.
   배경만 앱의 연보라(#F8F6FC) 대신 웹용 크림(#FBF7F0)을 쓴다(HYO 지정). */

:root {
  --cream: #fbf7f0;
  --cream-2: #f3ece1;
  --card: #ffffff;
  --ink: #2e2a3b;
  --muted: #6f6a80;
  --lav: #8b7be6;
  --lav-ink: #6a57cf;
  --lav-soft: #efebf7;
  --mint: #56c9ae;
  --mint-ink: #1f9b7a;
  --mint-soft: #e3f6f0;
  --border: #e9e0d3;
  --radius-card: 20px;
  --radius-btn: 16px;
  --shadow: 0 2px 10px rgba(46, 42, 59, 0.06);
  --shadow-lg: 0 10px 30px rgba(46, 42, 59, 0.1);
  --sans: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic",
    "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  --display: "Baloo 2", var(--sans);
  color-scheme: light;
}

/* 언어 전환 — html[lang]과 다른 data-lang 블록을 전부 숨긴다. 자연스러운 display를
   유지해야 해서 "맞는 것을 보이기"가 아니라 "틀린 것을 숨기기"로 쓴다. */
html[lang="en"] [data-lang]:not([data-lang="en"]),
html[lang="ko"] [data-lang]:not([data-lang="ko"]),
html[lang="de"] [data-lang]:not([data-lang="de"]),
html[lang="ja"] [data-lang]:not([data-lang="ja"]) {
  display: none !important;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* 한국어는 기본 줄바꿈이 글자 단위라 단어가 중간에서 끊긴다(예: "추적 도/구").
   어절 단위로 끊기게 keep-all을 주고, 아주 긴 토큰만 예외로 넘치지 않게 막는다.
   일본어에는 적용하지 않는다 — 띄어쓰기가 없어서 keep-all을 주면 줄 끝이 들쭉날쭉해진다
   (실제 캡처로 확인). 일본어는 브라우저 기본 금칙 처리가 맞다. */
html[lang="ko"] body {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 일본어는 폰트 순서를 따로 둔다 — 기본 스택은 한국어 폰트(Malgun Gothic 등)가 앞에 있어서
   일본어 글자를 한글용 폰트가 집어가 자간이 벌어져 보인다(실제 캡처로 확인). */
html[lang="ja"] body,
html[lang="ja"] h1 {
  font-family: "Nunito", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI",
    "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--lav-ink); }
a:hover { color: var(--lav); }

.wrap { width: 100%; max-width: 940px; margin: 0 auto; padding: 0 20px; }

/* ── header ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 247, 240, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 8px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.2px;
}
.brand img { width: 26px; height: auto; }
.brand .marks { display: inline-flex; align-items: center; gap: 2px; }

.langs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.lang-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 9px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-btn[aria-current="true"] {
  background: var(--lav);
  border-color: var(--lav);
  color: #fff;
}

.site-nav {
  display: flex;
  gap: 6px;
  padding-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
}
/* 좁은 폰(360~420)에서 메뉴 4개가 한 줄에 다 들어가게 — 안 그러면 마지막 "Contact"가
   잘려 보인다(가로 스크롤은 되지만 현재 페이지 칩이 잘리면 어색함). */
@media (max-width: 440px) {
  .site-nav { gap: 2px; flex-wrap: wrap; overflow-x: visible; }
  .site-nav a { font-size: 13px; padding: 7px 9px; }
}
.site-nav a:hover { background: var(--lav-soft); color: var(--lav-ink); }
.site-nav a[aria-current="page"] { background: var(--lav-soft); color: var(--lav-ink); }

/* ── type ─────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.3; margin: 0 0 12px; }
h1 { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: -0.2px; }
h2 { font-size: 24px; font-weight: 700; margin-top: 8px; }
h3 { font-size: 18px; font-weight: 700; color: var(--ink); }
p { margin: 0 0 14px; }
.lede { font-size: 19px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 7px; }

/* ── blocks ───────────────────────────────────────────── */
main { padding: 28px 0 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}
.card.flat { box-shadow: none; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.hero {
  display: grid;
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
}
.hero-art { text-align: center; }
.hero-art img { margin: 0 auto; max-width: 280px; }
.pill {
  display: inline-block;
  background: var(--mint-soft);
  color: var(--mint-ink);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.shots {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shot {
  flex: 0 0 auto;
  width: 190px;
  scroll-snap-align: center;
  text-align: center;
}
.shot img {
  width: 190px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: #fff;
}
.shot span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* 앱 아이콘 타일 — About 카드의 "우리가 만드는 앱" 줄. 실제 스토어 아이콘 그대로. */
.app-tiles { display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.app-tile { display: flex; align-items: center; gap: 10px; }
.app-tile img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}
.app-tile b { display: block; font-size: 16px; }
.app-tile span { display: block; font-size: 13px; color: var(--muted); }

/* 카드 안 작은 삽화(앱 마스코트). 글 흐름을 끊지 않게 가운데 작게만. */
.inline-art { margin: 6px auto 14px; display: block; width: 136px; }

.app-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.app-head img.wordmark { height: 34px; width: auto; }
.tag { font-size: 14px; color: var(--muted); font-weight: 600; }

.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--mint);
}
.feature-list.lav li::before { background: var(--lav); }

.note {
  background: var(--lav-soft);
  border-radius: var(--radius-btn);
  padding: 14px 16px;
  margin: 0 0 16px;
  font-size: 15px;
}
.note.mint { background: var(--mint-soft); }

.btn {
  display: inline-block;
  background: var(--lav);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: var(--radius-btn);
  min-height: 48px;
  line-height: 24px;
}
.btn:hover { background: var(--lav-ink); color: #fff; }
.btn.ghost { background: var(--card); color: var(--lav-ink); border: 1px solid var(--border); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 14px; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 27px;
  height: 27px;
  border-radius: 999px;
  background: var(--lav);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-scroll { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 460px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { background: var(--cream-2); font-weight: 700; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }

.toc { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.toc a { text-decoration: none; font-weight: 600; font-size: 15px; }
.toc a:hover { text-decoration: underline; }

section[id] { scroll-margin-top: 110px; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 26px;
  padding: 22px 0 36px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }

/* ── 넓은 화면 ─────────────────────────────────────────── */
@media (min-width: 760px) {
  body { font-size: 18px; }
  h1 { font-size: 44px; }
  h2 { font-size: 27px; }
  main { padding: 40px 0 10px; }
  .card { padding: 28px; }
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 28px; }
  .hero-art img { max-width: 320px; }
  .shots { justify-content: center; }
  .shot, .shot img { width: 228px; }
  .site-nav { padding-bottom: 0; }
  .header-row { min-height: 70px; }
  .nav-inline { display: flex; align-items: center; gap: 18px; }
}
