*{box-sizing:border-box}body{margin:0;background:#f7f5ee;color:#193f38;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;-webkit-tap-highlight-color:transparent}main{max-width:620px;margin:auto;padding:28px 18px 22px;padding-top:calc(28px + var(--safe-area-inset-top,env(safe-area-inset-top,0px)));padding-bottom:calc(22px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)))}header{display:flex;align-items:center;justify-content:space-between;padding-right:50px}h1{font-size:27px;font-weight:600;letter-spacing:1px;margin:8px 0 0}.eyebrow{font-size:10px;letter-spacing:2px;color:#6b7c6e;margin:0}button{font:inherit;color:inherit;border:0;background:#e5ebe2;cursor:pointer;min-height:44px;border-radius:12px;padding:10px 16px}button:disabled{opacity:.5;cursor:default}button:active{opacity:.7}button:focus,input:focus,summary:focus{outline:2px solid #ad7827;outline-offset:3px}.icon{width:44px;border:1px solid #d6dfd3;border-radius:50%;background:transparent}.subline{display:flex;justify-content:space-between;font-size:13px;color:#6b7c6e;margin:26px 0 14px}.board{display:flex;background:#fffdf6;border:1px solid #dedfd3;border-radius:20px;min-height:285px;padding:12px 5px;overflow:hidden}.board>div{width:16.666%;min-width:0;text-align:center;border-right:1px solid #ecece3;display:flex;flex-direction:column;align-items:center}.board>div:last-child{border:0}.empty{padding-top:10px;font-size:11px;color:#b4bbae}.attempt-number{font-size:11px;color:#849084;margin:8px}.word-svg{height:194px;width:100%;display:block;overflow:visible}.marks{display:flex;justify-content:center;flex-wrap:wrap;padding:8px 2px}.mark{font-size:10px;border-radius:50%;width:15px;height:15px;margin:2px 0;display:inline-flex;align-items:center;justify-content:center;color:white}.legend{display:flex;justify-content:center;flex-wrap:wrap;margin:17px 0;font-size:11px;color:#64746a}.legend span{margin:0 6px 7px}.legend i{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px}.green{background:#278263}.gold{background:#ae7a20}.gray{background:#939b96}#message{min-height:36px;text-align:center;font-size:13px;line-height:1.6;margin:8px 0 14px}label{display:block;font-size:12px;margin-bottom:9px;color:#64746a}.input-row{display:flex}input{width:100%;min-width:0;background:#fffdf6;border:1px solid #d8dfd2;border-radius:12px;padding:14px;font-size:19px;color:#193f38}.input-row button{margin-left:8px;background:#193f38;color:#fff;white-space:nowrap}#preview{height:95px;display:flex;justify-content:center;padding-top:8px}#preview svg{height:85px;width:45px}.hint{font-size:11px;color:#7d867b;line-height:1.7;margin:8px 0}.primary{width:100%;background:#193f38;color:#fff;margin-top:16px}.answer-row{display:flex;align-items:center;justify-content:center;padding:14px 0}#answer-word{width:70px;margin-right:18px}#answer-word svg{height:150px}h2{font-weight:500;font-size:23px;margin:8px 0}#result p{line-height:1.6}footer{display:flex;align-items:center;justify-content:space-between;margin-top:24px;border-top:1px solid #dedfd3;padding-top:14px;font-size:11px;color:#7d867b}footer button{font-size:12px;background:transparent}#help-panel{position:fixed;top:0;left:0;right:0;bottom:0;z-index:5;background:#f7f5ee;padding:38px 24px;padding-top:calc(38px + var(--safe-area-inset-top,env(safe-area-inset-top,0px)));overflow-y:auto;-webkit-overflow-scrolling:touch}#help-panel>*{max-width:560px;margin-left:auto;margin-right:auto}#help-panel p{font-size:14px;line-height:1.9}#help-panel button{display:block;max-width:560px}.source,pre{overflow-wrap:break-word;word-break:break-all;user-select:text;-webkit-user-select:text}pre{white-space:pre-wrap;font-size:11px}[hidden]{display:none!important}@media(min-width:500px){main{padding:38px 30px}.board{min-height:340px}.word-svg{height:240px}.mark{width:18px;height:18px}}@media(max-height:720px){main{padding-top:16px}.subline{margin-top:18px}.board{min-height:235px}.word-svg{height:152px}#preview{height:70px}#preview svg{height:64px}footer{margin-top:12px}}

/* Keep game controls below the host status bar and capsule. */
main{padding-top:calc(64px + var(--safe-area-inset-top,env(safe-area-inset-top,0px)))}
.marks{flex-wrap:nowrap;width:100%;padding:8px 2px}.mark{flex:1;min-width:0;max-width:15px;font-size:9px;height:15px}

/* Wordle-style keyboard, separate unknown and eliminated states. */
main{padding-left:12px;padding-right:12px}.board{min-height:215px}.word-svg{height:145px}.subline{margin:15px 0 10px}.legend{margin:10px 0}#message{min-height:32px;margin:4px 0 8px;font-size:12px}
.draft-line{display:flex;align-items:center;justify-content:space-between;min-height:42px;padding:8px 12px;border-bottom:1px solid #d8dfd2}#guess{font-size:20px;letter-spacing:1px;min-height:25px}#letter-count{font-size:12px;color:#64746a;white-space:nowrap}#preview{height:62px;padding:3px}#preview svg{height:56px;width:42px}
#keyboard{padding:5px 0}.key-row{display:flex;justify-content:center;margin-bottom:6px}.key-row button{flex:1;min-width:0;max-width:56px;margin:0 2px;padding:0;min-height:46px;border-radius:5px;font-size:17px;font-weight:600;background:#dce2db;color:#193f38;touch-action:manipulation}.key-row:last-child button{max-width:130px;font-size:14px}.key-row .grade-0{background:#777f7a;color:white}.key-row .grade-1{background:#a87822;color:white}.key-row .grade-2{background:#278263;color:white}.separator-mark{font-size:18px;font-weight:700;height:16px;line-height:16px}footer{margin-top:10px;padding-top:4px}.answer-row{padding:4px 0}#answer-word svg{height:100px}.primary{margin-top:8px}
@media(max-height:740px){main{padding-top:48px}.board{min-height:180px}.word-svg{height:115px}#preview{height:36px}#preview svg{height:32px}.key-row button{min-height:42px}.subline{margin-top:10px}}
/* Reserve separator feedback without pushing the keyboard below the viewport. */
.word-svg{height:125px}.attempt-number{margin:4px}.marks{padding-top:4px;padding-bottom:4px}
@media(max-height:740px){.word-svg{height:95px}}

@font-face{font-family:MongolLive;src:url('./mongolian.woff') format('woff');font-display:swap}
body,#help-panel{background:#121213;color:#f8f8f8}.board{background:#121213;border-color:#3a3a3c;border-radius:8px}.board>div{border-color:#3a3a3c}.board>.active-column{background:#202022;box-shadow:inset 0 0 0 1px #818384}.eyebrow,.subline,.legend,.hint,footer,#letter-count{color:#b9b9bd}button{background:#272729;color:#f8f8f8}.icon{border-color:#565758}.draft-line,footer{border-color:#3a3a3c}.green{background:#538d4e}.gold{background:#b59f3b}.gray{background:#818384}.key-row button{background:#272729;color:#f8f8f8;border:1px solid #565758}.key-row .grade-0{background:#3a3a3c;border-color:#3a3a3c;color:#b5b5b9}.key-row .grade-1{background:#b59f3b;border-color:#b59f3b;color:white}.key-row .grade-2{background:#538d4e;border-color:#538d4e;color:white}.primary{background:#538d4e}.live-text{font-family:MongolLive;font-size:32px;writing-mode:vertical-lr;text-orientation:mixed;white-space:nowrap;height:145px;max-width:100%;line-height:1.3}.live-word{margin-top:0}#preview{display:none}#keyboard{margin-top:16px}.board{min-height:245px}.word-svg{height:150px}
@media(max-height:740px){.board{min-height:200px}.word-svg{height:110px}.live-text{height:120px;font-size:28px}}

/* Light theme and shared horizontal layouts for Chinese, Cyrillic and English. */
body,#help-panel{background:#fff;color:#202124}.board{background:#fff;border-color:#d3d6da}.board>div{border-color:#e5e7e9}.board>.active-column{background:#f5f6f7;box-shadow:inset 0 0 0 1px #878a8c}.eyebrow,.subline,.legend,.hint,footer,#letter-count{color:#62666a}button{background:#e7e9eb;color:#202124}.icon{border-color:#d3d6da}.draft-line,footer{border-color:#e0e2e4}.green{background:#6aaa64}.gold{background:#c9b458}.gray{background:#787c7e}.key-row button{background:#d3d6da;color:#202124;border-color:#d3d6da}.key-row .grade-0{background:#787c7e;border-color:#787c7e;color:#fff}.key-row .grade-1{background:#b59b3c;border-color:#b59b3c;color:#fff}.key-row .grade-2{background:#538d4e;border-color:#538d4e;color:#fff}.primary{background:#538d4e;color:#fff}.live-text{color:#202124}.language-control{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.language-control label{margin:0;color:#202124}.language-control select{font:inherit;min-height:44px;padding:8px 12px;background:white;color:#202124;border:1px solid #d3d6da;border-radius:8px}h1{font-size:24px;line-height:1.25}.legend span{margin-left:4px;margin-right:4px}#message{min-height:42px}.subline{font-size:12px}#help-panel{padding-bottom:40px}
html[lang="mn"] h1,html[lang="en"] h1{font-size:21px}html[lang="mn"] .legend{font-size:10px}

.header-actions{display:flex;align-items:center}.header-actions button{margin-left:5px;flex-shrink:0}header{padding-right:0;position:relative}.header-actions .icon{width:38px;min-height:38px;padding:6px;font-size:13px}#language-panel{position:absolute;right:14px;top:110px;z-index:7;background:#fff;border:1px solid #d3d6da;border-radius:10px;padding:14px;box-shadow:0 4px 18px #0002}#language-panel .language-control{margin:0}#language-panel select{margin-left:12px}.board-actions{display:flex;justify-content:flex-end}.board-actions button{min-height:32px;padding:4px 0;font-size:12px;background:transparent;text-decoration:underline;text-underline-offset:3px}#timer{font-variant-numeric:tabular-nums;letter-spacing:1px}.key-row .position-disabled{opacity:1;background:#f6f7f8;color:#b8bcc0;border:1px dashed #c9cdd1}.board{min-height:220px}.word-svg{height:125px}#message{min-height:32px;margin-bottom:4px}#keyboard{margin-top:8px}h1{letter-spacing:0}html[lang="mn"] h1,html[lang="en"] h1{font-size:19px}@media(max-height:740px){.board{min-height:180px}.word-svg{height:90px}}

/* Compact header and anchored language popover. */
header h1,html[lang="mn"] header h1,html[lang="en"] header h1{font-size:20px;letter-spacing:3px;margin:0;font-weight:650}
header #language-panel{position:absolute;top:46px;right:0;min-width:132px;padding:5px;background:#fff;border:1px solid #e5e7e9;border-radius:12px;box-shadow:0 8px 25px #0002;z-index:7}
#language-panel button{display:block;width:100%;text-align:left;min-height:44px;background:transparent;border-radius:7px;font-size:14px;padding:10px 13px}
#language-panel button[aria-pressed="true"]{background:#f0f2f3;font-weight:600}
.key-row button svg{vertical-align:middle;pointer-events:none}
#message:empty{min-height:0;margin:0}#message{min-height:0}.draft-line{border-bottom:0}.subline{margin-top:16px}

header h1,html[lang="mn"] header h1,html[lang="en"] header h1{font-size:18px;letter-spacing:1px}

/* Center staggered rows after removing k, z and f. */
.key-row:nth-child(2){padding-left:5%;padding-right:5%}
.key-row:nth-child(3){padding-left:9%;padding-right:9%}
.key-row:nth-child(2) button,.key-row:nth-child(3) button{max-width:56px}

#share-panel{position:fixed;top:0;left:0;right:0;bottom:0;background:#fff;z-index:9;overflow:auto;padding:70px 24px 28px;text-align:center}#score-card{display:block;width:100%;max-width:360px;height:auto;margin:12px auto;border:1px solid #e5e7e9;border-radius:12px}#close-share{display:block;margin-left:auto;font-size:24px;background:transparent}#publish-score{max-width:360px}#share-status{font-size:13px;color:#62666a}

/* Letter feedback uses game transliteration; ng remains one token. */
.marks{flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;padding:7px 0;width:100%}.marks .mark{flex:none;width:auto;max-width:none;min-width:0;height:16px;background:transparent;font-size:11px;font-weight:600;line-height:16px;letter-spacing:0;border-radius:0;margin:0}.board{min-height:220px}
#answer-translit,#answer-cyrl{font-size:26px;line-height:1.35;margin:8px 0}
@media(max-height:740px){.board{min-height:180px}}

#close-share{margin-left:0;margin-right:auto;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:10px;border-radius:50%;background:#f3f4f1}#share-panel{padding-top:calc(70px + var(--safe-area-inset-top,env(safe-area-inset-top,0px)))}

main{padding-top:calc(24px + env(safe-area-inset-top,0px))}#share-panel{padding-top:calc(20px + env(safe-area-inset-top,0px))}#copy-score{max-width:360px;background:#e7e9eb;color:#202124}#share-text{display:block;width:100%;max-width:360px;margin:16px auto;min-height:160px;font:14px monospace}#share-text[hidden]{display:none}

/* Correct physical QWERTY arrangement and bottom-right keycap legends. */
.key-row button{position:relative;overflow:hidden}
.key-row .physical-key{position:absolute;right:4px;bottom:2px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:10px;font-weight:600;line-height:1;letter-spacing:0;color:inherit;opacity:.72;pointer-events:none}
.key-row button[data-key="ng"]{font-size:15px}
.key-row button[data-key="ng"] .physical-key{font-size:10px}
.key-row:nth-child(3){padding-left:13%;padding-right:13%}
@media(max-width:410px){.key-row button{margin-left:1.5px;margin-right:1.5px}.key-row .physical-key{right:3px;bottom:3px;font-size:9px}.key-row:nth-child(2){padding-left:1%;padding-right:1%}.key-row:nth-child(3){padding-left:10%;padding-right:10%}}

/* Physical-key legends for the bottom-row actions */
.key-row:last-child button .physical-key{font-size:10px;right:6px;bottom:4px;white-space:nowrap}
@media(max-width:410px){.key-row:last-child button .physical-key{font-size:9px;right:4px}}
