/* Mobile corner controls; independent of the scrolling header and Swup container. */
.ps-sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.ps-mobile-search, .ps-pet-toggle { display:none; }
@media (max-width:1182px) {
 .ps-mobile-search { display:block; position:fixed; top:max(10px,env(safe-area-inset-top)); right:max(10px,env(safe-area-inset-right)); width:40px; margin:0; z-index:1002; color:#454950; }
 .ps-mobile-search summary, .ps-pet-toggle { box-sizing:border-box; width:40px; height:40px; padding:10px; border:0; border-radius:50%; background:#f8f8f8; color:#454950; cursor:pointer; }
 .ps-mobile-search summary { list-style:none; display:flex; align-items:center; justify-content:center; }
 .ps-mobile-search summary::-webkit-details-marker { display:none; }
 .ps-mobile-search summary svg, .ps-pet-toggle svg { display:block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
 .ps-mobile-search form { position:absolute; right:0; top:48px; display:flex; gap:8px; width:min(320px,calc(100vw - 32px)); padding:10px; margin:0; box-sizing:border-box; border:1px solid #ddd; border-radius:12px; background:#fff; box-shadow:0 6px 24px #00000018; }
 .ps-mobile-search:not([open]) form { display:none; }
 .ps-mobile-search input { min-width:0; width:0; flex:1; box-sizing:border-box; height:42px; border:1px solid #ddd; border-radius:8px; padding:8px 10px; background:#fff; color:#303238; font:16px/1.4 system-ui,sans-serif; }
 .ps-mobile-search button { flex:none; border:1px solid #ddd; border-radius:8px; padding:8px 12px; background:#fff; color:#303238; font:14px/1.4 system-ui,sans-serif; cursor:pointer; }
 html[data-theme="dark"] .ps-mobile-search :is(summary,form,input,button), html[data-theme="dark"] .ps-pet-toggle { background:#27292d; border-color:#484c53; color:#eceef0; }
}
@media (max-width:768px) {
 html:not(.ps-pet-open) #waifu, #waifu-toggle { display:none!important; }
 .ps-pet-toggle { display:block; position:fixed; top:max(10px,env(safe-area-inset-top)); right:calc(max(10px,env(safe-area-inset-right)) + 44px); z-index:1001; }
 html.ps-pet-open .ps-pet-hidden-mark { display:none; }
 html.ps-pet-open .ps-pet-toggle { color:#ad5268; background:#f9edf0; }
 html[data-theme="dark"].ps-pet-open .ps-pet-toggle { color:#f0aabe; background:#42313b; }
}
.ps-mobile-search :is(summary,input,button):focus-visible, .ps-pet-toggle:focus-visible { outline:2px solid #b7596d; outline-offset:3px; }

/* Each dock button controls only the panel named by data-ps-panel-toggle. */
.ps-panel-dock { display:none; }
@media (min-width:1183px) {
 html.ps-sidebar-collapsed .content-layout { grid-template-columns:minmax(0,1fr) clamp(144px,12vw,220px); }
 html.ps-sidebar-collapsed #right-sidebar, .ps-panel-collapsed { display:none!important; }
 html.ps-panels-ready .ps-panel-dock { display:flex; position:fixed; right:16px; top:16px; z-index:130; flex-direction:column; gap:10px; }
 .ps-panel-toggle { display:flex; box-sizing:border-box; align-items:center; justify-content:center; width:40px; height:40px; padding:10px; border:1px solid #dedfe1; border-radius:50%; background:#fafafa; color:#6b7077; box-shadow:0 2px 8px #00000005; cursor:pointer; transition:color 180ms,background-color 180ms,border-color 180ms; }
 .ps-panel-toggle svg { display:block; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
 .ps-panel-toggle[aria-expanded="false"] .ps-panel-icon-lines { display:none; }
 .ps-panel-toggle[aria-expanded="true"] { color:#a44f64; background:#fcf3f5; border-color:#dcc1c8; }
 .ps-panel-toggle:hover { color:#a44f64; border-color:#b98795; background:#fff; }
 html[data-theme="dark"] .ps-panel-toggle { color:#afb3b8; background:#202224; border-color:#3c3f43; box-shadow:none; }
 html[data-theme="dark"] .ps-panel-toggle[aria-expanded="true"] { color:#edb1c1; background:#352930; border-color:#5f424c; }
 html[data-theme="dark"] .ps-panel-toggle:hover { color:#f0b0bf; border-color:#79616a; background:#29272a; }
 .ps-panel-toggle:focus-visible { outline:2px solid #b7596d; outline-offset:3px; }
}
@media (prefers-reduced-motion:reduce) { .ps-panel-toggle { transition:none!important; } }

/* DJI article product card: self-contained, no whole-card click target. */
.github-card.ps-product-card,
.github-card.ps-product-card:hover,
.github-card.ps-product-card:active {
 display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px 20px;
 padding:24px;margin:24px 0;border:1px solid var(--border-color);
 border-radius:16px;background:var(--card-color);color:var(--text-color);
 transform:none;animation:none;transition:none;box-sizing:border-box;
}
.github-card.ps-product-card .ps-product-icon {
 grid-column:1;grid-row:1 / span 2;align-self:start;
 display:block;width:64px;height:64px;max-width:100%;margin:0;
 object-fit:contain;border:0;border-radius:0;box-shadow:none;
}
.github-card.ps-product-card .ps-product-name {
 grid-column:2;margin:0;padding:0;font-size:20px;font-weight:650;
 line-height:1.45;letter-spacing:0;overflow-wrap:anywhere;
}
.github-card.ps-product-card .ps-product-description {
 grid-column:2;margin:0;padding:0;font-size:15px;line-height:1.7;
 color:var(--text2-color);overflow-wrap:anywhere;
}
.inner-post-wrapper .github-card.ps-product-card a.ps-product-link {
 grid-column:2;justify-self:end;display:inline-flex;align-items:center;gap:8px;
 margin:8px 0 0;padding:6px 13px;min-height:36px;box-sizing:border-box;
 border:1px solid var(--border-color);border-radius:999px;
 background:transparent;color:var(--text-color);font-size:14px;
 font-weight:500;line-height:1.4;text-decoration:none;
 transition:background-color 180ms ease,border-color 180ms ease;
}
.inner-post-wrapper .github-card.ps-product-card a.ps-product-link::before,
.inner-post-wrapper .github-card.ps-product-card a.ps-product-link::after {display:none!important;content:none!important;}
.inner-post-wrapper .github-card.ps-product-card a.ps-product-link:hover {
 background:color-mix(in srgb,var(--themecolor) 12%,var(--card-color));border-color:var(--themecolor);
}
.inner-post-wrapper .github-card.ps-product-card a.ps-product-link:focus-visible {outline:2px solid var(--themecolor);outline-offset:4px;}
.github-card.ps-product-card .ps-product-link svg {display:block;width:17px;height:17px;flex:none;fill:currentColor;}
@media(max-width:520px){
 .github-card.ps-product-card,.github-card.ps-product-card:hover,.github-card.ps-product-card:active {grid-template-columns:48px minmax(0,1fr);gap:12px;padding:18px;border-radius:14px;}
 .github-card.ps-product-card .ps-product-icon {width:48px;height:48px;grid-row:1;}
 .github-card.ps-product-card .ps-product-name {font-size:17px;align-self:center;}
 .github-card.ps-product-card .ps-product-description {grid-column:1 / -1;font-size:14px;}
 .inner-post-wrapper .github-card.ps-product-card a.ps-product-link {margin-top:0;}
}
@media(prefers-reduced-motion:reduce){.inner-post-wrapper .github-card.ps-product-card a.ps-product-link {transition:none;}}

/* The theme wraps article images in figures; keep the product icon uncaptioned. */
.github-card.ps-product-card > figure {grid-column:1;grid-row:1 / span 2;align-self:start;margin:0;padding:0;width:64px;max-width:100%;}
.github-card.ps-product-card > figure > figcaption {display:none;}
@media(max-width:520px){.github-card.ps-product-card > figure {grid-row:1;width:48px;}}

/* Outrank the theme's long :not() selector for ordinary article links. */
.inner-post-wrapper .github-card.ps-product-card a.ps-product-link {display:inline-flex!important;color:var(--text-color)!important;border-radius:999px!important;}
.github-card.ps-product-card .ps-product-name {background:none;}

/* List previews reflow to three readable lines as the information panel changes width. */
.post--index.ps-adaptive-summary:not(.post-protected) .post-excerpt {
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;
 overflow:hidden;overflow-wrap:anywhere;line-height:1.8;
 min-height:5.4em;max-height:5.4em;
}
@media(min-width:1183px){
 .post--index.ps-adaptive-summary .post-title {min-height:2lh;}
}
