/* Plain stylesheet for every page: system fonts, one column, light and dark. */

:root {
  color-scheme: light dark;
  --text: #1d1d1f;
  --muted: #5f6368;
  --bg: #ffffff;
  --line: #dadce0;
  --link: #0b57d0;
  --brand: #be0623;
  --code-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8eaed;
    --muted: #9aa0a6;
    --bg: #18191b;
    --line: #3c4043;
    --link: #8ab4f8;
    --code-bg: #26282b;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI",
    Roboto, "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--link); }

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.site-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.site-name img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

nav.lang {
  font-size: 0.9rem;
  white-space: nowrap;
}

nav.lang a { text-decoration: none; }

nav.lang a[aria-current="true"] {
  color: var(--text);
  font-weight: 600;
}

main.wrap { padding-top: 2rem; padding-bottom: 3rem; }

h1 { font-size: 1.75rem; line-height: 1.3; margin: 0 0 0.5rem; }
h2 { font-size: 1.2rem; line-height: 1.4; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 0.25rem; }

p, ul, ol, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.25rem 0; }

.meta { color: var(--muted); font-size: 0.95rem; }

.table-scroll { overflow-x: auto; margin: 0 0 1rem; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
}

th, td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

th { background: var(--code-bg); font-weight: 600; }

.app-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.app-head img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  flex: none;
}

.app-head h1 { margin: 0; }
.app-head p { margin: 0.25rem 0 0; color: var(--muted); }

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

/* The Google Play badge carries its own transparent margin. */
.badges img { height: 64px; width: auto; margin-left: -10px; }

footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.25rem 0 2rem;
}

footer.site a { color: var(--muted); }
footer.site p { margin: 0.25rem 0; }

/* lang.js sets data-lang on <html>; without it both languages show. */
html[data-lang="ko"] .en,
html[data-lang="en"] .ko {
  display: none;
}

@media (max-width: 30rem) {
  h1 { font-size: 1.5rem; }
  .app-head img { width: 72px; height: 72px; border-radius: 16px; }
}
