/* 모바일(≤760px) 전용 정리 — 2026-11-28 사용자 요청 (wangeunji.xyz 벤치마킹)
   원칙: 위에는 이름 + 펼쳐 둔 메뉴 네 단어뿐. 작은 글자는 그대로, 크기 대신 여백과 정렬로 위계를 만들어요.
   2026-11-29 사용자: 이제 데스크톱에도 같은 디자인을 적용해요(맨 끝 min-width: 761px 블록이 데스크톱 크기만 조정). */
.m-nav, .ml, .m-sw { display: none; }

@media all /* 2026-11-29: 예전 (max-width: 760px) — 데스크톱에도 적용 */ {
  :root { --m-e: 20px; }
  /* 2026-11-28 3차(사용자): 모바일 글자 전체를 한 단계 더 작게 */
  :root { --t-xxs: 7.5px; --t-xs: 8px; --t-s: 8.5px; --t-m: 10px; --t-l: 11px; --t-xl: 12px; --t-xxl: 15px; }
  /* 첫 화면 글자(YP. STUDIO & LAB)는 훨씬 작게 */
  .sl-tr { font-size: 15px !important; }

  /* ---------- 상단바: YP.STUDIO & LAB | Works  Lab  Info  Contact ---------- */
  .hdr.g4 { grid-template-columns: 41% 1fr; padding: 0 var(--m-e); column-gap: 0; }
  .hdr.g4 > .logo { grid-column: 1 !important; }
  .hdr.g4 > .hdr-n, .hdr.g4 > .hdr-t, .hdr.g4 > .hdr-m, .hdr-m, .hdr-t { display: none !important; }
  .m-nav { grid-column: 2; grid-row: 1; display: flex; justify-content: space-between; gap: 12px; text-transform: none; letter-spacing: 0; font-size: var(--t-s); }
  .m-nav a { position: relative; padding: 6px 0; }
  .m-nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px; background: currentColor; }
  .hud { display: none !important; }
  /* 라이트/다크: 로고 바로 아래 왼쪽에 작게 */
  .hdr .m-sw { display: flex !important; position: absolute; left: var(--m-e); top: calc(env(safe-area-inset-top, 0px) + 32px); gap: 8px; font-size: 7.5px; letter-spacing: 0.02em; }
  .hdr .m-sw button { padding: 2px 0; }
  .bk { top: auto !important; bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important; }
  .bk { left: var(--m-e) !important; }

  /* ---------- studio · lab: 세로 목록 ---------- */
  html.m-on.v2-home, html.m-on.v2-home body { height: auto; overflow: visible; overscroll-behavior: auto; }
  body[data-page="works"] .cs, body[data-page="lab"] .cs, html.m-on .cs-vw, html.m-on .cs-ix, html.m-on .hi { display: none !important; }
  .ml { display: block; padding: calc(var(--hdr) + 92px) var(--m-e) 120px; }
  .ml-hd { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: start; margin-bottom: 28px; }
  .ml-note { margin: 0; font-size: 8px; line-height: 1.45; color: var(--mid); }
  .ml-cat { margin: 0; font-size: 8px; line-height: 1.45; text-align: right; }
  .ml-l, .ml-r { list-style: none; margin: 0; padding: 0; }
  .ml-l { display: grid; gap: 28px; }
  .ml-it { display: block; }
  .ml-m { position: relative; overflow: hidden; background: var(--line); aspect-ratio: 4 / 3; }
  .ml-m .mz { position: absolute; inset: 0; transform: none !important; }
  .ml-m img, .ml-m video { width: 100%; height: 100%; object-fit: cover; display: block; }
  .ml-cap { display: flex; justify-content: space-between; gap: 10px; padding-top: 6px; font-size: 8px; line-height: 1.3; letter-spacing: 0.01em; }
  .ml-cap .num { color: var(--soft); margin-right: 2px; }
  .ml-y { color: var(--mid); }
  .ml-ix { display: inline-block; margin-top: 64px; font-size: 8px; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
  /* lab: 글자만 있는 줄 */
  .ml-lab .ml-hd { margin-bottom: 56px; }
  .ml-row { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); font-size: 8px; }
  .ml-r li:last-child .ml-row { border-bottom: 1px solid var(--line); }
  .ml-n { color: var(--soft); font-size: var(--t-xs); }
  .ml-s { grid-column: 2 / -1; font-size: var(--t-xs); color: var(--mid); }
  .ml-row.soon { color: var(--soft); }
  .lb-note { display: none !important; }
}

/* 2026-11-29 사용자: 모바일 Works 목록의 Tim(team) Work 사진은 아래(모자 쓴 사람·길, 진입부)가 보이게 */
@media all /* 2026-11-29: 예전 (max-width: 760px) — 데스크톱에도 적용 */ {
  .ml-it[href$="#timteam-work"] .ml-m img, .ml-it[href$="#timteam-work"] .ml-m video { object-position: 50% 88% !important; }
}

/* 2026-11-29 사용자: studio 보기 아이콘 — 가로 띠 / 세로 목록 (mobile.js .m-vw, html.m-strip) */
.m-vw { display: none; }
@media all /* 2026-11-29: 예전 (max-width: 760px) — 데스크톱에도 적용 */ {
  html.m-on .m-vw { display: flex; position: fixed; z-index: 70; left: var(--m-e); right: auto; top: calc(env(safe-area-inset-top, 0px) + 46px); gap: 7px; } /* 2026-11-29 사용자: Light/Dark 바로 아래 왼쪽 */
  .m-vw button { width: 14px; height: 12px; padding: 0; display: grid; place-items: center; background: none; border: 0; color: var(--ink); opacity: .18; cursor: pointer; }
  .m-vw button[aria-pressed="true"] { opacity: .5; }
  .m-vw svg { width: 11px; height: 7.5px; display: block; fill: none; stroke: currentColor; stroke-width: 0.6; vector-effect: non-scaling-stroke; }
  .m-vw svg rect { stroke-width: 0.5px; vector-effect: non-scaling-stroke; }
  html.m-strip body[data-page="works"] .ml { display: none !important; }
  html.m-on.m-strip body[data-page="works"] .cs { display: flex !important; padding-bottom: 28px; }
  html.m-on.m-strip body[data-page="works"] .cs-gd { display: none !important; }
  html.m-on.m-strip.v2-home, html.m-on.m-strip.v2-home body { height: 100%; overflow: hidden; overscroll-behavior: none; }
}

/* 2026-11-29 사용자: studio 목록 사진을 누르면 검정 반투명 덮개 + 흰 제목·부제 + View project (mobile.js .ml-ov) */
.ml-ov { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 12px; background: rgba(0, 0, 0, 0.55); color: #fff; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.ml-it.ov .ml-ov { opacity: 1; pointer-events: auto; }
.ml-ov { padding: 10px; gap: 1px; }
.ml-ov-t { font-size: 9px; line-height: 1.25; letter-spacing: .01em; }
.ml-ov-s { font-size: 7px; line-height: 1.35; opacity: .8; padding-right: 32px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ml-ov-m { font-size: 6.5px; line-height: 1.4; opacity: .55; text-transform: uppercase; letter-spacing: .05em; }
.ml-go { position: absolute; right: 10px; bottom: 10px; display: block; width: 18px; height: 12px; color: #fff; }
.ml-go svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ml-go::after { content: ""; position: absolute; inset: -14px; } /* 누르기 쉬운 넓은 자리 */
.ml-it.ov .ml-go svg { animation: mlgo 1.4s ease-in-out infinite; }
@keyframes mlgo { 50% { translate: 3px 0; } }
.ml-m img { transition: scale .6s cubic-bezier(.16,1,.3,1); }
.ml-it.ov .ml-m img { scale: 1.04; }

/* 2026-11-29 사용자: 목록 사진 아래 제목·연도 글자는 지움(누르면 덮개에 나와요) */
@media all /* 2026-11-29: 예전 (max-width: 760px) — 데스크톱에도 적용 */ { .ml-cap { display: none !important; } .ml-l { gap: 14px; } }

/* 2026-11-29 사용자: 가로 띠 보기 — 카드 이름표 없음, 누르면 목록과 같은 덮개 */
@media all /* 2026-11-29: 예전 (max-width: 760px) — 데스크톱에도 적용 */ {
  html.m-strip .cs-track .cs-card .cs-lab { display: none !important; }
  html.m-strip .cs-track .cs-card .media .ml-ov { z-index: 3; inset: -20px; padding: 30px; } /* 사진 시차(1.15배)로 생기는 가장자리 틈까지 덮기 */
  html.m-strip .cs-track .cs-card .media .ml-go { right: 30px; bottom: 30px; }
  html.m-strip .cs-track .cs-card.ov .ml-ov { opacity: 1; pointer-events: auto; }
  html.m-strip .cs-track .cs-card.ov .ml-go svg { animation: mlgo 1.4s ease-in-out infinite; }
}

/* ========== 2026-11-29 사용자: 데스크톱(761px 이상)에도 모바일 심플 디자인 — 크기만 조정 ========== */
@media (min-width: 761px) {
  :root { --m-e: var(--g4-e, 16px); --t-xxs: 8px; --t-xs: 8.5px; --t-s: 9px; --t-m: 10.5px; --t-l: 11.5px; --t-xl: 13px; --t-xxl: 18px; }
  .sl-tr { font-size: 18px !important; }
  /* 상단바: 로고 | Works · Lab · Info · Contact (가운데 칸부터 간격 좁게) */
  .hdr.g4 { grid-template-columns: 50% 1fr; }
  .m-nav { justify-content: flex-start; gap: clamp(32px, 5vw, 80px); font-size: 10px; }
  .hdr .m-sw { top: calc(env(safe-area-inset-top, 0px) + 34px); font-size: 8px; }
  html.m-on .m-vw { top: calc(env(safe-area-inset-top, 0px) + 50px); }
  /* studio 세로 목록: 사진은 왼쪽 정렬, 화면 폭의 절반 정도 */
  .ml { padding-top: calc(var(--hdr) + 120px); }
  .ml-hd { max-width: none; margin-bottom: 40px; }
  .ml-note, .ml-cat, .ml-row, .ml-ix { font-size: 9px; }
  .ml-l { gap: 18px; }
  .ml-it { width: min(52vw, 900px); }
  .ml-lab .ml-r { max-width: 52vw; }
  /* 덮개 글자: 데스크톱은 한 단계만 크게 */
  .ml-ov { padding: 16px; }
  .ml-ov-t { font-size: 12px; }
  .ml-ov-s { font-size: 9.5px; padding-right: 48px; }
  .ml-ov-m { font-size: 8px; }
  .ml-go { right: 16px; bottom: 16px; width: 24px; height: 16px; }
  .ml-it { cursor: pointer; }
  .ml-it:not(.ov):hover .ml-m img { scale: 1.02; }
}

/* 2026-11-29 사용자: 데스크톱 studio 세로 목록 사진은 화면 가운데로 */
@media (min-width: 761px) {
  .ml-l { justify-items: center; }
  .ml-it { margin-inline: auto; }
}

/* 2026-11-29 사용자: 데스크톱 studio 세로 목록 — 사진 사이 여백 넓게(모바일은 그대로) */
@media (min-width: 761px) {
  .ml-l { gap: 120px; }
}

/* 2026-11-30 사용자: 모바일 studio 세로 목록도 사진 사이 여백 넓게(14px → 56px) */
@media (max-width: 760px) {
  .ml-l { gap: 56px; }
}

/* 2026-11-30 사용자: 로고 STUDIO & LAB 오른쪽에 작고 연한 회색 YP */
html .hdr .logo > .logo-yp { display: inline-block !important; margin-left: .6em; font-size: .8em; font-weight: 400; letter-spacing: .04em; color: #9a9a9a !important; opacity: 1 !important; vertical-align: baseline; }
html[data-theme="dark"] .hdr .logo > .logo-yp { color: #6a6a6a !important; }

/* 2026-11-30 사용자: 데스크톱 Lab 목록 줄·선을 화면 폭 끝까지(설명 줄·Lab (02)와 같은 좌우 끝) */
@media (min-width: 761px) {
  .ml-lab .ml-r { max-width: none !important; width: 100% !important; }
}

/* 2026-11-30 사용자: 스크롤하면 위 메뉴 글자가 본문 글자와 겹쳐 보이던 것 → 메뉴 뒤에 바탕색 띠(다크 모드는 --bg 따라감).
   작품 페이지(대표사진 위에 메뉴가 떠 있음)와 첫 화면은 빼요 */
body:not([data-page="project"]):not([data-page="home"])::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 52px; background: var(--bg); z-index: 59; pointer-events: none; }
body[data-page="works"]:not(#_)::before { height: 68px; }
body[data-page="works"] .m-vw { z-index: 61; }
