.yhdi-book{--yhdi-navy:#092b55;--yhdi-blue:#087fc2;--yhdi-border:#cde0f0;--yhdi-muted:#526b83;box-sizing:border-box;width:min(100%,960px);margin:22px auto 34px;padding:0 12px;color:var(--yhdi-navy);font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif}.yhdi-book *{box-sizing:border-box}.yhdi-book button{font:inherit;cursor:pointer}.yhdi-book button:focus-visible{outline:3px solid #1877c0;outline-offset:2px}.yhdi-book-header{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:14px;padding:14px 20px;border:1px solid var(--yhdi-border);border-radius:18px;background:#fff;box-shadow:0 8px 24px #173c6512}.yhdi-book-header h2{margin:2px 0;color:var(--yhdi-navy);font-size:clamp(23px,4vw,36px);font-weight:900;line-height:1.25}.yhdi-book-header p{margin:4px 0 0;font-size:13px;color:var(--yhdi-muted)}.yhdi-overline{font-size:10px;color:#6898b8;letter-spacing:1.3px;font-weight:900}.yhdi-header-actions{display:flex;gap:7px;flex-wrap:wrap}.yhdi-header-actions button,.yhdi-bottom-navigation button,.yhdi-doc-navigation button{border:1px solid var(--yhdi-border);border-radius:12px;background:#fff;color:var(--yhdi-navy);padding:8px 13px;font-size:14px;font-weight:800}.yhdi-header-actions button:hover,.yhdi-bottom-navigation button:hover,.yhdi-doc-navigation button:hover{background:#eaf5fc}.yhdi-header-actions button[aria-current="page"]{background:#087fc2;color:#fff;border-color:#087fc2}.yhdi-view[hidden]{display:none!important}.yhdi-views{perspective:1300px}.yhdi-view{animation:yhdi-page-in var(--yhdi-turn,1.5s) ease both;transform-origin:left center;backface-visibility:hidden}.yhdi-photo-stage{position:relative;margin:0 auto;overflow:hidden;max-width:100%;border-radius:6px}.yhdi-photo-cover{width:min(100%,730px);aspect-ratio:1254/1254}.yhdi-photo-directory{width:min(100%,900px);aspect-ratio:1500/1000}.yhdi-photo-stage>img{width:100%;height:100%;display:block;object-fit:contain}.yhdi-photo-turn{position:absolute;inset:0;z-index:1;border:0;background:transparent;cursor:pointer}.yhdi-hotspot{position:absolute;z-index:3;background:transparent;border:0!important;border-radius:3px;padding:0!important;min-height:0;min-width:0;display:block}.yhdi-hotspot:hover,.yhdi-hotspot:focus-visible{outline:2px solid #087fc2!important;outline-offset:-1px;background:rgba(5,114,187,.13)}.yhdi-photo-hint{text-align:center;color:var(--yhdi-muted);font-size:12px;margin:12px 0 18px}.yhdi-directory-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:5px 4px 10px;color:var(--yhdi-navy)}.yhdi-directory-toolbar span{color:var(--yhdi-muted);font-size:12px}.yhdi-doc-sheet{width:min(100%,800px);margin:4px auto 20px;padding:30px 32px 28px;border:1px solid var(--yhdi-border);border-radius:23px;background:#fff;box-shadow:0 16px 30px #0e376112}.yhdi-tab-pill{display:inline-block;background:#e1f5fb;border-radius:999px;color:#006691;font-weight:900;font-size:13px;padding:4px 11px}.yhdi-doc-sheet h2{font-size:clamp(26px,5vw,42px);font-weight:900;margin:8px 0 16px;line-height:1.35;color:var(--yhdi-navy)}.yhdi-doc-subtitle{border-top:1px solid var(--yhdi-border);padding-top:11px;color:#537494;font-size:14px;margin-bottom:10px}.yhdi-document-body{font-size:16px;line-height:1.8;color:#415b72;min-height:90px;overflow-wrap:anywhere}.yhdi-document-body h1,.yhdi-document-body h2,.yhdi-document-body h3{color:var(--yhdi-navy);margin:13px 0 8px;font-weight:800}.yhdi-document-body h1{font-size:24px}.yhdi-document-body h2{font-size:21px}.yhdi-document-body h3{font-size:18px}.yhdi-document-body p{margin:8px 0 15px}.yhdi-document-body table{width:100%;border-collapse:collapse;font-size:13px;display:block;overflow-x:auto}.yhdi-document-body table th,.yhdi-document-body table td{border:1px solid #c9dce8;padding:8px 10px}.yhdi-document-body table th{background:#eaf3f8}.yhdi-document-body img{max-width:100%;height:auto}.yhdi-document-body pre{overflow:auto;border-radius:9px;padding:11px;background:#eff4f7}.yhdi-document-body blockquote{margin:13px 0;border-left:3px solid #7caace;padding:7px 14px;background:#f3f9fd}.yhdi-doc-navigation{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;gap:8px;margin-top:24px}.yhdi-doc-navigation button{justify-self:start;white-space:nowrap}.yhdi-doc-navigation button:nth-child(2){justify-self:center}.yhdi-doc-navigation button:nth-child(3){justify-self:end}.yhdi-doc-navigation button:disabled,.yhdi-bottom-navigation button:disabled{opacity:.32;cursor:not-allowed}.yhdi-editor-hint{font-size:12px;color:#496b84}.yhdi-bottom-navigation{position:sticky;bottom:0;z-index:15;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;border:1px solid var(--yhdi-border);border-radius:15px;background:rgba(255,255,255,.97);box-shadow:0 6px 20px #0b2f4c18;padding:11px 13px;backdrop-filter:blur(10px)}.yhdi-bottom-navigation button{padding:6px 10px;font-size:12px}.yhdi-counter{font-weight:800;font-size:12px;color:var(--yhdi-muted);text-align:center}.yhdi-book a{color:#04679e;text-decoration:underline}.yhdi-book a:hover{color:#003e69}@keyframes yhdi-page-in{from{opacity:.40;transform:rotateY(-17deg) translateX(10px)}to{opacity:1;transform:rotateY(0deg) translateX(0)}}@media(max-width:640px){.yhdi-book{padding:0 4px}.yhdi-book-header{padding:11px;align-items:flex-start;flex-direction:column}.yhdi-book-header h2{font-size:25px}.yhdi-doc-sheet{padding:19px 15px;border-radius:17px}.yhdi-doc-navigation button{font-size:11px;padding:8px}.yhdi-directory-toolbar{font-size:12px}.yhdi-directory-toolbar span{font-size:10px}.yhdi-bottom-navigation{padding:9px 7px}.yhdi-bottom-navigation button{font-size:11px;padding:6px 7px}.yhdi-counter{order:5;flex-basis:100%;text-align:center}.yhdi-photo-hint{font-size:11px}}@media(prefers-reduced-motion:reduce){.yhdi-view{animation:none}}

/* Optional same-DOM V5.8 integration: no changes to the original H5 required. */
.yhdi-bridge-close{display:none;border:1px solid #cde0f0;border-radius:11px;background:#f5fbff;color:#092b55;padding:8px 13px;margin-left:auto;margin-bottom:10px;font-weight:800}.yhdi-bridge-mode{display:none}.yhdi-bridge-mode.yhdi-bridge-open{display:block;position:fixed;inset:2vh 2vw;overflow:auto;z-index:200001;width:auto;max-width:none;margin:0;border:1px solid #b6d2e5;border-radius:20px;padding:14px 16px 25px;background:#f8fbfd;box-shadow:0 26px 90px #04182d6b}.yhdi-bridge-open .yhdi-bridge-close{display:block}.yhdi-bridge-backdrop{display:none;position:fixed;inset:0;background:rgba(4,24,45,.60);z-index:200000}.yhdi-bridge-backdrop.open{display:block}@media(max-width:640px){.yhdi-bridge-mode.yhdi-bridge-open{inset:0;padding:10px;border-radius:0}}

/* v1.4.2: public template + privately authenticated, owner-scoped document UI */
.yhdi-account-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#f1f7fd;border:1px solid #c9dced;border-radius:12px;padding:10px 16px;margin:6px 0 15px;font-size:13px;color:#234861}
.yhdi-account-bar a{font-weight:800;white-space:nowrap}
.yhdi-account-refresh{border:1px solid #bad4e5;border-radius:9px;background:white;padding:6px 12px;font-weight:700}
.yhdi-account-bar [hidden]{display:none!important}
.yhdi-doc-mode-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 13px;padding-bottom:12px;border-bottom:1px solid #dce9f2}
.yhdi-doc-mode-tabs button{background:#fff;color:#144166;border:1px solid #c3d9e9;border-radius:10px;padding:7px 12px;font-size:13px;font-weight:700}
.yhdi-doc-mode-tabs button.is-active{background:#0c78af;color:white;border-color:#0c78af}
.yhdi-personal-region{padding:12px;border:1px solid #d1e2ee;background:#fbfdff;border-radius:13px;min-height:110px;overflow-wrap:anywhere}
.yhdi-personal-region[hidden],.yhdi-document-body[hidden],.yhdi-personal-editor[hidden]{display:none!important}
.yhdi-personal-hint{margin:0 0 12px;font-size:12px;color:#45667c}
.yhdi-personal-view>h3{margin:0 0 10px;font-size:20px;color:#092b55}
.yhdi-private-safe-html{padding:10px 13px;background:#fff;border:1px solid #e2edf5;border-radius:11px;min-height:55px;line-height:1.75}
.yhdi-private-safe-html img{max-width:100%;height:auto}
.yhdi-private-safe-html table{max-width:100%;display:block;overflow:auto;border-collapse:collapse}
.yhdi-private-safe-html table td,.yhdi-private-safe-html table th{border:1px solid #c4dbe8;padding:5px}
.yhdi-private-stamp{display:block;color:#5b7284;margin-top:8px}
.yhdi-personal-editor{margin-top:18px;padding:14px;background:#eef6fc;border:1px solid #d0e3f0;border-radius:11px}
.yhdi-personal-editor label{display:block;color:#1b4265;font-size:13px;font-weight:750;margin-bottom:12px}
.yhdi-personal-editor input,.yhdi-personal-editor textarea{display:block;width:100%;padding:9px 10px;border:1px solid #b4cedf;border-radius:8px;background:#fff;color:#203950;font-size:14px;font-weight:400;margin-top:4px}
.yhdi-personal-editor textarea{min-height:170px;font-family:ui-monospace,Menlo,Consolas,monospace;line-height:1.5}
.yhdi-personal-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px}
.yhdi-personal-actions button{padding:8px 14px;border-radius:9px;background:#087fc2;border:1px solid #087fc2;color:#fff;font-weight:800}
.yhdi-personal-actions button:disabled{opacity:.6}
.yhdi-personal-actions [data-yhdi-save-status]{color:#3b5b72}
@media(max-width:640px){.yhdi-account-bar{padding:9px}.yhdi-doc-mode-tabs{gap:5px}.yhdi-doc-mode-tabs button{padding:7px 9px;font-size:12px}.yhdi-personal-region{padding:10px}}

/* v1.4.6: one document title, one content area, one navigation row. */
.yhdi-book[data-yhdi-current="tab"] .yhdi-header-title{display:none!important}
.yhdi-book .yhdi-book-header{padding:11px 16px;gap:14px;min-height:58px}
.yhdi-book .yhdi-header-tools{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-left:auto;flex-wrap:wrap}
.yhdi-book .yhdi-header-title h2{font-size:clamp(20px,3vw,27px);margin:0}
.yhdi-book .yhdi-header-account{font-weight:700;color:#34526c;font-size:12px;display:flex;align-items:center;gap:10px}
.yhdi-book .yhdi-header-account a{white-space:nowrap}
.yhdi-book .yhdi-header-account [hidden]{display:none!important}
.yhdi-book .yhdi-doc-sheet{max-width:800px;padding:28px 30px 26px}
.yhdi-book .yhdi-document-heading{font-size:clamp(24px,3.4vw,37px);line-height:1.3;margin:0 0 20px;padding-bottom:16px;border-bottom:1px solid #d7e7f1;color:#002e62;overflow-wrap:anywhere}
.yhdi-book .yhdi-doc-sheet .yhdi-document-body{min-height:115px}
.yhdi-book .yhdi-personal-region{margin-top:18px;padding:0;border:0;background:transparent;min-height:0}
.yhdi-book .yhdi-personal-editor{margin:0;padding:15px;background:#f3f8fc}
.yhdi-book .yhdi-edit-trigger{border:1px solid #cde0f0;border-radius:10px;padding:7px 13px;background:#fff;color:#075783;font-size:13px;font-weight:700}
.yhdi-book .yhdi-edit-trigger[hidden]{display:none!important}
.yhdi-book .yhdi-cancel-edit{background:#fff;color:#1c4868;border:1px solid #cde0f0}
.yhdi-book .yhdi-bottom-navigation{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;padding:12px 18px;border-radius:16px;flex-wrap:nowrap}
.yhdi-book .yhdi-bottom-navigation button{font-size:14px;font-weight:800;padding:8px 13px;white-space:nowrap}
.yhdi-book .yhdi-bottom-navigation button:first-child{justify-self:start}
.yhdi-book .yhdi-bottom-navigation button:nth-child(2){justify-self:center}
.yhdi-book .yhdi-bottom-navigation button:last-child{justify-self:end}
.yhdi-book [data-yhdi-public-body][hidden]{display:none!important}
@media(max-width:640px){.yhdi-book .yhdi-book-header{align-items:flex-start;flex-direction:row;gap:8px}.yhdi-book .yhdi-header-tools{margin-left:auto;justify-content:flex-end;gap:6px}.yhdi-book .yhdi-header-account{font-size:11px;gap:4px}.yhdi-book .yhdi-doc-sheet{padding:20px 16px}.yhdi-book .yhdi-bottom-navigation{padding:10px 7px;gap:3px}.yhdi-book .yhdi-bottom-navigation button{font-size:11px;padding:7px 8px}}
/* Page control follows the page content, without covering rows 41–50. */
.yhdi-book .yhdi-bottom-navigation{position:relative;bottom:auto;z-index:1;margin-top:12px}
.yhdi-book .yhdi-document-heading{font-size:clamp(22px,2.6vw,31px)}


/* v1.4.7: Content TAB pages are ONE cohesive H5-style card; cover and directory unchanged. */
.yhdi-doc-kicker{color:#6a9bbc;font-weight:900;letter-spacing:1.25px;font-size:10px;line-height:1.5;text-transform:uppercase}
.yhdi-doc-tablabel{display:table;margin:5px 0 0;padding:4px 12px;border-radius:999px;background:#e3f5fa;color:#08739e;font-weight:800;font-size:13px;line-height:1.4;max-width:100%;overflow-wrap:anywhere}
.yhdi-book[data-yhdi-current="tab"]{position:relative;padding:30px 34px 24px;border:1px solid var(--yhdi-border);border-radius:24px;background:#fff;box-shadow:0 16px 36px #0e376114;width:min(100%,960px);margin:22px auto 30px}
.yhdi-book[data-yhdi-current="tab"] .yhdi-book-header{position:absolute;top:22px;right:30px;width:auto;min-height:0;max-width:52%;padding:0;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;z-index:2}
.yhdi-book[data-yhdi-current="tab"] .yhdi-header-title{display:none!important}
.yhdi-book[data-yhdi-current="tab"] .yhdi-header-actions button{padding:7px 11px}
.yhdi-book[data-yhdi-current="tab"] .yhdi-views{perspective:1300px}
.yhdi-book[data-yhdi-current="tab"] .yhdi-doc-sheet{width:100%;max-width:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent}
.yhdi-book[data-yhdi-current="tab"] .yhdi-document-heading{font-size:clamp(30px,4vw,42px);font-weight:900;margin:15px 0 20px;padding:0;border:0;line-height:1.22;color:var(--yhdi-navy)}
.yhdi-book[data-yhdi-current="tab"] .yhdi-document-body{min-height:110px;margin:0;padding:0;color:#485f74;font-size:16px;line-height:1.8}
.yhdi-book[data-yhdi-current="tab"] .yhdi-personal-region{margin-top:18px}
.yhdi-book[data-yhdi-current="tab"] .yhdi-bottom-navigation{position:relative;bottom:auto;z-index:1;margin:28px 0 0;padding:16px 0 0;gap:10px;border:0;border-top:1px solid #dceaf3;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none}
.yhdi-book[data-yhdi-current="tab"] .yhdi-bottom-navigation button{font-size:14px;padding:9px 13px}
@media(max-width:700px){
  .yhdi-book[data-yhdi-current="tab"]{padding:16px 16px 18px;border-radius:18px}
  .yhdi-book[data-yhdi-current="tab"] .yhdi-book-header{position:static;max-width:none;width:100%;justify-content:flex-end;min-height:0;padding:0;margin:0 0 16px}
  .yhdi-book[data-yhdi-current="tab"] .yhdi-header-tools{justify-content:flex-end;flex-wrap:wrap}
  .yhdi-book[data-yhdi-current="tab"] .yhdi-document-heading{font-size:clamp(27px,6vw,36px);margin:11px 0 15px}
  .yhdi-book[data-yhdi-current="tab"] .yhdi-bottom-navigation{padding-top:13px;gap:4px}
  .yhdi-book[data-yhdi-current="tab"] .yhdi-bottom-navigation button{padding:7px 6px;font-size:11px}
  .yhdi-doc-tablabel{font-size:12px}
}

/* H5 headings use a CJK sans-serif rather than the browser's serif fallback. */
.yhdi-book[data-yhdi-current="tab"] .yhdi-document-heading,.yhdi-book[data-yhdi-current="tab"] .yhdi-doc-tablabel{font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif}

.yhdi-book[data-yhdi-current="tab"] .yhdi-document-body{font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif}

/* DASSN v1.4.8: editable, synchronized double-column catalogue captions. */
.yhdi-photo-directory{container-type:inline-size}
.yhdi-directory-label{position:absolute;z-index:6;display:flex;align-items:center;justify-content:flex-start;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:left;color:#141d24;background:#fff;border:0!important;border-radius:0!important;padding:0 1px!important;line-height:1;font-size:clamp(2px,.76cqw,12px)!important;font-weight:600!important;letter-spacing:-.01em;cursor:pointer}
.yhdi-directory-label span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}
.yhdi-directory-label:hover,.yhdi-directory-label:focus-visible{outline:1px solid #007ca5!important;background:#e6f5fd}
.yhdi-catalog-editing .yhdi-directory-label{background:#e3f2fa;border-bottom:1px solid #147caa!important}
.yhdi-directory-toolbar{flex-wrap:wrap}
.yhdi-directory-toolbar [data-yhdi-catalog-toggle],.yhdi-catalog-editor button{padding:5px 10px;border:1px solid #96bfdb;background:#fff;color:#075886;border-radius:8px;font-weight:700}
.yhdi-directory-toolbar [data-yhdi-catalog-toggle]{margin-left:auto;font-size:12px}
.yhdi-catalog-editor{margin:8px 0 12px;padding:12px;border:1px solid #9bc8e1;border-radius:12px;background:#eff8fd}
.yhdi-catalog-editor label{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.yhdi-catalog-editor input{flex:1;min-width:210px;padding:8px;border:1px solid #abc9dc;border-radius:8px}
.yhdi-catalog-editor [role="status"]{display:inline-block;padding:4px;font-size:12px;color:#315777}
.yhdi-directory-label:focus-visible{z-index:9}

/* v1.4.9: all directory save/cancel controls live in the right-side top toolbar. */
.yhdi-directory-toolbar .yhdi-catalog-toolbar-actions{display:flex;align-items:center;gap:7px;margin-left:auto}
.yhdi-directory-toolbar .yhdi-catalog-toolbar-actions button{padding:6px 12px;border:1px solid #96bfdb;border-radius:8px;background:#fff;color:#075886;font-weight:700;font-size:12px;cursor:pointer}
.yhdi-directory-toolbar .yhdi-catalog-toolbar-actions [data-yhdi-catalog-save]{background:#087fc2;color:#fff;border-color:#087fc2}
.yhdi-directory-toolbar .yhdi-catalog-toolbar-actions [hidden],.yhdi-book [data-yhdi-edit-toggle][hidden]{display:none!important}
.yhdi-catalog-editor-note{font-size:12px;color:#315777;margin:9px 0 0}
.yhdi-book [data-yhdi-personal-title][readonly]{background:#eaf0f5;color:#40586a}
@media(max-width:640px){.yhdi-directory-toolbar .yhdi-catalog-toolbar-actions{margin-left:auto;flex-wrap:wrap}}

/* v1.5.0 - continuous masking eliminates the horizontal banding caused by 100 row backgrounds. */
.yhdi-photo-directory .yhdi-directory-title-mask{
 position:absolute;z-index:4;pointer-events:none;background:#fbfcfd;
}
.yhdi-photo-directory .yhdi-mask-left{left:30.88%;top:17.7%;width:13.85%;height:73.1%}
.yhdi-photo-directory .yhdi-mask-right{left:72.56%;top:16.65%;width:17.80%;height:74.2%}
.yhdi-photo-directory .yhdi-directory-label{
 position:absolute;z-index:7;display:block;overflow:visible;
 border:0!important;border-radius:0!important;padding:0!important;
 background:transparent!important;box-shadow:none!important;
 color:#17212a;font-weight:650!important;line-height:1!important;
 font-size:clamp(5px,.75cqw,11px)!important;
}
.yhdi-directory-link,.yhdi-directory-inline{
 display:block;width:100%;height:100%;margin:0;padding:0 2px!important;
 border:0!important;outline:0!important;border-radius:0!important;
 background:transparent!important;box-shadow:none!important;
 font:inherit!important;font-size:inherit!important;line-height:1!important;
 color:#15212d!important;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.yhdi-directory-link span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.yhdi-directory-inline{display:none!important;caret-color:#086fa6}
.yhdi-book.yhdi-can-edit-directory .yhdi-directory-link{display:none!important}
.yhdi-book.yhdi-can-edit-directory .yhdi-directory-inline{display:block!important}
.yhdi-directory-label:focus-within{z-index:12!important}
.yhdi-directory-inline:focus{
 position:relative;z-index:12;
 background:#fff!important;outline:2px solid #087fc2!important;
 border-radius:2px!important;box-shadow:0 2px 12px #163d6650!important;
 text-overflow:clip;
}
.yhdi-book .yhdi-inline-status{margin-left:auto;color:#316483;font-size:12px;white-space:normal}
.yhdi-book .yhdi-inline-status.is-error{color:#aa302e}

/* Direct content editing and per-tab autosave. */
.yhdi-book[data-yhdi-current="tab"]{padding-right:77px;min-height:600px}
.yhdi-book .yhdi-doc-tablabel{display:flex;align-items:center;gap:0;max-width:100%;white-space:normal}
.yhdi-tab-prefix{flex:none}
.yhdi-inline-tab-title{
 flex:1;min-width:0;width:100%;max-width:100%;margin:0!important;
 border:1px solid transparent!important;outline:0!important;background:transparent!important;
 padding:1px 2px!important;border-radius:5px!important;
 color:inherit!important;font:inherit!important;font-weight:inherit!important;
 cursor:default;box-shadow:none!important;
}
.yhdi-inline-tab-title:not([readonly]){cursor:text}
.yhdi-inline-tab-title:not([readonly]):hover{background:#f1fafd!important}
.yhdi-inline-tab-title:not([readonly]):focus{border-color:#5caadc!important;background:#fff!important;outline:2px solid #5caadc40!important}
.yhdi-book .yhdi-document-body[contenteditable="true"]{
 min-height:220px;border:1px solid transparent;border-radius:10px;
 padding:11px;margin:0 -11px;outline:none;cursor:text;
}
.yhdi-book .yhdi-document-body[contenteditable="true"]:hover{border-color:#d0e7f5;background:#fbfdff}
.yhdi-book .yhdi-document-body[contenteditable="true"]:focus{
 border-color:#85bad9;background:#fff;box-shadow:0 0 0 3px #087fc211;
}
.yhdi-document-body[contenteditable="true"]:empty:before{
 content:'点击此处直接输入正文，系统自动保存';color:#879bac;pointer-events:none;
}
.yhdi-book .yhdi-edit-toolbar{display:flex;align-items:center;gap:6px;margin:0 0 8px}
.yhdi-book .yhdi-edit-toolbar[hidden]{display:none!important}
.yhdi-edit-toolbar button{border:1px solid #ccdeeb;border-radius:7px;background:#fff;color:#0b5278;padding:4px 10px;font-size:12px;min-height:30px}
.yhdi-edit-toolbar button:hover{background:#eaf5fc}
.yhdi-body-autosave-status{min-height:19px;color:#557891;font-size:12px;margin-top:4px}
.yhdi-body-autosave-status.is-error{color:#b23030;font-weight:650}
.yhdi-body-autosave-status:empty{min-height:0}
.yhdi-book .yhdi-tab-rail{
 position:absolute;top:128px;right:12px;bottom:90px;width:42px;
 display:flex;flex-direction:column;gap:3px;overflow-y:auto;overscroll-behavior:contain;
 z-index:9;scrollbar-width:thin;scrollbar-color:#8cbbd8 transparent;padding:2px;
}
.yhdi-book .yhdi-tab-rail[hidden]{display:none!important}
.yhdi-tab-rail-item{flex:none;display:block;width:34px;min-height:26px;padding:1px 0!important;
 border:0!important;border-radius:5px 10px 10px 5px!important;
 color:#073052!important;background:var(--yhdi-tab-color)!important;
 font-size:12px!important;font-weight:900!important;text-align:center;
}
.yhdi-tab-rail-item[aria-current="page"]{
 outline:3px solid #063a69!important;outline-offset:-1px;
 box-shadow:0 0 0 3px #fff,0 2px 9px #113d6e55!important;
 color:#fff!important;text-shadow:0 1px 2px #17466d;
}
.yhdi-rail-shade-0{--yhdi-tab-color:#ff5b67}.yhdi-rail-shade-1{--yhdi-tab-color:#ffa038}
.yhdi-rail-shade-2{--yhdi-tab-color:#fff34d}.yhdi-rail-shade-3{--yhdi-tab-color:#9fec35}
.yhdi-rail-shade-4{--yhdi-tab-color:#3bea63}.yhdi-rail-shade-5{--yhdi-tab-color:#4beae8}
.yhdi-rail-shade-6{--yhdi-tab-color:#24b0ff}.yhdi-rail-shade-7{--yhdi-tab-color:#a8a0ff}
.yhdi-rail-shade-8{--yhdi-tab-color:#e973db}.yhdi-rail-shade-9{--yhdi-tab-color:#f77eb3}
@media(max-width:640px){
 .yhdi-book[data-yhdi-current="tab"]{padding-right:48px;min-height:570px}
 .yhdi-book .yhdi-tab-rail{right:5px;top:116px;bottom:86px;width:32px}
 .yhdi-tab-rail-item{width:27px;min-height:24px;font-size:10px!important}
 .yhdi-book .yhdi-doc-tablabel{display:flex;font-size:11px}
 .yhdi-book .yhdi-inline-status{font-size:10px}
 .yhdi-book .yhdi-document-body[contenteditable="true"]{min-height:150px}
}

/* v1.5.1: prevent the document TAB rail and editable title from overlapping controls.
   Only the TAB view uses the 2-column layout. Cover and directory retain v1.5.0 geometry. */
.yhdi-book[data-yhdi-current="tab"]{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) 48px;
 column-gap:16px;
 row-gap:0;
 padding-right:34px;
 align-items:start;
}
.yhdi-book[data-yhdi-current="tab"] > .yhdi-book-header{
 position:static!important;top:auto;right:auto;max-width:none;width:100%;
 grid-column:1 / -1;grid-row:1;
 display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
 gap:10px;min-height:36px;margin:0 0 18px;padding:0;
}
.yhdi-save-indicator{display:none;align-items:center;gap:6px;color:#426983;font-size:12px;font-weight:700;white-space:nowrap;}
.yhdi-book[data-yhdi-current="tab"] .yhdi-save-indicator{display:inline-flex;}
.yhdi-save-indicator:before{content:"✓";display:inline-grid;place-items:center;width:18px;height:18px;flex:none;border-radius:50%;background:#e2f4e9;color:#117448;font-weight:900}
.yhdi-save-indicator.is-error{color:#a62e2e}
.yhdi-save-indicator.is-error:before{content:"!";color:#a62e2e;background:#fdebea}
.yhdi-book[data-yhdi-current="tab"] .yhdi-header-tools{
 margin-left:auto;max-width:100%;justify-content:flex-end;gap:10px;min-width:0;
}
.yhdi-book[data-yhdi-current="tab"] > .yhdi-views{
 grid-column:1;grid-row:2;min-width:0;width:100%;
}
.yhdi-book[data-yhdi-current="tab"] > .yhdi-tab-rail{
 position:sticky!important;grid-column:2;grid-row:2;
 top:16px;right:auto;bottom:auto;
 display:flex;align-items:center;justify-content:flex-start;
 width:48px;min-width:0;height:min(530px,calc(100dvh - 150px));max-height:640px;
 overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
 z-index:1;gap:3px;padding:6px 4px;margin:0;
 border:1px solid #d7e7f3;border-radius:12px;background:#f8fbff;
 scrollbar-width:thin;scrollbar-color:#8cbbd8 transparent;
}
.yhdi-book[data-yhdi-current="tab"] > .yhdi-tab-rail[hidden]{display:none!important}
.yhdi-book[data-yhdi-current="tab"] .yhdi-tab-rail-item{width:36px;min-height:27px;line-height:24px;flex:none}
.yhdi-book[data-yhdi-current="tab"] > .yhdi-bottom-navigation{
 grid-column:1 / -1;grid-row:3;width:100%;margin-top:20px;
}
.yhdi-book[data-yhdi-current="tab"] > .yhdi-bridge-close{grid-column:1/-1}
.yhdi-book[data-yhdi-current="tab"] .yhdi-doc-tablabel{
 display:inline-flex;align-items:center;gap:1px;
 width:min(100%,540px);max-width:100%;min-height:30px;
 margin:6px 0 0;padding:4px 11px;white-space:nowrap;vertical-align:top;
}
.yhdi-book[data-yhdi-current="tab"] .yhdi-doc-tablabel .yhdi-tab-prefix{flex:0 0 auto;white-space:nowrap}
.yhdi-book[data-yhdi-current="tab"] .yhdi-doc-tablabel .yhdi-inline-tab-title{
 flex:1 1 auto;min-width:0;width:auto!important;max-width:465px;
 font-size:inherit!important;line-height:1.35!important;height:24px;
}
.yhdi-book[data-yhdi-current="tab"] .yhdi-doc-sheet,.yhdi-book[data-yhdi-current="tab"] .yhdi-document-body{min-width:0}
@media(max-width:700px){
 .yhdi-book[data-yhdi-current="tab"]{grid-template-columns:minmax(0,1fr) 35px;column-gap:8px;padding:16px!important;}
 .yhdi-book[data-yhdi-current="tab"] > .yhdi-book-header{margin-bottom:12px;gap:8px}
 .yhdi-book[data-yhdi-current="tab"] .yhdi-header-actions button{padding:6px 9px}
 .yhdi-book[data-yhdi-current="tab"] .yhdi-doc-tablabel{width:min(100%,540px);font-size:12px;padding:4px 7px}
 .yhdi-book[data-yhdi-current="tab"] > .yhdi-tab-rail{top:12px;width:35px;height:min(460px,calc(100dvh - 125px));padding:5px 2px;border-radius:9px}
 .yhdi-book[data-yhdi-current="tab"] .yhdi-tab-rail-item{width:29px;min-height:26px;font-size:10px!important}
 .yhdi-save-indicator{font-size:11px}
}
@media(max-width:400px){
 .yhdi-book[data-yhdi-current="tab"]{column-gap:5px;padding:12px!important;}
 .yhdi-book[data-yhdi-current="tab"] .yhdi-doc-tablabel{font-size:11px}
 .yhdi-book[data-yhdi-current="tab"] .yhdi-doc-tablabel .yhdi-inline-tab-title{height:22px}
}
