/* General Old Hangul fallback: preserve the production NAVER font routing. */
@font-face{
 font-family:'XiXi Old Hangul';
 src:url('/static/fonts/NanumBarunGothic-YetHangul.woff2') format('woff2');
 font-style:normal;font-weight:400;font-display:swap;
 unicode-range:U+1100-11FF,U+302E-302F,U+3165-318E,U+A960-A97F,U+D7B0-D7FF;
}

/* Follow-up 1: practice Hangul uses the exact HCR Batang webfont.
   Non-Hangul scripts remain outside this face's unicode-range. */
@font-face{
 font-family:'XiXi Practice Old Hangul';
 src:url('/static/fonts/xixi/XiXi-HCRBatang-Hangul.woff2') format('woff2');
 font-style:normal;font-weight:400;font-display:block;
 unicode-range:U+1100-11FF,U+302E-302F,U+3130-318F,U+A960-A97F,U+AC00-D7A3,U+D7B0-D7FF;
}
.line-original.xixi-old-hangul-font-context,
.line-input.xixi-old-hangul-font-context,
#persistentImeEditor.xixi-old-hangul-font-context{
 font-family:'XiXi Practice Old Hangul',var(--pf);
 font-synthesis:none;
}

.line-original .ch.xixi-spaced-tone,
.line-original .ch[data-xixi-spaced-tone="1"],
.xixi-typed-visual-projection .xixi-typed-projection-token.xixi-spaced-tone{position:relative;display:inline-block;padding-inline-start:.30em}
.line-original .xixi-tone-mark,
.xixi-typed-visual-projection .xixi-tone-mark{position:absolute;left:0;bottom:0;letter-spacing:0;white-space:nowrap}

/* Only an unmarked complete Hangul syllable before a toned syllable needs
   room on its right for the following left-facing tone mark. */
.line-original .ch[data-xixi-before-tone="1"]{margin-inline-end:.30em}

/* Native input/textarea keeps the original Unicode, IME and selection. The
   visual projection moves only a committed tone glyph to match the target;
   unmarked syllables retain the user's ordinary letter spacing. */
.line-original.xixi-old-hangul-tone-input,
.line-input.xixi-old-hangul-tone-input,
#persistentImeEditor.xixi-old-hangul-tone-input{
 word-break:break-all;
 overflow-wrap:anywhere;
}
.line-original.xixi-old-hangul-leading-tone,
.line-input.xixi-old-hangul-leading-tone,
#persistentImeEditor.xixi-old-hangul-leading-tone{padding-inline-start:calc(var(--ppad-h) + .55em)}
/* The tone glyph extends to the left. Keep its visual inset without adding an
   extra advance that the native textarea cannot reproduce. */
.line-original.xixi-old-hangul-tone-input .ch.xixi-spaced-tone,
.line-original.xixi-old-hangul-tone-input .ch[data-xixi-spaced-tone="1"],
.xixi-typed-visual-projection .xixi-typed-projection-token.xixi-spaced-tone{
 margin-inline-start:-.30em;
}
