@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Vey Hangul";
  src: url("/fonts/vey-hangul.woff2") format("woff2");
  font-weight: 45 920;
  font-display: swap;
  unicode-range: U+1100-11FF, U+3130-318F, U+AC00-D7A3;
}

:root {
  color-scheme: light;
  --paper: #f7f7f7;
  --white: #ffffff;
  --surface: #eceeed;
  --ink: #212421;
  --muted: #525650;
  --action: #313b34;
  --night: #222724;
  --light-ink: #f7f8f7;
  --focus: #57796a;
  --ui-font: "Geist", system-ui, sans-serif;
  --gutter: clamp(20px, 4vw, 64px);
  --column-gap: clamp(24px, 5vw, 72px);
  --section: clamp(68px, 9vw, 136px);
  --body: 1.0625rem;
  --small: .875rem;
  --lead: clamp(1.1875rem, 1rem + .5vw, 1.5rem);
  --heading: clamp(2rem, 1.5rem + 2.8vw, 4rem);
  --display: clamp(2.25rem, 4.85vw, 4.875rem);
  font: 400 var(--body)/1.57 var(--ui-font);
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
:root[lang="ko"] {
  --ui-font: "Geist", "Vey Hangul", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ko) :is(h1, h2, h3) { letter-spacing: -.015em; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
h1, h2 { line-height: 1.03; }
h1 { font-size: var(--display); }
h2 { font-size: var(--heading); letter-spacing: -.027em; }
h3 { font-size: var(--lead); line-height: 1.2; }
p { max-width: 62ch; }
p + p { margin-top: 1em; }
a { color: inherit; text-underline-offset: .23em; }
button, select { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
section[id], li[id], article[id] { scroll-margin-top: 24px; }
.wrap { width: min(100%, 1320px); margin-inline: auto; padding-inline: var(--gutter); }
.lead { font-size: var(--lead); line-height: 1.4; max-width: 43ch; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 5;
  transform: translateY(-180%);
  padding: .65rem 1rem;
  color: var(--light-ink);
  background: var(--action);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding-block: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: .55rem;
  min-height: 44px;
  font-size: var(--lead);
  font-weight: 700;
  text-decoration: none;
}
.brand img { border-radius: 6px; }
.site-header nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 44px); }
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.site-header a:hover, .site-header a[aria-current] { text-decoration: underline; }
.language-picker {
  position: relative;
  justify-self: end;
}
.language-picker select {
  appearance: none;
  field-sizing: content;
  min-height: 44px;
  padding-inline: .625rem 1.625rem;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: .9375rem;
  font-weight: 500;
  cursor: pointer;
}
.language-picker select:hover { background: var(--surface); }
.language-picker::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: .7rem;
  width: 6px;
  height: 6px;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

body[data-page="home"] .wrap { width: min(100%, 1440px); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, min(62%, 800px));
  gap: clamp(24px, 3vw, 42px);
  align-items: center;
  padding-block: clamp(48px, 6vw, 92px) clamp(48px, 6vw, 86px);
}
.hero-heading {
  font-size: clamp(2.35rem, 4vw, 3.85rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  text-wrap: initial;
}
.hero-heading:lang(ja) { font-size: clamp(1.65rem, 2.65vw, 3.35rem); }
.hero-heading span { display: block; }
.hero-lead {
  max-width: 31ch;
  margin-top: 1.25rem;
}
.hero-lead:lang(en) { text-wrap: balance; }
.hero-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1rem;
  margin-top: 1.35rem;
}
.hero-actions-row :is(.button, .text-link) { margin: 0; }
.hero-actions-row .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.hero-status { margin-top: .65rem; color: var(--muted); font-size: var(--small); }
.hero-screen {
  width: 100%;
  background: var(--night);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .7rem 1.2rem;
  margin-top: 1.35rem;
  background: var(--action);
  color: var(--light-ink);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--night); }
.button:active { transform: translateY(1px); }
figcaption {
  color: var(--muted);
  font-size: var(--small);
  line-height: 1.4;
  margin-top: .6rem;
}
.hero-image-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  margin-top: .2rem;
}
.hero-screen,
.workspace-feature img,
.host-section img,
.guide-image-link img,
.image-preview-media:not([data-zoomed]) img {
  --edge-fade: 3px;
  border-radius: 8px;
  mask-image:
    linear-gradient(to right, transparent, #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), transparent);
  mask-composite: intersect;
}
.image-preview-action, .guide-image-link span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--small);
  text-decoration: underline;
}
.image-preview-action:hover, .guide-image-link:hover span { text-decoration-thickness: 2px; }
.image-preview {
  width: min(72rem, calc(100% - 2rem));
  max-width: none;
  --preview-inset: clamp(8px, 1vw, 14px);
  max-height: calc(100dvh - 2rem);
  padding: 0 var(--preview-inset) var(--preview-inset);
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 16px 48px rgb(15 19 17 / .24);
}
.image-preview[open] { display: flex; flex-direction: column; }
.image-preview::backdrop { background: rgb(15 19 17 / .68); }
html:has(.image-preview[open]) { overflow: hidden; scrollbar-gutter: stable; }
.image-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .3rem .55rem;
  padding-block: .45rem;
}
.image-preview-toolbar button {
  min-height: 44px;
  padding: .25rem .75rem;
  border: 1px solid var(--action);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: var(--small);
  font-weight: 600;
}
.image-preview-toolbar button:hover { background: var(--surface); }
.image-preview-toolbar .image-preview-close { background: var(--action); color: var(--light-ink); }
.image-preview-toolbar .image-preview-close:hover { background: var(--night); }
.image-preview-media {
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
}
.image-preview-media img {
  margin-inline: auto;
  max-height: calc(100dvh - 7rem);
  object-fit: contain;
}
.image-preview-media[data-zoomed] img { max-width: none; max-height: none; margin-inline: 0; }
.image-preview-media:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.text-link { display: inline-block; margin-top: 1rem; font-weight: 600; }
.text-link:hover { text-decoration-thickness: 2px; }

.home-section {
  padding-block: clamp(32px, 5vw, 68px);
}
.home-section h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  text-wrap: initial;
}
.workspace { background: var(--surface); }
.workspace-features, .host-section, .home-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--column-gap);
}
.workspace-features { margin-top: 1.5rem; row-gap: 1.35rem; }
.workspace-feature {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.workspace-feature h3 { margin-bottom: .5rem; }
.workspace-feature p, .host-section p, .home-notes p { max-width: 47ch; }
.workspace-feature figure { width: min(100%, 440px); }
.workspace-feature img, .host-section img {
  width: 100%;
}
.host-section {
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  align-items: start;
}
.host-section p, .home-notes h2 + p { margin-top: .85rem; }
.host-section figure { max-width: 610px; }
.release-offer {
  display: grid;
  grid-template-columns: fit-content(48%) minmax(0, 1fr);
  column-gap: 1rem;
  margin-block: 1.1rem;
}
.release-offer div {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  padding-block: .55rem;
}
.release-offer dt { font-weight: 600; }
.release-offer dd { color: var(--muted); }
.release-role { display: block; color: var(--muted); font-size: var(--small); font-weight: 400; }

.site-footer { background: var(--surface); }
.footer-layout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem 2rem;
  align-items: center;
  padding-block: 1.4rem;
}
.footer-wordmark { font-size: var(--lead); font-weight: 700; }
.footer-layout nav { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.footer-layout nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer-layout small { font-size: var(--small); color: var(--muted); }

.guide { padding-block: clamp(36px, 6vw, 86px) var(--section); }
.guide-intro { margin-bottom: clamp(40px, 7vw, 94px); }
.guide-intro .lead { margin-top: 1rem; }
.guide-layout { display: grid; grid-template-columns: minmax(150px, 215px) minmax(0, 800px); gap: clamp(24px, 5vw, 74px); }
.guide-toc-panel { position: sticky; top: 24px; align-self: start; z-index: 1; }
.guide-toc-panel summary { display: none; }
.guide-toc { display: grid; gap: .15rem; }
.guide-toc a { padding: .45rem .65rem; text-decoration: none; }
.guide-toc a:hover { text-decoration: underline; }
.guide-toc a[aria-current="location"] { background: var(--surface); font-weight: 600; }
.guide-content section + section { margin-top: clamp(44px, 7vw, 90px); }
.guide-content h2 { font-size: clamp(1.75rem, 1.3rem + 2.3vw, 3.25rem); margin-bottom: .85rem; }
.guide-content figure { margin-block: 1rem 0; }
.guide-content img { width: 100%; }
.guide-content .narrow-figure { max-width: 520px; }
.guide-prerequisites {
  margin-block: 1.15rem 1.7rem;
  padding: .9rem 1rem;
  background: var(--surface);
}
.guide-prerequisites h3, .guide-input-settings h3 { margin-bottom: .45rem; }
.guide-availability {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 .85rem;
  margin-top: .35rem;
  color: var(--muted);
  font-size: var(--small);
}
.guide-availability a { display: inline-flex; align-items: center; min-height: 44px; margin: 0; }
.guide-image-link { display: block; text-decoration: none; }
.guide-image-link + figcaption { margin-top: 0; }
.guide-image-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.guide-input-settings { margin-top: 2rem; }
.guide-steps { padding-inline-start: 1.35rem; }
.guide-steps li + li { margin-top: 2rem; }
.guide-steps li::marker { font-weight: 600; }
.guide-steps h3 { margin-bottom: .45rem; }
.guide-fixes dt { font-weight: 600; margin-top: 1rem; }
.guide-fixes dd { max-width: 62ch; margin-top: .25rem; }
.sponsor, .not-found { padding-block: var(--section); }
.sponsor .lead { margin-top: 1rem; }
.not-found { width: min(100%, 880px); margin-inline: auto; padding-inline: var(--gutter); }
.not-found h1 { margin-block: 1.25rem; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes enter-home {
    from { opacity: .82; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .hero-heading, .hero-lead, .hero-actions, .hero-visual, .enter-home { animation: enter-home .38s ease-out both; }
  .hero-visual { animation-delay: 70ms; }
}
@media (min-width: 1051px) {
  .hero-heading:lang(en) { font-size: clamp(2rem, 3.6vw, 3.65rem); letter-spacing: -.02em; }
}
@media (min-width: 651px) {
  .workspace-feature { display: grid; grid-template-rows: subgrid; grid-row: span 2; }
}
@media (max-width: 1050px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-heading { font-size: clamp(2.6rem, 8vw, 4.25rem); }
  .hero-heading:lang(ja) { font-size: clamp(1.65rem, 6.9vw, 4rem); }
  .hero-lead { max-width: 38ch; }
}
@media (max-width: 650px) {
  .site-header { grid-template-columns: 1fr auto; gap: 2px 14px; padding-block: 12px; }
  .site-header nav { grid-row: 2; grid-column: 1 / -1; gap: clamp(12px, 4vw, 28px); flex-wrap: wrap; }
  .language-picker { grid-row: 1; grid-column: 2; }
  .hero-heading { font-size: clamp(2.15rem, 10vw, 3.75rem); }
  .hero-heading:lang(ja) { font-size: clamp(1.6rem, 7.2vw, 3.5rem); }
  .hero { padding-block-start: 34px; }
  .hero-actions-row { column-gap: .8rem; font-size: .9375rem; }
  .hero-actions-row .button { padding-inline: .85rem; }
  .workspace-features, .host-section, .home-notes, .guide-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .workspace-features { row-gap: 2.5rem; }
  .guide-layout { gap: 1.15rem; }
  .guide-image-pair { grid-template-columns: 1fr; gap: .35rem; }
  .guide-toc-panel { top: 0; background: var(--paper); }
  .guide-toc-panel summary {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 48px;
    padding-inline: .65rem;
    border-block-end: 1px solid var(--surface);
    font-weight: 600;
    cursor: pointer;
  }
  .guide-toc-panel summary::-webkit-details-marker { display: none; }
  .guide-toc-panel summary::after {
    content: "";
    width: 6px;
    height: 6px;
    border-inline-end: 1.5px solid currentColor;
    border-block-end: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
  }
  .guide-toc-panel[open] summary::after { transform: translateY(2px) rotate(225deg); }
  .guide-toc {
    position: absolute;
    inset-block-start: 100%;
    inset-inline-start: 0;
    width: min(100%, 18rem);
    max-height: 65vh;
    overflow: auto;
    padding: .3rem;
    background: var(--white);
    border: 1px solid var(--surface);
  }
  .guide-toc a { display: inline-flex; align-items: center; min-height: 44px; }
  .guide-content :is(section, li)[id] { scroll-margin-top: 72px; }
  .footer-layout { grid-template-columns: 1fr; gap: .6rem; }
}
