/* gothic — 본고딕(Noto Sans KR) 계열 네모꼴 일반 글꼴 폰트
 * 폰트 계약 v2(ADR-008): font-kku.font/jamo/context 레이어와 계층 변수로만 자모에 닿는다.
 * finer slot/cluster 변수로 구조 차이를 직접 흡수하는 현재 shipped 네모꼴 font다.
 * 하위 호환 alias(`gothic2`)는 런타임이 canonical resolved surface인
 * data-fy-font="gothic"으로 정규화하므로 셀렉터에 나열하지 않는다.
 *
 * round8 재교정 (2026-08-10): round7의 affine 사상 결과를 출발점으로, 기준 음절과
 * 조합 결과의 **잉크 마스크 IoU**를 목적함수로 slot/per-jamo 값을 좌표하강 적합했다.
 * 표본 32자(가나허한각강밟값읽고오그누글울흙늘긁의과와왕권획괆온밤없닭키아어),
 * 셀당 150px, 공통 원점 정렬. 평균 IoU 0.343 → 0.604.
 * 목적함수는 IoU 단독이 아니라 **IoU + 잉크 외곽상자 이탈 벌점**이다. IoU만 쓰면
 * 글자가 기준보다 넓어져도 겹침이 늘어 통과하고, 실제로 왕/획의 세로모음이 다음
 * 음절을 침범했다. 벌점 도입 후 최대 bbox 편차 0.105 → 0.040em.
 * 리듬은 실측 metric에 직접 정합: 음절 pitch 0.865em(= native advance),
 * space 0.263em(= native space advance).
 * 압축 슬롯의 획 얇아짐은 slot 단위 --fy-<slot>-weight로 보상했다 (잉크 면적비 fk/ref
 * 기준 적합, 평균 오차 0.117 → 0.055). font 레이어의 slot weight 블록.
 *
 * round8b 구조 교정: `scripts/glyph_metrics.py`(구조 지표 게이트)로 IoU가 못 잡는
 * 결함을 잡았다 — 가로모음 bar가 0.087em으로 기준(0.067em)보다 30% 굵었고(mt
 * 0.839→0.646), 받침이 붙은 세로모음 기둥이 0.553에서 멈춰 기준(0.640)보다 짧았다
 * (trc 0.69→0.769). m 슬롯은 고의 ㅗ와 그의 ㅡ를 함께 쓰므로 ㅡ만 per-jamo로 분리했다.
 *
 * TRK-033 겹침 재교정 (2026-09-27): `scripts/glyph_overlap_audit.py`(노드 쌍 잉크 교집합 /
 * 작은 쪽 면적, 임계 15%)가 잡은 뭉개짐을 자모·문맥 레이어에서 고쳤다 — 흙/흘(ㅡ가 ㅎ 링에
 * 포갬), 획(ㅗ 기둥이 링 관통 + ㄱ 받침이 bar 위), 뒤/웨(ㅜ bar가 초성 밑동에), 없/읽/값
 * (겹받침 위 기둥 과장), 된/쇤/곽(split ㅗ가 초성 안), 혹/촌(bottom ㅗ 기둥이 링 관통).
 * 두께를 맞추면 소스 ᅩ의 긴 기둥이 초성을 뚫는 곳은 slot clip으로 기둥 윗부분만 잘랐다.
 * 616자 표본에서 15% 초과 쌍 286 → 0, 평균 IoU 0.399 → 0.50.
 * release gate family 표본(1,055자) 후속: ㅠ/ㅜ + ㄹ 받침 내림획(휼 17%)과 split-open 꼬리 ㅐ(꽤 19%)
 * 20쌍 → 0 (최대 12%).
 *
 * 기준 폰트 주의: 이 프로필의 명시 기준은 본고딕(Noto Sans KR)이지만, Noto Sans KR
 * 웹폰트는 conjoining jamo(U+1100–U+11FF)를 배포 subset에 포함하지 않아 자모 렌더에
 * 쓸 수 없다. 따라서 실제 렌더·적합 기준은 스택이 해소하는 시스템 폰트
 * (darwin에서는 Apple SD Gothic Neo)다. 스택이 바뀌면 재적합이 필요하다.
 * 스택은 반드시 교정 기준 글꼴로 시작한다. 2026-10-11까지 스택 맨 앞이 "Noto Sans KR"이었고,
 * 데스크톱판 Noto Sans KR이 설치된 컴퓨터의 Chrome이 그 글꼴로 자모를 그려 고딕 계열 5종
 * (gothic·retro·saekdong·riso·blueprint)의 받침이 아랫줄로 떨어지고 자모가 흩어졌다(외부 제보,
 * 상장 예제에서 재현). 이 기기에는 그 글꼴이 없어 감사가 보지 못했다.
 */

@layer font-kku.font, font-kku.jamo, font-kku.context;

@layer font-kku.font {
  :where([data-fy-font="gothic"]) {
    --fy-font-id: gothic; /* 폰트 계약 메타데이터: CSS 도착 판정 */
    --fy-contract: 2;
    --fy-material: system;
    --fy-expression-mode: general; /* 일반 글꼴 렌더링 선택. 예: gothic 전체 */
    --fy-glyph-width: 0.98em; /* slot left% 기준 폭. 잉크는 x 0.03~0.87em 사용 */
    --fy-glyph-height: 1.2em; /* slot top% 기준 높이. 잉크는 y -0.06~0.86em 사용 */
    --fy-glyph-gap: -0.115em; /* 음절 pitch를 native advance(0.865em)에 정합 */
    --fy-space-width: 0.263em; /* 공백 폭 = Noto Sans KR space advance 실측 */
    --fy-word-gap: 0px; /* 단어 wrapper 추가 간격은 없음 */
    --fy-line-gap: 0.15em; /* 줄 pitch ≈ 1.35em (native line-height 수준) */
    --fy-font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif; /* 교정 기준(Apple SD Gothic Neo)부터 — 아래 '기준 폰트 주의' */
    --fy-font-weight: 400; /* native regular 기준. 압축 슬롯만 국소 보상 */
    --fy-content-y: 0em; /* 비한글 content 세로 미세 보정. baseline은 CSS가 자동 정렬 */
    --fy-content-size: 1em; /* 비한글 content 크기. 1em이면 baseline이 한글과 정확히 일치 */
    --fy-content-side-bearing: 0em; /* 비한글 좌우 여백 (한글의 음수 gap 흡수) */
    --fy-content-scale-x: 1; /* 정본 폰트는 identity — 크기는 --fy-content-size로 */
    --fy-content-scale-y: 1; /* 정본 폰트는 identity — 크기는 --fy-content-size로 */
    /* Choseong — 목표 잉크: 초성 zone(모음 topology별 실측값) */
    --fy-t-top: -23.3%;    --fy-t-left: -10.4%;  --fy-t-size: 1.2em; --fy-t-scale-x: 0.961;   --fy-t-scale-y: 0.849; /* t: bottom-open 초성. 예: 고/오/우 잉크 x[0.04,0.78] y[0.03,0.54] */
    --fy-tlo-top: -25.4%; --fy-tlo-left: -8.9%; --fy-tlo-size: 0.938em; --fy-tlo-scale-x: 0.902; --fy-tlo-scale-y: 1.28; /* tlo: right-open 초성. 예: 가/나 잉크 x[0.04,0.50] y[0.03,0.69] */
    --fy-tlc-top: -21.6%; --fy-tlc-left: -7.5%; --fy-tlc-size: 0.794em; --fy-tlc-scale-x: 0.944; --fy-tlc-scale-y: 0.995; /* tlc: right-closed 초성. 예: 한/값 잉크 x[0.04,0.55] y[-0.04,0.55] */
    --fy-tls-top: -18.4%;  --fy-tls-left: -6.8%; --fy-tls-size: 0.72em; --fy-tls-scale-x: 1.14; --fy-tls-scale-y: 1.12; /* tls: split-open 초성. 예: 의/과 잉크 x[0.03,0.42] y[0.03,0.40] */
    --fy-tt-top: -18.7%;   --fy-tt-left: -6.8%;  --fy-tt-size: 1.03em; --fy-tt-scale-x: 1.089;  --fy-tt-scale-y: 0.517; /* tt: bottom-closed 초성. 예: 글/울 잉크 x[0.035,0.79] y[-0.01,0.26] */
    --fy-ttl-top: -17.52%;  --fy-ttl-left: -5.3%; --fy-ttl-size: 0.766em; --fy-ttl-scale-x: 1.042; --fy-ttl-scale-y: 0.834; /* ttl: split-closed 초성. 곽/관/괌/괵 ㄱ 기준 끝 0.31~0.37, 권/귄 0.39~0.41 → ㄱ [0.06,0.37] (TRK-033: 이전 1.04는 0.447까지 내려와 ㅗ bar와 포갬) */
    /* Jungseong — 세로 모음은 stem x[0.63,0.715] 고정을 기준으로 산출 (ᅡ stem 소스 0.38 기준) */
    --fy-tro-top: -14%;  --fy-tro-left: 35%; --fy-tro-size: 1em;    --fy-tro-scale-x: 0.8; --fy-tro-scale-y: 1.009; /* tro: right-open 중성. 예: 가의 ㅏ. 소스 ᅡ의 곁줄기가 native보다 길어(잉크폭 0.28 vs 0.22em) 가로 압축 — left/scale-x는 짝으로 산출(좌표하강으로는 못 찾는 결합 이동) */
    --fy-trc-top: -14.3%;  --fy-trc-left: 26.2%; --fy-trc-size: 0.958em;    --fy-trc-scale-x: 0.95; --fy-trc-scale-y: 0.769; /* trc: right-closed 중성. 한의 ㅏ 기둥 끝 0.640 실측 정합 (0.69는 0.553으로 과단축) */
    --fy-trs-top: -13.7%;  --fy-trs-left: 27.5%;   --fy-trs-size: 0.938em;    --fy-trs-scale-x: 1.028;  --fy-trs-scale-y: 1.081;    /* trs: split-open tail. 예: 의/과의 ㅣ/ㅏ */
    --fy-ttr-top: -13.71%;  --fy-ttr-left: 38.24%; --fy-ttr-size: 0.96em;    --fy-ttr-scale-x: 0.733; --fy-ttr-scale-y: 0.688; /* ttr: split-closed tail. 곽/왕의 ㅏ 기준 x[0.633,0.847] 끝 0.51~0.58 → [-0.007,0.57] (TRK-033: 이전 값은 0.05em 왼쪽·끝 0.627로 받침 머리를 뚫었다. ᅢ/ᅥ/ᅦ/ᅵ는 자모 규칙) */
    --fy-m-top: 8%;       --fy-m-left: -0.5%;      --fy-m-size: 0.992em;      --fy-m-scale-x: 1.011;    --fy-m-scale-y: 0.762;   /* m: bottom-open 중성. 예: 고의 ㅗ bar y[0.63,0.68] */
    --fy-ml-top: -3.7%;    --fy-ml-left: 2.1%;   --fy-ml-size: 0.748em;  --fy-ml-scale-x: 0.978;   --fy-ml-scale-y: 1.15;  /* ml: split-open base. 예: 의의 ㅡ bar y[0.55,0.62] (ㅗ/ㅜ는 per-jamo 보정) */
    --fy-mt-top: -13.2%;  --fy-mt-left: -0.3%;     --fy-mt-size: 1em;     --fy-mt-scale-x: 0.989;   --fy-mt-scale-y: 0.646;  /* mt: bottom-closed 중성. 글/늘의 ㅡ bar 두께 0.067em·[0.353,0.420] 실측 정합 (0.839는 0.087em으로 과대) */
    --fy-mtl-top: -4.1%;   --fy-mtl-left: -0.3%; --fy-mtl-size: 0.74em; --fy-mtl-scale-x: 0.972;  --fy-mtl-scale-y: 0.675; /* mtl: split-closed base. 예: 왕의 ㅗ bar y[0.40,0.47] (ㅜ는 per-jamo 보정) */
    /* Jongseong — 받침 zone 실측: single y[0.45,0.82], double 좌우 x[0.05,0.40]/[0.45,0.80] */
    --fy-b-top: 16.3%;    --fy-b-left: -6.1%;  --fy-b-size: 1.12em; --fy-b-scale-x: 1.003;    --fy-b-scale-y: 0.68; /* b: bottom:single 종성. 예: 글/울의 ㄹ 전폭 */
    --fy-brs-top: 22.9%;  --fy-brs-left: -5.5%; --fy-brs-size: 0.942em; --fy-brs-scale-x: 1.179; --fy-brs-scale-y: 0.678; /* brs: right:single 종성. 예: 한/각의 ㄴ/ㄱ */
    --fy-blr-top: 20.9%;    --fy-blr-left: 1.7%; --fy-blr-size: 0.612em; --fy-blr-scale-x: 0.972; --fy-blr-scale-y: 1.1; /* blr: right:double 왼쪽 종성. 예: 읽/밟의 ㄹ */
    --fy-brd-top: 19.2%;    --fy-brd-left: 35.9%; --fy-brd-size: 0.5em; --fy-brd-scale-x: 1.079; --fy-brd-scale-y: 1.26; /* brd: right:double 오른쪽 종성. 예: 읽의 ㄱ, 밟의 ㅂ */
    --fy-bl-top: 22.5%;     --fy-bl-left: 2.8%;  --fy-bl-size: 0.6em; --fy-bl-scale-x: 0.93;  --fy-bl-scale-y: 1.067; /* bl: bottom:double 왼쪽 종성. 예: 흙/긁의 ㄹ */
    --fy-br-top: 19.2%;     --fy-br-left: 30.4%;  --fy-br-size: 0.6em; --fy-br-scale-x: 1.011;  --fy-br-scale-y: 1.229; /* br: bottom:double 오른쪽 종성. 예: 흙/긁의 ㄱ */
    --fy-bbl-top: 20.4%;  --fy-bbl-left: 3.5%; --fy-bbl-size: 0.59em; --fy-bbl-scale-x: 0.821; --fy-bbl-scale-y: 1.208; /* bbl: split-right:double 왼쪽 종성. 예: 괆의 ㄹ */
    --fy-bbrs-top: 27.99%; --fy-bbrs-left: -1.73%;  --fy-bbrs-size: 0.71em; --fy-bbrs-scale-x: 1.483; --fy-bbrs-scale-y: 0.795; /* bbrs: split-right:single 종성. 괌/권/웜 기준 받침은 폭 전체 x[0.15,0.72~0.78], 머리 0.55~0.61 → ㅁ [0.155,0.735]×[0.60,0.86] (TRK-033: 이전 값은 오른쪽 반칸 x[0.37,0.76] y[0.52,]에 올라가 꼬리·ㅗ bar와 포갬). ᆨ/ᆯ/ᆼ은 자모 규칙 */
    --fy-bbrd-top: 21.2%; --fy-bbrd-left: 35.9%; --fy-bbrd-size: 0.59em; --fy-bbrd-scale-x: 0.86; --fy-bbrd-scale-y: 1.18; /* bbrd: split-right:double 오른쪽 종성. 예: 괆의 ㅁ */
  }
  /* --- generated: slot weight compensation (fit_weight.py) --- */
  /* 압축 슬롯은 획이 가늘어지므로 slot 단위로 weight를 보상한다.
   * 값은 잉크 면적비(fk/ref≈1) 기준 실측 적합. */
  /* 겹받침은 좌우 반칸 압축으로 획이 가늘어져 weight를 한 단계 더 보상한다. 2026-10 획 굵기
   * 감사: 겹받침 칸(blr·brd·bbl·bbrd)과 쪼갠 받침(bbrs)은 600에서 가로·세로획이
   * 0.043~0.053em로 모음(막대 0.067·기둥 0.080em)보다 확연히 가늘어 800으로 올렸다(0.057~0.077em).
   * 아래 겹받침 짝(bl·br, 흙)은 600에서도 0.053~0.067em으로 감사 안이라 그대로 둔다.
   * 이 기기의 Apple SD Gothic Neo는 ≤700과 ≥800 두 단계로만 갈린다. */
  /* tt(bottom-closed) 초성 — 3단 구성상 세로 압축이 불가피해 가로획이 얇아진다.
   * weight 한 단계로 보상한다 (글/늘/울의 ㄱ/ㄴ/ㅇ). */
  :where([data-fy-font="gothic"]) {
    --fy-b-weight: 600;
    --fy-bbrs-weight: 800;
    --fy-brs-weight: 600;
    --fy-m-weight: 500;
    --fy-ml-weight: 500;
    --fy-mt-weight: 800;
    --fy-t-weight: 500;
    --fy-tlc-weight: 500;
    --fy-tlo-weight: 500;
    --fy-tls-weight: 600;
    --fy-tro-weight: 600;
    --fy-trc-weight: 600;
    --fy-trs-weight: 600;
    --fy-ttl-weight: 800;
    --fy-ttr-weight: 800;
    --fy-blr-weight: 800;
    --fy-brd-weight: 800;
    --fy-bl-weight: 600;
    --fy-br-weight: 600;
    --fy-bbl-weight: 800;
    --fy-bbrd-weight: 800;
    --fy-tt-weight: 600;
  }
  /* --- composite / syllable depth 전용 슬롯 -----------------------------------
   * atomic depth에서는 emit되지 않는다. 값은 실측 적합 대상이며 시드값에서 출발한다. */
  :where([data-fy-font="gothic"]) {
    --fy-mw-top: 8%; --fy-mw-left: 8%; --fy-mw-size: 0.62em; --fy-mw-scale-x: 1; --fy-mw-scale-y: 1;
    --fy-mtw-top: 6%; --fy-mtw-left: 8%; --fy-mtw-size: 0.58em; --fy-mtw-scale-x: 1; --fy-mtw-scale-y: 1;
    --fy-bw-top: 40.6%; --fy-bw-left: 6.9%; --fy-bw-size: 0.42em; --fy-bw-scale-x: 1.011; --fy-bw-scale-y: 0.804;
    --fy-brw-top: 40.3%; --fy-brw-left: 6.9%; --fy-brw-size: 0.412em; --fy-brw-scale-x: 1.305; --fy-brw-scale-y: 0.821;
    --fy-bbw-top: 51%; --fy-bbw-left: 10%; --fy-bbw-size: 0.52em; --fy-bbw-scale-x: 1; --fy-bbw-scale-y: 1;
    --fy-hs-top: -11.51%; --fy-hs-left: 0.07%; --fy-hs-size: 0.942em; --fy-hs-scale-x: 0.774; --fy-hs-scale-y: 0.958;
    --fy-hts-top: -12.63%; --fy-hts-left: -0.01%; --fy-hts-size: 0.852em; --fy-hts-scale-x: 0.846; --fy-hts-scale-y: 0.827;
  }
  /* syllable depth 전용 미세 보정 — head가 초성+base를 대신하므로 tail과 받침의
   * 최적 위치가 atomic과 다르다. 공유 slot을 건드리지 않도록 depth로 게이트한다. */
  :where([data-fy-font="gothic"][data-fy-vowel-depth="syllable"]) {
    --fy-trs-top: -13.7%; --fy-trs-left: 29.5%; --fy-trs-size: 0.938em; --fy-trs-scale-x: 0.972; --fy-trs-scale-y: 1.081;
    --fy-ttr-top: -13%; --fy-ttr-left: 29.5%; --fy-ttr-size: 0.892em; --fy-ttr-scale-x: 0.97; --fy-ttr-scale-y: 0.865;
    --fy-bbrs-top: 24.8%; --fy-bbrs-left: -4.6%; --fy-bbrs-size: 0.778em; --fy-bbrs-scale-x: 1.455; --fy-bbrs-scale-y: 0.806;
    --fy-bbw-top: 42.1%; --fy-bbw-left: 14.4%; --fy-bbw-size: 0.392em; --fy-bbw-scale-x: 1.266; --fy-bbw-scale-y: 0.81;
  }
}

@layer font-kku.jamo {
  /* 세로 모음 per-jamo 가로 보정 — conjoining 글리프마다 stem 위치가 달라
   * (ᅡ 0.38 / ᅵ 0.40 / ᅧ 0.47 / ᅥ 0.475 / ᅢ 0.505 / ᅦ 0.535)
   * slot left 기준(ᅡ)에서의 편차를 em으로 빼서 stem을 native x0.63에 정렬한다.
   * (em 단위: --fy-glyph-width가 바뀌어도 편차가 유지된다) */
  :where([data-fy-font="gothic"]) :is([data-jamo="ᅥ"], [data-jamo="ᅧ"]) {
    --fy-jamo-dx: -0.088em;
  }
  :where([data-fy-font="gothic"]) :is([data-jamo="ᅢ"], [data-jamo="ᅤ"]) {
    --fy-jamo-dx: -0.045em;
  }
  :where([data-fy-font="gothic"]) :is([data-jamo="ᅦ"], [data-jamo="ᅨ"]) {
    --fy-jamo-dx: -0.060em;
  }
  /* 받침 있는 ㅖ — 왼쪽으로 민 곁줄기 둘이 ㄱ·ㅋ 다리에 닿아 곗·곕·곌·곈이 17.9% 포개졌다
   * (KS X 1001 표본 겹침 감사). 받침 자리에서만 덜 민다. */
  /* 받침 있는 ㅐ·ㅒ — 왼쪽 기둥이 받침 윗획(0.555em) 아래 0.625em까지 내려가 백·핵·색의 ㄱ 받침과
   * 13.7% 포개졌다(외곽선 꾸밈 retro·blueprint에서 15.7–15.9%). 기둥 끝만 아래쪽 clip으로 0.6em쯤에서 멈춘다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="trc"]:is([data-jamo="ᅢ"], [data-jamo="ᅤ"]) {
    --fy-trc-clip: inset(-1em -1em 15.6% -1em);
  }
  /* 받침 없는 ㅕ·ㅖ — 곁줄기가 ㄱ·ㄲ 다리 쪽으로 밀려 계 13.9%·껴 13.7%(외곽선 꾸밈에서 15%를 넘음). 조금 덜 민다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="tro"][data-jamo="ᅧ"] {
    --fy-jamo-dx: -0.076em;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="tro"][data-jamo="ᅨ"] {
    --fy-jamo-dx: -0.048em;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="trc"][data-jamo="ᅨ"] {
    --fy-jamo-dx: -0.034em;
  }
  :where([data-fy-font="gothic"]) [data-jamo="ᅵ"] {
    --fy-jamo-dx: -0.019em;
  }
  /* slot clip은 자르는 한 변만 자르고 나머지 세 변은 -1em으로 열어 둔다(2026-10) — 0으로 두면 꾸밈의
   * 빛번짐·그림자까지 노드 상자에 갇혀 네모로 잘린다. 자르는 변 너머의 빛은 여전히 잘린다(clip은
   * 그림자를 그린 뒤에 자른다). 다각형으로 획 너비만 파내 보았지만 파낸 자리가 어두운 사각형으로
   * 남아 더 눈에 띄었다. */
  /* 가로 모음 per-jamo 세로 보정 — 소스 ᅮ의 내림획(0.37em)이 native(0.08~0.15em)보다
   * 훨씬 길어 종성 자리와 충돌하므로 슬롯별로 압축하고 weight로 획 두께를 보상한다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="m"][data-jamo="ᅳ"] {
    --fy-m-top: -6.2%;
    --fy-m-scale-y: 0.963; /* m 슬롯은 고의 ㅗ와 그의 ㅡ를 함께 쓴다. ㅡ만 bar 두께 0.067em에 맞춘다 */
  }
  /* 받침 없는 ㅗ/ㅛ·ㅜ/ㅠ — 가로 막대를 ㅡ와 같은 0.068em으로(slot 기본값 0.762는 0.053~0.060em으로
   * 얇아 "도·두"의 막대가 "그"보다 가늘었다, 획 굵기 감사 B 72%). 막대 윗선은 그대로 두고, 길어진
   * 꼭지(ㅗ: 0.257em에서 시작)·내림획(ㅜ: 0.74em에서 멈춤)은 slot clip의 한쪽만 잘라 예전 길이로 둔다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="m"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-m-top: 3.18%;
    --fy-m-scale-y: 0.864;
    --fy-m-clip: inset(25.5% -1em -1em -1em);
  }
  /* ㅛ — 꼭지 둘이 초성 밑획(ㅌ·ㄹ 0.535em)을 뚫고 0.40em까지 올라와 툐·료가 12.9%(도면 외곽선
   * 15.1%) 포개졌다. 꼭지를 초성 밑에서 시작하게(요의 0.52em과 같게) 위쪽을 더 자른다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="m"][data-jamo="ᅭ"] {
    --fy-m-clip: inset(35% -1em -1em -1em);
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="m"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"]) {
    --fy-m-top: 2.85%;
    --fy-m-scale-y: 0.914;
    --fy-m-clip: inset(-1em -1em 22.2% -1em);
  }
  /* 받침 있는 ㅜ/ㅠ — 이전 값(0.36, weight 800)은 막대가 0.037em으로 ㅡ(글 0.067em)의 절반이고
   * 내림획만 0.11em으로 굵었다(획 굵기 감사 B 54%). 다른 가로모음과 같은 weight로 두고 막대를
   * 0.068em에 맞춘 뒤, 내림획은 아래쪽만 잘라 예전처럼 받침 위(0.387em)에서 멈춘다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="mt"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"]) {
    --fy-mt-top: -8.94%;
    --fy-mt-scale-y: 0.816;
    --fy-mt-weight: 600;
    --fy-mt-clip: inset(-1em -1em 39.4% -1em);
  }
  /* bottom-closed ㅗ(곡/논/몸/속) — 이전 값(scale-y 0.419)은 bar가 0.04em·[0.31,0.35]로
   * 기준([0.41~0.50] 두께 0.067)보다 높고 얇아, 기둥이 초성 안으로 올라가 ㅎ/ㅊ 초성과
   * 42~58% 포갰다(혹/촌 — TRK-033). 두께를 맞춰 bar를 기준 평균 [0.445,0.515]에 두고
   * (받침은 context 레이어의 ㅗ 문맥 받침 규칙이 [0.575,0.86]으로 줄인다), 소스 ᅩ의 긴
   * 기둥은 초성 밑(0.275)에서 자른다: inset 비율 = (0.275 - 노드 원점 -0.061em) / 0.88em.
   * ㅇ/ㅎ/ㅊ 초성은 밑동이 더 낮아 context 규칙이 자르는 높이만 바꾼다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-mt-top: -17.62%;
    --fy-mt-scale-y: 0.88;
    --fy-mt-weight: 700;
    --fy-mt-clip: inset(38.2% -1em -1em -1em);
  }
  /* split-open ㅗ(과/돠/화) — 막대 0.068em(이전 0.919·weight 500은 0.054em), 꼭지는 위쪽만 잘라
   * 예전 시작점(0.22em)을 지킨다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="ml"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-ml-top: 0.61%;
    --fy-ml-left: -2.3%;
    --fy-ml-size: 0.728em;
    --fy-ml-scale-y: 1.103;
    --fy-ml-weight: 600;
    --fy-ml-clip: inset(26.5% -1em -1em -1em);
  }
  /* split-open ㅜ(ㅝ/ㅞ/ㅟ) — 받침이 없어 기준은 기둥을 0.85까지 길게 내린다
   * (뒤/둬/뭐 bar [0.45,0.53], 기둥 끝 0.847). 이전 값(scale-y 0.62)은 bar 0.04em·기둥 끝
   * 0.64로 눌려 bar가 초성 밑동(0.46)과 포개졌다(뒤 27%, 웨 19% — TRK-033). 초성 쪽은
   * context 레이어의 ㅜ 문맥 tls 규칙이 함께 줄인다. 지금 잉크 [0.455,0.83]. */
  :where([data-fy-font="gothic"]) [data-fy-pos="ml"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"]) {
    --fy-ml-top: -2.28%;
    --fy-ml-left: -0.6%;
    --fy-ml-size: 0.73em;
    --fy-ml-scale-y: 1.162;
    --fy-ml-weight: 600;
  }
  /* split-closed ㅜ(권/원/월) — 이전 값(scale-y 0.58)은 bar가 0.034em로 기준(권 [0.473,0.533])의
   * 절반 두께였다. 두께를 맞추면 내림획이 0.83까지 내려와 받침을 뚫으므로 0.615 아래를 자른다:
   * 1 - (0.615 - 노드 원점 0.153em) / (1.056 × 0.76em). 잉크 bar [0.47,0.537]. */
  :where([data-fy-font="gothic"]) [data-fy-pos="mtl"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"]) {
    --fy-mtl-top: 0.26%;
    --fy-mtl-left: -0.3%;
    --fy-mtl-size: 0.76em;
    --fy-mtl-scale-y: 1.056;
    --fy-mtl-weight: 600;
    --fy-mtl-clip: inset(-1em -1em 42.4% -1em);
  }
  /* 둥근 자모(ㅇ) 보정 — 광폭·납작 슬롯(t/brs/b)에서 ㅇ이 짜부라진 타원이 되지 않게
   * native 실측(오 ㅇ x[0.20,0.66] y[0.02,0.50], 강 ㅇ x[0.28,0.62] y[0.50,0.86])으로 재사상. */
  :where([data-fy-font="gothic"]) [data-fy-pos="t"][data-jamo="ᄋ"] {
    --fy-t-top: -22.9%;
    --fy-t-left: -6%;
    --fy-t-size: 1.192em;
    --fy-t-scale-x: 0.958;
    --fy-t-scale-y: 0.82;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="brs"][data-jamo="ᆼ"] {
    --fy-brs-top: 21.2%;
    --fy-brs-left: -2.4%;
    --fy-brs-size: 0.894em;
    --fy-brs-scale-y: 0.765;
  }
  /* bottom 받침 ㅇ(응/공/궁/용) — 기준은 받침 폭 전체의 납작한 타원 x[0.127,0.745] y[0.547,0.865]다.
   * 이전 값은 x[0.28,0.66] y[0.58,0.913]의 작은 원이라 밑선(0.86) 아래로 0.05em 빠졌다(TRK-033). */
  :where([data-fy-font="gothic"]) [data-fy-pos="b"][data-jamo="ᆼ"] {
    --fy-b-top: 24.42%;
    --fy-b-left: -4.03%;
    --fy-b-size: 0.68em;
    --fy-b-scale-x: 1.61;
    --fy-b-scale-y: 0.93; /* 잉크 x[0.13,0.74] y[0.555,0.865] */
  }
  /* ㅎ/ㅊ — 소스 글리프가 평균(0.49em)보다 크게 그려져(0.545em) 기본 스트레치를 그대로
   * 받으면 획이 뭉개진다. 세로 스트레치를 실측 비율로 완화한다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="tlo"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"]) {
    --fy-tlo-top: -23.1%;
    --fy-tlo-scale-y: 1.245;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="tlc"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"]) {
    --fy-tlc-top: -20.6%;
    --fy-tlc-scale-y: 1.161;
  }
  /* tt(bottom-closed) 슬롯의 둥근 자모/ㅎ — 광폭·초납작 기본값이 ㅇ을 로젠지로,
   * ㅎ을 얼룩으로 만들어 재사상한다 (울/응, 흙/훙 계열). */
  :where([data-fy-font="gothic"]) [data-fy-pos="tt"][data-jamo="ᄋ"] {
    --fy-tt-top: -21.2%;
    --fy-tt-left: -4.6%;
    --fy-tt-size: 1.02em;
    --fy-tt-scale-y: 0.632;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="tt"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"]) {
    --fy-tt-top: -20%;
    --fy-tt-scale-y: 0.48;
  }
  /* ᆺ/ᆻ — 소스 잉크가 유난히 넓어(0.62em) 겹받침 오른칸에서 과대해 보임 → 축소 (값/없). */
  :where([data-fy-font="gothic"]) :is([data-fy-pos="brd"], [data-fy-pos="br"]):is([data-jamo="ᆺ"], [data-jamo="ᆻ"]) {
    --fy-brd-size: 0.588em;
    --fy-br-size: 0.58em;
  }
  /* 초성 ㅇ — 일반 슬롯 스트레치를 그대로 받으면 과대한 정원이 된다 (읽/없/왕).
   * native 비례(폭>높이 타원, 작게)로 재사상한다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="tlc"][data-jamo="ᄋ"] {
    --fy-tlc-top: -21.9%;
    --fy-tlc-left: -6.8%;
    --fy-tlc-size: 0.836em;
    --fy-tlc-scale-y: 0.983;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="ttl"][data-jamo="ᄋ"] {
    --fy-ttl-top: -19.7%;
    --fy-ttl-left: -5.2%;
    --fy-ttl-size: 0.764em;
    --fy-ttl-scale-y: 0.894;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="tlo"][data-jamo="ᄋ"] {
    --fy-tlo-top: -25.3%;
    --fy-tlo-left: -9.6%;
    --fy-tlo-size: 0.986em;
    --fy-tlo-scale-x: 0.852;
    --fy-tlo-scale-y: 1.24;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="tls"][data-jamo="ᄋ"] {
    --fy-tls-top: -20.3%;
    --fy-tls-left: -4.8%;
    --fy-tls-size: 0.728em;
    --fy-tls-scale-x: 1.14;
    --fy-tls-scale-y: 1.164;
  }
  /* 받침 ㅇ (split-right: 왕/횡) — 일반 bbrs보다 크고 납작한 타원으로, 중앙 정렬. */
  :where([data-fy-font="gothic"]) [data-fy-pos="bbrs"][data-jamo="ᆼ"] {
    --fy-bbrs-top: 26.1%;
    --fy-bbrs-left: -2.7%;
    --fy-bbrs-size: 0.758em;
    --fy-bbrs-scale-x: 1.399;
    --fy-bbrs-scale-y: 0.806;
  }
  /* split-closed(ㅘ/ㅚ/ㅝ/ㅟ/ㅢ + 받침) 자모 보정 — TRK-033 획 뭉개짐.
   * 기준 획: ㅎ [0.01,0.45], ㅗ bar [0.513,0.580], 꼬리 ㅣ x[0.673,0.753] 끝 0.53~0.66
   * (받침 ㄱ이면 0.53~0.59, ㄴ이면 0.65), 받침 ㄱ x[0.14,0.76] y[0.57~0.62,0.873].
   * 조합은 ㅎ이 0.48까지 내려와 ㅗ 기둥이 링을 관통했고, ㄱ 받침이 오른쪽 반칸
   * x[0.37,0.76] y[0.52,]에 올라가 ㅗ bar와 33%, 꼬리 ㅣ와 16% 포갰다.
   * syllable depth는 head가 초성+ㅗ를 대신하고 depth 블록이 bbrs/ttr을 따로 적합했으므로
   * 이 보정에서 뺀다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="ttl"][data-jamo="ᄒ"] {
    --fy-ttl-top: -17.41%;
    --fy-ttl-scale-y: 0.919; /* 잉크 [0.003,0.445] */
  }
  /* split-closed ㅗ(곽/관/된/쇤) — slot 기본값은 bar 0.04em·[0.387,0.427]로 기준([0.40,0.475],
   * 0.07em)보다 높고 얇아 초성 밑동과 포갰다(된 59%, 곽 11%). 두께를 맞추면 소스 ᅩ의
   * 기둥(bar의 4.6배)이 초성을 뚫으므로 기둥 윗부분을 초성 밑(0.36)에서 자른다:
   * inset 비율 = (0.36 - 노드 원점 -0.096em) / (1.19 × 0.74em). ㅇ/ㅎ 초성은 context 규칙. */
  :where([data-fy-font="gothic"]) [data-fy-pos="mtl"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-mtl-top: -20.54%;
    --fy-mtl-scale-y: 1.19;
    --fy-mtl-weight: 700;
    --fy-mtl-clip: inset(51.8% -1em -1em -1em); /* 잉크 bar [0.405,0.476], 기둥 0.36~ */
  }
  :where([data-fy-font="gothic"]:not([data-fy-vowel-depth="syllable"])) [data-fy-pos="ttr"][data-jamo="ᅵ"] {
    --fy-ttr-top: -13.21%;
    --fy-ttr-left: 43.48%;
    --fy-ttr-scale-x: 0.719;
    --fy-ttr-scale-y: 0.689; /* 잉크 x[0.675,0.755] y[-0.007,0.57] */
  }
  /* split-closed ㅡ(읜/늰/흰) — mtl 기본값(ㅗ용)을 그대로 받아 bar가 0.04em·[0.393,0.433]로
   * 얇고 높아 ㅎ 링 안에 들어갔다(흰 41%). 기준 bar [0.43~0.46,0.51~0.53], 두께 0.073. */
  :where([data-fy-font="gothic"]) [data-fy-pos="mtl"][data-jamo="ᅳ"] {
    --fy-mtl-top: -17.44%;
    --fy-mtl-scale-y: 1.18;
    --fy-mtl-weight: 600; /* 잉크 bar [0.45,0.523] */
  }
  /* 꼬리 ㅓ(권/원/월) — 기준 x[0.54,0.76](기둥 [0.68,0.76]). 조합은 x[0.40,0.68]로 0.1em 왼쪽이라
   * 곁줄기가 초성(ㄱ/ㅅ/ㅈ) 오른쪽 끝에 박혔다(숸 15%, 권 13%). */
  :where([data-fy-font="gothic"]:not([data-fy-vowel-depth="syllable"])) [data-fy-pos="ttr"][data-jamo="ᅥ"] {
    --fy-ttr-top: -13.21%;
    --fy-ttr-left: 44.29%;
    --fy-ttr-scale-x: 0.753;
    --fy-ttr-scale-y: 0.689; /* 잉크 x[0.54,0.76] y[-0.007,0.57] */
  }
  /* 꼬리 ㅐ(괜/왠/됐) — 기준 x[0.54,0.78]. 조합은 x[0.46,0.75]로 왼기둥이 ㅗ bar 끝과
   * 초성 ㄱ에 박혔다(괜 ttl×ttr 35%). */
  :where([data-fy-font="gothic"]:not([data-fy-vowel-depth="syllable"])) [data-fy-pos="ttr"][data-jamo="ᅢ"] {
    --fy-ttr-top: -13.16%;
    --fy-ttr-left: 37.71%;
    --fy-ttr-scale-x: 0.785;
    --fy-ttr-scale-y: 0.681; /* 잉크 x[0.54,0.78] y[-0.007,0.57] */
  }
  /* 꼬리 ㅐ(split-open ㅙ: 괘/꽤/왜/돼) — 기준 x[0.527,0.78]. 조합은 x[0.507,0.793]로 0.02em 왼쪽·
   * 0.03em 넓어 왼기둥이 초성 오른끝에 박혔다(꽤 ᄁ×ᅢ 19%, 괘 9%). */
  :where([data-fy-font="gothic"]:not([data-fy-vowel-depth="syllable"])) [data-fy-pos="trs"][data-jamo="ᅢ"] {
    --fy-trs-left: 32.87%;
    --fy-trs-scale-x: 0.909;
  }
  :where([data-fy-font="gothic"]:not([data-fy-vowel-depth="syllable"])) [data-fy-pos="ttr"][data-jamo="ᅦ"] {
    --fy-ttr-top: -13.18%;
    --fy-ttr-left: 44.48%;
    --fy-ttr-scale-x: 0.655;
    --fy-ttr-scale-y: 0.692; /* 웬/궨 기준 x[0.50,0.78] — 기본 ttr 가로 이동을 되돌린다 */
  }
  /* 받침 ㄹ(월/궐/괄) — 기준 x[0.14~0.16,0.75~0.79] y[0.52~0.55,0.867]. 조합은 오른쪽 반칸
   * x[0.37,0.77] y[0.513,]이라 두꺼워진 ㅝ bar([0.47,0.537])와 15% 포갰다. */
  :where([data-fy-font="gothic"]:not([data-fy-vowel-depth="syllable"])) [data-fy-pos="bbrs"][data-jamo="ᆯ"] {
    --fy-bbrs-top: 27.47%;
    --fy-bbrs-left: -3.37%;
    --fy-bbrs-scale-x: 1.55;
    --fy-bbrs-scale-y: 0.814; /* 잉크 x[0.15,0.77] y[0.585,0.867] — 꼬리 끝 0.57 아래 */
  }
  :where([data-fy-font="gothic"]:not([data-fy-vowel-depth="syllable"])) [data-fy-pos="bbrs"][data-jamo="ᆨ"] {
    --fy-bbrs-top: 27.08%;
    --fy-bbrs-left: -1.62%;
    --fy-bbrs-scale-x: 1.518;
    --fy-bbrs-scale-y: 0.845; /* 잉크 x[0.16,0.75] y[0.60,0.873] — 꼬리 끝 0.57 아래 */
  }
  /* 자모별 초성 상자 보정 (glyph_fit_jamo_box.py, slot=t) —
   * 한 slot의 affine은 대표 자음 하나에만 맞는다. 나머지 자음은 여기서 잡는다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄀ"], [data-jamo="ᄁ"]) {
    --fy-t-left: -5.44%;
    --fy-t-scale-x: 0.897;
    --fy-t-top: -24.44%;
    --fy-t-scale-y: 0.945;
  }
  /* ㄲ — 두 다리가 ㄱ보다 길게 내려와 꾸·꼬의 막대와 14.7% 포갰다(도면 외곽선에서 16.7%). 조금 줄인다. */
  :where([data-fy-font="gothic"]) [data-fy-pos="t"][data-jamo="ᄁ"] {
    --fy-t-scale-y: 0.905;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄂ"]) {
    --fy-t-left: -4.76%;
    --fy-t-scale-x: 0.897;
    --fy-t-top: -20.56%;
    --fy-t-scale-y: 0.669;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄃ"], [data-jamo="ᄄ"]) {
    --fy-t-left: -5.44%;
    --fy-t-scale-x: 0.917;
    --fy-t-top: -21.11%;
    --fy-t-scale-y: 0.742;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄅ"]) {
    --fy-t-left: -4.76%;
    --fy-t-scale-x: 0.909;
    --fy-t-top: -23.89%;
    --fy-t-scale-y: 0.834;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄆ"]) {
    --fy-t-left: -4.08%;
    --fy-t-scale-x: 0.896;
    --fy-t-top: -21.11%;
    --fy-t-scale-y: 0.738;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄇ"], [data-jamo="ᄈ"]) {
    --fy-t-left: -6.12%;
    --fy-t-scale-x: 0.917;
    --fy-t-top: -25%;
    --fy-t-scale-y: 0.788;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄉ"], [data-jamo="ᄊ"]) {
    --fy-t-left: -9.52%;
    --fy-t-scale-x: 0.983;
    --fy-t-top: -23.33%;
    --fy-t-scale-y: 0.735;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄌ"], [data-jamo="ᄍ"]) {
    --fy-t-left: -10.2%;
    --fy-t-scale-x: 0.983;
    --fy-t-top: -21.67%;
    --fy-t-scale-y: 0.768;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄎ"]) {
    --fy-t-left: -9.52%;
    --fy-t-scale-x: 0.982;
    --fy-t-top: -24.44%;
    --fy-t-scale-y: 0.799;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄏ"]) {
    --fy-t-left: -6.8%;
    --fy-t-scale-x: 0.929;
    --fy-t-top: -23.89%;
    --fy-t-scale-y: 0.958;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄐ"]) {
    --fy-t-left: -5.44%;
    --fy-t-scale-x: 0.907;
    --fy-t-top: -23.33%;
    --fy-t-scale-y: 0.828;
  }
  :where([data-fy-font="gothic"]) [data-fy-pos="t"]:is([data-jamo="ᄑ"]) {
    --fy-t-left: -5.44%;
    --fy-t-scale-x: 0.913;
    --fy-t-top: -23.3%;
    --fy-t-scale-y: 0.75; /* 표: ㅍ 밑획이 ㅛ 꼭지 둘을 덮어 19.5% — 다른 초성(ㅌ·ㅋ)과 같은 높이로 올리고 조금 줄였다 */
  }
}

@layer font-kku.context {
  /* ㅗ/ㅛ 기둥 — 초성이 둥근 자모(ㅇ/ㅎ)면 기둥이 링 내부(counter)까지 침투하므로
   * 링 하단 접점에서 멈추도록 압축하고 weight로 bar 두께를 보상한다 (오/호).
   * ㄱ/ㄴ 등 개방형 초성은 기둥이 빈 중앙을 채우므로 기본값(관통 없음)을 유지한다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄋ"], [data-jamo="ᄒ"])) [data-fy-pos="m"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    /* 막대는 다른 ㅗ와 같은 0.068em(이전 0.542는 0.044em) — 길어진 꼭지는 위쪽만 잘라 링 아랫선(0.37em)에서 시작 */
    --fy-m-top: 6.98%;
    --fy-m-scale-y: 0.851;
    --fy-m-weight: 700;
    --fy-m-clip: inset(33.9% -1em -1em -1em);
  }
  /* split 슬롯도 같은 이유다. ml은 ㅇ/ㅎ 공통, mtl은 초성별로 나눈다 — 같은 레이어·같은
   * 특이도의 두 규칙이 한 노드에서 값을 나눠 갖지 않도록 초성 조건을 서로 배타적으로 쓴다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄋ"], [data-jamo="ᄒ"])) [data-fy-pos="ml"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-ml-top: 3.79%;
    --fy-ml-scale-y: 1.061;
    --fy-ml-weight: 700;
    --fy-ml-clip: inset(38.5% -1em -1em -1em); /* 막대 0.068em(이전 0.52는 0.033em), 꼭지는 링 밑 0.343em부터 */
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"][data-jamo="ᄋ"]) [data-fy-pos="mtl"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-mtl-top: -12.55%;
    --fy-mtl-scale-y: 1.073;
    --fy-mtl-weight: 700;
    --fy-mtl-clip: inset(45.4% -1em -1em -1em); /* 막대 0.068em(이전 0.631은 0.040em), 밑선 0.363em 그대로. 기둥은 0.21em부터 */
  }
  /* ㅎ 초성 + split ㅗ (획/횤) — ㅎ은 ㅇ보다 세로로 길어서 같은 bar 높이를 쓰면
   * 기둥이 링을 관통한다. native는 bar를 0.04em 낮추고 두껍게 그린다([0.513,0.580]).
   * 두께를 맞추려고 세로로 늘린 소스 ᅩ는 기둥이 0.31em이라 링(ttl ㅎ, 끝 0.445)을
   * 뚫고 가로획까지 올라갔다(획 19% — TRK-033). 기둥 윗부분만 slot clip으로 잘라
   * 링 밑동(0.43)에서 멈춘다: inset 비율 = (0.43 - 노드 원점 0.036em) / (1.135 × 0.74em). */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"][data-jamo="ᄒ"]) [data-fy-pos="mtl"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-mtl-top: -9.54%;
    --fy-mtl-scale-y: 1.135;
    --fy-mtl-weight: 700;
    --fy-mtl-clip: inset(46.9% -1em -1em -1em);
  }
  /* ㅎ 초성 + split-closed ㅡ(흰/흴) — 링이 0.445까지 내려오므로 bar를 [0.49,0.563]으로
   * 내린다(기준 흰 [0.533,0.607]; 받침 머리 0.585~0.60 위에서 멈춘다). */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"][data-jamo="ᄒ"]) [data-fy-pos="mtl"][data-jamo="ᅳ"] {
    --fy-mtl-top: -14.11%;
  }
  /* split-open ㅜ 문맥의 초성(뒤/웨/위/궈/쉬) — ㅜ bar가 ㅗ/ㅡ보다 높은 [0.455,0.53]에
   * 오므로 초성은 기준처럼 0.36~0.41에서 끝나야 한다(뒤 ㄷ [0.04,0.36], 웨 ㅇ ~0.38,
   * 위 ㅇ 0.413). tls 기본값은 과/의(bar 0.46~0.61) 기준이라 초성이 0.46까지 내려와
   * bar와 포갰다. 세로만 줄인다. ㅇ은 자모 규칙 값을 대체하므로 따로 준다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="ml"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"])) [data-fy-pos="tls"] {
    --fy-tls-top: -19.5%;
    --fy-tls-scale-y: 0.96;
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="ml"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"])) [data-fy-pos="tls"][data-jamo="ᄋ"] {
    --fy-tls-top: -19.9%;
    --fy-tls-scale-y: 1.014;
  }
  /* ㅎ은 예외 — 기준 휘/훼는 ㅎ을 크게 두고(링 끝 0.45~0.50) ㅜ bar를 내린다
   * (휘 [0.547,..], 훼 [0.48,0.55]). ㅎ [0,0.465], ㅜ [0.505,0.85]로 둔다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="ml"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"])) [data-fy-pos="tls"][data-jamo="ᄒ"] {
    --fy-tls-top: -22.57%;
    --fy-tls-scale-y: 1.162;
  }
  /* ㄱ/ㅋ은 반대로 짧아서 기준이 ㅜ bar를 올려 ㄱ 기둥 끝에 붙인다(궈/궤/뀌 [0.40,0.47],
   * 귀 [0.433,0.507]). ㅜ [0.41,0.82]. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="tls"]:is([data-jamo="ᄀ"], [data-jamo="ᄁ"], [data-jamo="ᄏ"])) [data-fy-pos="ml"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"]) {
    --fy-ml-top: -9.21%;
    --fy-ml-scale-y: 1.276;
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="tls"][data-jamo="ᄒ"]) [data-fy-pos="ml"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"]) {
    --fy-ml-top: 3.6%;
    --fy-ml-scale-y: 1.074;
  }
  /* right:double(값/없/읽/닭/밟) — 겹받침은 홑받침보다 높이(0.507~)에서 시작하므로
   * 기준의 세로모음 기둥은 0.467~0.487에서 끝난다(한 0.640). trc 기본값(끝 0.620)을
   * 그대로 쓰면 기둥이 겹받침 오른칸(ㅅ/ㄱ) 머리를 16% 관통했다(TRK-033).
   * 기둥 끝만 0.475로 줄인다 — 가로 위치는 홑받침 음절과 같은 trc 값을 유지한다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="brd"]) [data-fy-pos="trc"] {
    --fy-trc-top: -14.11%;
    --fy-trc-scale-y: 0.593;
  }
  /* ㅎ 초성 + 받침 없는 ㅜ/ㅠ(후·휴) — ㅎ이 0.59em까지 내려와 ㅜ 막대(0.55em~)와 11%, 도면 외곽선에서
   * 15.3% 포갰다. 기준(Apple SD Gothic Neo) 후는 ㅜ 막대를 구(0.415)보다 낮은 [0.570,0.670]에 두고
   * ㅎ을 그 위에서 끝낸다. 같은 방식으로 ㅎ을 줄이고 막대를 내리되, 내림획 끝(0.89em)은 아래 clip으로 유지한다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="m"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"])) [data-fy-pos="t"][data-jamo="ᄒ"] {
    --fy-t-scale-y: 0.78;
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="t"][data-jamo="ᄒ"]) [data-fy-pos="m"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"]) {
    --fy-m-top: 4.6%;
    --fy-m-clip: inset(-1em -1em 24.2% -1em);
  }
  /* ㅎ/ㅊ 초성 + bottom-closed(흙/흘/츨) — 소스가 커서 링이 슬릿으로 짜부라지므로
   * ㅎ 압축을 완화하고(아래 tt 규칙, 잉크 [0,0.38]) ㅡ를 링 아래로 내린다.
   * 기준(Apple SD Gothic Neo) 흙/흘: 링 끝 0.40, ㅡ [0.44,0.51], 받침 0.56~.
   * TRK-033: 이전 값 -17.7%는 mt scale-y를 0.839→0.646으로 줄인 round8b 뒤에 갱신되지
   * 않아 ㅡ가 0.30em(링 하단)에 올라가 링과 40% 포개졌다. 지금 ㅡ 잉크 [0.428,0.501]. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])) [data-fy-pos="mt"][data-jamo="ᅳ"] {
    --fy-mt-top: -7.03%;
  }
  /* 홑받침(b)이면 기준은 받침을 [0.56~0.62,0.86]으로 줄이고 ㅎ과 ㅡ를 더 내린다
   * (흘 ㅡ [0.447,0.513], 흑 [0.487,0.553], 흠 [0.473,0.540]). 겹받침(흙/흝)은 받침이
   * 원래 0.53에서 시작하므로 위 값을 쓰고, 홑받침만 ㅡ [0.455,0.528]·ㅎ/ㅊ [0,0.405]·
   * 받침 [0.575,0.86]으로 나눈다. 특이도가 위 규칙보다 높아 홑받침에서 이긴다.
   * ᆼ 받침은 자모 규칙([0.58,0.91])이 이미 ㅡ 아래라 받침 규칙에서 뺀다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])):has([data-fy-pos="b"]) [data-fy-pos="mt"][data-jamo="ᅳ"] {
    --fy-mt-top: -4.78%;
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])):has([data-fy-pos="mt"][data-jamo="ᅳ"]):has([data-fy-pos="b"]) [data-fy-pos="tt"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"]) {
    --fy-tt-top: -21.4%;
    --fy-tt-scale-y: 0.708;
  }
  /* bottom-closed ㅗ의 초성별 기둥 — ㅇ 링은 0.327, ㅎ/ㅊ은 0.38까지 내려오므로 자르는
   * 높이를 그 밑동에 맞춘다(기둥이 링을 뚫지 않고 밑동에 닿는다). */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"][data-jamo="ᄋ"]) [data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-mt-clip: inset(42.7% -1em -1em -1em); /* (0.315 + 0.061em) / 0.88em */
  }
  /* ㅎ/ㅊ + bottom-closed ㅗ(혹/홍/촌) — 기준은 ㅎ을 [0,0.44]로 크게 두고 bar [0.50,0.567],
   * 받침 0.62~로 내린다. ㅎ/ㅊ [0,0.43], bar [0.49,0.56], 받침 [0.615,0.86]. */
  /* 홑받침에서만 — 겹받침(bl/br)은 0.527부터라 bar를 내릴 자리가 없어 기본 bar를 쓴다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])):has([data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"])):has([data-fy-pos="b"]:not([data-jamo="ᆯ"])) [data-fy-pos="tt"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"]) {
    --fy-tt-top: -21.9%;
    --fy-tt-scale-y: 0.75;
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])) [data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-mt-clip: inset(49% -1em -1em -1em); /* 겹받침·받침 없음: (0.37 + 0.061em) / 0.88em */
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])):has([data-fy-pos="b"]:not([data-jamo="ᆯ"])) [data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-mt-top: -13.87%;
    --fy-mt-clip: inset(49% -1em -1em -1em); /* 홑받침: (0.415 + 0.016em) / 0.88em */
  }
  /* ㅎ/ㅊ + ㄹ 받침(홀/촐) — 기준 bar 홀 [0.447,0.513]·촐 [0.407,0.473], ㄹ은 0.53~0.56부터.
   * ㅎ/ㅊ은 키우지 않고 bar [0.425,0.495], ㄹ [0.535,0.86]. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])):has([data-fy-pos="b"][data-jamo="ᆯ"]) [data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-mt-top: -19.29%;
    --fy-mt-clip: inset(51.3% -1em -1em -1em); /* (0.37 + 0.081em) / 0.88em */
  }
  /* ㄹ 받침(골/놀/돌/올) — 기준은 ㄹ을 [0.49,0.86]로 길게 두고 ㅗ bar를 [0.36~0.38,0.42~0.45]로
   * 올린다. bar [0.37,0.44], 받침은 기본 b 그대로(아래 ㅗ 문맥 받침 규칙에서 ᆯ을 뺀다).
   * ㅎ/ㅊ(홀/촐)은 위 홑받침 규칙이 특이도로 이긴다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="b"][data-jamo="ᆯ"]) [data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-mt-top: -23.87%;
    --fy-mt-clip: inset(46.7% -1em -1em -1em); /* (0.275 + 0.136em) / 0.88em */
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"][data-jamo="ᄋ"]):has([data-fy-pos="b"][data-jamo="ᆯ"]) [data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"]) {
    --fy-mt-clip: inset(51.3% -1em -1em -1em); /* 올: (0.315 + 0.136em) / 0.88em */
  }
  /* ㄹ 받침 위 ㅜ/ㅠ(울/율/귤/휼) — 기준은 내림획 끝을 ㄹ 윗획에 용접한다(율 다리 [0.433,0.527],
   * ㄹ 0.527~). 조합은 내림획이 0.533까지 내려와 ㄹ 윗획(0.487~)을 절반 넘게 관통했다(ㅠ 17%,
   * ㅜ 11%). 내림획만 ㄹ 윗획 한 픽셀 아래(0.495)에서 자른다 — 윗변(0.487)에 딱 맞추면 AA 이음매가
   * 회색 줄로 남는다. 2026-10 막대 두께를 ㅡ에 맞추며(배율 0.36 → 0.816) 내림획 끝(0.346em)을
   * 지키도록 다시 셈했다: 1 - (0.346 + 0.107em) / 0.816. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="b"][data-jamo="ᆯ"]) [data-fy-pos="mt"]:is([data-jamo="ᅮ"], [data-jamo="ᅲ"]) {
    --fy-mt-clip: inset(-1em -1em 44.5% -1em);
  }
  /* ㅠ + 꼭지 있는 받침(ㅊ·ㅎ·ㅈ) — 내림획 둘이 받침 꼭지(0.465em~)까지 내려와 윷·귳 14.3%·윻 13.2%
   * (레트로 외곽선에서 15.1%) 포갰다. 내림획을 꼭지 위에서 멈춘다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="b"]:is([data-jamo="ᆾ"], [data-jamo="ᇂ"], [data-jamo="ᆽ"])) [data-fy-pos="mt"][data-jamo="ᅲ"] {
    --fy-mt-clip: inset(-1em -1em 43% -1em);
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])):has([data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"])) [data-fy-pos="b"]:not([data-jamo="ᆼ"], [data-jamo="ᆯ"]) {
    --fy-b-top: 31%;
    --fy-b-scale-y: 0.447;
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])):has([data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"])) [data-fy-pos="b"][data-jamo="ᆯ"] {
    --fy-b-top: 21.81%;
    --fy-b-scale-y: 0.5925;
    --fy-b-weight: 700;
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])):has([data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"])) [data-fy-pos="b"][data-jamo="ᆼ"] {
    --fy-b-top: 29.37%;
    --fy-b-scale-y: 0.81; /* 홍/총 ㅇ [0.60,0.87] — 기준 홍 [0.600,0.873] */
  }
  /* bottom-closed ㅗ 문맥 홑받침 — 기준은 ㅗ 음절에서 받침을 0.57~0.62부터 그린다(곡 0.573,
   * 혹 0.62). bar [0.445,0.515] 밑으로 [0.575,0.86]에 줄인다. ᆼ은 자모 규칙([0.555,])이, ᆯ은
   * 위 ㄹ 받침 규칙(bar를 올리고 받침은 그대로)이 맡는다. */
  :where([data-fy-font="gothic"]) [part="glyph"]:has([data-fy-pos="mt"]:is([data-jamo="ᅩ"], [data-jamo="ᅭ"])) [data-fy-pos="b"]:not([data-jamo="ᆼ"], [data-jamo="ᆯ"]) {
    --fy-b-top: 26.4%;
    --fy-b-scale-y: 0.52;
    --fy-b-weight: 700;
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])):has([data-fy-pos="mt"][data-jamo="ᅳ"]) [data-fy-pos="b"]:not([data-jamo="ᆼ"]) {
    --fy-b-top: 26.4%;
    --fy-b-scale-y: 0.52;
    --fy-b-weight: 700;
  }
  :where([data-fy-font="gothic"]) [part="glyph"]:has([part~="choseong"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"])) [data-fy-pos="tt"]:is([data-jamo="ᄒ"], [data-jamo="ᄎ"]) {
    --fy-tt-top: -20.9%;
    --fy-tt-scale-y: 0.67;
  }
}
