/* The blog's own pages. They borrow the app's look: its teal, its cream store frame and its chunky card edge. */
:root {
  color-scheme: light;
  --ink: #2c2721;
  --muted: #655e55;
  --paper: #ffffff;
  --frame: #fff1dc;
  --line: #dde4dd;
  --teal: #167d70;
  --teal-edge: #0b5b51;
  --sun: #fcaf04;
  --gutter: 1.25rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --size: 1.0625rem;
  --leading: 1.7;
  --heading-leading: 1.25;
}

:root:lang(ko) {
  --font: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --leading: 1.8;
  --heading-leading: 1.35;
}

:root:lang(ja) {
  --font: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --size: 1rem;
  --leading: 1.9;
  --heading-leading: 1.4;
}

:root:lang(hi) {
  --font: "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", system-ui, sans-serif;
  --size: 1.125rem;
  --leading: 1.85;
  --heading-leading: 1.4;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--size);
  line-height: var(--leading);
  overflow-wrap: break-word;
}

:root:lang(ko) body {
  word-break: keep-all;
}

:root:lang(ja) body {
  line-break: strict;
}

:root:lang(ja) h1,
:root:lang(ja) h2 {
  word-break: auto-phrase;
}

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

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

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
  border-radius: 0.375rem;
}

h1,
h2 {
  line-height: var(--heading-leading);
  font-weight: 800;
  text-wrap: balance;
}

.dotted {
  white-space: nowrap;
}

h1 {
  margin: 0.5rem 0 0.75rem;
  font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.625rem);
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.125em;
}

/* Top bar: the same header as the site's other pages, without its stickiness so it stays out of the way while reading */
.bar {
  border-bottom: 1px solid rgba(233, 228, 220, 0.8);
  background: var(--paper);
}

.bar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  line-height: 1.3;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand span {
  font-size: 22px;
}

.brand .brand-blog {
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.site-nav a {
  color: inherit;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--ink);
}

.bar-links {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--sun);
  box-shadow: 0 12px 28px rgba(252, 175, 4, 0.24);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.languages summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

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

.languages summary:hover {
  background: var(--frame);
}

.languages summary span {
  display: none;
}

.languages ul {
  position: absolute;
  z-index: 2;
  top: calc(100% - 0.25rem);
  right: 0;
  width: 12rem;
  margin: 0;
  padding: 0.375rem;
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 1rem;
  background: var(--paper);
  list-style: none;
}

.languages a {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  color: inherit;
  font-size: 15px;
  text-decoration: none;
}

.languages a:hover {
  background: var(--frame);
}

.languages a[aria-current] {
  color: var(--teal);
  font-weight: 800;
}

/* The app's buttons sit on a darker edge and press down into it. */
.get {
  display: inline-block;
  margin-bottom: 3px;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  background: var(--teal);
  box-shadow: 0 3px 0 var(--teal-edge);
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.get:hover {
  background: var(--teal-edge);
}

.get:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--teal-edge);
}

/* A post: the text, with its screen kept in view beside it */
.post {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.post-head {
  padding-top: 1.5rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.post-screen {
  margin: 1.5rem calc(var(--gutter) * -1) 0;
  padding: 1.5rem var(--gutter);
  background: var(--frame);
}

.post-screen img {
  width: auto;
  max-height: min(72vh, 36rem);
  margin: 0 auto;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
}

.post-body {
  padding: 1.75rem 0 3rem;
}

.post-body > p {
  margin: 0 0 1.1em;
}

.post-body > h2 {
  margin: 2.25em 0 0.6em;
  font-size: 1.4em;
  scroll-margin-top: 1rem;
}

.post-body > ul,
.post-body > ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.post-body > ul > li,
.post-body > ol > li {
  margin: 0.4em 0;
  padding-left: 0.2em;
}

.post-body > ul > li::marker {
  color: var(--sun);
}

.post-body > ol > li::marker {
  color: var(--teal);
  font-weight: 800;
}

.contents {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 1rem;
  font-size: 0.9375em;
}

.contents ul {
  margin: 0.375rem 0 0;
  padding: 0;
  list-style: none;
}

.contents li {
  margin: 0.25rem 0;
}

.contents a {
  text-decoration: none;
}

.contents a:hover {
  text-decoration: underline;
}

.shot {
  margin: 2rem 0;
}

.shot img {
  width: min(100%, 17rem);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
}

.shot figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375em;
  line-height: 1.6;
}

.try {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.875rem 1rem;
  align-items: center;
  margin-top: 2.75rem;
  padding: 1.25rem;
  border: 2px solid var(--line);
  border-bottom-width: 5px;
  border-radius: 1.25rem;
}

.try img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.875rem;
}

.try strong {
  display: block;
  line-height: 1.4;
}

.try p {
  margin: 0.125rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.try .get {
  grid-column: 1 / -1;
  justify-self: start;
}

/* The other screens */
.more {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
}

.more h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.strip {
  display: grid;
  grid-auto-columns: 7.5rem;
  grid-auto-flow: column;
  gap: 0.875rem;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 0.5rem;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--gutter);
}

.strip a {
  display: block;
  color: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  scroll-snap-align: start;
}

.strip img,
.shelf img {
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 0.875rem;
  background: var(--frame);
}

.strip img {
  margin-bottom: 0.5rem;
}

.strip a:hover img,
.shelf a:hover img {
  border-color: var(--teal);
}

.strip a:hover span,
.shelf a:hover strong {
  text-decoration: underline;
}

/* The index: a shelf of the app's screens */
.index {
  max-width: 70rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 4rem;
}

.index .lead {
  max-width: 38rem;
}

.shelf {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.shelf a {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  color: inherit;
  text-decoration: none;
}

.shelf-copy strong {
  display: block;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.shelf-copy span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.empty {
  margin-top: 2rem;
  color: var(--muted);
}

.foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  max-width: 70rem;
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
}

.foot a {
  color: inherit;
}

@media (max-width: 980px) {
  .bar-inner {
    width: min(100% - 28px, 720px);
  }

  .site-nav {
    gap: 20px;
  }
}

@media (max-width: 760px) {
  .bar-inner {
    flex-wrap: wrap;
    min-height: 56px;
  }

  .brand,
  .bar-links {
    min-height: 56px;
  }

  .site-nav {
    order: 3;
    display: grid;
    grid-template-columns: repeat(5, auto);
    gap: 0;
    width: 100%;
    font-size: 14px;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
  }

  .site-nav a.active {
    border-bottom-color: var(--sun);
  }

  .languages ul {
    top: 52px;
  }
}

@media (max-width: 640px) {
  .brand img {
    width: 32px;
    height: 32px;
  }

  .brand span {
    font-size: 20px;
  }

  .brand .brand-blog {
    font-size: 16px;
  }

  .bar-links {
    gap: 8px;
  }

  .install {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .languages summary {
    min-width: 40px;
    min-height: 40px;
    padding: 0;
  }
}

@media (max-width: 400px) {
  .brand .brand-blog {
    display: none;
  }
}

@media (max-width: 340px) {
  .install svg {
    display: none;
  }
}

@media (min-width: 34rem) {
  .languages {
    position: relative;
  }

  .languages ul {
    top: calc(100% + 0.25rem);
  }

  .languages summary span {
    display: inline;
  }

  .shot {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: end;
  }

  .shot img {
    width: 100%;
    margin: 0;
  }

  .shot figcaption {
    margin: 0;
  }
}

@media (min-width: 48rem) {
  .shelf {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5rem 1.75rem;
  }

  .shelf a {
    display: block;
  }

  .shelf img {
    width: 100%;
    margin-bottom: 0.875rem;
  }
}

/* Wide enough for both: the screen stays in view on a cream rail while the text scrolls past it. */
@media (min-width: 60rem) {
  .post {
    display: grid;
    grid-template-columns: minmax(0, 38rem) 22rem;
    grid-template-areas:
      "head screen"
      "body screen";
    grid-template-rows: auto 1fr;
    column-gap: clamp(3rem, 7vw, 6rem);
    justify-content: center;
  }

  .post-head {
    grid-area: head;
    padding-top: 2.5rem;
  }

  .post-body {
    grid-area: body;
  }

  .post-screen {
    grid-area: screen;
    margin: 2.5rem 0 3rem;
    border-radius: 1.75rem;
  }

  .post-screen img {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
  }

  .strip {
    grid-auto-columns: minmax(0, 1fr);
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .try {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .try .get {
    grid-column: auto;
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
