/* BBRab Native Office — free visual editing baseline */
#p-play .bb-office-basic-bar{display:flex;align-items:center;gap:5px;min-height:34px;margin:-3px 0 8px;padding:5px;border:1px solid #dbe7fb;border-radius:10px;background:linear-gradient(180deg,#fff,#f8fbff);overflow-x:auto;scrollbar-width:thin}
#p-play .bb-office-basic-bar button,#p-play .bb-office-basic-bar select,#p-play .bb-office-basic-bar input{height:26px;box-sizing:border-box;border:1px solid #dbe7fb;border-radius:7px;background:#fff;color:#315b91;font:800 9px/1 inherit;outline:none}
#p-play .bb-office-basic-bar button{min-width:28px;padding:0 8px;cursor:pointer;white-space:nowrap}
#p-play .bb-office-basic-bar button:hover,#p-play .bb-office-basic-bar button.active{border-color:#60a5fa;background:#eff6ff;color:#1d4ed8}
#p-play .bb-office-basic-bar button:disabled{opacity:.38;cursor:not-allowed}
#p-play .bb-office-basic-bar select{min-width:82px;padding:0 23px 0 7px}
#p-play .bb-office-basic-bar input[type=color]{width:28px;min-width:28px;padding:2px}
#p-play .bb-office-basic-bar .office-sep{width:1px;height:19px;flex:0 0 1px;background:#dbe7fb}
#p-play .bb-office-basic-bar .office-grow{flex:1 1 auto}
#p-play .bb-office-basic-bar .office-find{width:100px;padding:0 8px;font-weight:650}
#p-play .bb-office-basic-bar .office-sheet-filter{width:92px;padding:0 8px;font-weight:650}
#p-play .bb-office-workspace{position:relative;min-height:330px;border:1px solid #cbdcf5;border-radius:12px;background:#edf3fb;overflow:auto;box-shadow:inset 0 1px 2px rgba(15,35,72,.04)}
#p-play .bb-office-source{display:none!important;margin:0;border:0!important;border-radius:0!important;min-height:330px!important;background:#0f172a!important;color:#dbeafe!important}
#p-play .bb-office-workspace.source-mode .bb-office-source{display:block!important}
#p-play .bb-office-workspace.source-mode .bb-office-visual-surface{display:none}
#p-play .bb-office-visual-surface{min-width:0;min-height:330px;padding:14px;box-sizing:border-box}
#p-play .bb-office-basic-status{display:flex;align-items:center;justify-content:space-between;padding:5px 3px 0;color:#71839c;font-size:8px;font-weight:750}

/* Saved version history */
.bb-office-version-dialog{width:min(560px,calc(100vw - 28px));max-height:min(640px,calc(100vh - 40px));padding:0;border:1px solid #cbdcf5;border-radius:18px;background:#fff;color:#17345d;box-shadow:0 28px 80px rgba(15,35,72,.28);overflow:hidden}
.bb-office-version-dialog::backdrop{background:rgba(15,35,72,.42);backdrop-filter:blur(4px)}
.office-version-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid #e2e8f0;background:linear-gradient(180deg,#fff,#f8fbff)}
.office-version-head b{display:block;font-size:16px}.office-version-head span{display:block;margin-top:4px;color:#71839c;font-size:11px;line-height:1.5}.office-version-head>button{width:32px;height:32px;border:1px solid #dbe7fb;border-radius:9px;background:#fff;color:#526b91;font-size:20px;cursor:pointer}
.office-version-list{max-height:430px;padding:8px 14px;overflow:auto}.office-version-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 6px;border-bottom:1px solid #edf2f7}.office-version-row:last-child{border-bottom:0}.office-version-row>div{min-width:0}.office-version-row b{display:block;color:#1d4ed8;font-size:13px}.office-version-row span{display:block;margin-top:3px;overflow:hidden;color:#71839c;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.office-version-row em{padding:4px 8px;border-radius:999px;background:#ecfdf5;color:#047857;font-size:9px;font-style:normal;font-weight:850}.office-version-row button,.office-version-foot button{padding:7px 11px;border:1px solid #bfdbfe;border-radius:8px;background:#eff6ff;color:#1d4ed8;font-size:10px;font-weight:850;cursor:pointer;white-space:nowrap}.office-version-empty{padding:34px 12px;text-align:center;color:#71839c;font-size:11px}.office-version-empty.error{color:#dc2626}.office-version-foot{display:flex;justify-content:flex-end;padding:12px 20px;border-top:1px solid #e2e8f0;background:#f8fbff}.office-version-foot button{background:#fff;color:#526b91}
.bb-office-storage{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px;padding:8px 10px;border:1px solid #dbe7fb;border-radius:10px;background:linear-gradient(90deg,#f8fbff,#eef6ff);color:#315b91}.bb-office-storage b{display:block;font-size:9px}.bb-office-storage span{display:block;margin-top:2px;color:#71839c;font-size:7px;line-height:1.4}.bb-office-storage-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px}.bb-office-storage-actions span{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bb-office-storage-actions button{height:27px;padding:0 9px;border:1px solid #bfdbfe;border-radius:8px;background:#fff;color:#1d4ed8;font-size:8px;font-weight:900;cursor:pointer;white-space:nowrap}

/* Writer */
#p-play .office-doc-page{width:min(100%,680px);min-height:460px;margin:0 auto;padding:42px 46px;box-sizing:border-box;background:#fff;border:1px solid #dbe7fb;box-shadow:0 10px 28px rgba(15,35,72,.1);color:#172f55;outline:none;font:500 12px/1.75 Arial,'Noto Sans SC',sans-serif;overflow-wrap:anywhere}
#p-play .office-doc-page:focus{border-color:#93c5fd;box-shadow:0 10px 28px rgba(15,35,72,.1),0 0 0 3px rgba(59,130,246,.09)}
#p-play .office-doc-page h1{font-size:25px;line-height:1.3;margin:0 0 18px}.office-doc-page h2{font-size:20px;margin:18px 0 10px}.office-doc-page h3{font-size:16px;margin:15px 0 8px}
#p-play .office-doc-page p{margin:0 0 10px;min-height:1.5em}.office-doc-page blockquote{margin:12px 0;padding:8px 13px;border-left:3px solid #3b82f6;background:#eff6ff;color:#526b91}
#p-play .office-doc-page table{width:100%;border-collapse:collapse;margin:12px 0}.office-doc-page td,.office-doc-page th{min-width:44px;padding:7px;border:1px solid #cbdcf5}.office-doc-page th{background:#eff6ff}
#p-play .office-doc-page img{max-width:100%;height:auto}.office-doc-page [data-align=center]{text-align:center}.office-doc-page [data-align=right]{text-align:right}
#p-play .office-doc-page mark[data-office-review-highlight]{padding:1px 2px;border-radius:3px;background:#fef08a;color:inherit;box-shadow:inset 0 -1px 0 #eab308}

/* Free article review comments */
.bb-office-review-dialog{width:min(620px,calc(100vw - 28px));max-height:min(680px,calc(100vh - 40px));padding:0;border:1px solid #cbdcf5;border-radius:18px;background:#fff;color:#17345d;box-shadow:0 28px 80px rgba(15,35,72,.28);overflow:hidden}
.bb-office-review-dialog::backdrop{background:rgba(15,35,72,.42);backdrop-filter:blur(4px)}
.office-review-compose{padding:18px 20px}.office-review-quote{max-height:120px;margin:0 0 12px;padding:11px 13px;border-left:3px solid #facc15;border-radius:7px;background:#fefce8;color:#713f12;font-size:11px;line-height:1.6;overflow:auto}.office-review-compose textarea{width:100%;min-height:110px;box-sizing:border-box;padding:11px;border:1px solid #cbdcf5;border-radius:10px;color:#17345d;font:500 11px/1.6 inherit;resize:vertical;outline:none}.office-review-compose textarea:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(59,130,246,.1)}
.office-review-list{max-height:470px;padding:8px 14px;overflow:auto}.office-review-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:13px 6px;border-bottom:1px solid #edf2f7}.office-review-item:last-child{border-bottom:0}.office-review-item.resolved{opacity:.62}.office-review-item q{display:block;margin-bottom:6px;color:#a16207;font-size:10px;line-height:1.5}.office-review-item p{margin:0;color:#315b91;font-size:11px;line-height:1.6}.office-review-item small{display:block;margin-top:7px;color:#94a3b8;font-size:8px}.office-review-item button{align-self:start;min-height:28px;padding:0 9px;border:1px solid #bfdbfe;border-radius:8px;background:#eff6ff;color:#1d4ed8;font-size:9px;font-weight:850;cursor:pointer}

/* Paid one-click format conversion */
#p-play .bb-office-convert-suite{margin-top:13px;padding-top:12px;border-top:1px solid #e7eef8}.bb-office-convert-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:9px}.bb-office-convert-head h5{margin:0;color:#17345d;font-size:11px}.bb-office-convert-head span{color:#71839c;font-size:8px}.bb-office-convert-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.bb-office-convert-card{display:flex;align-items:center;gap:8px;min-height:58px;padding:9px;border:1px solid #dbe7fb;border-radius:11px;background:#f8fbff;color:#17345d;cursor:pointer;text-align:left;transition:.15s ease}.bb-office-convert-card:hover{border-color:#60a5fa;background:#eff6ff;transform:translateY(-1px);box-shadow:0 8px 18px rgba(37,99,235,.09)}.bb-office-convert-card:disabled{opacity:.45;cursor:not-allowed;transform:none}.bb-office-convert-icon{display:grid;place-items:center;flex:0 0 31px;width:31px;height:31px;border-radius:9px;background:linear-gradient(145deg,#2563eb,#60a5fa);color:#fff;font-size:13px;font-weight:950}.bb-office-convert-card b{display:block;font-size:9px}.bb-office-convert-card small{display:block;margin-top:3px;color:#71839c;font-size:7px;line-height:1.35}.bb-office-convert-card em{display:inline-block;margin-top:4px;padding:2px 5px;border-radius:999px;background:#ede9fe;color:#6d28d9;font-size:6px;font-style:normal;font-weight:900}
#p-play .bb-office-route-note .external .bb-office-btn{display:block;margin-top:8px}

/* Sheets */
#p-play .office-sheet-app{display:grid;grid-template-rows:auto auto minmax(280px,1fr);min-width:720px;min-height:330px;background:#fff}
#p-play .office-sheet-formula{display:grid;grid-template-columns:66px minmax(0,1fr);gap:6px;padding:7px;border-bottom:1px solid #dbe7fb;background:#f8fbff}
#p-play .office-sheet-formula span{display:grid;place-items:center;border:1px solid #cbdcf5;border-radius:7px;background:#fff;color:#2563eb;font-size:9px;font-weight:900}
#p-play .office-sheet-formula input{height:29px;padding:0 9px;border:1px solid #cbdcf5;border-radius:7px;outline:none;color:#17345d;font:500 10px/1 ui-monospace,monospace}
#p-play .office-sheet-tabs{display:flex;align-items:center;gap:5px;padding:6px 8px;border-bottom:1px solid #dbe7fb;background:#fff;overflow-x:auto}
#p-play .office-sheet-tabs button{height:25px;padding:0 10px;border:1px solid #dbe7fb;border-radius:7px;background:#f8fbff;color:#526b91;font-size:8px;font-weight:900;cursor:pointer}
#p-play .office-sheet-tabs button.active{border-color:#60a5fa;background:#eff6ff;color:#1d4ed8}
#p-play .office-sheet-grid-wrap{overflow:auto;position:relative}
#p-play .office-sheet-grid{border-collapse:separate;border-spacing:0;table-layout:fixed;min-width:100%}
#p-play .office-sheet-grid th,#p-play .office-sheet-grid td{height:29px;min-width:92px;padding:0;border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;background:#fff}
#p-play .office-sheet-grid th{position:sticky;top:0;z-index:3;min-width:42px;background:#edf4ff;color:#526b91;font-size:8px;font-weight:900;text-align:center}
#p-play .office-sheet-grid .office-row-head{position:sticky;left:0;z-index:2;width:42px;min-width:42px;background:#edf4ff;color:#71839c;text-align:center;font-size:8px;font-weight:850}
#p-play .office-sheet-grid thead .office-row-head{z-index:4}
#p-play .office-sheet-cell{display:block;width:100%;height:100%;box-sizing:border-box;padding:0 7px;border:2px solid transparent;background:transparent;color:#17345d;font:500 9px/1.2 Arial,sans-serif;outline:none;text-overflow:ellipsis}
#p-play .office-sheet-cell:focus,#p-play .office-sheet-cell.selected{border-color:#2563eb;background:#eff6ff;box-shadow:inset 0 0 0 1px #fff}
#p-play .office-sheet-cell.bold{font-weight:900}.office-sheet-cell.center{text-align:center}.office-sheet-cell.right{text-align:right}
#p-play .office-sheet-chart{position:absolute;right:18px;top:18px;width:250px;padding:12px;border:1px solid #cbdcf5;border-radius:12px;background:rgba(255,255,255,.97);box-shadow:0 16px 36px rgba(15,35,72,.18);z-index:8}
#p-play .office-sheet-chart-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px;color:#17345d;font-size:9px;font-weight:900}.office-sheet-chart-head button{border:0;background:transparent;cursor:pointer}
#p-play .office-sheet-bars{height:130px;display:flex;align-items:flex-end;gap:7px;padding:5px 4px 20px;border-left:1px solid #dbe7fb;border-bottom:1px solid #dbe7fb}
#p-play .office-sheet-bar{position:relative;flex:1;min-width:18px;border-radius:5px 5px 0 0;background:linear-gradient(180deg,#60a5fa,#2563eb)}.office-sheet-bar small{position:absolute;top:100%;left:50%;transform:translateX(-50%);max-width:46px;overflow:hidden;text-overflow:ellipsis;color:#71839c;font-size:7px;white-space:nowrap}

/* Slides */
#p-play .office-slides-app{display:grid;grid-template-columns:108px minmax(480px,1fr);min-width:620px;min-height:350px;gap:10px}
#p-play .office-slide-list{display:flex;flex-direction:column;gap:7px;max-height:420px;overflow:auto}
#p-play .office-slide-thumb{position:relative;aspect-ratio:16/9;padding:8px;border:2px solid transparent;border-radius:8px;background:#fff;box-shadow:0 4px 10px rgba(15,35,72,.08);cursor:pointer;overflow:hidden;color:#17345d}
#p-play .office-slide-thumb.active{border-color:#2563eb}.office-slide-thumb b{display:block;font-size:7px}.office-slide-thumb span{display:block;margin-top:4px;color:#71839c;font-size:6px}.office-slide-thumb i{position:absolute;right:4px;bottom:3px;font-size:6px;font-style:normal;color:#94a3b8}
#p-play .office-slide-stage{display:grid;grid-template-rows:minmax(290px,auto) auto;gap:8px}
#p-play .office-slide-canvas{position:relative;aspect-ratio:16/9;min-height:290px;padding:45px 54px;box-sizing:border-box;border:1px solid #cbdcf5;border-top:8px solid var(--slide-accent,#2563eb);border-radius:10px;background:var(--slide-bg,#fff);box-shadow:0 12px 28px rgba(15,35,72,.12);overflow:hidden}
#p-play .office-slide-canvas:after{content:'';position:absolute;right:-55px;bottom:-70px;width:180px;height:180px;border-radius:50%;background:color-mix(in srgb,var(--slide-accent,#2563eb) 15%,transparent);pointer-events:none}
#p-play .office-slide-title,#p-play .office-slide-body,#p-play .office-slide-notes{position:relative;z-index:1;width:100%;box-sizing:border-box;border:1px dashed transparent;background:transparent;color:var(--slide-text,#17345d);outline:none;resize:none;font-family:Arial,'Noto Sans SC',sans-serif}
#p-play .office-slide-title{height:54px;font-size:25px;font-weight:900;line-height:1.3}.office-slide-body{height:150px;margin-top:17px;font-size:13px;line-height:1.7}.office-slide-title:focus,.office-slide-body:focus{border-color:#93c5fd;background:rgba(255,255,255,.35)}
#p-play .office-slide-notes{height:58px;padding:8px;border:1px solid #cbdcf5;border-radius:8px;background:#fff;color:#526b91;font-size:9px;line-height:1.5}

/* PDF */
#p-play .office-pdf-app{display:grid;grid-template-columns:104px minmax(460px,1fr);min-width:590px;min-height:360px;gap:10px}
#p-play .office-pdf-pages{display:flex;flex-direction:column;gap:7px;max-height:460px;overflow:auto}
#p-play .office-pdf-thumb{min-height:72px;padding:8px;border:2px solid transparent;border-radius:8px;background:#fff;box-shadow:0 4px 10px rgba(15,35,72,.08);cursor:pointer}.office-pdf-thumb.active{border-color:#2563eb}.office-pdf-thumb b{display:block;color:#17345d;font-size:7px}.office-pdf-thumb span{color:#94a3b8;font-size:6px}
#p-play .office-pdf-stage{display:grid;grid-template-columns:minmax(360px,1fr) 150px;gap:9px;align-items:start}
#p-play .office-pdf-paper{min-height:500px;padding:46px 48px;box-sizing:border-box;background:#fff;border:1px solid #dbe7fb;box-shadow:0 12px 28px rgba(15,35,72,.12)}
#p-play .office-pdf-title,#p-play .office-pdf-body{width:100%;box-sizing:border-box;border:1px dashed transparent;background:transparent;color:#17345d;outline:none;resize:none;font-family:Arial,'Noto Sans SC',sans-serif}.office-pdf-title{height:55px;font-size:22px;font-weight:900}.office-pdf-body{height:330px;font-size:11px;line-height:1.75}.office-pdf-title:focus,.office-pdf-body:focus{border-color:#93c5fd;background:#f8fbff}
#p-play .office-pdf-annotations{padding:10px;border:1px solid #dbe7fb;border-radius:10px;background:#fff}.office-pdf-annotations h5{margin:0 0 8px;color:#17345d;font-size:9px}.office-pdf-note{padding:7px;margin-bottom:6px;border-left:3px solid #f59e0b;border-radius:5px;background:#fffbeb;color:#78570d;font-size:7px;line-height:1.45}.office-pdf-note.signature{border-color:#2563eb;background:#eff6ff;color:#1d4ed8;font-family:'Dancing Script',cursive;font-size:12px}.office-pdf-note button{float:right;border:0;background:transparent;color:#ef4444;cursor:pointer}

@media(max-width:980px){#p-play .bb-office-visual-surface{padding:9px}#p-play .office-doc-page{padding:30px 28px}.office-pdf-stage{grid-template-columns:1fr!important}.office-pdf-annotations{max-height:150px;overflow:auto}}
@media(max-width:980px){#p-play .bb-office-convert-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){#p-play .bb-office-basic-bar .office-find,#p-play .bb-office-basic-bar .office-grow{display:none}#p-play .office-doc-page{padding:24px 20px}.office-slides-app,.office-pdf-app{grid-template-columns:88px minmax(440px,1fr)!important}#p-play .bb-office-convert-grid{grid-template-columns:1fr}.bb-office-storage{align-items:flex-start;flex-direction:column}.bb-office-storage-actions{width:100%;justify-content:space-between}}
@media(prefers-reduced-motion:reduce){#p-play .bb-office-workspace *{scroll-behavior:auto!important;transition:none!important}}
