/* C2 fused reader dock: public-page utilities stay outside the content layout. */
.ztc-reader-tools { --reader-edge:26px; --reader-safe-bottom:env(safe-area-inset-bottom,0px); color:var(--ztc-text-muted); font-family:var(--ztc-sans); }
.ztc-reader-tools[hidden], .ztc-reader-tools [hidden] { display:none !important; }
.ztc-reader-tools button { font:inherit; font-size:var(--ztc-fs-small); line-height:1.5; color:var(--ztc-text-muted); background:transparent; border:0; border-radius:var(--ztc-radius); min-height:44px; padding:10px 12px; display:inline-flex; align-items:center; justify-content:center; gap:8px; cursor:pointer; text-align:left; transition:background .15s,color .15s; }
.ztc-reader-tools button:hover { color:var(--ztc-action); background:var(--ztc-tint-info-bg); }
.ztc-reader-tools button:focus-visible, .reader-copy-buffer:focus-visible { outline:2px solid var(--ztc-action); outline-offset:3px; box-shadow:none; }
.ztc-reader-tools button:disabled { cursor:wait; opacity:.65; }
.reader-dock { position:fixed; right:max(var(--reader-edge),env(safe-area-inset-right)); bottom:max(var(--reader-edge),var(--reader-footer-clearance,0px),env(safe-area-inset-bottom)); z-index:90; display:flex; flex-direction:column; padding:4px; border:1px solid var(--ztc-border); border-radius:29px; background:var(--ztc-white); background:color-mix(in srgb,var(--ztc-white) 96%,transparent); box-shadow:var(--ztc-shadow-hover); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); opacity:0; visibility:hidden; pointer-events:none; transform:translateY(8px); transition:opacity .2s,transform .2s,visibility .2s; }
.reader-dock.is-visible { opacity:1; visibility:visible; pointer-events:auto; transform:none; }
.ztc-reader-tools .reader-dock > button { position:relative; width:46px; height:46px; min-height:44px; flex:none; display:grid; place-items:center; border:0; padding:0; border-radius:50%; box-shadow:none; }
.reader-dock svg { width:19px; height:19px; }
.ztc-reader-tools .reader-dock > button[data-reader-action="top"] { color:var(--ztc-action); margin-top:5px; }
.reader-dock > button[data-reader-action="top"]::before { content:''; height:1px; position:absolute; top:-3px; left:10px; right:10px; background:var(--ztc-border); }
.reader-dock > button[aria-expanded="true"] { color:var(--ztc-action); background:var(--ztc-tint-info-bg); }
.reader-dock-tip { position:absolute; right:calc(100% + 12px); top:50%; transform:translateY(-50%); white-space:nowrap; font:400 12px/1.5 var(--ztc-sans); padding:6px 10px; border:1px solid var(--ztc-border); border-radius:5px; color:var(--ztc-text); background:var(--ztc-white); opacity:0; visibility:hidden; pointer-events:none; box-shadow:var(--ztc-shadow-hover); }
.reader-dock button:hover .reader-dock-tip, .reader-dock button:focus-visible .reader-dock-tip { opacity:1; visibility:visible; }
.has-open-panel .reader-dock-tip { display:none; }
.reader-status { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.reader-dialog { box-sizing:border-box; position:fixed; inset:auto; right:calc(max(var(--reader-edge),env(safe-area-inset-right)) + 68px); bottom:max(var(--reader-edge),var(--reader-footer-clearance,0px)); z-index:90; color:var(--ztc-text); background:var(--ztc-white); width:min(320px,calc(100vw - 120px)); max-height:max(180px,calc(100dvh - max(var(--reader-edge),var(--reader-footer-clearance,0px)) - 24px)); padding:16px; border:1px solid var(--ztc-border); border-radius:12px; margin:0; overflow:auto; overscroll-behavior:contain; box-shadow:var(--ztc-shadow-panel); }
.reader-dialog::backdrop { background:color-mix(in srgb,var(--ztc-surface-inverse-deep) 32%,transparent); }
.reader-dialog-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:0 0 6px; }
.ztc-reader-tools .reader-dialog-heading h2 { font:600 16px/1.5 var(--ztc-sans); color:var(--ztc-text); margin:0; }
.ztc-reader-tools .reader-dialog-heading button { width:44px; padding:10px; margin:-4px -8px -4px 0; flex:none; }
.reader-qr { display:flex; justify-content:center; padding:8px 0; }
.reader-qr canvas { width:240px; height:240px; max-width:100%; aspect-ratio:1; object-fit:contain; }
.reader-dialog-note { margin:12px 0 4px; font-size:var(--ztc-fs-small); line-height:1.8; text-align:center; }
.reader-dialog-caption { font-size:var(--ztc-fs-caption); line-height:1.8; margin:0 0 8px; color:var(--ztc-text-muted); text-align:center; }
.reader-export-note { text-align:left; margin:12px 8px 4px; }
.ztc-reader-tools .reader-menu-action { display:flex; width:100%; justify-content:flex-start; padding:12px 8px; margin:0; border-bottom:1px solid var(--ztc-border); color:var(--ztc-text); }
.reader-dialog-status { margin:12px 8px 0; font-size:var(--ztc-fs-caption); line-height:1.7; color:var(--ztc-action); }
.reader-dialog-status:empty { display:none; }
.reader-copy-buffer { display:block; width:100%; min-height:160px; max-height:40dvh; resize:vertical; padding:12px; border:1px solid var(--ztc-border); border-radius:var(--ztc-radius); background:var(--ztc-white); color:var(--ztc-text); font:var(--ztc-fs-body)/1.7 var(--ztc-sans); box-sizing:border-box; }
.reader-wechat-guide { padding:12px; background:var(--ztc-tint-info-bg); font-size:var(--ztc-fs-small); line-height:1.9; color:var(--ztc-text); margin:0 0 8px; }
@media (max-width:767px) {
 .ztc-reader-tools { --reader-edge:16px; }
 .reader-dock { flex-direction:row; gap:2px; border-radius:28px; }
 .ztc-reader-tools .reader-dock > button { height:44px; width:44px; }
 .ztc-reader-tools .reader-dock > button[data-reader-action="top"] { margin-top:0; margin-left:5px; }
 .reader-dock > button[data-reader-action="top"]::before { top:10px; bottom:10px; left:-4px; right:auto; width:1px; height:auto; }
 .reader-dock-tip { display:none; }
 .reader-dialog { left:max(12px,env(safe-area-inset-left)); right:max(12px,env(safe-area-inset-right)); bottom:max(12px,env(safe-area-inset-bottom)); width:auto; max-width:none; max-height:calc(100dvh - 48px); z-index:200; border-radius:16px; padding:16px; }
 .reader-dialog-heading { margin-bottom:8px; }
 .ztc-reader-tools .reader-menu-action { min-height:50px; }
 .has-mobile-panel .reader-dock { visibility:hidden; pointer-events:none; }
 .reader-qr canvas { width:min(240px,100%); height:auto; }
}
@media (prefers-reduced-motion:reduce) { .ztc-reader-tools button, .reader-dock { transition:none; } .reader-dock { transform:none; } }
