/* Unified layout. One scale for cards, filters, sidebar and reading pages. */
:root{--ui:clamp(15px,0.8vw + 5px,19px);--title:1.38;--sidebar:240px;--gap:12px;--header:60px;--header-base:60px;--ink:#424242;--accent:#2c9ce4}
html{scroll-padding-top:80px}*,*::before,*::after{box-sizing:border-box}
body{margin:0;min-width:0;overflow-x:visible;font-size:var(--ui);line-height:1.5;color:var(--ink);background:#fbf5f6;background-image:radial-gradient(at 10% 0%,#f8e4e1,transparent 60%),radial-gradient(at 100% 30%,#eee7fa,transparent 65%);background-attachment:fixed}
body::after{display:none}img{max-width:100%}a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.skip-link{position:fixed;top:-100px;left:10px;z-index:9999;background:white;padding:10px}.skip-link:focus{top:5px}
#topbar{position:fixed;top:0;left:0;width:100%;height:auto;min-height:var(--header-base);z-index:100;background:#ded3d4eF;box-shadow:0 2px 8px #0001}
#topbar .topbar_width{width:100%;max-width:none;margin:0;min-height:var(--header-base);padding:6px 12px;display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px}
#topbar .homeicon{float:none;display:block;flex:none;width:110px;height:auto;margin:0;padding:0;background:none}#topbar .homeicon img{display:block;width:100%;height:auto}
.site-wechat{font-size:var(--ui)}.site-menu{margin-left:auto;min-width:0}.site-menu ul{display:flex;flex-wrap:wrap;gap:8px 16px;list-style:none}.site-menu a{font-size:var(--ui)}
#wrapper{position:relative;z-index:1;width:auto!important;min-width:0!important;max-width:none!important;margin:0 0 0 calc(var(--sidebar) + 20px)!important;padding:calc(var(--header) + 16px) 12px 24px 0}
#content{margin:0!important;width:100%!important;min-width:0;max-width:none;display:block}.listing-content{container-type:inline-size;container-name:cards;min-width:0}
#content>.main,.main{float:none;position:relative;width:100%;min-width:0;margin:0;padding:0}
.context-tag{padding:0;margin:0 0 20px;font-size:var(--ui)}.context-tag ul{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:0;padding:0}.context-tag li{float:none;margin:0;list-style:none;line-height:1.6;max-width:100%}
.context-tag a{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:3px 7px;border:1px solid #d8d8d8;border-radius:4px;background:#fff;color:#777!important;overflow-wrap:anywhere}
.context-tag a.current,.context-tag a:hover{background:var(--accent);border-color:var(--accent);color:white!important;text-decoration:none}.context-tag em{font:inherit;font-size:.88em;padding:0 4px;border-radius:2px;background:#73c9e5;color:white}
#content .main.card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gap);align-items:start}
@container cards (width < 1524px){#content .main.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container cards (width < 1012px){#content .main.card-grid{grid-template-columns:minmax(0,1fr)}}
@supports not (container-type:inline-size){@media(max-width:1795px){#content .main.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:1283px){#content .main.card-grid{grid-template-columns:minmax(0,1fr)}}}
#content .card-grid>ul.post,#content .card-grid>ul.post>li{float:none;width:100%;min-width:0;margin:0;padding:0;list-style:none}
#content .card-grid .box{position:relative;float:none;display:block;width:100%;height:auto;aspect-ratio:5/3;min-width:0;margin:0;padding:0;border:0;border-radius:5px;overflow:hidden;background:#dcd5d8;box-shadow:none;isolation:isolate}
#content .card-grid .box .card-image{position:absolute;inset:0;display:block;width:100%!important;height:100%!important;max-width:100%;object-fit:cover;object-position:center;margin:0;transition:filter .4s}
#content .card-grid .box .cover{position:absolute;inset:0;width:100%;height:100%;background:linear-gradient(#0006,transparent 85%);z-index:2;overflow:hidden}
#content .card-grid .article{float:none;position:static;display:flex;flex-direction:column;gap:.5em;width:100%;min-width:0;height:100%;padding:.8em;font-size:var(--ui);color:#fff}
#content .card-grid .info{position:static;float:none;display:flex;flex-wrap:wrap;gap:.3em;width:100%;min-width:0;height:auto;margin:0;padding:0;font-size:1em;line-height:1.4;overflow:visible;color:#fff}
#content .card-grid .info em{display:block;max-width:100%;font:inherit;margin:0;padding:.08em .3em;border-radius:3px;color:#666;background:#ffffffe0;white-space:normal;overflow-wrap:anywhere}
#content .card-grid h2{position:static;float:none;width:100%;min-width:0;height:auto;margin:0;padding:0;font-size:calc(var(--ui)*var(--title));line-height:1.35;overflow-wrap:anywhere}
#content .card-grid h2 a,#content .card-grid h2 a:visited{display:block;height:auto;color:white!important;font:inherit;text-shadow:0 1px 3px #0008;text-decoration:none}#content .card-grid h2 a::after{content:"";position:absolute;inset:0;z-index:3}
#content .card-grid .box:hover .card-image{filter:brightness(1.08)}
#sidebar{display:block!important;position:fixed;top:calc(var(--header) + 16px);left:10px;float:none;width:var(--sidebar)!important;min-width:var(--sidebar);max-width:var(--sidebar);height:auto;max-height:none;margin:0!important;padding:0;overflow:visible;z-index:5;font-size:var(--ui)}
.sidebar-panel>summary{display:none}.sidebar-inner,.sidebar-inner .widget,.sidebar-categories{width:100%;min-width:0;max-width:100%;overflow:visible}
#sidebar h3{height:auto;font-size:calc(var(--ui)*1.2);line-height:1.5;margin:0 0 12px;padding-bottom:6px;border-bottom:3px double #bbb}
#sidebar .sidebar-categories>img{display:block;width:240px;height:auto;max-width:100%;margin:0 0 10px}#sidebar ul{width:100%!important;list-style:none;margin:0;padding:0;overflow:visible!important}
#sidebar .sidebar-categories li{width:auto!important;max-width:100%;font-size:1em;line-height:1.6;overflow-wrap:anywhere}#sidebar .sidebar-categories li ul.children li{padding-left:16px;background:url(../images/tier5.gif) 4px 9px no-repeat}
.castles-link{display:block;margin-top:8px;font-size:1em}
#content .navigation{position:static;inset:auto;grid-column:1/-1;float:none;width:100%;font-size:var(--ui);margin:10px 0}.navigation .nav-links{display:flex;justify-content:center;flex-wrap:wrap;gap:6px}.navigation .page-numbers,.page-links a{display:inline-block;min-width:2em;padding:.2em .5em;background:#fff;border:1px solid #ddd;border-radius:4px}.navigation .current{background:var(--accent);color:white}
.empty-state{grid-column:1/-1;margin:0 0 20px;padding:24px;border-radius:6px;background:#ffffffa0;overflow-wrap:anywhere}.empty-state h1,.empty-state h2,.listing-title{font-size:calc(var(--ui)*var(--title));line-height:1.4;margin:0 0 12px}
.search-form{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.search-form label{flex:1;min-width:0}.search-field{width:100%;padding:8px;border:1px solid #ccc;border-radius:4px;font:inherit}.search-submit{padding:8px 14px;border-radius:4px;background:var(--accent);color:white;font:inherit;cursor:pointer}
#content .reading-content{width:100%;max-width:1200px;margin:0 auto;font-size:var(--ui)}
#content .singlebox,#content .commentbox{float:none;position:static;width:100%;min-width:0;max-width:100%;margin:0 0 20px;padding:clamp(16px,2vw,32px);background:#ffffffa8;border:0;border-radius:6px;box-shadow:0 0 2px #0002}
/* One article stylesheet for the current page and both neighboring pages. */
.entry-header :is(h1,.entry-title){font-size:calc(var(--ui)*1.8);line-height:1.4;margin:0 0 12px;padding:0;overflow-wrap:anywhere}
.article_info{padding:0;margin:0 0 24px;font-size:.9em;line-height:1.7;color:#777;overflow-wrap:anywhere}
#content .context.entry-content{display:flow-root;width:100%;max-width:100%;font-size:var(--ui)!important;line-height:1.95;overflow-wrap:anywhere}
.entry-content>*{max-width:100%}
#content .context.entry-content p{padding:0;margin:0 0 1em;text-indent:0}
#content .context.entry-content p:empty{display:none}
#content .context.entry-content :is(h1,h2,h3,h4,h5,h6){position:static;float:none;clear:both;width:auto;height:auto;max-width:100%;margin-left:0!important;margin-right:0!important;padding-left:0;padding-right:0;text-indent:0;left:auto;top:auto;line-height:1.55;overflow:visible}
#content .context.entry-content h1{font-size:1.6em;margin:1.5em 0 .65em!important;padding:0}
#content .context.entry-content h2{display:table;font-size:1.4em;font-weight:700;margin:1.4em 0 .65em!important;padding:0 0 .1em;background-image:linear-gradient(to right,#2c9ce4,#73c9e5);background-repeat:no-repeat;background-position:0 100%;background-size:100% .32em}
#content .context.entry-content h3{display:table;font-size:1.15em;font-weight:600;color:inherit;margin:1.2em 0 .6em!important;padding:0 0 .08em;background-image:linear-gradient(to right,#a7d9e9,#d5edf3);background-repeat:no-repeat;background-position:0 100%;background-size:100% .18em}
#content .context.entry-content :is(h4,h5,h6){display:block;font-size:1.05em;font-weight:600;margin:1em 0 .5em!important;padding:0;border:0;background:none;color:inherit}
#content .context.entry-content img{float:none;display:block;height:auto!important;max-width:100%!important;margin:0 auto}
#content .context.entry-content :is(figure,.wp-caption){position:relative;float:none;width:auto;max-width:100%;padding:10px 0;margin:1em 0;overflow:hidden}
/* Original article caption: white text and shadow over a fading band on the photo. */
#content .context.entry-content :is(figure figcaption,.wp-caption .wp-caption-text){position:absolute;top:10px;left:0;width:100%;height:fit-content;margin:0;padding:0 10px;background-image:linear-gradient(rgb(85 85 85 / 20%),transparent);background-color:transparent;color:#fff;text-align:left;text-shadow:1px 1px 0 #000;font-size:1em;line-height:1.95;box-sizing:border-box;pointer-events:none}
#content .context.entry-content :is(ul,ol){margin:0 0 1em;padding-left:1.5em}
#content .context.entry-content ul>li{list-style:disc;line-height:1.95}
#content .context.entry-content ol>li{list-style:decimal;line-height:1.95}
#content .context.entry-content li>p{margin-bottom:.4em}
.entry-content pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;background:#f0eeee;border-radius:4px}
.entry-content table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse}
.entry-content td,.entry-content th{padding:.4em;border:1px solid #ddd}
.entry-content iframe,.entry-content video,.entry-content embed{max-width:100%!important}
#content .context.entry-content blockquote{width:auto;margin:1em 0;padding:.6em 1em;border-left:3px solid #ccc;background:#f5f0f1;text-indent:0;font:inherit}
#content .context.entry-content blockquote:first-letter{padding:0;background:none;font:inherit}
/* A full-screen viewer must escape article/preview stacking contexts. */
body>.LGallery.LGallery_open{z-index:2147483000!important;background-color:#0e0e0e!important;opacity:1!important;isolation:isolate}
body>.LGallery:not(.LGallery_open){pointer-events:none!important}
body>.LGallery .LGallery-Counter{left:10px!important;right:auto!important;width:80px!important;white-space:nowrap!important;font-size:16px!important;line-height:1!important;justify-content:flex-start!important;pointer-events:none!important}
.entry-footer{margin-top:24px;font-size:.95em}.post-navigation{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:16px 0;font-size:.95em}.post-navigation a{max-width:100%;overflow-wrap:anywhere}
#article-index{position:static!important;float:none;width:100%;max-width:100%;margin:0 0 20px;padding:12px;background:#f3eef2;border-radius:5px}#index-ul li{list-style:decimal;margin-left:1.5em}#index-ul a{cursor:pointer;color:#c25b76}
.commentbox .articles{float:none;position:static;width:100%;margin:0;padding:0}#respond,#respond_box{width:100%;max-width:100%;padding:0}#commentform textarea{display:block;width:100%!important;max-width:100%;min-height:130px;font:inherit}#commentform input{max-width:100%;font:inherit}#commentform p{margin:.5em 0}.commentlist,.commentlist ol{list-style:none}.commentlist li.comment ul.children{margin-left:1em}.commentlist p{overflow-wrap:anywhere;line-height:1.7}.commentlist li.comment ul.children,.commentlist li.comment ul.children .comment-body{background:transparent!important}
.castle-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.castle-gallery figure{margin:0}.castle-gallery img{width:100%;aspect-ratio:5/3;object-fit:cover}
@media(max-width:900px){:root{--ui:16px;--header:56px;--header-base:56px}#wrapper{margin:0!important;padding:calc(var(--header) + 12px) 12px 20px}#sidebar{position:static;width:100%!important;min-width:0;max-width:none;top:auto;left:auto;margin:0 0 16px!important}.sidebar-panel{background:#ffffffb0;border:1px solid #ded6d9;border-radius:5px}.sidebar-panel>summary{display:list-item;cursor:pointer;padding:10px 12px;font-size:1em;font-weight:600}.sidebar-inner{padding:12px}.sidebar-inner .widget{max-width:240px}.site-wechat{font-size:.9em}.site-menu{width:100%;margin:0}.site-menu ul{gap:6px 14px}#topbar .homeicon{width:90px}#content .singlebox,#content .commentbox{padding:16px}.entry-header :is(h1,.entry-title){font-size:1.65em}.castle-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){:root{--ui:15px}.site-wechat{font-size:.85em}.entry-header :is(h1,.entry-title){font-size:1.5em}.castle-gallery{grid-template-columns:minmax(0,1fr)}.commentlist li.comment ul.children{margin-left:.5em}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.entry-content :where(div,section,figure,p,ul,ol){max-width:100%;min-width:0}
@media(min-width:901px) and (max-height:720px){#sidebar{position:absolute;left:-250px;top:calc(var(--header) + 16px)}}
