#attachmentPreview{position:fixed;inset:0;margin:auto;width:min(1100px,100%);height:100dvh;max-width:100%;max-height:100dvh;padding:0;border:0;border-radius:0;background:#f7f8f5;color:#26342b;overflow:hidden;box-sizing:border-box}
#attachmentPreview[open]{display:flex;flex-direction:column}#attachmentPreview::backdrop{background:#17251db3}
#attachmentPreview header{display:flex;align-items:center;gap:12px;padding:calc(8px + env(safe-area-inset-top)) 16px 8px;border-bottom:1px solid #dfe5dd;background:#fff;flex:none}
#attachmentPreview h2{font-size:16px;font-weight:600;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
#attachmentPreview button{font:inherit;cursor:pointer;min-height:44px;border:0;border-radius:10px;padding:8px 14px;color:#36553d;background:#eaf0e7}
#attachmentPreview button:disabled{opacity:.4;cursor:default}#attachmentPreview [data-close]{font-size:30px;min-width:44px;padding:0;background:none;color:#26342b}
#attachmentPreview .ap-actions{display:flex;gap:10px;padding:10px 16px;flex:none}#attachmentPreview .ap-status{margin:0;padding:8px 16px;font-size:14px;color:#5b675d;white-space:pre-wrap}
#attachmentPreview .ap-sheet{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:white}
#attachmentPreview table{border-collapse:separate;border-spacing:0;min-width:100%;font-size:14px;line-height:1.5;table-layout:auto}
#attachmentPreview td,#attachmentPreview th{min-width:80px;max-width:320px;padding:9px 12px;white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top;border-right:1px solid #e3e8e1;border-bottom:1px solid #e3e8e1}
#attachmentPreview th{position:sticky;top:0;background:#eff3ec;z-index:1;font-size:12px;font-weight:500;color:#63715f}
#attachmentPreview nav{display:flex;gap:8px;flex:none;overflow:auto;padding:10px 16px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #dfe5dd}
#attachmentPreview nav button{white-space:nowrap;background:transparent}#attachmentPreview nav button[aria-selected=true]{background:#395f45;color:white}
@media(min-width:700px){#attachmentPreview{height:90dvh;max-height:900px;border-radius:18px}}
