/* Language-only chooser, using Allyspan's established palette. */
.language-dialog{box-sizing:border-box;width:min(420px,calc(100% - 32px));max-height:calc(100dvh - 40px);padding:18px 22px;border:1px solid #e7dfcb;border-radius:28px;background:#fdfbf5;color:#294d43;box-shadow:0 22px 80px #16372c33;overflow:auto}
.language-dialog::backdrop{background:rgba(17,35,29,.52);backdrop-filter:blur(4px)}
.language-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:0;border:0}
.language-dialog h2{margin:0;font:400 20px/1.25 Georgia,serif;color:#294d43}
.language-dialog .language-close{position:static;background:none;border:0;color:#294d43;font:400 28px/1 Arial,sans-serif;padding:6px;min-width:40px;min-height:40px;cursor:pointer}
.language-dialog select{box-sizing:border-box;width:100%;min-height:58px;padding:14px 46px 14px 16px;border:1px solid #a4b09f;border-radius:12px;background-color:#fffdf8;color:#294d43;font:400 17px/1.5 Arial,'Noto Sans SC','Microsoft YaHei',sans-serif;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='12' viewBox='0 0 18 12'%3E%3Cpath d='m3 3 6 6 6-6' fill='none' stroke='%23294d43' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:right 16px center;background-repeat:no-repeat}
.language-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:12px}
.language-dialog .language-action{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:8px 14px;min-height:44px;border:0;border-radius:0;background:transparent;color:#856b25!important;font:400 13px/1.5 Arial,sans-serif;cursor:pointer;text-decoration:none;-webkit-text-fill-color:currentColor}
.language-dialog .language-action::before,.language-dialog .language-action::after{content:'';position:absolute;width:15px;height:11px;border:solid #92772d;pointer-events:none}
.language-dialog .language-action::before{top:2px;left:2px;border-width:1px 0 0 1px;border-top-left-radius:9px}
.language-dialog .language-action::after{bottom:2px;right:2px;border-width:0 1px 1px 0;border-bottom-right-radius:9px}
.language-dialog :focus-visible,[data-language-open]:focus-visible{outline:2px solid #92772d;outline-offset:4px}
.language-launch{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;background:transparent;border:0;color:#294d43;cursor:pointer;margin-left:auto}
.language-launch svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.5}
.language-context-note,.article-language-note{font:400 14px/1.7 Arial,sans-serif;color:#52695f;max-width:820px;margin:20px 0;padding:12px 0;border-top:1px solid #ded8c9}
.article-language-badge{display:block;font:400 13px/1.5 Arial,sans-serif;letter-spacing:.02em;margin-top:10px}
html:lang(zh-Hans) body{font-family:Arial,'PingFang SC','Microsoft YaHei',sans-serif}
html:lang(zh-Hans) p,html:lang(zh-Hans) li{line-height:1.85;word-break:normal;overflow-wrap:anywhere}
html:lang(zh-Hans) h1,html:lang(zh-Hans) h2,html:lang(zh-Hans) h3{font-family:Georgia,'Noto Serif SC','Songti SC','SimSun',serif;line-height:1.4}
html:not(:lang(en)) .site-header .header-row{gap:18px}
html:not(:lang(en)) .site-header nav{flex-wrap:wrap;column-gap:20px;row-gap:8px}
@supports((-webkit-background-clip:text) or (background-clip:text)){
.language-dialog .language-action:hover{background-image:linear-gradient(110deg,#856b25 0%,#856b25 42%,#b19a58 50%,#856b25 58%,#856b25 100%);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:language-gold-shimmer 1.8s ease-in-out 1 forwards}
}
@keyframes language-gold-shimmer{from{background-position:100% 50%}to{background-position:-100% 50%}}
@media(prefers-reduced-motion:reduce){.language-dialog .language-action:hover{animation:none;background:none;-webkit-text-fill-color:currentColor}}
@media(forced-colors:active){.language-dialog .language-action:hover{animation:none;background:none;-webkit-text-fill-color:currentColor;color:LinkText!important}}
@media(max-width:600px){.language-dialog{padding:16px 18px;border-radius:20px}}
