:root{--ink:#242523;--muted:#797c76;--line:#e7e8e3;--paper:#f7f7f5;--white:#fff}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:14px}button,textarea{font:inherit}button,a,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer;transition:background .2s,transform .2s}button:disabled{cursor:not-allowed;opacity:.35}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #555;outline-offset:4px}button:active:not(:disabled){transform:translateY(1px)}a{color:inherit;text-decoration:none}textarea{resize:vertical;color:var(--ink);background:transparent;line-height:1.8}textarea:focus{outline:2px solid #b9bcb4;outline-offset:3px}textarea::placeholder{color:#9b9e96}.shell{max-width:1120px;margin:auto;padding:0 24px}.topbar{height:46px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:600;letter-spacing:1px}.brand-mark{font-size:20px;font-weight:400;margin:4px 0}.brand-sub{font-size:11px;letter-spacing:1px;color:var(--muted);font-weight:400;margin-left:15px}.quiet,.text-btn{border:0;background:transparent;color:#666b61;padding:6px 10px;min-height:32px;font-size:12px}.quiet:hover,.text-btn:hover{background:#eeefeb;border-radius:8px}.workspace{display:grid;grid-template-columns:1.15fr 1fr;gap:14px;align-items:start}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px}.section-title{display:flex;align-items:center;gap:8px;margin-bottom:10px}.section-title h2{font-size:16px;font-weight:550;margin:0;letter-spacing:1px}.step{font-size:11px;color:#999d93;border:1px solid var(--line);border-radius:50%;height:23px;width:23px;display:grid;place-items:center}.optional{margin-left:auto;font-size:11px;color:var(--muted)}#question{width:100%;border:0;background:#f8f9f6;border-radius:8px;padding:10px;font-size:14px;min-height:72px}.question-foot{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#93978c;margin-top:4px}.divider{height:1px;background:var(--line);margin:14px 0}.helper{font-size:12px;line-height:1.9;color:var(--muted)}.entry-head{display:flex;align-items:center;justify-content:space-between;margin-top:8px;font-size:12px}.coins{display:flex;justify-content:center;gap:18px;padding:10px 0 12px}.coin{width:48px;height:48px;border-radius:50%;border:1px solid #d2d5cc;background:#fafbf8;box-shadow:inset 0 0 0 5px #fff,0 3px 8px #00000004;font-family:"Songti SC",serif;font-size:20px;color:#363b31}.coin.reverse{background:#3b3d37;color:white;box-shadow:inset 0 0 0 5px #4d5047}.primary{border:0;background:#292c26;color:#fff;padding:8px 12px;border-radius:8px;min-height:36px;font-size:13px}.primary:hover:not(:disabled){background:#44493e}.wide{width:auto;min-width:128px;gap:20px;display:flex;align-items:center;justify-content:space-between}.yao-rows{margin-top:10px;display:flex;flex-direction:column-reverse}.yao-row{display:flex;align-items:center;gap:13px;min-height:36px;border-bottom:1px solid #f1f2ef;font-size:11px;color:#898d82}.yao-row .row-name{width:30px}.yao-row .row-type{margin-left:auto;min-width:54px}.yao-row button{padding:8px;color:#8b9083;border:0;background:none;font-size:11px}.line{height:6px;width:66px;background:#484d40;border-radius:1px;flex-shrink:0}.line.yin{background:linear-gradient(to right,#484d40 43%,transparent 43%,transparent 57%,#484d40 57%)}.line.pending{background:#eceee7}.yao-row .faces{font-size:10px;letter-spacing:4px;color:#92978a}.reset{display:inline-block;margin:6px 0 0}details{border-top:1px solid var(--line);margin-top:8px;padding-top:8px;color:var(--muted);font-size:11px}summary{cursor:pointer;line-height:1.8}details p{line-height:1.9}.result-card{min-height:0;display:flex;flex-direction:column;position:sticky;top:12px}#result{flex:1}.empty-result{text-align:center;padding:18px 0 12px}.empty-symbol{display:grid;gap:10px;justify-content:center;margin-bottom:12px}.empty-symbol .line{width:77px;background:#e7e9e2}.empty-result h3{font-weight:400;font-size:15px;margin:8px 0}.empty-result p{font-size:12px;color:#92978b;line-height:1.9}.result-bottom{border-top:1px solid var(--line);padding-top:10px;text-align:center}.result-bottom p{font-size:11px;line-height:1.9;color:#92978b;margin:10px 0 22px}.caption{display:block;font-size:10px;color:#93978d;margin-top:6px}.hex-pair{display:flex;gap:16px;padding:10px 0 6px;justify-content:center}.hex-card{text-align:center;flex:1}.hex-card .tag{font-size:10px;color:var(--muted);letter-spacing:2px}.hex-card h3{font-family:"Songti SC",serif;font-size:24px;font-weight:400;margin:8px 0 4px}.hex-card p{font-size:10px;color:#909688}.hex-lines{display:grid;gap:9px;justify-content:center;padding:10px 0}.hex-line{display:flex;align-items:center;gap:6px}.hex-line .mark{width:12px;font-size:11px}.moving-text{font-size:11px;color:var(--muted);text-align:center;margin-bottom:12px}footer{padding:10px 0;color:#9b9f95;font-size:10px;display:flex;justify-content:space-between;letter-spacing:1px}#chat{max-width:740px;margin:auto;height:calc(var(--viewport-height, 100dvh) - 46px);display:flex;flex-direction:column}#chat[hidden]{display:none}.chat-head{display:flex;align-items:center;justify-content:space-between;padding:2px 0;font-size:12px}.chat-context{border:1px solid var(--line);border-radius:8px;background:#fff;padding:6px 10px}.chat-context strong{font-weight:500;font-size:14px}.chat-context p{margin:8px 0 0;color:var(--muted);font-size:11px;line-height:1.7;overflow-wrap:anywhere}.messages{flex:1;overflow-y:auto;padding:10px 0 6px;scroll-behavior:smooth;min-height:0}.message{margin-bottom:14px;max-width:100%;overflow-wrap:anywhere}.message .speaker{color:#8b9083;font-size:10px;margin-bottom:4px;letter-spacing:1px}.message .content{font-size:14px;line-height:1.95;white-space:pre-wrap}.message.user{margin-left:auto;max-width:85%}.message.user .content{background:#eaece6;padding:8px 12px;border-radius:14px 14px 3px 14px}.message.user .speaker{text-align:right}.message.assistant .content{background:white;border:1px solid #eef0ea;border-radius:3px 14px 14px;padding:12px 14px}.message .content strong{font-weight:600}.message .content h3{font-size:14px;margin:14px 0 5px}.loading{color:#8c9285}.loading::after{content:' · · ·';animation:pulse 1.4s infinite}.composer{display:flex;align-items:flex-end;gap:8px;background:#fff;border:1px solid #dfe3d7;border-radius:10px;padding:5px}.composer textarea{flex:1;width:0;min-width:0;max-height:120px;resize:none;border:0;padding:5px 8px;font-size:16px}.composer .primary{width:36px;min-height:36px;padding:4px;font-size:20px}.chat-caption{text-align:center;color:#9a9f91;font-size:10px;margin:4px 0 6px;padding-bottom:env(safe-area-inset-bottom)}.error{display:flex;align-items:center;justify-content:space-between;font-size:12px;padding:8px 12px;background:#edece8;border-radius:8px;flex-shrink:0}.error[hidden]{display:none}dialog{border:1px solid var(--line);border-radius:18px;width:min(520px,calc(100% - 30px));padding:16px;max-height:80dvh;background:var(--paper)}dialog::backdrop{background:#0005;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h2{font-family:"Songti SC",serif;font-size:20px;font-weight:400;margin:4px 0}.dialog-head .eyebrow{font-size:10px}.history-item{display:flex;align-items:center;gap:10px;border-top:1px solid var(--line);padding:4px 0}.history-open{flex:1;text-align:left;border:0;background:transparent;padding:6px 0;min-width:0}.history-open strong{display:block;font-size:15px;font-weight:500}.history-open p{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-open small{font-size:10px;color:#999e90}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}#toast{position:fixed;bottom:32px;left:50%;transform:translateX(-50%);background:#292d25;color:white;padding:12px 20px;border-radius:10px;font-size:12px;opacity:0;pointer-events:none;z-index:10;max-width:90%;transition:opacity .2s}#toast.show{opacity:1}@keyframes pulse{50%{opacity:.35}}@media(max-width:700px){.shell{padding:0 12px}.topbar{height:44px}.brand{font-size:19px}.brand-sub{display:none}.workspace{grid-template-columns:1fr;gap:12px}.card{padding:14px;border-radius:10px}.result-card{position:static;min-height:0}.question-foot{font-size:9px}.coins{gap:23px}.yao-row{gap:12px}.yao-row .faces{letter-spacing:3px}.hex-pair{gap:8px}.hex-card h3{font-size:22px}footer{display:block;text-align:center;line-height:1.6;padding:8px 0}footer span{display:block}#chat{height:calc(var(--viewport-height, 100dvh) - 44px)}.chat-head .quiet{padding:6px 0;font-size:11px}.chat-head>span{font-size:11px;color:var(--muted)}.chat-context{padding:6px 10px}.chat-context strong{font-size:14px}.message{max-width:100%}.message .content{font-size:14px}.message.assistant .content{padding:10px 12px}.chat-caption{font-size:9px}.composer{padding:4px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important;transition:none!important}}

[hidden]{display:none!important}

@media(max-width:380px){.yao-row{gap:8px}.yao-row .faces{display:none}.yao-row .row-type{margin-left:auto}.card{padding:12px}.coins{gap:18px}.brand{gap:7px}.quiet{padding:6px}}

.message .content h3{display:inline;margin:0;font-weight:600}.chat-context,.chat-head,.composer,.chat-caption{flex-shrink:0}

/* Keep supporting controls compact; reserve the viewport for input and reading. */
#home{padding-top:12px}
.eyebrow{font-size:10px;color:var(--muted)}
.context-details{border:0;margin:0;padding:0}
.context-details summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:24px;list-style:none}
.context-details summary::-webkit-details-marker{display:none}
.context-details summary span{font-size:10px;color:var(--muted)}
.context-details summary span::after{content:' ▾'}
.context-details[open] summary span::after{content:' ▴'}
.context-details p{max-height:100px;overflow-y:auto;margin:6px 0 0}
.suggestions{position:relative;align-self:flex-start;flex-shrink:0;border:0;margin:0;padding:0}
.suggestions summary{font-size:11px;min-height:28px;display:flex;align-items:center;color:var(--muted);list-style:none;padding:0 4px}
.suggestions summary::after{content:' ▴';margin-left:5px}
.suggestions[open] summary::after{content:' ▾'}
.suggestions>div{position:absolute;bottom:100%;left:0;z-index:2;display:flex;flex-direction:column;gap:4px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:6px;box-shadow:0 4px 16px #0001;min-width:200px}
.suggestions button{border:0;background:transparent;white-space:nowrap;text-align:left;padding:8px;font-size:12px;color:var(--ink)}
.suggestions button:hover{background:var(--paper)}
#confirmYao{margin:0 auto}
#interpretBtn{width:100%;justify-content:center}
.history-open p{margin:6px 0}
@media(pointer:coarse){.quiet,.text-btn,.yao-row button{min-height:36px}.coin{width:48px;height:48px}.chat-head .quiet{min-height:36px}}

.top-actions{display:flex;align-items:center;gap:4px;min-width:0}
.account-menu{position:relative;border:0;margin:0;padding:0}
.account-menu summary{font-size:12px;list-style:none;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:32px;display:block;line-height:32px;padding:0 8px;color:var(--ink)}
.account-menu summary::after{content:' ▾'}
.account-menu summary::-webkit-details-marker{display:none}
.account-menu>div{position:absolute;right:0;top:100%;z-index:5;display:flex;flex-direction:column;min-width:128px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:6px;box-shadow:0 4px 16px #0001}
.account-menu>div>span{font-size:10px;color:var(--muted);padding:5px 10px}
@media(max-width:700px){.brand-sub{display:none}.account-menu summary{max-width:88px}}

html[lang="en"] .brand{letter-spacing:0;font-size:17px}
html[lang="en"] .hex-card h3{font-family:inherit;font-size:19px;line-height:1.3;overflow-wrap:anywhere}
html[lang="en"] .hex-card p{line-height:1.5}
html[lang="en"] .yao-row{gap:8px}
html[lang="en"] .yao-row .row-name{width:40px;flex-shrink:0}
html[lang="en"] .yao-row .faces{display:none}
html[lang="en"] .yao-row .row-type{font-size:10px;min-width:0}
html[lang="en"] .brand-sub{letter-spacing:0}
@media(max-width:700px){html[lang="en"] .top-actions{gap:0}html[lang="en"] .quiet{padding:6px}html[lang="en"] .brand{gap:5px;font-size:16px}html[lang="en"] .chat-head>span{display:none}html[lang="en"] .hex-card h3{font-size:17px}html[lang="en"] .question-foot{font-size:9px}}

.tutorial{max-width:780px;margin:0 auto;padding:0 0 28px}.tutorial-head{display:flex;align-items:center;gap:16px;height:44px;color:var(--muted);font-size:12px}.tutorial-head .quiet{padding-left:0}.tutorial-hero{padding:30px 6px 24px;border-bottom:1px solid var(--line)}.tutorial-hero h1{font-family:"Songti SC",serif;font-size:34px;font-weight:400;letter-spacing:2px;margin:8px 0 12px}.tutorial-hero p{max-width:600px;color:var(--muted);line-height:1.9;margin:0}.tutorial-steps{display:grid;gap:10px;padding-top:14px}.tutorial-step{display:grid;grid-template-columns:34px 1fr;gap:14px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px}.tutorial-step .step{margin-top:1px}.tutorial-step h2{font-size:16px;font-weight:550;margin:0 0 8px}.tutorial-step p{color:var(--muted);line-height:1.9;margin:0}.coin-example{display:flex;align-items:center;gap:9px;margin:15px 0}.coin-example span{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;border:1px solid #d2d5cc;font-family:"Songti SC",serif;background:#fafbf8}.coin-example span.reverse{background:#3b3d37;color:#fff}.coin-example b{font-size:12px;color:var(--muted);margin-left:5px}.coin-rules{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 14px}.coin-rules>div{display:grid;grid-template-columns:72px 1fr auto;align-items:center;gap:10px;background:var(--paper);border-radius:8px;padding:10px}.coin-rules b{font-size:11px;font-weight:500;letter-spacing:2px}.coin-rules span{font-size:11px;color:var(--muted)}.coin-rules .line{width:48px;height:5px}.tutorial-action{text-align:center;padding:18px 0}.tutorial-action .primary{min-width:180px}.tutorial-action .primary span:last-child{margin-left:18px}@media(max-width:700px){.tutorial{padding-bottom:20px}.tutorial-hero{padding:22px 4px 18px}.tutorial-hero h1{font-size:27px}.tutorial-step{grid-template-columns:26px 1fr;gap:10px;padding:14px}.coin-rules{grid-template-columns:1fr}.coin-rules>div{grid-template-columns:72px 1fr 48px}.top-actions #tutorialBtn{padding-left:6px;padding-right:6px}}@media(max-width:380px){.top-actions #historyBtn{font-size:0}.top-actions #historyBtn span{font-size:12px}.coin-example{gap:6px}}
