/* A quieter reading surface. Keep the search and secondary controls reachable. */
.searchline{display:flex;align-items:start;gap:8px;position:relative}.searchline .search{flex:1;min-width:0}
.settings{flex:none}.settings>summary{list-style:none;min-height:54px;display:flex;align-items:center;padding:0 14px;background:var(--surface);border:1px solid var(--border);border-radius:12px;font-size:13px;cursor:pointer}.settings>summary::-webkit-details-marker{display:none}.settings[open]>summary{border-color:var(--accent)}
.settings-panel{position:absolute;right:0;top:calc(100% + 8px);width:min(340px,100%);max-height:65vh;overflow:auto;padding:20px;background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);z-index:30}.settings-panel h2{font-size:16px;margin:0 0 16px}.settings-panel .tools{display:flex;flex-direction:column;align-items:stretch;gap:10px;margin-bottom:16px}.settings-panel .pill{height:auto;min-height:44px;justify-content:space-between;border-radius:8px;font-size:14px}.settings-panel .icon-btn{width:44px;height:44px}.settings-panel>a{font-size:14px}.settings-panel p{font-size:13px;color:var(--muted);line-height:1.55;margin:12px 0 0}
/* The brand scrolls away naturally; sticky chrome never changes flow height.
   Avoid scroll-anchoring feedback from hiding rows or changing padding at a threshold. */
body:not(.home) header.top{top:-54px}
@media(max-width:600px){body:not(.home) header.top{top:0}}
.headword-row{display:flex;align-items:start;justify-content:space-between;gap:16px;margin:8px 0 10px}.hw{font-size:clamp(36px,5.5vw,56px);line-height:1.12;letter-spacing:-.035em;margin:0;min-width:0}.headword-row .hw{flex:1}
.entry-save{flex:0 0 112px;display:flex;flex-direction:column;align-items:flex-end;gap:5px;padding-top:3px;min-height:76px}.entry-save button,.retry-source,.source-state button{min-height:44px;border:1px solid var(--border);border-radius:9px;background:var(--surface);padding:8px 12px;font-size:13px;font-weight:600}.entry-save button{background:var(--accent);color:var(--bg);border-color:transparent}.entry-save .msg{font-size:12px;line-height:1.4;color:var(--muted);text-align:right;display:flex;gap:5px;align-items:center}.entry-save .msg svg{width:15px;height:15px;flex:none}.entry-save button:disabled{opacity:.5;cursor:wait}
.pos{margin-top:28px}.pos-h h3{font-size:16px}.g{font-size:17px;line-height:1.65}.ex{font-size:16px;line-height:1.6;margin-top:10px}.ex i{font-size:14.5px;line-height:1.6}ol.defs>li{padding-top:16px;padding-bottom:10px}ol.defs>li::before{top:19px}.forms{font-size:13px;line-height:1.6}.native{font-size:15px}.source-state{font-size:13px;color:var(--muted);min-height:64px;margin-top:24px;padding:12px 0}.native.source-state{padding:16px 18px;min-height:84px}.source-state button{margin-left:8px}.lookup-state{min-height:420px}.lookup-state h2{font-size:24px}.retry-source{margin-top:16px}
.col-main{min-width:0}.morphology{margin-top:32px;padding:22px}.morphology h4{font-size:16px;color:var(--text)}.morphology .morph-group{margin:18px 0}.morph-parts{align-items:flex-start}.morph-parts>span{align-self:center}.component-gloss{display:block;max-width:160px;font-size:14px;line-height:1.45;margin-top:6px;color:var(--text)}.analysis-about{margin:20px 0 14px;border-top:1px solid var(--border);padding-top:8px}.analysis-about summary{min-height:44px;display:list-item;align-content:center;cursor:pointer;font-size:14px;font-weight:500}.history-content{padding:0 18px 18px;color:var(--muted);font-size:15px;line-height:1.65}.historical-detail{margin-top:16px}.col-side .card:first-child{min-height:116px}.entry-actions{margin-top:10px}.entry-actions button,.contrast-actions button{min-height:44px}.frames{margin-top:10px}
@media(max-width:600px){.headword-row{gap:10px;order:0}.hw{font-size:36px}.entry-save{flex-basis:94px;min-height:72px}.entry-save button{padding:8px 10px}.settings>summary{font-size:12px;padding:0 10px}.search #q{font-size:16px;padding-left:40px;padding-right:4px}.search>svg{left:13px}body:not(.home) .col-main>.morphology,body:not(.home) .col-main>.historical-detail{order:4}body:not(.home) .col-main>.source-state{order:3}.morphology{padding:18px}.g{line-height:1.6}.seg button{min-height:40px;padding:0 11px}body:not(.home) .pos{margin-top:22px}.settings-panel{max-height:60vh}}
