@font-face{font-family:SurnameKaiTi;src:url('./kaiti-surnames.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:PhoneticArabic;src:url('/assets/fonts/ScheherazadeNew-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
.surnames-page{--surname-bg:#112738;--surname-card:#1a3040;--surname-line:#3a5060;--surname-ink:#f2f5f7;--surname-muted:#a8bdcb;--surname-accent:#6ec9c5;background:var(--surname-bg);color:var(--surname-ink)}
html[data-theme=light] .surnames-page{--surname-bg:#f6f7f5;--surname-card:#ffffffb8;--surname-line:#d4dfe3;--surname-ink:#20394e;--surname-muted:#607587;--surname-accent:#147c7a}
.surnames-page .site-header{position:relative;background:var(--surname-bg);border-bottom:1px solid var(--surname-line)}.surnames-page .site-footer{border-top:1px solid var(--surname-line)}.surnames-page [hidden]{display:none!important}.surnames-page .shell{max-width:1280px}
.surname-hero{position:relative;isolation:isolate;overflow:hidden;min-height:310px}.surname-hero-inner{position:relative;min-height:310px;display:flex;align-items:center;padding-block:34px 58px}.surname-heading{position:relative;z-index:1;width:74%;max-width:850px}.surname-kicker{font-size:11px;color:var(--surname-muted);display:flex;align-items:center;gap:12px}.surname-kicker:before{content:'';width:32px;height:2px;background:var(--orange)}.surname-heading h1{font-size:clamp(28px,3vw,43px);font-weight:500;line-height:1.9;letter-spacing:-.025em;margin-block:10px 6px}.surname-intro{font-size:14px;line-height:2;color:var(--surname-muted)}.surname-hundred{font:400 clamp(160px,19vw,270px)/1 Century,sans-serif;letter-spacing:-.09em;direction:ltr;position:absolute;inset-inline-end:4%;top:22px;color:var(--surname-ink);opacity:.095;user-select:none}.surname-mountains{position:absolute;z-index:-1;inset:0;background:url('./mountains.webp') center 64%/cover no-repeat;filter:grayscale(1) invert(1);mix-blend-mode:screen;opacity:.24;mask-image:linear-gradient(#0000,#000 45%,#000 80%,#0000)}
html[data-theme=light] .surname-mountains{filter:none;mix-blend-mode:multiply;opacity:.8;mask-image:linear-gradient(#0000,#000 35%,#000 90%,#0000)}
.surname-directory{padding-bottom:54px}.surname-search{display:flex;align-items:center;gap:14px;height:62px;padding-inline:20px 10px;border:1px solid var(--surname-line);border-radius:9px;background:var(--surname-card);color:var(--surname-muted);transition:border-color .15s}.surname-search:focus-within{border-color:var(--surname-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--surname-accent) 14%,transparent)}.surname-search input{font:inherit;font-size:13px;min-width:0;width:100%;height:100%;border:0;outline:0;background:none;color:var(--surname-ink)}.surname-search input::placeholder{color:var(--surname-muted);opacity:1}.surname-search input::-webkit-search-cancel-button{display:none}.surname-clear{flex:none;width:44px;height:44px;display:grid;place-items:center;background:none;border:0;color:var(--surname-muted);border-radius:6px}.surname-clear:hover{color:var(--surname-ink)}
.surname-browse{display:flex;align-items:center;gap:24px;margin-top:20px;border-bottom:1px solid var(--surname-line);padding-bottom:8px}.surname-sort{display:flex;gap:14px;align-items:center;flex:none}.surname-sort button,.surname-alphabet button{position:relative;border:0;background:none;color:var(--surname-muted);min-height:44px;border-radius:3px;padding:5px 2px}.surname-sort button{font-size:11px;white-space:nowrap}.surname-sort [data-sort=alpha]{font:400 17px Century,sans-serif;min-width:48px}.surname-sort button:after,.surname-alphabet button:after{content:'';height:2px;position:absolute;inset-inline:0;bottom:-9px;background:var(--orange);opacity:0}.surname-browse button[aria-pressed=true]{color:var(--orange)}.surname-browse button[aria-pressed=true]:after{opacity:1}.surname-browse button:hover:not(:disabled){color:var(--surname-ink)}.surname-browse button[aria-pressed=true]:hover{color:var(--orange)}.surname-alphabet{display:flex;justify-content:space-between;gap:3px;flex:1;min-width:0;padding-inline-start:18px;border-inline-start:1px solid var(--surname-line)}.surname-alphabet button{font:400 15px Century,sans-serif;flex:1;min-width:22px}.surname-alphabet button:disabled{opacity:.3;cursor:default}
.surname-results-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:55px;padding-block:9px}.surname-count{font-size:10px;color:var(--surname-muted)}.surname-reset,.surname-reset-empty{font-size:11px;background:none;border:0;color:var(--surname-accent);padding:8px 0;text-decoration:underline;text-underline-offset:5px}
.surname-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px}.surname-card{min-width:0;display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;align-items:center;min-height:122px;padding:17px 24px 17px 16px;border:1px solid var(--surname-line);border-radius:10px;background:var(--surname-card);transition:border-color .15s,background .15s}.surname-card:has(.surname-play[aria-pressed=true]){border-color:var(--surname-accent)}.surname-character{display:flex;align-items:center;justify-content:space-between;gap:14px}.surname-rank{font:400 10px Century,sans-serif;color:var(--surname-muted);align-self:flex-start;padding-top:8px;min-width:15px}.surname-character h2{font:400 64px/1.1 SurnameKaiTi,KaiTi,STKaiti,serif;text-align:center;flex:1;color:var(--surname-ink)}.surname-readings{min-width:0}.surname-reading{display:flex;align-items:center;gap:16px;min-height:84px}.surname-reading+.surname-reading{border-top:1px solid var(--surname-line);margin-top:12px;padding-top:12px}.surname-pronunciation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;flex:1;min-width:0}.surname-pinyin{font:400 26px/1.25 Century,sans-serif;white-space:nowrap;display:block;padding-top:5px}.surname-arabic{font:400 26px/1.45 PhoneticArabic,serif;color:var(--surname-muted);display:block}.surname-written{display:inline-flex;direction:ltr;white-space:nowrap;line-height:1.25}.surname-vowel{position:relative;display:inline-block}.surname-accent{position:absolute;width:.46em;height:auto;left:50%;transform:translateX(-50%);top:.006em;fill:none;stroke:currentColor;stroke-width:7.5;stroke-linecap:round;stroke-linejoin:round;overflow:visible}.surname-accent[data-tone="1"]{top:.225em}.surname-accent[data-tone="3"]{width:.55em;top:.07em}.surname-vowel.has-umlaut .surname-accent{margin-top:-.23em}
.surname-play{display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:50%;border:1px solid var(--surname-accent);color:var(--surname-accent);background:none;transition:background .15s,color .15s}.surname-play:hover,.surname-play[aria-pressed=true]{background:var(--surname-accent);color:var(--surname-bg)}.surname-play .icon{width:23px;height:23px}.surname-play[data-loading=true]{opacity:.65}.surname-empty{padding:60px 20px;text-align:center;border:1px dashed var(--surname-line);border-radius:10px;font-size:14px}.surname-empty button{margin-top:12px}.surname-source{display:flex;align-items:flex-start;justify-content:space-between;gap:30px;margin-top:30px;padding-top:22px;border-top:1px solid var(--surname-line);color:var(--surname-muted);font-size:10px;line-height:2.2}.surname-source details{max-width:740px}.surname-source summary{cursor:pointer;min-height:32px}.surname-source p{margin-top:10px}.surname-source a{text-decoration:underline;text-underline-offset:4px}.surname-top{display:flex;align-items:center;gap:10px;flex:none}.surname-top span{font-size:18px}
html[lang=zh-Hans] .surname-heading h1{font-size:clamp(32px,3.8vw,50px);font-weight:300;line-height:1.5;margin-top:20px}html[lang=zh-Hans] .surname-intro{font-size:22px}html[lang=zh-Hans] .surname-kicker{font-size:16px}html[lang=zh-Hans] .surname-search input{font-size:20px}html[lang=zh-Hans] .surname-sort [data-sort=rank]{font-size:17px}html[lang=zh-Hans] .surname-count,html[lang=zh-Hans] .surname-source{font-size:15px}html[lang=zh-Hans] .surname-reset,html[lang=zh-Hans] .surname-reset-empty,html[lang=zh-Hans] .surname-empty{font-size:18px}
@media(max-width:1150px){.surname-browse{display:block}.surname-sort{margin-bottom:14px;gap:28px}.surname-sort button:after{bottom:0}.surname-alphabet{border:0;padding:0;gap:6px}.surname-hero,.surname-hero-inner{min-height:285px}.surname-heading{width:80%}.surname-heading h1{font-size:32px}.surname-hundred{font-size:220px;inset-inline-end:0;top:40px}}
@media(max-width:760px){.surnames-page .shell{width:calc(100% - 40px)}.surname-hero,.surname-hero-inner{min-height:260px}.surname-hero-inner{padding-block:30px 54px}.surname-heading{width:100%}.surname-heading h1{font-size:clamp(25px,5.5vw,34px);line-height:1.9}.surname-intro{font-size:11px;max-width:85%}.surname-hundred{font-size:190px;top:40px;opacity:.055}.surname-mountains{background-size:auto 100%;background-position:25% center;opacity:.2}html[data-theme=light] .surname-mountains{opacity:.55}.surname-grid{grid-template-columns:1fr;gap:12px}.surname-card{padding-inline:18px;grid-template-columns:105px minmax(0,1fr);min-height:112px}.surname-character h2{font-size:61px}.surname-search{height:56px;padding-inline:14px 5px;gap:10px}.surname-search input{font-size:11px}.surname-search>.icon{width:21px}.surname-browse{margin-top:14px}.surname-sort{margin-bottom:9px}.surname-sort button{font-size:10px}.surname-alphabet{overflow-x:auto;padding-block:0 8px;scrollbar-width:thin;scrollbar-color:var(--surname-line) transparent;justify-content:flex-start;gap:0;overscroll-behavior-x:contain}.surname-alphabet button{min-width:42px;min-height:44px;flex:none}.surname-alphabet button:after{bottom:0;inset-inline:10px}.surname-source{flex-direction:column;gap:14px}.surname-directory{padding-bottom:35px}html[lang=zh-Hans] .surname-heading h1{font-size:34px}html[lang=zh-Hans] .surname-intro{font-size:19px}}
@media(max-width:380px){.surnames-page .shell{width:calc(100% - 32px)}.surname-heading h1{font-size:25px}.surname-card{grid-template-columns:87px minmax(0,1fr);gap:6px;padding-inline:12px}.surname-character{gap:8px}.surname-character h2{font-size:55px}.surname-pinyin{font-size:23px}.surname-arabic{font-size:25px}.surname-reading{gap:8px}.surname-play{width:44px;height:44px}.surname-hundred{font-size:160px;top:75px}}
/* The numeral is LTR text, so position it explicitly opposite the reading edge. */
.surname-hundred{inset-inline-end:auto;left:4%;right:auto}
html[dir=ltr] .surname-hundred{left:auto;right:4%}
.surname-search input:placeholder-shown{direction:inherit;text-align:start}
@media(prefers-reduced-motion:reduce){.surname-card,.surname-play,.surname-search{transition:none}}
