/* Phase one: readable content and a dependable notebook, preserving the original palette. */
*, *::before, *::after { box-sizing:border-box; }
[hidden] { display:none!important; }
body { padding-bottom:95px; }
.wrapper { max-width:1220px; padding:0 12px; }
.content,.blog-main,.post-main-content,.post-info { min-width:0; }
.sidebar { width:230px; }
.blog-sidebar { width:185px; flex-shrink:0; }
.post-sidebar { width:180px; flex-shrink:0; }
.post-detail-layout,.blog-layout { gap:20px; }
.post-main-content { flex:1; }
.post-body { font-size:16px; line-height:1.9; overflow-wrap:anywhere; }
.post-body img { display:block; max-width:100%; height:auto; border-radius:8px; margin:16px auto; }
.post-body pre { max-width:100%; overflow:auto; padding:14px; background:#f5f5f5; border-radius:6px; }
.post-body table { display:block; max-width:100%; overflow:auto; }
.post-body h1,.post-body h2,.post-body h3 { scroll-margin-top:20px; }
.post-thumb { flex-shrink:0; }
.post-thumb img { width:100%; height:100%; object-fit:cover; }
.cover-placeholder { min-height:130px; display:grid; place-items:center; background:#fff0f5; color:#a84268; font-size:48px; }
.top-nav ul { flex-wrap:wrap; gap:8px; justify-content:center; }
.top-nav li a { padding:8px 22px; }
.post-title a,.read-more a,.toc-list a { color:#a53660; }
.archive-header h1,.editor-heading h1 { margin:5px 0 12px; font-size:28px; overflow-wrap:anywhere; }
.admin-shortcuts { display:flex; flex-wrap:wrap; gap:16px; margin-bottom:12px; font-size:14px; }
.admin-shortcuts a { color:#964764; }
.editor-shell { padding:24px; }
.editor-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.eyebrow { font-size:11px; letter-spacing:2px; color:#987a85; margin:0; }
.editor-help { color:#73616b; }
.editor-shell label { display:block; font-weight:600; margin:12px 0 7px; }
.editor-shell input,.editor-shell textarea { width:100%; min-width:0; border:1px solid #e6b8c6; background:#fffdfd; border-radius:7px; padding:12px; color:#393239; font:inherit; }
.editor-shell textarea { resize:vertical; }
#entry-source { font:15px/1.85 ui-monospace,'Microsoft YaHei',monospace; min-height:350px; tab-size:2; }
.editor-toolbar { display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin:12px 0; }
button,.btn-retro,.upload-button { border:1px solid #dc9fb3; border-radius:6px; padding:8px 12px; background:#fff0f5; color:#813956; font:inherit; font-size:14px; cursor:pointer; text-decoration:none; }
button:hover,.btn-retro:hover { background:#ffe0eb; }
button:disabled { opacity:.5; cursor:wait; }
.editor-shell button { border-radius:6px; background:#fff0f5; color:#813956; font-weight:500; }
button.primary { background:#af4269; color:#fff; border-color:#af4269; }
.editor-shell button.primary { background:#af4269; color:#fff; }
body:has(.editor-shell) .system-monitor, body:has(.editor-shell) .mini-music { display:none; }
.editor-toolbar .upload-button { margin:0; font-weight:400; }
#word-count { margin-left:auto; color:#8c7480; font-size:12px; }
.editor-actions { position:sticky; bottom:0; background:#fffafc; border-top:1px dashed #e8b7c6; padding:14px 0; margin-top:18px; display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; z-index:5; }
.action-buttons { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
#save-status { display:block; font-size:13px; color:#4d745b; }
#public-note { display:block; margin-top:5px; }
.notice,#editor-message { padding:12px; margin:12px 0; border:1px solid #e5c27b; background:#fff9e8; border-radius:6px; color:#685029; overflow-wrap:anywhere; }
#editor-message { border-color:#dc92a6; background:#fff0f3; color:#833e52; }
.notice button { margin:6px; }
.publish-options,#history { margin:18px 0; border-top:1px dashed #e8c4ce; padding-top:14px; }
summary { cursor:pointer; color:#91516a; }
#revision-list { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.content-tabs { display:flex; flex-wrap:wrap; gap:10px; margin:20px 0; }
.content-tabs a { padding:8px 14px; border-radius:20px; color:#8d5269; text-decoration:none; background:#fdf3f7; }
.content-tabs a[aria-current] { background:#a73e65; color:white; }
.entry-card { padding:20px 0; border-top:1px dashed #dfc6cf; }
.entry-card h2 { color:#51424b; font-size:18px; border:0; margin:12px 0; overflow-wrap:anywhere; }
.entry-meta { display:flex; gap:10px; flex-wrap:wrap; align-items:center; color:#81717a; font-size:12px; }
.state-badge { padding:3px 8px; background:#edf7ee; color:#506f54; border-radius:20px; }
.danger { color:#9d334c; }
.empty-state { padding:40px 10px; color:#8a7781; text-align:center; }
.editor-image-list { display:flex; flex-wrap:wrap; gap:12px; }
.editor-image { width:150px; background:#fff5f8; padding:6px; border-radius:8px; }
.editor-image img { width:100%; height:110px; object-fit:cover; border-radius:5px; }
.editor-image button { font-size:11px; padding:5px; margin:2px; }
.log-gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:15px; }
.log-gallery img { width:100%; height:auto; aspect-ratio:1; object-fit:cover; border-radius:7px; }
.log-gallery:has(> :only-child) { grid-template-columns:minmax(0,400px); }
.log-edit { float:right; }
.log-body { white-space:normal; }
.log-date a { color:#9b5370; }
dialog { width:min(850px,94vw); max-height:90vh; border:2px solid #f0bacd; border-radius:12px; padding:24px; color:#51464c; background:#fffdfd; }
dialog::backdrop { background:rgba(53,35,47,.45); }
.preview-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.visually-hidden { position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
:focus-visible { outline:3px solid #8cbe99; outline-offset:3px; }
@media(max-width:1050px) {
 .sidebar { width:190px; } .blog-layout { flex-direction:column; } .blog-sidebar { width:100%; display:flex; flex-wrap:wrap; gap:12px; } .blog-sidebar .sidebar-box { flex:1; min-width:150px; }
 .post-detail-layout { flex-direction:column; } .post-sidebar { width:100%; order:-1; } .toc-list { display:flex; flex-wrap:wrap; gap:8px 20px; }
 .top-nav li a { padding:8px 15px; }
}
@media(max-width:700px) {
 body { padding-bottom:75px; } .wrapper { padding:0 8px; } .top-nav { margin-top:10px; } .top-nav ul { display:flex; gap:5px; } .top-nav li a { padding:7px 11px; font-size:14px; border-width:2px; border-radius:12px 12px 0 0; }
 .main-container { display:flex; flex-direction:column; padding:10px; gap:14px; border-width:2px; } .content { order:0; width:100%; } .sidebar { order:1; width:100%; display:none; }
 .widget { padding:14px; border-width:2px; } .archive-header { padding:14px; } .archive-header h1,.editor-heading h1 { font-size:23px; }
 .archive-post { padding:12px; gap:12px; } .post-thumb { width:90px; height:100px; } .post-title { font-size:17px; } .post-summary { font-size:13px; line-height:1.65; }
 .post-header h1 { font-size:26px; } .post-banner { height:130px; } .post-body { font-size:16px; } .post-main-content { width:100%; }
 .blog-sidebar { display:block; order:-1; } .blog-sidebar .sidebar-box:not(:first-child) { display:none; } .editor-shell { padding:14px; } #entry-source { font-size:16px; min-height:300px; } .editor-actions { bottom:0; margin-bottom:-10px; } .action-buttons { gap:6px; } .editor-actions .action-buttons { width:100%; } .editor-actions button { flex:1; padding:9px 7px; }
 .editor-toolbar button,.upload-button { font-size:12px; padding:7px 9px; } .admin-shortcuts { gap:12px; font-size:13px; }
 .system-monitor { display:none; } .mini-music { bottom:7px; left:8px; width:225px; max-width:calc(100vw - 16px); padding:7px; opacity:.92; } .mm-sub { display:none; }
 body:has(.editor-shell) .mini-music,body:has(.entry-list) .mini-music { display:none; }
 .dashboard-grid,.works-grid { grid-template-columns:1fr; } .stamp-grid-wide { grid-template-columns:repeat(3,1fr); } .sitemap-container { width:100%; padding:12px; display:flex; flex-direction:column; gap:16px; min-height:auto; } .retro-window { width:100%!important; min-width:0; } .connection-line { display:none; } .props-table { table-layout:fixed; width:100%; overflow-wrap:anywhere; }
 .deco { display:none; } .log-gallery { gap:5px; } dialog { padding:14px; } .hero-ascii { font-size:20px; white-space:pre-wrap; overflow-wrap:anywhere; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } .blink { visibility:visible!important; } }
