/* Madang Lab (마당랩): own style, home page pilot (BRANDS-OWN-STYLE.md section 4)
   The idea: the courtyard, and behind it the software. The palace world Madang Lab drew for
   its first system is the ground (stills only, made by tools/build_stills.py), and crisp
   interface panels, built here in HTML and CSS with made-up data, stand in front of it.
   Palette from the palace art itself: roof-tile charcoal (ink, footer), paper cream (ground),
   timber sand (bands), dancheong red and green (the mark's yard, labels, approvals), pond blue
   (AI chips, the chart). One family (Noto Sans KR as "ML Sans"), weights 400, 500, 700.
   Motion: one calm loop on the hero's approvals panel (a row is approved, its tick draws,
   the next row moves up), driven by site.js, pausable, off under reduced motion. Every
   transition lives inside the prefers-reduced-motion: no-preference block at the end and
   moves only opacity, transform or a stroke; nothing changes layout. */

@font-face {
  font-family: "ML Fallback";
  src: local("Malgun Gothic"), local("MalgunGothic");
  size-adjust: 92%;
}

:root {
  color-scheme: light;
  --ground: #F6F0E4;
  --sand: #EEE5D4;
  --paper: #FFFDF8;
  --ink: #24212D;
  --text: #34303D;
  --soft: #45404E;
  --muted: #5C5664;
  --line: #E2D8C6;
  --line-strong: #CBBDA5;
  --field-line: #857B6C;
  --placeholder: #6B6457;
  --red: #A1372F;
  --red-soft: #F6E1DA;
  --green: #2B6A55;
  --green-soft: #DBECE3;
  --blue: #335F80;
  --blue-soft: #E0EAF1;
  --gold: #8E5B0C;
  --gold-soft: #F6E9CC;
  --foot: #2C2936;
  --foot-text: #E3DCCD;
  --foot-link: #FFFDF8;
  --shadow: 0 1px 1px rgba(36, 33, 45, 0.05), 0 22px 44px -18px rgba(36, 33, 45, 0.42);
  --shadow-soft: 0 1px 1px rgba(36, 33, 45, 0.04), 0 16px 36px -20px rgba(36, 33, 45, 0.36);
  --font: "ML Sans", "ML Fallback", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[lang="en"] body { word-break: normal; line-height: 1.65; }
body [lang="ko"] { word-break: keep-all; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.lede, .sub { text-wrap: pretty; }
ul, ol { list-style: none; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
button, input, textarea { font: inherit; color: inherit; }
strong { font-weight: 700; }
em { font-style: normal; }
.nw { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

a { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 4px; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

.cap { margin-top: 14px; font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.sample-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.sample-tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--red); }

/* Buttons and links */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.cta:hover { background: #3A3646; color: var(--paper); }
.cta-lg { min-height: 54px; padding: 0 28px; font-size: 16.5px; }

.text-link, .link-sm {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--red);
  text-underline-offset: 6px;
}
.text-link { font-size: 16.5px; }
.link-sm { font-size: 15.5px; text-underline-offset: 5px; }

/* Header */
.site-head { position: relative; z-index: 5; background: var(--ground); }
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 6;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.skip:focus { left: 16px; color: #FFFFFF; }

.head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  min-height: 68px;
  padding: 8px 0;
}
.wordmark {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.mark { flex: 0 0 auto; }
.mark-ring { fill: var(--ink); }
.mark-yard { fill: var(--red); }
.nav { display: none; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--red); text-underline-offset: 6px; }
.head-tools { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; align-items: center; gap: 2px; font-size: 14.5px; }
.lang a, .lang-now { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.lang a { min-width: 44px; margin: 0 -7px; color: var(--muted); text-decoration: none; }
.lang-now {
  min-width: 30px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
}
.lang-sep { color: #A39B8C; }
.cta-head { display: none; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.menu-btn svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

@media (max-width: 1023px) {
  .nav.is-open {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }
}

/* Hero: the courtyard as the ground, the line on paper, the panels standing in the yard */
.hero { position: relative; overflow: hidden; padding: 28px 0 0; padding: min(28px, 4svh) 0 0; }
.hero-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 476px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 110px);
  mask-image: linear-gradient(180deg, transparent 0, #000 110px);
}
.hero-ground picture, .hero-ground img { width: 100%; height: 100%; }
.hero-ground img { object-fit: cover; object-position: 52% 38%; }
.hero-grid { position: relative; }
/* Phones and tablets: the first screen is the hero. It runs 51 px past the window's bottom
   edge so the courtyard reads as going on. The words take the first row; the stage takes the
   room they leave (see "Sized from the window" below), so the panel, the sample tag and the
   pause control stay on the first screen; the courtyard starts 28 px above the stage, below
   the words, however tall the stage is. Wide but short windows (under 560 px) use it too. */
@media (max-width: 899px), (max-height: 559px) {
  .hero {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 20px;
    grid-template-rows: auto 1fr;
    min-height: calc(100vh - 17px);
    min-height: calc(100svh - 17px);
  }
  .hero-grid { display: contents; }
  .hero-text { position: relative; grid-column: 2; grid-row: 1; }
  .stage { grid-column: 2; grid-row: 2; }
  .hero-ground { position: relative; grid-column: 1 / -1; grid-row: 2; height: auto; contain: size; margin-top: 8px; margin-top: calc(min(36px, 5svh) - 28px); }
}
@media (min-width: 600px) and (max-width: 899px), (min-width: 600px) and (max-height: 559px) {
  .hero { grid-template-columns: 32px minmax(0, 1fr) 32px; }
}
@media (min-width: 900px) and (max-height: 559px) {
  .hero { grid-template-columns: minmax(40px, 1fr) minmax(0, 1160px) minmax(40px, 1fr); }
}
.hero h1 {
  font-size: clamp(33px, 8.6vw, 64px);
  font-size: clamp(33px, min(8.6vw, 7svh), 64px); /* a short window keeps the line short */
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.hero h1 em { color: var(--red); }
html[lang="en"] .hero h1 { line-height: 1.12; letter-spacing: -0.03em; }
.brk { display: none; }
.lede {
  margin-top: 18px;
  max-width: 30em;
  font-size: clamp(17px, 1.45vw, 19.5px);
  line-height: 1.7;
  color: var(--soft);
}
html[lang="en"] .lede { line-height: 1.55; }
.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}

/* the approvals panel stands 76 px above the stage's foot (25 px above the window's edge on a
   phone); the tag and the pause control sit just above the panel */
.stage { --row: 56px; --qh: calc(var(--row) * 4); --foot: 0px; position: relative; min-height: 316px; margin: 36px 0 0; margin: min(36px, 5svh) 0 0; }
.stage-panels { position: absolute; inset: 0; }
.stage .ui-approve { position: absolute; left: 0; right: 0; bottom: 76px; max-width: 440px; margin: 0 auto; z-index: 3; }
.stage .ui-stock { display: none; }
.stage .ui-chart { display: none; }
.stage-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(172px + var(--foot) + var(--qh));
  min-height: 52px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}
.stage-cap .sample-tag, .stage-note { padding: 3px 9px; border-radius: 7px; background: rgba(255, 253, 248, 0.92); }
.stage-note { display: none; color: var(--soft); }
.motion-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid rgba(36, 33, 45, 0.18);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.94);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.motion-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.motion-btn .i-play { display: none; fill: currentColor; stroke: none; }
.motion-btn[aria-pressed="true"] .i-pause { display: none; }
.motion-btn[aria-pressed="true"] .i-play { display: inline; }

/* Interface panels (made-up data; aria-hidden, the figure caption says so) */
.ui {
  background: var(--paper);
  border: 1px solid rgba(36, 33, 45, 0.12);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  word-break: keep-all;
}
html[lang="en"] .ui { word-break: normal; }
.ui-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.ui-title { font-size: 13.5px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.ui-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--sand);
  color: var(--ink);
}
.ui-ico svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ui-ico-ink { background: var(--ink); color: var(--paper); }
.ui-ico-ink svg { stroke-width: 1.8; }
.ui-count { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ui-count b { display: inline-block; min-width: 2ch; font-weight: 700; color: var(--green); text-align: right; }
.ui-big { margin-left: auto; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.ui-big small { margin-left: 2px; font-size: 12px; font-weight: 500; color: var(--muted); }
.ui-foot { padding: 9px 14px; border-top: 1px solid var(--line); background: #FBF7EF; font-size: 12px; color: var(--muted); }
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.ui-btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.chip {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--sand);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--soft);
  white-space: nowrap;
}
.chip-ai { background: var(--blue-soft); color: var(--blue); }
.chip-low { background: var(--red-soft); color: var(--red); }
.chip-green { background: var(--green-soft); color: var(--green); }
.chip-blue { background: var(--blue-soft); color: var(--blue); }
.chip-gold { background: var(--gold-soft); color: var(--gold); }

/* the approvals queue: up to four whole rows show (--qh, set on .stage); the next waits below
   the fold of the panel */
.q-view { position: relative; height: var(--qh); overflow: hidden; }
.q-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 10px;
  height: var(--row);
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.q-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  border-radius: 6px;
  background: var(--blue-soft);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--blue);
}
.q-main { display: flex; flex-direction: column; min-width: 0; }
.q-name { font-size: 13.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-act { position: relative; display: flex; justify-content: flex-end; align-items: center; height: 28px; }
.q-tick { position: absolute; right: 2px; top: 1px; width: 26px; height: 26px; }
.q-tick svg { display: block; }
.q-tick circle { fill: var(--green-soft); stroke: var(--green); stroke-width: 1.4; opacity: 0; }
.q-tick path { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; }
.q-row.is-done .ui-btn { opacity: 0; }
.q-row.is-done .q-tick circle { opacity: 1; }
.q-row.is-done .q-tick path { stroke-dashoffset: 0; }
.q-row.is-done .q-name { color: var(--muted); }

/* stock table */
.st-table { padding: 4px 0 6px; }
.st-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 34px;
  grid-template-areas: "n q m" "b b b";
  align-items: center;
  column-gap: 8px;
  padding: 7px 14px 6px;
}
.st-row > span:nth-child(1) { grid-area: n; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-row > span:nth-child(2) { grid-area: q; text-align: right; font-weight: 500; color: var(--ink); }
.st-row > span:nth-child(3) { grid-area: m; text-align: right; color: var(--muted); }
.st-bar { grid-area: b; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--sand); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 2px; background: var(--green); }
.st-headrow { padding-top: 6px; padding-bottom: 2px; }
.st-headrow > span { font-size: 11.5px; color: var(--muted) !important; font-weight: 400 !important; }
.st-low > span:nth-child(1), .st-low > span:nth-child(2) { color: var(--red); font-weight: 700; }
.st-low .st-bar i { background: var(--red); }

/* small chart */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 116px; padding: 14px 16px 10px; }
.bars span { position: relative; flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; padding-bottom: 20px; }
.bars i { display: block; height: var(--h); border-radius: 5px 5px 2px 2px; background: #C9D6E1; }
.bars .is-today i { background: var(--blue); }
.bars b { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; font-weight: 500; text-align: center; color: var(--muted); }

/* document inbox */
.tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.tabs span { padding: 4px 8px 8px; white-space: nowrap; }
.tabs .is-on { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ink); }
.ib-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto 64px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.ib-row:last-child { border-bottom: 0; }
.ib-from { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-subj { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-time { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.ib-row.is-new .ib-subj { font-weight: 700; }
.ib-row.is-new .ib-from { position: relative; padding-left: 12px; color: var(--ink); }
.ib-row.is-new .ib-from::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--red); }

/* staff rota */
.ui-legend { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ui-legend i { display: inline-block; width: 10px; height: 10px; margin-left: 6px; border-radius: 3px; }
.sh-grid {
  display: grid;
  grid-template-columns: 58px repeat(6, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 14px 14px;
  align-items: center;
}
.sh-grid b { font-size: 11.5px; font-weight: 500; text-align: center; color: var(--muted); }
.sh-who { font-size: 12px; color: var(--ink); white-space: nowrap; }
.sh-grid i { display: block; height: 22px; border-radius: 5px; }
.sh-am { background: var(--gold-soft); box-shadow: inset 0 0 0 1px #E7CF98; }
.sh-pm { background: var(--blue-soft); box-shadow: inset 0 0 0 1px #BFD0DE; }
.sh-full { background: var(--green-soft); box-shadow: inset 0 0 0 1px #A9CDBB; }
.sh-off { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(36, 33, 45, 0.07) 4px 5px); box-shadow: inset 0 0 0 1px var(--line); }

/* reply draft */
.ui-draft .chip-ai { margin-right: auto; }
.dr-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.dr-switch i { position: relative; width: 30px; height: 18px; border-radius: 9px; background: var(--green); }
.dr-switch i::after { content: ""; position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); }
.dr-in { display: flex; flex-direction: column; gap: 2px; margin: 14px 14px 0; padding: 10px 12px; border-radius: 9px; background: var(--sand); }
.dr-from { font-size: 11.5px; color: var(--muted); }
.dr-subj { font-size: 13px; font-weight: 500; color: var(--ink); }
.dr-body { margin: 12px 14px 0; padding: 12px 14px; border-radius: 9px; border: 1px dashed #A9BDCD; background: #F6F9FB; font-size: 13.5px; line-height: 1.7; color: var(--ink); }
.dr-body p + p { margin-top: 6px; }
.dr-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px; }
.dr-foot .ui-btn { height: 32px; padding: 0 14px; font-size: 12.5px; }

/* Sections */
.sec { padding: 76px 0; }
.sec-build, .sec-own { background: var(--sand); }
.label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--red);
}
.label::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--red); }
.sec h2 {
  margin-top: 14px;
  max-width: 19em;
  font-size: clamp(27px, 3.3vw, 44px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.03em;
  color: var(--ink);
}
html[lang="en"] .sec h2 { line-height: 1.16; letter-spacing: -0.022em; }
.sub { margin-top: 16px; max-width: 36em; font-size: 17px; line-height: 1.75; color: var(--soft); }
html[lang="en"] .sub { line-height: 1.6; }

/* What we build */
.product { margin-top: 48px; }
.product-text h3 { font-size: 21px; font-weight: 700; line-height: 1.45; letter-spacing: -0.015em; color: var(--ink); }
.product-text p { margin-top: 8px; font-size: 17px; line-height: 1.75; color: var(--soft); }
html[lang="en"] .product-text p { line-height: 1.6; }
.product-text .text-link { margin-top: 8px; }
.collage { margin-top: 24px; }
.shot {
  position: relative;
  border: 1px solid rgba(36, 33, 45, 0.14);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #FBF7EF;
  font-size: 12.5px;
}
.shot-mark path { fill: var(--ink); }
.shot-mark rect { fill: var(--red); }
.shot-title { font-weight: 500; color: var(--ink); white-space: nowrap; }
.shot-pill { margin-left: auto; padding: 1px 8px; border-radius: 6px; background: var(--sand); font-size: 11.5px; color: var(--soft); }
.shot-pic { position: relative; }
.shot-pic img { width: 100%; }
.pin {
  position: absolute;
  transform: translate(-50%, -100%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: -8px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(36, 33, 45, 0.6);
}
.pin::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #E46C5F; }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.pin-ok::before { background: #6FC2A0; }
.collage-panels { position: relative; z-index: 2; display: grid; gap: 14px; margin: 14px 0 0; }

.shots-pair { margin-top: 48px; display: grid; gap: 32px; }
.product-pair { margin-top: 48px; display: grid; gap: 20px; }
.product-card {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 28px;
  padding: 24px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--ground);
}
.product-card .product-text { flex: 1 1 240px; min-width: 0; }
.phone { flex: 0 0 auto; width: 196px; }
.phone-body {
  height: 330px;
  overflow: hidden;
  border: 7px solid var(--ink);
  border-bottom-width: 0;
  border-radius: 30px 30px 0 0;
  background: #FFFFFF;
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent);
  mask-image: linear-gradient(180deg, #000 78%, transparent);
}
.phone .cap { margin-top: 10px; font-size: 14px; }
.product-words { padding: 22px 0 0; border: 0; border-top: 2px solid var(--ink); border-radius: 0; background: transparent; }

/* AI rules */
.ai-grid { display: grid; gap: 36px; }
.draft-fig { min-width: 0; }
.rules { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 0 32px; }
.rules li { padding: 22px 0 26px; border-top: 2px solid var(--ink); }
.rules h3 { font-size: 18.5px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.rules p { margin-top: 8px; font-size: 16.5px; line-height: 1.75; color: var(--soft); }
html[lang="en"] .rules p { line-height: 1.6; }

/* Process */
.steps { margin-top: 40px; display: grid; gap: 14px; counter-reset: step; }
.step {
  position: relative;
  padding: 22px 20px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--paper);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  right: 18px;
  top: 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.step-time {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--gold-soft);
  font-size: 14px;
  font-weight: 500;
  color: var(--gold);
}
.step h3 { margin-top: 14px; font-size: 20px; font-weight: 700; line-height: 1.45; color: var(--ink); }
.step-text { margin-top: 8px; font-size: 16.5px; line-height: 1.75; color: var(--soft); }
html[lang="en"] .step-text { line-height: 1.6; }
.note { margin-top: 28px; max-width: 40em; font-size: 16.5px; color: var(--text); }

/* You own it: the promise, set as a settings list */
.own-grid { display: grid; gap: 36px; }
.own-card { border: 1px solid rgba(36, 33, 45, 0.12); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-soft); }
.own-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 14px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}
.own-list li:first-child { border-top: 0; }
.own-list li::before {
  content: "";
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M7.5 13.4l3.6 3.6 7.4-8' fill='none' stroke='%232B6A55' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 26px 26px no-repeat;
}
.own-k { font-size: 16.5px; font-weight: 700; line-height: 1.6; color: var(--ink); }
.own-v { font-size: 16.5px; line-height: 1.7; color: var(--soft); }

/* Contact (preview only: site.js stops the form from sending) */
.contact-grid { display: grid; gap: 36px; }
.ways { margin-top: 24px; }
.ways dl, .ways > div { display: flex; flex-direction: column; gap: 2px; }
.ways dt { font-size: 14px; color: var(--muted); }
.ways a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--red);
  text-underline-offset: 6px;
  overflow-wrap: anywhere;
}
.form { min-width: 0; padding: 24px 18px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--sand); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 22px 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 15.5px; font-weight: 500; color: var(--ink); }
.req { font-size: 14px; font-weight: 400; color: var(--muted); }
/* typed text uses the system Korean face: the page font is a subset of the page's own characters */
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--paper);
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
}
.field input { height: 52px; padding: 0 16px; }
.field textarea { min-height: 128px; padding: 14px 16px; line-height: 1.7; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { font-family: var(--font); color: var(--placeholder); opacity: 1; }
.consent { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.consent-row { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; }
.consent-row input { flex: 0 0 auto; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); cursor: pointer; }
.consent-row label { flex: 1 1 auto; min-height: 44px; font-size: 16px; font-weight: 500; line-height: 1.7; color: var(--ink); cursor: pointer; }
.consent-notes { margin-top: 8px; padding-left: 36px; font-size: 14px; line-height: 1.75; color: var(--muted); }
.consent-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 36px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 4px;
}
.form-note { margin-bottom: 26px; padding: 14px 18px; border-radius: 12px; background: var(--paper); font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.form-note a { overflow-wrap: anywhere; }
.submit { margin-top: 20px; }
.form-msg { margin-top: 20px; padding: 16px 20px; border-radius: 12px; background: var(--paper); font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.form-msg:empty { margin: 0; padding: 0; }

/* Privacy page (its markup predates this pilot: a label column and a body) */
.doc .row { display: block; }
.doc .label { margin-bottom: 8px; }
.lead { margin-top: 12px; font-size: clamp(26px, 3vw, 40px); font-weight: 700; line-height: 1.35; letter-spacing: -0.025em; color: var(--ink); }
.doc-note { margin-top: 18px; max-width: 40em; padding: 14px 18px; border-radius: 12px; background: var(--sand); font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.doc-intro { margin-top: 24px; max-width: 40em; font-size: 17px; color: var(--text); }
.doc-part { max-width: 40em; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.doc-part h2 { font-size: 19px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.doc-part p, .doc-part ul { margin-top: 10px; font-size: 16.5px; line-height: 1.8; color: var(--text); }
.doc-part ul { list-style: disc; padding-left: 1.2em; }
.doc-part li { padding: 2px 0; }
.doc .link-sm { margin-top: 36px; }

/* Footer: roof-tile charcoal */
.foot { padding: 52px 0 48px; background: var(--foot); color: var(--foot-text); }
.foot-inner { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.85; color: var(--foot-text); }
.foot a { color: var(--foot-link); text-decoration-color: rgba(255, 253, 248, 0.5); }
.foot a:hover { color: var(--foot-link); text-decoration-color: var(--foot-link); }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 15px; font-weight: 700; color: var(--foot-link); }
.foot .mark-ring { fill: var(--foot-link); }
.foot .mark-yard { fill: #D9574B; }
.foot-line a { display: inline-block; padding: 10px 0; margin: -10px 0; }
.foot-privacy a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.foot-copy { margin-top: 4px; }

/* The family mark (framelabs-home/family, family-ko.html and family-en.html): the parent, then
   the four sites. Its markup is pasted as it is; its rules live here instead of in its own
   <style>, set in this footer's colours and in the page's own face (its 600 is 700 here, the
   weight this site ships). */
.foot { --fl-ink: var(--foot-link); --fl-line: rgba(255, 253, 248, 0.2); }
.fl-family { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.6em; margin: 0; padding: 6px 0 0; border-top: 1px solid var(--fl-line, rgba(0, 0, 0, 0.14)); font-size: 14px; line-height: 1.4; color: var(--fl-ink, inherit); }
.fl-family ul { display: flex; flex-wrap: wrap; gap: 0 1.2em; margin: 0; padding: 0; list-style: none; }
.fl-family a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; }
.fl-family a:hover, .fl-family a:focus-visible { color: inherit; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 0.25em; }
.fl-family .fl-home { font-weight: 700; }
.foot :focus-visible { outline-color: var(--foot-link); }

/* Sized from the window: the stage is a size container whose height comes from the window
   (phones: what the words leave of the first screen; desks: the window's height, below). The
   approvals panel shows as many whole rows as the stage has room for, two to four, and the
   rows shrink from 56 to 46 px before one is dropped. --fit is the room left for rows: on a
   phone the stage less the panel's head and foot (84), the gap and tag above it (64) and the
   76 px below it; on a desk the stage less the caption (60), the stock panel above (252) and
   the head and foot (84); 2 px spare so a whole row never rounds away. */
@supports (container-type: size) and (height: round(down, 10px, 3px)) {
  .stage {
    container-type: size;
    --fit: calc(100cqh - 222px - var(--foot));
    --row: clamp(46px, calc(var(--fit) / 4), 56px);
    --qh: clamp(calc(var(--row) * 2), round(down, var(--fit), var(--row)), calc(var(--row) * 4));
  }
  @media (min-width: 900px) and (min-height: 560px) {
    .stage { --fit: calc(100cqh - 394px); }
  }
}

/* A short window in the one-column hero (a short phone, a phone on its side): when two rows
   of the approvals panel would not fit above the bottom edge, the words and a strip of the
   courtyard take the first screen, and the tag, the pause control and the whole panel start
   below the edge (--lift: at least 160 px of courtyard above them, and enough that they
   clear the edge even when the words are short). Measured: two rows need a window 662 to
   741 px tall by width and language (English sets "See what we build" under the button), so
   the turn is at 740 px; English under 360 px wide needs 780. The stage gets a set height
   here: a size container sized only by its min-height reads as 0 px tall to its rows in
   Chrome. */
@media (max-width: 899px) and (max-height: 739px), (max-height: 559px) {
  .stage { --lift: max(160px, calc(100svh - 280px)); --fit: calc(100cqh - 222px - var(--foot) - var(--lift)); min-height: calc(var(--lift) + var(--foot) + 448px); height: calc(var(--lift) + var(--foot) + 448px); }
}
@media (max-width: 359px) and (max-height: 779px) {
  html[lang="en"] .stage { --lift: max(160px, calc(100svh - 280px)); --fit: calc(100cqh - 222px - var(--foot) - var(--lift)); min-height: calc(var(--lift) + var(--foot) + 448px); height: calc(var(--lift) + var(--foot) + 448px); }
}

/* Narrow phones: the inbox drops its sender column so the subject can be read */
@media (max-width: 599px) {
  .ib-row { grid-template-columns: minmax(0, 1fr) auto 58px; }
  .ib-from { display: none; }
  .ui-approve .ui-count { display: none; }
  /* nothing under 14 px on a phone outside the sample panels themselves */
  .sample-tag, .motion-btn { font-size: 14px; }
}
/* under 360 px the approvals panel's foot line takes two lines: the tag sits that much higher */
@media (max-width: 359px) {
  .stage { --foot: 17px; }
}

/* Wider phones and tablets */
@media (min-width: 600px) {
  .wrap { padding: 0 32px; }
  .form { padding: 36px 36px 40px; }
  .product-card { padding: 28px; }
  .collage-panels { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .stage-note { display: inline; }
}

@media (min-width: 721px) {
  .cta-head { display: inline-flex; }
  .head-tools { gap: 16px; }
  .lang a { margin: 0 -4px; }
  .lang-now { min-width: 36px; }
  .brk { display: inline; }
  .sec { padding: 104px 0; }
  .shots-pair, .product-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .wrap { padding: 0 40px; }
  .product-office { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 48px; align-items: start; }
  .product-office .product-text { position: sticky; top: 32px; padding-top: 12px; }
  .collage { margin-top: 0; }
  .collage-panels { margin: -72px 24px 0; }
  .ai-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 56px; align-items: center; }
  .own-grid, .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 56px; align-items: start; }
}

/* Two columns: the line on paper at the left, the courtyard and its panels at the right.
   They need a window at least 560 px tall; a shorter one (a big phone on its side) gets the
   one-column hero above. */
@media (min-width: 900px) and (min-height: 560px) {
  .hero { padding: 0; }
  .hero-ground {
    top: 0;
    left: calc(max(40px, (100% - 1160px) / 2) + clamp(330px, 34vw, 480px));
    height: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 140px);
    mask-image: linear-gradient(90deg, transparent 0, #000 140px);
  }
  .hero-ground img { object-position: 44% 50%; }
  .hero-grid {
    display: grid;
    grid-template-columns: clamp(330px, 34vw, 480px) minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    column-gap: 32px;
    min-height: clamp(520px, calc(100vh - 68px), 860px);
    min-height: clamp(520px, calc(100svh - 68px), 860px);
  }
  .hero-text { padding: 56px 0 72px; padding: clamp(28px, calc(9svh - 25px), 56px) 0 clamp(32px, calc(12svh - 36px), 72px); }
  .hero h1 { font-size: clamp(38px, 3.9vw, 56px); }
  html[lang="en"] .hero h1 { font-size: clamp(36px, 3.8vw, 54px); }
  /* the panels stand in the yard: stock at the back right, the approvals queue in front,
     the week's chart at the front right; none hides another's rows. The stage is 620 px when
     the window allows and keeps 20 px clear above and below it on a short window; the
     approvals queue then shows fewer, shorter rows (see "Sized from the window"). */
  .stage { min-height: 0; height: clamp(492px, calc(100vh - 108px), 620px); height: clamp(492px, calc(100svh - 108px), 620px); margin: 0; }
  .stage-panels { inset: 0 0 60px; }
  .stage .ui-approve { left: 0; right: auto; bottom: 0; width: min(380px, 70%); max-width: none; margin: 0; }
  .stage .ui-stock { display: block; position: absolute; right: 0; top: 0; width: 290px; z-index: 1; }
  .stage .ui-chart { display: block; position: absolute; right: 0; bottom: 0; width: 200px; z-index: 2; }
  .stage-cap { left: 0; right: auto; bottom: 0; }
  .motion-btn { margin-left: 0; }
  /* a narrow stage (900 to about 1060 px windows) drops the week's chart rather than let it
     under the approvals queue, and keeps its caption on one line, as on a phone (the
     picture's alt text says it is AI-drawn) */
  @container (max-width: 591px) { .stage .ui-chart { display: none; } }
  @container (max-width: 539px) { .stage-note { display: none; } }
  @container (max-width: 639px) { html[lang="en"] .stage-note { display: none; } }
}

@media (min-width: 1024px) {
  .head-row { display: flex; gap: 8px 32px; }
  .wordmark { margin-right: auto; }
  .nav { display: flex; flex-wrap: wrap; gap: 0 26px; }
  .nav a { padding: 0 8px; margin: 0 -8px; }
  .menu-btn { display: none; }
  .sec { padding: 128px 0; }
}

@media (min-width: 1200px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1200px) and (min-height: 560px) {
  .stage .ui-approve { width: 440px; }
}

/* Motion: only for people who have not asked for less of it. site.js runs the loop. */
@media (prefers-reduced-motion: no-preference) {
  .q-list { transition: transform 720ms cubic-bezier(0.45, 0, 0.2, 1); }
  .q-list.is-moving { transform: translateY(calc(-1 * var(--row))); }
  .q-list.is-moving .q-row:first-child { opacity: 0; transition: opacity 520ms ease; }
  .q-row .ui-btn { transition: opacity 260ms ease; }
  .q-tick circle { transition: opacity 260ms ease; }
  .q-row.is-done .q-tick path { transition: stroke-dashoffset 640ms cubic-bezier(0.3, 0, 0.2, 1) 160ms; }
  .q-list.no-anim, .q-list.no-anim * { transition: none !important; }
}

@media print {
  .site-head, .form, .hero-ground, .stage { display: none; }
  body { background: #FFFFFF; }
}
