/* 1080 × 2352 design reference, at 3 device pixels per CSS pixel: 360 × 784.
   Reserve Android system areas inside this local preview; never scale text with transforms. */
:root{--frame-width:360px;--frame-height:784px;--android-top:max(28px,env(safe-area-inset-top,0px));--android-bottom:max(24px,env(safe-area-inset-bottom,0px))}
html{height:100%;overflow:hidden}
body{position:relative;display:flex;flex-direction:column;width:min(var(--frame-width),100%);max-width:var(--frame-width);height:min(var(--viewport-height,100dvh),var(--frame-height));min-height:0;overflow:hidden;padding-top:var(--android-top);padding-bottom:var(--android-bottom)}
body::after{content:"";position:absolute;bottom:9px;left:50%;transform:translateX(-50%);height:3px;width:92px;border-radius:3px;background:#6c756b;pointer-events:none}
.sidebar{position:relative;top:auto;height:44px;min-height:44px;flex:none;padding:0 12px;z-index:30}.brand{gap:8px}.brand span{font-size:24px}.brand small{font-size:11px}
#menu-toggle{min-height:36px;min-width:62px;font-size:11px}.sidebar nav{top:43px;padding:8px 10px;gap:5px;max-height:calc(var(--viewport-height,100dvh) - 120px);overflow:auto}.nav{min-height:40px;padding:8px 10px;font-size:11px}
.shell{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.topbar{height:22px;min-height:22px;flex:none;padding:0 12px;font-size:9px}.topbar>span:first-child{font-size:9px}.local-badge{font-size:9px;gap:5px}
main{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:7px 10px 0}
.view{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;gap:5px}
.page-heading{flex:none;gap:9px;margin:0;min-height:39px;align-items:center}.eyebrow{display:none}h1{font-size:18px;line-height:1.3;margin:0 0 2px}.intro{font-size:10px;line-height:1.45}.page-heading .button{min-height:36px;font-size:11px;padding:6px 10px}
.workflow{flex:none;padding:4px 0;margin:0;gap:5px}.step{font-size:10px;gap:4px}.step b{width:16px;height:16px;font-size:9px}.workflow i{max-width:16px}
.panel-tabs{position:static;top:auto;flex:none;padding:0;margin:0;gap:5px}.panel-tabs button{min-height:34px;font-size:11px;border-radius:5px}
.studio-layout{flex:1;min-height:0;overflow:hidden;width:100%}.editor{display:flex;flex-direction:column;height:100%;min-height:0;padding:0 10px;overflow:hidden;gap:5px}
.content-types{flex:none;margin:0;gap:8px;overflow-x:auto}.content-types button{min-height:33px;padding:6px 0;font-size:11px}
.mode-tabs{flex:none;gap:6px;margin:0}.mode-tabs button{min-height:40px;padding:5px 7px;gap:6px}.mode-tabs img{width:17px}.mode-tabs span{font-size:11px;line-height:1.35}.mode-tabs small{font-size:8px;line-height:1.3;margin-top:2px}
.entry-region{flex:1;min-height:0;overflow:hidden}
#zip-panel{display:flex;flex-direction:column;height:100%;min-height:0;overflow:auto;gap:5px;overscroll-behavior:contain;scrollbar-gutter:stable}
.drop-zone{position:relative;flex:none;min-height:78px;margin:0;padding:8px 8px 8px 35px;gap:3px}.drop-zone img{position:absolute;left:10px;top:17px;width:19px;margin:0}.drop-zone strong{font-size:12px;line-height:1.5}.drop-zone span{font-size:10px;line-height:1.4}.drop-zone small{font-size:9px;line-height:1.5}
.package-actions{flex:none;gap:2px 9px;margin:0}.package-actions>a,.package-actions>button{min-height:30px;font-size:10px}.text-button{min-height:32px;font-size:11px}
.structure{flex:none;padding:3px 8px}.structure summary{min-height:28px;line-height:28px;font-size:10px}.structure[open]{max-height:155px;overflow:auto}.structure pre{margin:4px 0;padding:7px;font-size:9px}.structure p{font-size:10px;margin:4px 0;line-height:1.65}
.import-result{flex:none;max-height:82px;overflow:auto;font-size:10px;padding:8px}.file-line{font-size:9px}
#zip-adjust{flex:none}#zip-adjust .button{min-height:32px;padding:5px 8px;font-size:10px}#zip-adjust .hint{font-size:9px;margin:3px 0}
.batch-panel{display:flex;flex-direction:column;flex:1 0 126px;min-height:126px;overflow:hidden;margin:0;padding-top:5px;gap:3px}.batch-panel>.section-line{flex:none;margin:0}.section-line h3{font-size:11px}.batch-panel>.hint{flex:none;margin:0;font-size:9px;line-height:1.5}
.batch-list{flex:1;min-height:35px;max-height:none;overflow:auto;margin:0;overscroll-behavior:contain;scrollbar-gutter:stable}.batch-row{padding:7px 8px;margin-bottom:5px;border-radius:4px}.batch-choice{font-size:11px;line-height:1.5;gap:7px}.batch-choice input[type=checkbox]{margin-top:1px}.batch-file{font-size:9px;margin-top:2px}.batch-status{font-size:9px;line-height:1.5;margin-top:3px}.batch-row-actions{gap:13px;margin-top:0}.batch-row-actions .text-button{min-height:30px;font-size:10px}
#batch-save{display:none}.compact-help{flex:none;font-size:9px}.compact-help summary{min-height:24px;line-height:24px;cursor:pointer}.compact-help p{margin:3px 0;line-height:1.65}.compact-help[open]{max-height:85px;overflow:auto}.format-download{flex:none;min-height:27px;font-size:10px;margin:0}
#manual-panel{height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:2px;padding-bottom:5px}
.manual-group{margin:0 0 5px;border-bottom:1px solid var(--line);padding-bottom:4px}.manual-heading{margin:0 0 4px;min-height:28px;line-height:28px;font-size:11px;font-weight:600}.manual-heading span{font-size:9px;color:var(--muted);font-weight:400;margin-left:6px}
form label{font-size:10px;margin-bottom:7px}.form-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}
#manual-panel .primary-fields{grid-template-columns:minmax(0,1fr);gap:0}
input:not([type=file]),textarea,select{font-size:16px;min-height:36px;padding:6px 7px;margin-top:3px;line-height:1.4}input::placeholder,textarea::placeholder{font-size:10px}textarea{resize:vertical}#summary{height:52px;min-height:52px}#body{height:92px;min-height:82px}form .hint{font-size:9px;line-height:1.55;margin:3px 0}#manual-panel>p .text-button{min-height:26px;font-size:10px}
.asset-edit{gap:8px}.file-button{min-height:36px;font-size:10px;padding:5px 8px}.asset-edit .hint{display:block}.image-list{gap:6px;margin:4px 0}.image-item{width:calc((100% - 6px)/2)}.image-item img{height:62px}.image-item span{font-size:9px;padding:3px 5px}.image-item button{min-height:30px;font-size:10px}.body-tools{gap:2px}.file-link{min-height:30px}.chapter{padding:8px;margin-bottom:6px}
.check-panel{flex:none;margin:0;padding:0;border-top:1px solid var(--line);max-height:133px;overflow:hidden}.check-heading{margin:0;min-height:31px;line-height:31px;font-size:10px;font-weight:600}.check-heading span{font-weight:400;margin-left:7px;font-size:9px}.check-heading small{float:right;font-size:8px;font-weight:400;color:var(--muted)}.check-content{max-height:100px;overflow:auto;overscroll-behavior:contain}.check-content>.text-button{min-height:28px;font-size:10px}.check-line{font-size:10px;line-height:1.65}.check-dot{margin-top:1px}
.editor-footer{position:static;transform:none;left:auto;bottom:auto;flex:none;width:100%;z-index:auto;margin:0;padding:5px 0 6px;gap:3px;box-shadow:none;background:var(--paper)}.editor-footer>span{font-size:9px;line-height:1.4;max-height:25px;overflow:auto}.editor-footer>div{gap:7px}.editor-footer .button{min-height:38px;padding:6px 7px;font-size:11px}
.preview-side{height:100%;display:flex;flex-direction:column;min-height:0;overflow:hidden;gap:4px}.preview-heading{flex:none;padding:0;margin:0;font-size:10px}.reader{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.reader-cover{height:165px}.reader article{padding:15px 13px}.reader h2{font-size:19px}.reader-body{font-size:13px;line-height:1.9}.reader-summary{font-size:11px}.preview-foot{flex:none;font-size:9px;margin:0;padding:0;line-height:1.55}.audit-note{flex:none;margin:0;padding:4px 0;gap:6px}.audit-note img{width:17px}.audit-note strong{font-size:10px}.audit-note p{font-size:9px;line-height:1.5;margin:2px 0}
.manage-card{flex:none;min-height:0;max-height:44%;overflow:auto;padding:8px 10px;margin:0;border-radius:6px;overscroll-behavior:contain}.manage-card label{font-size:10px;margin:0 0 5px}.manage-card .hint{font-size:9px;line-height:1.5;margin:3px 0}.manage-actions{flex:none;margin:4px 0;gap:6px}.manage-actions .button{min-height:34px;font-size:10px;padding:5px 7px}
#drafts-list,#category-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.draft-row{padding:9px 10px;gap:5px;margin-bottom:6px;border-radius:5px}.draft-row h3{font-size:13px;line-height:1.5}.draft-row p{font-size:9px;margin:2px 0}.origin-label{font-size:8px;margin-bottom:2px}.draft-row .buttons{gap:6px}.draft-row .button{min-height:34px;font-size:10px;padding:4px 7px}.empty-state{padding:25px 10px;font-size:10px}.category-row{padding:10px;margin:0 0 6px;border-radius:5px}.category-row h3{font-size:13px;margin-bottom:3px}.category-row p{font-size:9px;line-height:1.5}.category-row .manage-actions{margin:5px 0 0}
#content-pages{align-items:center;margin:0}.manage-card .compact-help{font-size:9px}
#format-view>.document,#scheme-view>.scheme-grid{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.scheme-grid{display:block}.scheme-grid .document{margin-bottom:7px}.document{padding:13px 11px}.document h2{font-size:15px}.document h3{font-size:12px;margin-top:16px}.document p,.document li{font-size:11px;line-height:1.8}
#manage-dialog{width:min(336px,calc(100% - 24px));max-height:calc(var(--viewport-height,100dvh) - var(--android-top) - var(--android-bottom) - 24px);padding:16px 13px}#manage-dialog h2{font-size:16px;margin-bottom:8px}#manage-dialog label{margin:8px 0;font-size:11px}#manage-dialog .hint{font-size:11px}#manage-dialog .category-choice{min-height:36px}.dialog-fields{min-height:0}
#toast{bottom:calc(var(--android-bottom) + 70px);max-width:min(336px,calc(100% - 24px));font-size:10px;padding:8px 11px;z-index:40}
@media(max-height:660px){.workflow{padding:2px 0}.step{font-size:9px}.step b{width:14px;height:14px}.intro{font-size:9px}.page-heading{min-height:32px}h1{font-size:16px}.reader-cover{height:125px}.mode-tabs small{display:none}.mode-tabs button{min-height:34px}.drop-zone{min-height:67px;padding-top:5px;padding-bottom:5px}.batch-panel{flex-basis:110px;min-height:110px}}

.manual-group p .text-button{min-height:26px;font-size:10px}.metadata-extra label{margin-top:4px}
.short-viewport .sidebar{height:38px;min-height:38px}.short-viewport .sidebar nav{top:37px}.short-viewport .topbar{height:18px;min-height:18px}.short-viewport .workflow{padding:2px 0}.short-viewport .page-heading{min-height:32px}.short-viewport h1{font-size:16px}.short-viewport .mode-tabs small{display:none}.short-viewport .mode-tabs button{min-height:34px}.short-viewport .editor-footer .button{min-height:34px}.short-viewport .drop-zone{min-height:67px;padding-top:5px;padding-bottom:5px}.short-viewport .reader-cover{height:125px}
/* Administrators use item actions; upload controls contain titles and status only. */
.mode-tabs button{display:block;min-height:36px;font-size:12px;text-align:center}
.entry-region{display:flex;flex-direction:column;gap:5px}#zip-panel{height:auto;flex:none;overflow:visible;gap:2px}.drop-zone{min-height:56px;padding-top:6px;padding-bottom:6px}.drop-zone img{top:13px}.drop-zone strong{font-size:12px}.short-viewport .drop-zone{min-height:56px}
#editor-panel{position:relative}.file-drag #editor-panel::after{content:"松开上传压缩包";position:absolute;inset:4px;z-index:5;display:grid;place-items:center;border:2px dashed var(--sage);border-radius:6px;background:#edf1e7f2;color:var(--ink);font-size:16px;font-weight:600;pointer-events:none}
#manual-slot{flex:1;min-height:100px;overflow:hidden}.entry-region.has-upload-list #manual-slot{flex:1;max-height:55%}.batch-panel{flex:1;min-height:130px}.batch-row-actions{display:flex;gap:15px}.batch-row-actions .text-button{font-size:11px}
#upload-footer,#item-footer{flex:none}#save-note:empty{display:none}.editor-footer.single-action>div{display:flex}.editor-footer.single-action>div .button{flex:1}.draft-row .buttons{grid-template-columns:repeat(3,minmax(0,1fr))}.draft-row .button{padding:4px;font-size:10px}
#content-dialog{position:fixed;inset:0 0 auto;display:flex;flex-direction:column;gap:7px;margin:var(--android-top) auto 0;width:min(360px,100%);max-width:360px;height:min(calc(var(--viewport-height,100dvh) - var(--android-top) - var(--android-bottom)),732px);max-height:calc(var(--viewport-height,100dvh) - var(--android-top) - var(--android-bottom));padding:10px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:var(--paper);overflow:hidden}
#content-dialog:not([open]){display:none}#content-dialog::backdrop{background:#1b302880}.item-heading{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px}.item-heading h2{font-size:17px;margin:0}.item-heading .button{min-height:36px;font-size:11px;padding:5px 9px}
#item-body{flex:1;min-height:0;overflow:hidden}#item-edit{display:flex;flex-direction:column;height:100%;min-height:0;gap:6px;padding:8px;background:var(--white);border:1px solid var(--line);border-radius:6px}#item-edit #manual-panel{flex:1;min-height:0;height:auto}#item-edit .check-panel{flex:none}#item-footer .editor-footer{padding-bottom:0}.source-reader h3{font-size:18px;margin:0 0 12px}.source-reader p{font-size:13px;line-height:1.9}
/* Feedback keeps the same phone frame and independent list/detail scrolling. */
.feedback-filters{margin-top:7px}#feedback-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.feedback-row{padding:10px;margin-bottom:6px;border:1px solid var(--line);border-radius:5px;background:var(--white)}.feedback-row .section-line{margin-bottom:4px;gap:7px}.feedback-row h3{font-size:12px}.feedback-excerpt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font-size:12px;line-height:1.7;margin:4px 0}.feedback-row .hint{font-size:9px;margin:4px 0}.feedback-row .button{min-height:34px;font-size:10px;padding:4px 9px}
.feedback-status{flex:none;font-size:9px;padding:1px 6px;border-radius:3px;background:#edf1e7;color:var(--sage)}.feedback-status.pending{color:var(--ink);background:#f4ebcf}
#feedback-dialog{position:fixed;inset:0 0 auto;display:flex;flex-direction:column;gap:7px;margin:var(--android-top) auto 0;width:min(360px,100%);max-width:360px;height:min(calc(var(--viewport-height,100dvh) - var(--android-top) - var(--android-bottom)),732px);max-height:calc(var(--viewport-height,100dvh) - var(--android-top) - var(--android-bottom));padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);overflow:hidden}
#feedback-dialog:not([open]){display:none}#feedback-dialog::backdrop{background:#1b302880}.feedback-example{flex:none;margin:0;font-size:10px}#feedback-detail{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:10px;background:var(--white);border:1px solid var(--line);border-radius:6px}
.feedback-meta{display:grid;grid-template-columns:62px minmax(0,1fr);gap:6px;font-size:11px;margin:0 0 14px}.feedback-meta dt{color:var(--muted)}.feedback-meta dd{margin:0;overflow-wrap:anywhere}.feedback-section{padding-top:10px;border-top:1px solid var(--line);margin-top:10px}.feedback-section h3{font-size:12px;margin:0 0 5px}.feedback-section p{font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
#feedback-reply-form{flex:none;padding-top:7px;border-top:1px solid var(--line)}#feedback-reply-form label{font-size:11px;margin:0}#feedback-reply{height:76px;min-height:64px;max-height:120px;resize:none;font-size:16px}.feedback-reply-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:5px}.feedback-reply-actions .button{min-height:36px;padding:5px 12px;font-size:11px}#feedback-reply-error,#feedback-reply-status{font-size:10px;margin:3px 0;line-height:1.5}#feedback-reply-error:empty,#feedback-reply-status:empty{display:none}.feedback-reply-entry+.feedback-reply-entry{border-top:1px solid var(--line);padding-top:8px;margin-top:8px}.feedback-reply-entry small{display:block;font-size:9px;margin-top:3px}
