/* 모바일 앱 포트폴리오 — 공통 스타일
   프로젝트 페이지마다 :root 변수(색·서체)와 모티프 CSS를 갈아 끼운다. */

@layer base, layout, comp, motif;

@layer base {
  :root {
    --bg: #f4f3ef; --surface: #fff; --sunken: #eae8e2; --ink: #141414; --sub: #4c4c4c; --muted: #6e6e6e;
    --line: #dcdad3; --accent: #141414; --on-accent: #fff; --accent-text: #141414;
    --frame: #111; --deep: #141414; --on-deep: #f4f3ef; --deep-sub: #b9b7b0; --deep-line: rgba(255,255,255,.14);
    --f-body: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', system-ui, sans-serif;
    --f-display: var(--f-body); --f-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --display-weight: 700; --display-tracking: -0.02em; --radius: 20px; --gutter: 40px;
  }
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 400 17px/1.7 var(--f-body);
    -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word;
  }
  img { display: block; max-width: 100%; height: auto; }
  a { color: inherit; }
  h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
  :focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 3px; border-radius: 6px; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sr-only:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 99; padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: 8px; }
  /* 디스플레이 서체에 없는 글자가 섞인 문자열은 본문 서체 굵게로 통째 교체 */
  .fb { font-family: var(--f-body) !important; font-weight: var(--fb-weight, 800) !important; letter-spacing: -0.03em; }
  .muted { color: var(--muted); }
}

@layer layout {
  .wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
  section { position: relative; }
  .sec { padding: 112px 0; }
  .sec + .sec { border-top: 1px solid var(--line); }
  .sec.deep { background: var(--deep); color: var(--on-deep); border-top: 0; --sub: var(--deep-sub); --line: var(--deep-line); }
  .sec.deep + .sec { border-top: 0; }
  .sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px 64px; align-items: end; margin-bottom: 56px; }
  .sec-head.solo { grid-template-columns: 1fr; }
  @media (max-width: 860px) {
    :root { --gutter: 20px; }
    .sec { padding: 72px 0; }
    .sec-head { grid-template-columns: 1fr; margin-bottom: 36px; }
  }
}

@layer comp {
  /* 글자 */
  .kicker { font: 600 13px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .sec.deep .kicker { color: var(--deep-accent, var(--on-deep)); }
  .h2 { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: clamp(34px, 4.4vw, 56px); line-height: 1.12; margin-top: 14px; }
  .lead { color: var(--sub); font-size: 18px; line-height: 1.75; max-width: 36em; }
  .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

  /* 상단 바 */
  .topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
  .topbar .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
  .back { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; min-height: 44px; }
  .back svg { width: 18px; height: 18px; }
  .pnav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
  .pnav a { flex: none; min-width: 44px; height: 44px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; font: 600 14px/1 var(--f-mono); text-decoration: none; color: var(--sub); }
  .pnav a:hover { color: var(--ink); background: var(--sunken); }
  .pnav a[aria-current] { color: var(--bg); background: var(--ink); }
  @media (max-width: 600px) { .pnav a { min-width: 40px; } .back span { display: none; } }

  /* 폰 프레임 — 컨테이너 단위로 어떤 폭에서도 같은 비율 */
  .phone { display: block; container-type: inline-size; width: var(--w, 100%); max-width: 100%; border-radius: 15cqi; }
  button.phone { cursor: zoom-in; }
  .bezel { display: block; position: relative; }
  /* 다이내믹 아일랜드 — 화면 폭의 32% × 9.4%, 위에서 2.8% (iPhone 15 Pro 비율) */
  .bezel.island::after { content: ''; position: absolute; top: 6cqi; left: 50%; width: 29.8cqi; height: 8.8cqi; transform: translateX(-50%); border-radius: 99px; background: #000; pointer-events: none; }
  .bezel { padding: 3.4cqi; background: var(--frame); border-radius: 15cqi; box-shadow: 0 0 0 1px var(--frame-edge, rgba(0,0,0,.06)), 0 2px 4px rgba(0,0,0,.06), 0 28px 56px -24px rgba(0,0,0,.42); }
  .bezel img { width: 100%; border-radius: 11.8cqi; background: var(--sunken); }

  /* 히어로 */
  .hero { position: relative; padding: 80px 0 120px; overflow: hidden; }
  .hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 48px; align-items: center; }
  .app-id { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
  .app-icon { width: 76px; height: 76px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 10px 24px -10px rgba(0,0,0,.4); flex: none; }
  .app-id b { font-size: 18px; line-height: 1.3; }
  .app-id span { font-size: 14px; }
  .wordmark { height: 52px; width: auto; }
  .title { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: clamp(64px, 10vw, 128px); line-height: .98; margin: 22px 0 22px; white-space: nowrap; }
  .tagline { font-size: clamp(22px, 2.5vw, 30px); font-weight: 700; line-height: 1.38; letter-spacing: -0.01em; }
  .hero .lead { margin-top: 18px; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
  .chip { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--sub); background: color-mix(in srgb, var(--surface) 70%, transparent); }
  .meta { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
  .meta dt { color: var(--muted); font-weight: 600; }
  .phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 560px; }
  .phones .phone { --w: 216px; position: relative; flex: none; }
  .phones .phone:nth-child(1) { margin-right: -44px; transform: translateY(46px) rotate(-6deg); z-index: 1; }
  .phones .phone:nth-child(2) { --w: 256px; z-index: 2; }
  .phones .phone:nth-child(3) { margin-left: -44px; transform: translateY(46px) rotate(6deg); z-index: 1; }
  @media (max-width: 960px) {
    .hero { padding: 48px 0 72px; }
    .hero-grid { grid-template-columns: 1fr; }
    .phones { min-height: 0; margin-top: 8px; }
    .phones .phone { --w: min(30vw, 240px); }
    .phones .phone:nth-child(2) { --w: min(35vw, 280px); }
    .phones .phone:nth-child(1) { margin-right: -6vw; transform: translateY(6vw) rotate(-6deg); }
    .phones .phone:nth-child(3) { margin-left: -6vw; transform: translateY(6vw) rotate(6deg); }
  }

  /* 개요 카드 */
  .cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 30px 34px; }
  .card h3 { font-size: 15px; font-weight: 700; color: var(--accent-text); letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
  .card h3 .num { font-size: 13px; color: var(--muted); }
  .card p { margin-top: 14px; font-size: 17px; line-height: 1.75; }
  .card ul { margin-top: 14px; display: grid; gap: 8px; font-size: 16px; }
  .card li { padding-left: 18px; position: relative; }
  .card li::before { content: ''; position: absolute; left: 2px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
  @media (max-width: 960px) { .cards { grid-template-columns: 1fr; } }

  /* 핵심 기능 */
  .features { display: grid; gap: 0; }
  .feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; padding: 64px 0; border-top: 1px solid var(--line); }
  .feature:first-child { border-top: 0; padding-top: 0; }
  .feature:nth-child(even) .f-media { order: -1; }
  .f-no { font: 600 15px/1 var(--f-mono); color: var(--accent-text); letter-spacing: .08em; }
  .f-title { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: clamp(28px, 3vw, 40px); line-height: 1.2; margin-top: 16px; }
  .f-desc { margin-top: 18px; color: var(--sub); font-size: 18px; line-height: 1.8; }
  .f-points { margin-top: 22px; display: grid; gap: 10px; font-size: 16px; }
  .f-points li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; }
  .f-points li::before { content: '—'; color: var(--accent-text); font-weight: 700; }
  .f-media { display: flex; justify-content: center; gap: 24px; align-items: flex-start; }
  .f-media .phone { --w: 236px; }
  .f-media .phone:nth-child(2) { margin-top: 56px; }
  @media (max-width: 960px) {
    .feature { grid-template-columns: 1fr; gap: 36px; padding: 48px 0; }
    .feature:nth-child(even) .f-media { order: 0; }
    .f-media { gap: 14px; }
    .f-media .phone { --w: min(236px, 42vw); }
    .f-media .phone:nth-child(2) { margin-top: 32px; }
  }

  /* 전체 화면 */
  .set-bar { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; margin-bottom: 40px; }
  .tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); }
  .tabs [role="tab"] { min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--sub); display: inline-flex; align-items: center; gap: 8px; }
  .tabs [role="tab"] .num { font-size: 13px; font-weight: 500; opacity: .75; }
  .tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--bg); }
  .set-note { color: var(--muted); font-size: 14px; }
  .group + .group { margin-top: 72px; }
  .group-h { display: flex; align-items: baseline; gap: 12px; padding-bottom: 14px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
  .group-h h3 { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: 24px; line-height: 1.3; }
  .group-h .num { color: var(--muted); font-size: 14px; }
  .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 40px 28px; }
  .shot { display: block; width: 100%; text-align: left; border-radius: 12px; }
  .shot .phone { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
  .shot:hover .phone { transform: translateY(-6px); }
  .shot .cap { display: flex; gap: 8px; margin-top: 14px; font-size: 14px; line-height: 1.45; color: var(--sub); }
  .shot .cap b { font: 600 12px/1.6 var(--f-mono); color: var(--muted); flex: none; }
  @media (max-width: 600px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
    .group + .group { margin-top: 52px; }
  }
  @media (prefers-reduced-motion: reduce) { .shot .phone { transition: none; } .shot:hover .phone { transform: none; } }

  /* 디자인 시스템 */
  .ds { display: grid; gap: 64px; }
  .ds-h { font-size: 15px; font-weight: 700; color: var(--accent-text); margin-bottom: 20px; display: flex; gap: 12px; align-items: baseline; }
  .ds-h span { color: var(--muted); font-weight: 500; font-size: 14px; }
  .pal + .pal { margin-top: 28px; }
  .pal-h { font-size: 14px; font-weight: 700; color: var(--sub); margin-bottom: 12px; }
  .swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
  .sw { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
  .sw i { display: block; height: 92px; background: var(--c); border-bottom: 1px solid var(--line); }
  .sw div { padding: 12px 14px 14px; font-size: 14px; line-height: 1.45; }
  .sw b { display: block; font-weight: 700; }
  .sw code { font: 500 13px/1.4 var(--f-mono); color: var(--muted); }
  .types { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
  .type { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 26px; display: flex; flex-direction: column; gap: 18px; }
  .type .spec { font-size: 40px; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
  .type .meta-t { font-size: 14px; color: var(--sub); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 14px; }
  .type .meta-t b { color: var(--ink); font-size: 16px; display: block; }
  .assets { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
  .asset { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
  .asset .pic { flex: 1; display: grid; place-items: center; padding: 28px; background: var(--asset-bg, var(--sunken)); min-height: 220px; }
  .asset .pic img { max-height: 320px; width: auto; }
  .asset .pic.full { padding: 0; }
  .asset .pic.full img { max-height: none; width: 100%; }
  .asset figcaption { padding: 16px 20px 18px; font-size: 14px; color: var(--sub); line-height: 1.55; }
  .asset figcaption b { color: var(--ink); display: block; font-size: 15px; }
  .asset.wide { grid-column: 1 / -1; }
  .strip { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
  .strip img { height: 150px; width: auto; border-radius: 4px; box-shadow: 0 8px 20px -10px rgba(0,0,0,.45); }

  /* 산출물 · 검수 */
  .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
  .stat { padding: 28px 24px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .stat b { display: block; font-family: var(--f-stat, var(--f-display)); font-weight: var(--display-weight); font-size: clamp(34px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .stat span { display: block; margin-top: 10px; font-size: 14px; color: var(--sub); line-height: 1.55; }
  @media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat { padding: 22px 16px; } }
  .deliver { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
  .deliver .card p { color: var(--sub); }
  .deliver .card h3 { font-size: 18px; color: var(--ink); }
  .stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
  .stack span { padding: 6px 12px; border-radius: 8px; background: var(--sunken); font: 500 13px/1.3 var(--f-mono); color: var(--ink); }
  @media (max-width: 960px) { .deliver { grid-template-columns: 1fr; } }

  /* 이전·다음 */
  .pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .pager a { display: block; padding: 28px 30px; border-radius: var(--radius); border: 1px solid var(--deep-line); text-decoration: none; min-height: 44px; }
  .pager a:hover { background: rgba(255,255,255,.06); }
  .pager small { display: block; color: var(--deep-sub); font: 600 12px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
  .pager strong { display: block; margin-top: 10px; font-size: 26px; line-height: 1.25; font-family: var(--pager-font, var(--f-body)); font-weight: 700; }
  .pager .next { text-align: right; }
  .foot { margin-top: 56px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--deep-sub); }
  .foot a { text-decoration: underline; text-underline-offset: 3px; }
  @media (max-width: 600px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

  /* 확대 보기 */
  dialog#lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 8, 10, .92); color: #f2f2ee; }
  dialog#lb::backdrop { background: transparent; }
  dialog#lb[open] { display: grid; grid-template-rows: auto 1fr auto; }
  .lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 0 24px; font: 500 14px/1 var(--f-mono); color: #b8b8b0; }
  .lb-stage { min-height: 0; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; }
  .lb-stage > img { justify-self: center; }
  .lb-img { max-height: calc(100dvh - 140px); max-width: 100%; width: auto; margin: 0 auto; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6); background: #222; }
  .lb-cap { text-align: center; padding: 14px 24px 22px; font-size: 16px; font-weight: 600; }
  .lb-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: rgba(255,255,255,.1); color: #fff; }
  .lb-btn:hover { background: rgba(255,255,255,.2); }
  .lb-btn svg { width: 22px; height: 22px; }
  @media (max-width: 600px) {
    .lb-stage { grid-template-columns: 0 minmax(0, 1fr) 0; }
    .lb-prev, .lb-next { display: none; }
    .lb-img { max-height: calc(100dvh - 130px); border-radius: 18px; }
  }
}

/* ───────── 인덱스 ───────── */
@layer comp {
  .ix-hero { padding: 96px 0 88px; }
  .ix-hero .title { font-size: clamp(40px, 7.6vw, 104px); line-height: 1.08; letter-spacing: -0.035em; max-width: 11em; white-space: normal; }
  .ix-hero .lead { font-size: 20px; max-width: 40em; }
  .ix-stats { display: flex; flex-wrap: wrap; gap: 12px 48px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
  .ix-stats div b { display: block; font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .ix-stats div span { color: var(--sub); font-size: 15px; }
  .ix-list { display: grid; gap: 28px; padding-bottom: 112px; }
  .pj { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: center; min-height: 500px; padding: 56px 0 0 56px; border-radius: 32px; overflow: hidden; background: var(--bg); color: var(--ink); text-decoration: none; isolation: isolate; }
  .pj-text { padding-bottom: 56px; position: relative; z-index: 2; }
  .pj .kicker { color: var(--accent-text); }
  .pj-name { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: clamp(52px, 6.4vw, 84px); line-height: 1; margin-top: 18px; display: flex; align-items: center; gap: 18px; }
  .pj-name img { width: 64px; height: 64px; border-radius: 22.5%; flex: none; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
  .pj-tag { margin-top: 20px; font-size: 22px; font-weight: 700; line-height: 1.4; font-family: var(--f-body); }
  .pj-desc { margin-top: 12px; color: var(--sub); font-size: 16px; line-height: 1.7; max-width: 30em; font-family: var(--f-body); }
  .pj .chips { margin-top: 22px; }
  .pj .chip { font-family: var(--f-body); }
  .pj-go { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; font-family: var(--f-body); }
  .pj-go svg { width: 18px; height: 18px; transition: transform .2s; }
  .pj:hover .pj-go svg { transform: translateX(4px); }
  .pj-phones { align-self: end; display: flex; justify-content: center; gap: 18px; margin-bottom: -96px; padding-right: 40px; }
  .pj-phones .phone { --w: 196px; }
  .pj-phones .phone:nth-child(2) { transform: translateY(-48px); }
  @media (max-width: 960px) {
    .pj { grid-template-columns: minmax(0, 1fr); padding: 36px 24px 0; min-height: 0; border-radius: 24px; }
    .pj-text { padding-bottom: 8px; }
    .pj-phones { padding-right: 0; gap: 10px; margin-bottom: -64px; }
    .pj-phones .phone { --w: min(25vw, 196px); }
    .pj-phones .phone:nth-child(2) { transform: translateY(-24px); }
  }
  .process { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .process .card h3 { font-size: 20px; color: var(--ink); }
  .process .card .num { color: var(--muted); }
  .process .card p { color: var(--sub); font-size: 16px; }
  @media (max-width: 960px) { .process { grid-template-columns: 1fr; } }
}

/* ───────── 웹 프로젝트 ───────── */
@layer comp {
  .pnav-h { align-self: center; margin-right: 6px; font: 600 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

  /* 브라우저 창 목업 — 컨테이너 폭에 맞춰 바 · 점 · 탭이 같이 줄어든다 */
  .bw { display: block; width: 100%; container-type: inline-size; text-align: left; }
  button.bw { cursor: zoom-in; }
  .bw-in { display: block; overflow: hidden; border-radius: max(6px, 1cqi); background: #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .1), 0 1px 2px rgba(15, 23, 42, .06), 0 30px 60px -28px rgba(15, 23, 42, .38); }
  .bw-bar { display: flex; align-items: center; gap: max(4px, .6cqi); height: max(14px, 3cqi); padding: 0 max(8px, 1.5cqi); background: #EDEDEB; border-bottom: 1px solid rgba(0, 0, 0, .07); }
  .bw-bar i { flex: none; width: max(5px, .8cqi); aspect-ratio: 1; border-radius: 50%; background: rgba(0, 0, 0, .15); }
  .bw-tab { margin: 0 auto; transform: translateX(-2.4cqi); max-width: 46%; padding: .3cqi 1.8cqi; border-radius: .6cqi; background: rgba(0, 0, 0, .05);
    font: 500 1.05cqi/1.35 var(--f-body); color: rgba(0, 0, 0, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  @container (max-width: 620px) { .bw-tab { display: none; } }
  .bw img { display: block; width: 100%; height: auto; }
  .bw.dark .bw-in { background: #111; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 30px 60px -28px rgba(0, 0, 0, .7); }
  .bw.dark .bw-bar { background: #1F1F1E; border-bottom-color: rgba(255, 255, 255, .07); }
  .bw.dark .bw-bar i { background: rgba(255, 255, 255, .2); }
  .bw.dark .bw-tab { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .55); }

  /* 히어로 */
  .hero.wh { padding: 72px 0 104px; }
  .wh-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px 64px; align-items: end; margin-top: 22px; }
  .wh .title { white-space: normal; font-size: clamp(54px, 8vw, 108px); line-height: .98; margin: 0; }
  .wh-ko { margin-top: 16px; font-size: 18px; font-weight: 600; color: var(--muted); }
  .wh .lead { margin-top: 14px; }
  .wh .chips { margin-top: 22px; }
  .wh-stage { position: relative; margin-top: 60px; }
  .wh-stage.with-phone { padding-right: 8%; }
  .wh-stage > .phone { position: absolute; right: 0; bottom: -44px; --w: clamp(120px, 19%, 230px); z-index: 2; }
  .wh-meta { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px 28px; margin-top: 76px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
  .wh-meta dt { margin-bottom: 6px; font: 600 12px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  @media (max-width: 1080px) { .wh-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 960px) {
    .hero.wh { padding: 44px 0 72px; }
    .wh-head { grid-template-columns: 1fr; }
    .wh-stage { margin-top: 36px; }
    .wh-stage > .phone { bottom: -24px; }
    .wh-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 56px; }
  }
  @media (max-width: 600px) { .wh-meta { grid-template-columns: 1fr; } }

  /* 핵심 기능 — 글은 좁게, 화면은 넓게 */
  .feature.wf { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; }
  .feature.wf:nth-child(even) { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
  .feature.wf:nth-child(even) .wf-media { order: -1; }
  .wf-media { display: grid; align-items: start; }
  .wf-media > * { grid-area: 1 / 1; }
  .wf-media.two > :first-child { width: 88%; }
  .wf-media.two > :nth-child(2) { width: 66%; justify-self: end; margin-top: 32%; z-index: 1; }
  .wf-media.bp > .bw { width: 90%; }
  .wf-media.bp > .phone { --w: 27%; justify-self: end; margin-top: 16%; z-index: 1; }
  .wf-media.phones { display: flex; justify-content: center; gap: 20px; }
  .wf-media.phones > .phone { --w: 31%; }
  .wf-media.phones > .phone:nth-child(2) { margin-top: 48px; }
  @media (max-width: 960px) {
    .feature.wf, .feature.wf:nth-child(even) { grid-template-columns: 1fr; gap: 32px; }
    .feature.wf:nth-child(even) .wf-media { order: 0; }
    .wf-media.phones { gap: 10px; }
    .wf-media.phones > .phone:nth-child(2) { margin-top: 24px; }
  }

  /* 전체 화면 */
  .wgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
  .shot .bw { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  .shot:hover .bw { transform: translateY(-5px); }
  @media (max-width: 960px) { .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; } }
  @media (max-width: 600px) { .wgrid { grid-template-columns: 1fr; } }
  @media (prefers-reduced-motion: reduce) { .shot .bw { transition: none; } .shot:hover .bw { transform: none; } }

  /* 확대 보기 — 웹 전체 페이지는 세로로 스크롤 */
  dialog#lb.tall .lb-stage { overflow-y: auto; align-items: start; overscroll-behavior: contain; }
  dialog#lb.tall .lb-img { max-height: none; width: min(1280px, 100%); margin: 8px auto 28px; border-radius: 10px; }
  dialog#lb.tall .lb-btn { position: sticky; top: calc(50% - 26px); }
}

/* ───────── 인덱스 · 분야 ───────── */
@layer comp {
  .ix-toc { display: grid; margin-top: 56px; border-top: 1.5px solid var(--ink); }
  .ix-toc a { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 24px; align-items: center; gap: 16px; min-height: 76px; padding: 18px 4px;
    border-bottom: 1px solid var(--line); text-decoration: none; font-size: clamp(20px, 2.3vw, 28px); letter-spacing: -0.02em; }
  .ix-toc b { font-weight: 700; }
  .ix-toc .num { font-size: 14px; color: var(--muted); }
  .ix-toc-n { font-size: 15px; color: var(--sub); letter-spacing: 0; }
  .ix-toc svg { width: 22px; height: 22px; transition: transform .2s; }
  .ix-toc a:hover svg { transform: translateX(4px); }
  @media (max-width: 600px) { .ix-toc a { grid-template-columns: 34px minmax(0, 1fr) 22px; gap: 10px; } .ix-toc-n { display: none; } }
  .ix-sec { padding: 24px 0 120px; scroll-margin-top: 8px; }
  .ix-sec + .ix-sec { padding-top: 112px; border-top: 1px solid var(--line); }
  .ix-sec .ix-list { padding-bottom: 0; }

  /* 대표 웹 프로젝트(넓은 카드) — 앱 카드와 같은 판, 폰 대신 브라우저가 오른쪽 아래로 빠져나간다 */
  .pj-web { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); margin-bottom: 28px; }
  .pj-web .pj-name { font-size: clamp(44px, 5.2vw, 72px); letter-spacing: -0.04em; }
  .pj-shot { align-self: end; margin: 0 -150px -80px 0; }
  @media (max-width: 960px) { .pj-web { grid-template-columns: minmax(0, 1fr); } .pj-shot { margin: 12px -80px -40px 0; } }
  .pj-shot { position: relative; }
  .pj-shot > .phone { position: absolute; left: 5%; bottom: 96px; --w: 21%; z-index: 2; }
  @media (max-width: 960px) { .pj-shot > .phone { left: 3%; bottom: 60px; --w: 25%; } }

  /* 웹 카드 격자 */
  .wj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 60px 28px; }
  .wj { display: flex; flex-direction: column; text-decoration: none; border-radius: 26px; }
  .wj-stage { position: relative; aspect-ratio: 16 / 11; border-radius: 26px; overflow: hidden; background: var(--bg); isolation: isolate; }
  .wj-stage > .bw { position: absolute; left: 8%; top: 11%; width: 104%; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
  .wj-stage > .phone { position: absolute; right: 6%; bottom: -16%; --w: 22%; z-index: 2; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
  .wj:hover .wj-stage > .bw { transform: translate(-6px, -6px); }
  .wj:hover .wj-stage > .phone { transform: translateY(-10px); }
  .wj-text { padding: 24px 6px 0; }
  .wj-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 12px; font-size: clamp(28px, 2.6vw, 36px); line-height: 1.15; font-weight: 700; letter-spacing: -0.035em; }
  .wj-name small { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); }
  .wj-tag { margin-top: 8px; font-size: 17px; line-height: 1.6; color: var(--sub); }
  .wj-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 18px; }
  .wj .chips { margin-top: 0; }
  .wj-go { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; font-size: 15px; white-space: nowrap; }
  .wj-go svg { width: 18px; height: 18px; transition: transform .2s; }
  .wj:hover .wj-go svg { transform: translateX(4px); }
  .wj-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 52px 24px; }
  .wj-grid.three .wj-name { font-size: clamp(24px, 2.1vw, 30px); }
  .wj-grid.three .wj-stage { border-radius: 22px; }
  @media (max-width: 1080px) { .wj-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 860px) { .wj-grid, .wj-grid.three { grid-template-columns: 1fr; gap: 48px; } .wj-stage { border-radius: 20px; } }
  @media (prefers-reduced-motion: reduce) { .wj-stage > *, .wj-go svg, .ix-toc svg { transition: none !important; } }
}
