/* Otterday Studio: "Letters from the maker".
   Each section reads as a short letter on cool paper; products ride along as white enclosures.
   Batang Bold is only for H1, the H2 salutations and the signature. Everything else is Dodum.
   Breakpoints: mobile <= 760px (app.js uses the same line for the bottom menu),
   tablet 761-1023px, desktop >= 1024px on a 12-column, 1120px grid. */

@font-face {
  font-family: "Gowun Dodum";
  src: url('/assets/fonts/GowunDodum-Regular.subset.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Gowun Batang";
  src: url('/assets/fonts/GowunBatang-Bold.subset.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #142243;      /* text and headings */
  --paper: #F3F5F8;    /* page background */
  --envelope: #FFFFFF; /* enclosures and the ad box */
  --rose: #B23A5A;     /* the one filled CTA, the airmail stripe, the focus ring */
  --pencil: #5B6475;   /* secondary text and enclosure borders */
  --amber: #D9962B;    /* in-progress dot only, never text */
  --rule: #D3D8E1;     /* hairline dividers inside long documents */
  --serif: "Gowun Batang", "AppleMyungjo", "Nanum Myeongjo", serif;
  --sans: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --measure: 36rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  --mobile-nav-space: calc(96px + env(safe-area-inset-bottom));
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  padding-bottom: var(--mobile-nav-space);
  font-synthesis: none;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p {
  margin: 0;
}

h1, h2, h3 {
  font-weight: 400;
  line-height: 1.3;
  text-wrap: balance;
}

h1, h2, .signature {
  font-family: var(--serif);
  font-weight: 700;
}

h1 { font-size: 30px; }
h2 { font-size: 27px; }
h3 { font-size: 21px; }

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button, a {
  touch-action: manipulation;
}

button:disabled {
  cursor: wait;
}

[hidden] {
  display: none!important;
}

:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 30;
  background: var(--envelope);
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: 10px 14px;
}

.skip-link:focus {
  top: 8px;
}

.nowrap { white-space: nowrap; }

.line-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}

.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

/* Buttons: one filled rose button per page section, everything else outlined in ink. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--envelope);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
  text-decoration: none;
}

.button.primary {
  background: var(--rose);
  border-color: var(--rose);
  color: #FFFFFF;
}

.button.primary:hover {
  background: #9C3150;
  border-color: #9C3150;
}

/* Product links inside enclosures are outlined (no .primary) so the academy button is the only filled one. */
.button.secondary:hover, .app-cta:hover, .try-button:hover {
  background: var(--paper);
}


/* ---------- Top bar ---------- */

.topbar {
  max-width: 1168px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.brand strong {
  display: block;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.25;
}

.brand small {
  display: block;
  color: var(--pencil);
  font-size: 14px;
  line-height: 1.4;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-nav {
  display: flex;
  gap: 4px;
}

.header-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  color: var(--pencil);
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--ink);
}

.header-nav .active {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.lang-switch {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.lang-switch button {
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: var(--pencil);
  font-size: 14px;
  line-height: 1.2;
}

.lang-switch button + button {
  border-left: 1px solid var(--rule);
}

.lang-switch button[aria-pressed=true] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 4px;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ---------- Page grid ---------- */

.page {
  max-width: 1168px;
  margin: 0 auto;
  padding: 8px 16px 40px;
}

.apps-section, .library, .how-section, .graduates, .academy-teaser {
  margin-top: 56px;
  scroll-margin-top: 16px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.section-description {
  margin-top: 12px;
  max-width: var(--measure);
  color: var(--pencil);
}

.subtle {
  color: var(--pencil);
  font-size: 14px;
}

.load-status {
  margin-top: 16px;
  color: var(--pencil);
  font-size: 14px;
}

/* ---------- 2. Opening letter (the one bold element) ---------- */

.welcome-copy {
  position: relative;
  max-width: var(--measure);
}

.airmail {
  padding: 4px 0 4px 24px;
}

/* Airmail edge: the navy-and-rose stripe of a letter sent from far away. Home hero only. */
.airmail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: repeating-linear-gradient(-45deg,
    var(--rose) 0 8px, var(--envelope) 8px 12px,
    var(--ink) 12px 20px, var(--envelope) 20px 24px);
}

.letter-greeting {
  font-size: 21px;
  line-height: 1.5;
}

.welcome h1 {
  margin: 10px 0 16px;
  max-width: 15em;
}

.welcome-description {
  max-width: var(--measure);
}

.letter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-top: 16px;
}

.letter-links .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.welcome .button {
  margin-top: 24px;
}

.welcome-art {
  margin-top: 32px;
}

/* Enclosure: a white card tucked into the letter. Images inside keep their own 8px radius. */
.postcard, .app-card, .experiment-card {
  background: var(--envelope);
  border: 1px solid var(--pencil);
  border-radius: 4px;
  padding: 10px;
}

.postcard > img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 72% 40%;
  border-radius: 8px;
}

/* ---------- 3. To academy owners ---------- */

.academy-teaser-copy {
  max-width: var(--measure);
}

.academy-teaser-copy > p {
  margin-top: 12px;
}

.academy-teaser-copy > h2 + p {
  margin-top: 16px;
}

.academy-teaser .button {
  margin-top: 24px;
}

.academy-teaser-copy > .studio-kakao-link {
  margin-left: 12px;
}

.academy-note {
  color: var(--pencil);
  font-size: 14px;
}

.academy-teaser-copy > .academy-note {
  margin-top: 16px;
}

.academy-teaser-copy > .academy-note + .academy-note {
  margin-top: 4px;
}

/* Three real sample screens: a swipe row on phones, three phones side by side on desktop. */
.academy-screens {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 32px -16px 0;
  padding: 4px 16px 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  overscroll-behavior-x: contain;
}

.academy-screens:focus-visible {
  /* The strip clips overflow; draw the ring inside it. */
  outline-offset: -3px;
}

.academy-screens li {
  flex: 0 0 260px;
  scroll-snap-align: start;
}

.academy-screens figure {
  margin: 0;
}

.academy-screens img, .academy-shots img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--envelope);
  /* The only shadow on the site: phones sitting on the paper. */
  box-shadow: 0 1px 2px rgba(20,34,67,.08), 0 10px 24px rgba(20,34,67,.12);
}

.academy-screens figcaption {
  margin-top: 10px;
  color: var(--pencil);
  font-size: 14px;
}

/* ---------- 4. Apps ---------- */

.apps-section > h2, .apps-section > .section-description,
.graduates > .section-heading, .graduates > .section-description {
  max-width: var(--measure);
}

.apps-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 24px;
  margin-top: 32px;
}

.app-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 16px;
}

.app-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
}

.app-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  padding: 14px 6px 6px;
}

.app-copy h3 { order: 1; }

.app-copy .pitch {
  order: 2;
  margin-top: 6px;
}

.app-status {
  order: 3;
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
}

/* Under review and in preparation: a small amber dot beside the word. Released items show the word alone. */
.app-card:has(.coming-soon) .app-status::before, .empty-state-note::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

/* The status line already says 심사 중 / 준비 중; the repeated label is not shown. */
.coming-soon {
  display: none;
}

.mini-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.app-cta {
  order: 4;
  margin-top: 14px;
}

.pitch {
  max-width: var(--measure);
}

.app-card p, .experiment-card p {
  text-wrap: pretty;
}

/* ---------- 5. Lab ---------- */

#upcoming-links {
  margin-top: 8px;
}

#upcoming-links .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 24px;
  margin-top: 24px;
}

.experiment-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 16px;
}

/* 50 thumbs-up reached: the enclosure is edged in rose. */
.experiment-card.is-ready {
  border-color: var(--rose);
}

.card-art {
  position: relative;
}

.card-art > img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 45%;
  border-radius: 8px;
}

.thumb-button {
  position: absolute;
  right: 10px;
  top: 10px;
  min-width: 112px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--pencil);
  border-radius: 10px;
  background: var(--envelope);
  color: var(--ink);
  font-size: 14px;
  transition: transform .12s ease;
}

.thumb-button:active {
  transform: scale(.96);
}

.thumb-button[aria-pressed=true] {
  border: 2px solid var(--rose);
  padding: 5px 13px 5px 7px;
  color: var(--rose);
}

.thumb-button[aria-busy=true] {
  opacity: .7;
}

.thumb-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.thumb-count {
  font-variant-numeric: tabular-nums;
}

.thumb-button.pop .thumb-icon {
  animation: thumb-pop .36s ease;
}

.card-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 6px 6px;
}

.card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
}

.availability {
  font-size: 14px;
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 1px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--pencil);
  font-size: 14px;
}

.art-note, .vote-help {
  color: var(--pencil);
  font-size: 14px;
}

.art-note {
  margin-top: 12px;
}

.try-button {
  align-self: flex-start;
  margin-top: 18px;
}

.vote-help {
  margin-top: 16px;
}

.vote-progress {
  margin-top: 10px;
}

.progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.stage {
  color: var(--rose);
}

.vote-total {
  color: var(--pencil);
  text-align: right;
}

.progress-track {
  position: relative;
  transform-origin: center;
}

.vote-progress progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 3px;
  background: #E1E5EC;
  color: var(--rose);
  overflow: hidden;
}

.vote-progress progress::-webkit-progress-bar {
  background: #E1E5EC;
  border-radius: 3px;
}

.vote-progress progress::-webkit-progress-value {
  background: var(--rose);
  border-radius: 3px;
  transition: width .4s ease-out;
}

.vote-progress progress::-moz-progress-bar {
  background: var(--rose);
  border-radius: 3px;
}

/* The single motion moment: pressing 따봉 makes the goal bar answer. */
.experiment-card:has(.thumb-button.pop) .progress-track {
  animation: track-press .34s ease-out;
}

/* A visible starting point does not change the actual zero vote value. */
.progress-track.is-empty::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 3px;
  background: var(--rose);
  pointer-events: none;
}

.upcoming-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 18px;
  border: 1px dashed var(--pencil);
  border-radius: 4px;
}

.empty-avatar {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.empty-copy {
  flex: 1 1 12rem;
  min-width: 0;
}

.empty-copy p {
  color: var(--pencil);
  font-size: 14px;
  margin-top: 4px;
}

.empty-state-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.empty-state {
  margin-top: 16px;
  color: var(--pencil);
}

.empty-state .button {
  margin: 8px 8px 0 0;
}

/* ---------- 6. How it works: a real 1-2-3 sequence ---------- */

.how-steps {
  list-style: none;
  counter-reset: how;
  margin: 24px 0 0;
  padding: 0;
  max-width: var(--measure);
}

.how-steps li {
  counter-increment: how;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  column-gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}

.how-steps li::before {
  content: counter(how);
  grid-row: 1 / span 2;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 27px;
  line-height: 1;
}

.how-steps h3, .how-steps p {
  grid-column: 2;
}

.how-steps p {
  margin-top: 4px;
  color: var(--pencil);
}

/* ---------- 8. Add to home screen (quiet row) ---------- */

.install-actions, .install-guide {
  margin-top: 48px;
}

.install-label-desktop { display: none; }

.install-note {
  margin-top: 6px;
  color: var(--pencil);
  font-size: 14px;
}

.install-guide {
  display: grid;
  grid-template-columns: minmax(0,1fr) 44px;
  align-items: start;
  gap: 8px;
  max-width: var(--measure);
  padding: 14px 10px 14px 16px;
  background: var(--envelope);
  border: 1px solid var(--pencil);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.7;
}

.install-guide-copy {
  min-width: 0;
}

#ios-safari-steps { display: contents; }

.install-guide-title {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
}

.install-steps {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: install-step;
}

.install-steps li {
  position: relative;
  padding-left: 28px;
  counter-increment: install-step;
}

.install-steps li + li { margin-top: 10px; }

.install-steps li::before {
  content: counter(install-step);
  position: absolute;
  left: 0;
  top: 2px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 12px;
}

.install-step-note {
  margin-top: 4px;
  color: var(--pencil);
}

.install-steps .line-icon {
  width: 17px;
  height: 17px;
  vertical-align: -3px;
}

.install-dismiss {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  margin-block: -6px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--pencil);
}

.install-dismiss:hover {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- 9. Ad slot ----------
   Home-only display ad. Reserve the label + creative space even while empty.
   Width is responsive; fixed creative height avoids moving the footer on fill. */
.otter-ad {
  display: block;
  margin: 48px auto;
  width: 100%;
  max-width: 728px;
  /* border-box: 1+10 + label 20+6 + creative 100 + 10+1 = 148px (90px creative: 138px). */
  min-height: 148px;
  padding: 10px;
  background: var(--envelope);
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-align: center;
}
.otter-ad__label {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 20px;
  color: var(--pencil);
}
.studio_home_bottom {
  display: block;
  width: 100%;
  height: 100px;
}
@media (min-width: 768px) {
  .otter-ad { min-height: 138px; }
  .studio_home_bottom { height: 90px; }
}

/* ---------- 10. Footer ---------- */

.site-footer {
  max-width: 1168px;
  margin: 0 auto;
  padding: 40px 16px 32px;
  border-top: 1px solid var(--rule);
  color: var(--pencil);
  font-size: 14px;
  line-height: 1.7;
}

.footer-letter {
  max-width: var(--measure);
}

.footer-canon {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
}

.signature {
  margin-top: 10px;
  color: var(--ink);
  font-size: 21px;
}

.footer-desk {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.footer-contact p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-height: 44px;
  color: var(--ink);
}

.footer-contact .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.copy-email {
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--envelope);
  color: var(--ink);
  font-size: 14px;
  transition: transform .12s ease;
}

.copy-email:hover {
  background: var(--paper);
}

.copy-email:active {
  transform: scale(.96);
}

.copy-email.pop {
  animation: press .2s ease;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
  margin-top: 24px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-rule {
  margin-top: 4px;
}

.site-footer > .lang-switch {
  margin-top: 12px;
}

/* ---------- 11. Bottom menu (phones) ---------- */

.tab-icon {
  width: 20px;
  height: 20px;
}

#bottom-nav {
  display: flex;
  width: min(calc(100% - 32px),440px);
  margin: 16px auto;
  padding: 4px;
  background: var(--envelope);
  border: 1px solid var(--pencil);
  border-radius: 10px;
}

#bottom-nav.is-managed {
  position: fixed;
  z-index: 10;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  transition: transform .22s ease, visibility 0s;
}

#bottom-nav.is-managed.is-hidden {
  transform: translate(-50%,calc(120% + 12px + env(safe-area-inset-bottom)));
  visibility: hidden;
  pointer-events: none;
  transition: transform .22s ease, visibility 0s .22s;
}

#bottom-nav a {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  border-radius: 8px;
  color: var(--pencil);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}

#bottom-nav .active {
  background: var(--paper);
  color: var(--ink);
}

#toast {
  position: fixed;
  z-index: 20;
  bottom: calc(var(--mobile-nav-space) + 12px);
  left: 50%;
  transform: translate(-50%,8px);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}

#toast.visible {
  opacity: 1;
  transform: translate(-50%,0);
}

/* ---------- Other pages: privacy, consult privacy, 404 ---------- */

.error-page, .privacy-page, .academy-page {
  padding-bottom: 0;
}

.privacy-main {
  max-width: 880px;
}

.privacy-paper {
  background: var(--envelope);
  border: 1px solid var(--pencil);
  border-radius: 4px;
  padding: 24px 18px;
}

.privacy-intro h1 {
  margin-bottom: 12px;
}

.privacy-lead {
  max-width: var(--measure);
  margin-bottom: 16px;
  font-size: 21px;
  line-height: 1.5;
}

.privacy-meta {
  color: var(--pencil);
  font-size: 14px;
}

.meta-divider {
  display: inline-block;
  width: 1px;
  height: 12px;
  margin-inline: 8px;
  background: var(--rule);
  vertical-align: middle;
}

.policy-section {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.policy-number {
  flex: 0 0 24px;
  padding-top: 4px;
  color: var(--pencil);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.policy-section > div {
  flex: 1;
  min-width: 0;
}

.policy-section h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.policy-section p, .policy-section li {
  max-width: var(--measure);
}

.policy-section ul {
  margin: 0;
  padding-left: 20px;
}

.policy-section li + li, .policy-section p + p {
  margin-top: 10px;
}

.privacy-back {
  margin-top: 32px;
}

.security-details {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.security-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}

.security-details summary::-webkit-details-marker { display: none; }
.security-details summary::marker { content: ""; }
.security-details summary .line-icon { transition: transform .2s; }
.security-details[open] summary .line-icon { transform: rotate(180deg); }

.security-details p {
  max-width: var(--measure);
  margin-top: 12px;
  color: var(--pencil);
}

.consult-lang-note {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--paper);
  border-radius: 4px;
  font-size: 14px;
}

.consult-preamble {
  max-width: var(--measure);
  margin-top: 20px;
  color: var(--pencil);
}

.policy-table-wrap {
  margin: 4px 0 12px;
  overflow-x: auto;
}

.policy-table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.policy-table th, .policy-table td {
  padding: 10px 8px;
  border-top: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.policy-table th {
  font-weight: 400;
  white-space: nowrap;
}

.policy-table td {
  min-width: 120px;
  color: var(--pencil);
}

/* ---------- Academy page ---------- */

.academy-main {
  max-width: 1040px;
}

.tag {
  color: var(--pencil);
  font-size: 14px;
}

.academy-hero {
  max-width: 44rem;
  padding-top: 8px;
}

.academy-hero h1 {
  margin: 8px 0 14px;
}

.academy-lead {
  max-width: var(--measure);
  margin-bottom: 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 20px;
}

.hero-actions .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.academy-section, .academy-contact {
  margin-top: 56px;
  scroll-margin-top: 16px;
}

.academy-shots {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 32px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.academy-shots figure {
  margin: 0;
}

.academy-shots img {
  max-width: 260px;
}

.academy-shots figcaption {
  margin-top: 14px;
}

.academy-shots h3, .academy-make h3 {
  margin-bottom: 4px;
  font-family: var(--sans);
  font-size: 17px;
}

.academy-shots p, .academy-make p {
  color: var(--pencil);
  font-size: 14px;
}

.academy-make {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.academy-make li {
  padding: 18px;
  background: var(--envelope);
  border: 1px solid var(--pencil);
  border-radius: 4px;
}

.academy-section > .academy-note {
  max-width: var(--measure);
  margin-top: 14px;
}

.steps {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 0 24px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.step-card {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}

.step-number {
  display: block;
  margin-bottom: 8px;
  color: var(--pencil);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.step-card h3 {
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 21px;
}

.step-card p {
  color: var(--pencil);
}

.academy-scope h3 {
  margin: 28px 0 6px;
  font-size: 21px;
}

.academy-scope h4 {
  margin: 18px 0 4px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
}

.academy-scope p, .academy-faq p {
  max-width: var(--measure);
  color: var(--pencil);
  overflow-wrap: anywhere;
}

.academy-scope > div + p {
  margin-top: 20px;
}

.academy-price {
  color: var(--ink);
  font-size: 21px;
}

.academy-scope p.academy-price {
  color: var(--ink);
}

.academy-faq details {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.academy-faq summary {
  min-height: 44px;
  padding: 8px 0;
  cursor: pointer;
}

.academy-faq details p {
  margin-top: 8px;
}

.academy-contact {
  padding: 24px 18px;
  background: var(--envelope);
  border: 1px solid var(--pencil);
  border-radius: 4px;
}

.academy-contact h2 {
  margin-bottom: 10px;
}

.academy-contact > p:not(.academy-note) {
  max-width: var(--measure);
}

.academy-contact > .academy-note {
  max-width: var(--measure);
  margin-top: 12px;
}

.hero-actions > .studio-kakao-link {
  order: 1;
}

/* ---------- 404 ---------- */

.lost-card {
  padding-top: 16px;
}

/* ---------- Motion ---------- */

@keyframes thumb-pop {
  0%, 100% { transform: scale(1); }
  45% { transform: translateY(-3px) rotate(-9deg) scale(1.12); }
}

@keyframes track-press {
  0%, 100% { transform: scaleY(1); }
  40% { transform: scaleY(1.9); }
}

@keyframes press {
  50% { transform: scale(.96); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none!important;
    transition: none!important;
    scroll-behavior: auto!important;
  }
  .thumb-button:active, .copy-email:active {
    transform: none;
  }
}

/* ---------- Phones (<= 760px) ---------- */

@media (max-width: 760px) {
  .header-nav { display: none; }
  .topbar-tools .lang-switch { display: none; }
  .brand strong { font-size: 19px; }
  .upcoming-card { padding: 16px; }
  .academy-teaser-copy > .studio-kakao-link { display: flex; width: max-content; margin: 10px 0 0; }
}

@media (max-width: 380px) {
  .thumb-button { min-width: 96px; }
  .academy-screens li { flex-basis: 232px; }
}

/* ---------- Tablet and up (>= 761px) ---------- */

@media (min-width: 761px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  html { scroll-padding-top: 96px; }
  #bottom-nav { display: none; }
  #toast { bottom: 24px; }
  .site-footer > .lang-switch { display: none; }
  .install-label-mobile { display: none; }
  .install-label-desktop { display: inline; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    padding-inline: 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .page { padding: 32px 24px 56px; }
  .site-footer { padding: 48px 24px 40px; }
  h1 { font-size: 34px; }
  .welcome {
    display: grid;
    grid-template-columns: repeat(12, minmax(0,1fr));
    column-gap: 24px;
    align-items: center;
    padding: 24px 0 8px;
  }
  .welcome-copy { grid-column: 1 / 8; }
  .welcome-art { grid-column: 8 / 13; margin-top: 0; }
  .apps-section, .library, .how-section, .graduates, .academy-teaser { margin-top: 80px; }
  .academy-screens { margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; }
  .apps-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .single-experiment .experiment-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    column-gap: 16px;
  }
  .privacy-paper { padding: 40px 48px; }
  .academy-contact { padding: 36px 40px; }
  .academy-shots { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .academy-make { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .footer-desk { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
}

/* ---------- Desktop (>= 1024px): 12 columns, letters in 2-7, enclosures in 8-12 ---------- */

@media (min-width: 1024px) {
  h1 { font-size: 42px; }
  .page {
    display: grid;
    grid-template-columns: repeat(12, minmax(0,1fr));
    column-gap: 24px;
    align-items: start;
  }
  .page > * { grid-column: 1 / -1; }
  .welcome-copy { grid-column: 2 / 8; }
  .academy-teaser {
    display: grid;
    grid-template-columns: repeat(12, minmax(0,1fr));
    column-gap: 24px;
    align-items: start;
  }
  .academy-teaser-copy { grid-column: 2 / 7; }
  .academy-screens {
    grid-column: 7 / 13;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .apps-section > h2, .apps-section > .section-description,
  .graduates > .section-heading, .graduates > .section-description {
    margin-left: calc((100% - 264px) / 12 + 24px);
  }
  .apps-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .library { grid-column: 1 / 7; }
  /* .library spans six page columns; start its words at page column 2 like the other letters. */
  .library > .section-heading, .library > .section-description, .library > #upcoming-links {
    margin-left: calc((100% - 120px) / 6 + 24px);
  }
  .how-section { grid-column: 7 / 13; }
  .single-experiment .experiment-card { display: flex; }
  /* Footer shares the page's 12-column grid; the home letter starts at column 2. */
  body[data-page="home"] .site-footer {
    display: grid;
    grid-template-columns: repeat(12, minmax(0,1fr));
    column-gap: 24px;
  }
  body[data-page="home"] .site-footer > * { grid-column: 2 / -1; }
}
