.diagram-gallery{padding:10px!important;box-sizing:border-box;clear:both;background:#faf8f3!important;border:1px solid #e3ded3!important;border-radius:12px;color:#302c25;font:15px/1.4 'Microsoft YaHei','PingFang SC',system-ui,sans-serif}
.diagram-gallery *{box-sizing:border-box}.diagram-gallery [hidden]{display:none!important}
.diagram-gallery h2{margin:0 0 10px!important;padding:12px 4px!important;border-radius:8px;background:#a52a2e;color:#fff;font-size:20px!important;font-weight:700;line-height:1.4;text-align:center}
.diagram-gallery .diagram-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:0 0 10px;padding:4px;border-radius:12px;background:#eee8df}
.diagram-gallery .diagram-tabs button{display:block;min-width:0;min-height:42px;margin:0;padding:8px 4px;border:0;border-radius:9px;background:transparent;color:#5d5041;font:700 17px/1.3 'Microsoft YaHei','PingFang SC',sans-serif;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.diagram-gallery .diagram-tabs button[aria-pressed=true]{background:#a52a2e;color:#fff}
.diagram-gallery .diagram-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;list-style:none;margin:0!important;padding:0!important}
.diagram-gallery .diagram-grid>li{display:block;width:auto!important;min-width:0;margin:0!important;padding:0!important;float:none!important;overflow:hidden;border:1px solid #e1dacd;border-radius:4px 4px 12px 12px;background:#fff;box-shadow:0 2px 0 #e7e0d4}
.diagram-gallery .diagram-picture{position:relative;display:block;width:100%;aspect-ratio:3/4;margin:0;padding:0;border:0;border-radius:0;background:#eee8df;color:inherit;text-decoration:none;overflow:hidden;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.diagram-gallery .diagram-picture img{display:block;width:100%;height:100%;margin:0;object-fit:fill}
.diagram-gallery .diagram-badge{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:max-content;max-width:calc(100% - 8px);padding:5px 7px;border:2px solid #fff;border-radius:14px;color:#fff;text-align:center;font-size:clamp(8px,2.45vw,16px);font-weight:700;line-height:1.25;box-shadow:0 2px 2px #0002;pointer-events:none}.diagram-gallery .diagram-badge-main{display:block;white-space:nowrap}.diagram-gallery .diagram-badge-detail{display:block;margin-top:2px;white-space:normal;overflow-wrap:anywhere;font-size:.9em;line-height:1.3}
.diagram-gallery .diagram-badge-red{background:linear-gradient(#b52225,#a5151a);font-size:clamp(9px,2.6vw,16px)}.diagram-gallery .diagram-badge-red .diagram-badge-main{font-weight:600}.diagram-gallery .diagram-badge-action{display:flex;align-items:center;justify-content:center;gap:4px;margin-top:1px;white-space:nowrap;font-size:1.1em;line-height:1.2}.diagram-gallery .diagram-badge-action:after{content:'';display:block;flex:none;width:.35em;height:.35em;border-top:.14em solid currentColor;border-right:.14em solid currentColor;transform:rotate(45deg)}.diagram-gallery .diagram-badge-green{background:#146447}
.diagram-gallery .diagram-caption{display:grid;grid-template-columns:minmax(0,1fr) 10px;align-content:center;align-items:center;column-gap:4px;row-gap:2px;min-height:64px;padding:7px 9px;color:#302c25;text-align:left;text-decoration:none}
.diagram-gallery .diagram-name{display:block;grid-column:1;min-width:0;margin:0;font-size:17px;font-weight:700;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.diagram-gallery .diagram-byline{display:block;grid-column:1;min-width:0;color:#876b50;font-size:14px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.diagram-gallery .diagram-arrow{grid-column:2;grid-row:1/3;justify-self:center;width:6px;height:6px;border-top:1.5px solid #a52a2e;border-right:1.5px solid #a52a2e;transform:rotate(45deg)}
.diagram-gallery .diagram-caption:hover{background:#f7f2e9}.diagram-gallery button:focus-visible,.diagram-gallery a:focus-visible{outline:2px solid #a52a2e;outline-offset:-3px}
.diagram-gallery .diagram-state{margin:12px 0;text-align:center;color:#847965;font-size:14px}
.diagram-gallery .diagram-waiting{display:grid;place-items:center;width:100%;aspect-ratio:3/4;padding:8px;background:#eee8df;color:#8c806d;font-size:13px;text-align:center}
.diagram-gallery .diagram-image-failed:after{content:'图纸暂时无法加载，点击查看图解';position:absolute;inset:0;display:grid;place-items:center;padding:10px;background:#eee8df;color:#8c806d;font-size:12px;text-align:center}
@media(max-width:600px){.diagram-gallery{padding:7px!important}.diagram-gallery h2{font-size:18px!important;padding:10px 3px!important}.diagram-gallery .diagram-tabs{margin-bottom:8px}.diagram-gallery .diagram-tabs button{font-size:16px;min-height:40px}.diagram-gallery .diagram-grid{gap:7px}.diagram-gallery .diagram-caption{min-height:51px;padding:6px 5px;column-gap:2px}.diagram-gallery .diagram-name{font-size:clamp(12px,3.3vw,15px)}.diagram-gallery .diagram-byline{font-size:clamp(10px,2.8vw,13px)}.diagram-gallery .diagram-badge{padding:4px 5px;border-width:1px}.diagram-gallery .diagram-arrow{width:5px;height:5px}}
