/* Obsidian Publish scaffold
 * Direction: closely follow lab.marconoris.com/now
 * Theme base: Flexoki-like light surface + quiet reader-first layout
 */

@font-face {
  font-family: "Huiwen Mincho";
  src:
    url("https://fonts.shandaoyang.com/huiwen-mincho-gbk-site-subset.d6856c65c7ed.woff2")
      format("woff2"),
    url("https://fonts.shandaoyang.com/huiwen-mincho-gbk-site-subset.7025814b1d2c.ttf")
      format("truetype"),
    local("匯文明朝體GBK");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

body {
  --font-default: "Huiwen Mincho", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Times New Roman", serif;
  --font-text-theme: var(--font-default);
  --font-primary-sans: var(--font-default);
  --font-secondary-sans: var(--font-default);
  --font-primary-serif: var(--font-default);
  --font-secondary-serif: var(--font-default);
  --font-text-size: calc(0.82rem + 0.3vw);
  --font-text-size-mobile: calc(0.95rem + 0.3vw);
  --font-smallest: 0.8em;
  --font-smaller: 0.875em;
  --font-small: 0.933em;
  --normal-weight: 400;
  --bold-weight: 600;
  --link-weight: inherit;
  --h1-size: calc(2.8em + 0.55vw);
  --h2-size: calc(1.4em + 0.35vw);
  --h3-size: calc(1.3em + 0.25vw);
  --h4-size: calc(1.2em + 0.15vw);
  --h5-size: calc(1.1em + 0.2vw);
  --h6-size: calc(0.8em + 0.1vw);
  --h1-weight: 100;
  --h2-weight: 300;
  --h3-weight: 300;
  --h4-weight: 300;
  --h5-weight: 300;
  --h6-weight: 400;
  --h1-line-height: 1;
  --h2-line-height: 1.1;
  --h3-line-height: 1.15;
  --h4-line-height: 1.2;
  --h5-line-height: 1.2;
  --h6-line-height: 1.2;
  --h6-variant: all-small-caps;
  --radius-s: 6px;
  --radius-m: 8px;
  --radius-l: 12px;
  --radius-xxl: 24px;
  --border-width: 1px;
  --image-radius: var(--radius-m);
  --cards-min-width: 180px;
  --cards-max-width: 1fr;
  --cards-mobile-width: 180px;
  --cards-image-height: 400px;
  --cards-padding: 1.2em;
  --cards-image-fit: contain;
  --cards-background: transparent;
  --cards-border-width: 1px;
  --cards-aspect-ratio: auto;
  --cards-columns: repeat(auto-fit, minmax(var(--cards-min-width), var(--cards-max-width)));
  --img-grid-fit: cover;
  --img-grid-background: transparent;
  --img-grid-gap: 0.5rem;
  --img-zoom-background: rgba(0, 0, 0, 0.6);
  --img-zoom-max-width: 96%;
  --img-zoom-max-height: 90vh;
  --img-zoom-in-cursor: zoom-in;
  --img-zoom-out-cursor: zoom-out;
  --page-width: 800px;
  --site-name-size: 14px;
  --site-name-weight: 600;
  --site-name-color: var(--text-accent);
  --site-name-color-hover: var(--color-base-80);
  --sidebar-logo-width: 100%;
  --sidebar-logo-max-width: 320px;
  --sidebar-logo-top-gap: 8px;
  --sidebar-logo-bottom-gap: 10px;
  --site-name-bottom-gap: 0;
  --tagline-bottom-gap: 24px;
  --site-tagline: "由兴趣与偶然性引导的内容探索";
  --page-title-size: 14px;
  --page-title-weight: 500;
  --page-title-line-height: 1.1;
  --page-title-variant: all-small-caps;
  --page-title-color: var(--color-base-60);
  --page-title-style: normal;
  --background-reader: var(--background-primary);
  --component-title-color: var(--text-normal);
  --logo-width: 100%;
  --flexoki-blue-200: 146, 191, 219;
  --flexoki-blue-300: 102, 160, 200;
  --flexoki-red-500: 203, 62, 52;
  --flexoki-yellow-150: 241, 214, 126;
  --flexoki-yellow-300: 223, 180, 49;
  --flexoki-yellow-400: 208, 162, 21;
  --flexoki-purple-400: 139, 126, 200;
  --flexoki-gray: 230, 228, 217;
  --tag-color: var(--text-normal);
  --tag-size: var(--font-smallest);
  --tag-radius: var(--radius-s);
  --tag-color-hover: var(--color-base-10, var(--text-normal));
  --tag-padding-x: 4px;
  --tag-padding-y: 1px;
}

.theme-light {
  --color-red-rgb: 175, 48, 41;
  --color-orange-rgb: 188, 82, 21;
  --color-yellow-rgb: 173, 131, 1;
  --color-green-rgb: 102, 128, 11;
  --color-cyan-rgb: 36, 131, 123;
  --color-blue-rgb: 32, 94, 166;
  --color-purple-rgb: 94, 64, 157;
  --color-pink-rgb: 160, 47, 111;
  --bg1: #fffcf0;
  --bg2: #f2f0e5;
  --bg3: rgba(16, 15, 15, 0.05);
  --ui1: #e6e4d9;
  --ui2: #dad8ce;
  --ui3: #cecdc3;
  --tx1: #100f0f;
  --tx2: #6f6e69;
  --tx3: #b7b5ac;
  --hl1: rgba(187, 220, 206, 0.3);
  --hl2: rgba(247, 209, 61, 0.3);
  --color-base-00: #100f0f;
  --color-base-20: #d0cec5;
  --color-base-35: #b7b5ac;
  --color-base-50: #878580;
  --color-base-60: #6f6e69;
  --color-base-70: #575653;
  --color-base-80: #555450;
  --color-base-55: #a3a199;
  --color-base-100: #100f0f;
  --color-ligthorange: rgb(224, 150, 31);
  --color-faintorange: rgb(204, 146, 83);
  --color-darkorange: rgb(211, 117, 13);
  --color-wine-rgb: 154, 74, 66;
  --color-oldpink-rgb: 172, 106, 140;
  --background-primary: var(--bg1);
  --background-primary-alt: var(--bg2);
  --background-secondary: var(--bg2);
  --background-secondary-alt: var(--bg1);
  --background-tertiary: var(--bg3);
  --background-modifier-border: var(--ui1);
  --background-modifier-border-hover: var(--ui2);
  --divider-color: var(--ui2);
  --interactive-normal: var(--bg1);
  --interactive-accent: var(--color-darkorange);
  --interactive-accent-rgb: 211, 117, 13;
  --interactive-hover: var(--ui1);
  --text-normal: var(--tx1);
  --text-bold: var(--tx1);
  --text-muted: var(--tx2);
  --text-faint: var(--tx3);
  --text-accent: var(--color-faintorange);
  --text-accent-hover: var(--color-ligthorange);
  --text-selection: var(--hl1);
  --text-highlight-bg: var(--hl2);
  --text-highlight-bg-active: rgba(0, 0, 0, 0.1);
  --link-color: rgb(16, 15, 15);
  --link-external-color: rgb(16, 15, 15);
  --link-decoration: underline;
  --link-external-decoration: underline;
  --link-unresolved-color: var(--text-faint);
  --link-unresolved-decoration-style: wavy;
  --sidebar-left-background: var(--bg2);
  --sidebar-right-background: var(--color-base-10, var(--bg1));
  --sidebar-left-border-width: 0;
  --sidebar-right-border-width: 0;
  --blockquote-border-color: #e3e3e3;
  --blockquote-font-style: italic;
  --tag-background: var(--background-secondary);
  --tag-background-hover: #ababab;
  --code-background: #efefe8;
  --graph-node: var(--color-ligthorange);
  --graph-node-unresolved: rgba(0, 0, 0, 1);
  --graph-text: #707070;
  --graph-line: #d4d4d4;
  --color-accent: var(--interactive-accent);
  --img-zoom-color-background: rgba(250, 250, 244, 0.85);
  --text-light: var(--color-base-00);
  --background-modifier-error: rgba(255, 0, 0, 0.14);
  --background-modifier-error-hover: rgba(255, 0, 0, 0.08);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --btn-shadow-color: rgba(0, 0, 0, 0.05);
}

.theme-dark {
  --bg1: #100f0f;
  --bg2: #1c1b1a;
  --bg3: rgba(254, 252, 240, 0.05);
  --ui1: #282726;
  --ui2: #343331;
  --ui3: #403e3c;
  --tx1: #cecdc3;
  --tx2: #878580;
  --tx3: #575653;
  --hl1: rgba(30, 95, 91, 0.3);
  --hl2: rgba(213, 159, 17, 0.3);
  --color-base-00: #100f0f;
  --color-base-20: #282726;
  --color-base-35: #403e3c;
  --color-base-50: #878580;
  --color-base-55: #63615d;
  --color-base-60: #abaaa4;
  --color-base-70: #9a9893;
  --color-base-80: #cecdc3;
  --color-base-100: #ffffff;
  --background-primary: var(--bg1);
  --background-primary-alt: var(--bg2);
  --background-secondary: var(--bg2);
  --background-secondary-alt: var(--bg1);
  --background-tertiary: var(--bg3);
  --background-modifier-border: var(--color-base-35);
  --background-modifier-border-hover: var(--ui3);
  --divider-color: var(--color-base-35);
  --interactive-normal: var(--bg3);
  --interactive-accent: #4690b5;
  --interactive-accent-rgb: 70, 144, 181;
  --interactive-hover: var(--ui1);
  --text-normal: var(--tx1);
  --text-bold: var(--tx1);
  --text-muted: var(--tx2);
  --text-faint: var(--tx3);
  --text-accent: rgb(96 184 228);
  --text-accent-hover: #50d9fc;
  --text-selection: var(--hl1);
  --text-highlight-bg: rgba(255, 177, 80, 0.3);
  --text-highlight-bg-active: rgba(255, 255, 255, 0.1);
  --link-color: rgb(206, 205, 195);
  --link-external-color: rgb(206, 205, 195);
  --link-decoration: underline;
  --link-external-decoration: underline;
  --link-unresolved-color: var(--text-faint);
  --link-unresolved-decoration-style: wavy;
  --sidebar-left-background: var(--bg2);
  --sidebar-right-background: var(--bg1);
  --sidebar-left-border-width: 1px;
  --sidebar-right-border-width: 1px;
  --blockquote-border-color: #666666;
  --blockquote-font-style: italic;
  --tag-background: var(--color-base-35);
  --tag-background-hover: #b3b3b3;
  --code-background: var(--background-secondary);
  --graph-node: rgb(56, 166, 222);
  --graph-node-unresolved: #fd7878;
  --graph-text: rgba(136, 159, 170, 1);
  --graph-line: rgba(118, 117, 117, 0.6);
  --color-accent: var(--interactive-accent);
  --img-zoom-color-background: rgba(0, 0, 0, 0.85);
  --text-light: var(--color-base-100);
  --background-modifier-error: rgba(255, 20, 20, 0.12);
  --background-modifier-error-hover: rgba(255, 20, 20, 0.18);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --btn-shadow-color: rgba(0, 0, 0, 0.2);
}

.published-container {
  --background-color: var(--background-primary);
  --outline-heading-color-active: var(--text-normal);
  --site-name-size: 14px !important;
  --site-name-color: var(--text-accent);
  --site-name-color-hover: var(--color-base-80);
}

html {
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: contain;
}

html:has(body.theme-light) {
  background: #fffcf0;
}

html:has(body.theme-dark) {
  background: #100f0f;
}

::selection {
  color: #fff;
  background: var(--interactive-accent);
}

body,
.site-body-left-column-site-name {
  font-family: var(--font-default);
}

body {
  background: var(--background-primary);
}

.site-body-center-column {
  position: relative;
  box-shadow: 0 0 10px 3px rgba(0, 0, 0, 0.1);
}

.theme-dark .site-body-center-column {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.site-header,
.published-container .site-header {
  border-bottom: 0;
}

.site-body-left-column {
  padding-right: 18px;
  background: var(--sidebar-left-background);
}

.site-body-right-column {
  background: var(--sidebar-right-background) !important;
  box-shadow: none !important;
}

.graph-view-outer .graph-icon.graph-expand {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.graph-view-outer .graph-icon.graph-expand:hover {
  background: transparent !important;
  box-shadow: none !important;
}

.site-body-right-column .published-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-body-right-column .published-section-header-icon {
  display: inline-flex !important;
  align-items: center;
  color: var(--text-muted);
  flex: 0 0 auto;
}

.site-body-right-column .published-section-header-icon svg {
  width: 16px;
  height: 16px;
}

.site-body-right-column .published-section-header-label,
.site-body-right-column .published-section-header-icon + span {
  position: relative;
  top: -1px;
}

.site-body-left-column-site-logo img {
  display: block;
  border-radius: 0;
  width: min(var(--sidebar-logo-width), var(--sidebar-logo-max-width));
  max-width: 100%;
  margin-inline: auto;
}

.site-body-left-column-site-logo {
  margin: var(--sidebar-logo-top-gap) 0 var(--sidebar-logo-bottom-gap);
}

.site-body-left-column-site-logo img:hover {
  cursor: pointer;
}

.theme-dark .site-body-left-column-site-logo img {
  filter: invert(1) hue-rotate(212deg);
}

.site-body-left-column-site-name {
  z-index: 0 !important;
  padding: 0;
  margin: 0 0 var(--site-name-bottom-gap);
  text-align: center;
  font-size: var(--site-name-size) !important;
  font-weight: var(--site-name-weight);
  color: var(--site-name-color) !important;
  text-decoration: none;
  line-height: 1.2;
}

@media (hover: hover) {
  .site-body-left-column-site-name:hover {
    color: var(--site-name-color-hover) !important;
    text-decoration: none;
  }
}

.site-body-left-column-site-name::after {
  display: block;
  content: var(--site-tagline);
  margin: 0 0 var(--tagline-bottom-gap);
  font-weight: 400;
  font-size: var(--font-smaller);
  line-height: 1.3;
  color: var(--color-base-70);
}

.site-body-left-column-site-name::after:hover {
  color: var(--color-base-100);
}

.site-header-text::after {
  content: var(--site-tagline);
  font-size: var(--font-smaller);
  text-align: right;
  margin-left: 10px;
  color: var(--color-base-70);
  font-weight: 400;
}

.site-header-text {
  color: var(--site-name-color) !important;
  text-decoration: none !important;
}

.site-header-text:hover {
  color: var(--site-name-color-hover) !important;
  text-decoration: none !important;
}

.site-header-logo {
  display: none;
}

.nav-view-outer .tree-item-self.mod-active:hover,
.nav-view-outer .nav-view > .tree-item > .tree-item-children > .tree-item > .tree-item-self.mod-active:hover {
  color: var(--site-name-color-hover) !important;
  border-left-color: var(--site-name-color-hover);
  opacity: 1;
}

.site-body-left-column-site-theme-toggle {
  margin: 0 auto;
  padding-right: 32px;
  position: absolute;
  top: 10px;
  left: 10px;
}

.site-body-left-column .search-view-outer {
  margin: 0;
  display: contents;
}

.search-view-container {
  margin: 0 0 10px;
}

input.search-bar {
  border-radius: var(--radius-l);
  background: var(--background-primary);
  border-color: var(--background-modifier-border);
  color: var(--text-normal);
  caret-color: var(--text-normal);
}

input.search-bar::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.theme-light input.search-bar {
  background: var(--background-primary);
  color: #100f0f;
  caret-color: #100f0f;
}

.theme-light input.search-bar::placeholder {
  color: rgba(16, 15, 15, 0.42);
}

input.search-bar:hover {
  border-color: var(--background-modifier-border-hover);
}

input.search-bar:focus {
  outline: none;
  border-color: var(--background-modifier-border-hover);
  box-shadow: 0 0 0 2px var(--background-modifier-border-hover);
}

.publish-renderer .markdown-preview-view,
.markdown-rendered {
  font-size: var(--font-text-size);
  color: var(--text-normal);
}

.published-container .markdown-rendered h1,
.published-container .markdown-rendered h2 {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0.35em;
}

.publish-renderer:has(.el-h1 > .publish-article-heading) .mod-header {
  display: none;
}

.publish-renderer:has(.el-h1 > .publish-article-heading) .el-h1 .publish-article-heading {
  margin-top: 0;
}

.markdown-rendered h1 {
  font-size: var(--h1-size);
  font-weight: var(--h1-weight);
  line-height: var(--h1-line-height);
}

.markdown-rendered h2 {
  font-size: var(--h2-size);
  font-weight: var(--h2-weight);
  line-height: var(--h2-line-height);
}

.publish-renderer :is(.el-h1, .el-h2, .el-h3, .el-h4, .el-h5, .el-h6).is-flashing,
.publish-renderer :is(h1, h2, h3, h4, h5, h6)[data-heading].is-flashing,
.publish-renderer .publish-article-heading.is-flashing {
  background-color: var(--hl2);
  border-radius: 4px;
  color: var(--text-normal);
  transition: color 0.25s, background-color 0.25s;
}

.markdown-rendered h3 {
  font-size: var(--h3-size);
  font-weight: var(--h3-weight);
}

.markdown-rendered h4 {
  font-size: var(--h4-size);
  font-weight: var(--h4-weight);
}

.markdown-rendered h5 {
  font-size: var(--h5-size);
  font-weight: var(--h5-weight);
}

.markdown-rendered h6 {
  font-size: var(--h6-size);
  font-weight: var(--h6-weight);
  font-variant: var(--h6-variant);
  color: var(--text-muted);
}

.markdown-rendered p,
.markdown-rendered li {
  line-height: 1.72;
}

.markdown-rendered a,
.markdown-rendered .internal-link,
.markdown-rendered .external-link,
.metadata-container .internal-link {
  color: var(--link-color);
  text-decoration: underline;
}

.markdown-rendered a:hover,
.markdown-rendered .internal-link:hover,
.markdown-rendered .external-link:hover,
.metadata-container .internal-link:hover {
  text-decoration-color: var(--text-accent);
}

.theme-dark .external-link,
.theme-dark .internal-link {
  text-decoration-color: #b3b3b3;
}

.tag:not(.token) {
  white-space: nowrap;
  text-decoration: none;
  font-size: var(--font-small);
  border: 1px solid var(--ui1);
  background-color: transparent;
  color: var(--tx2);
}

.tag:not(.token):hover {
  text-decoration: none;
  background-color: var(--ui3);
}

.page-header {
  letter-spacing: 0;
}

.caption,
.smalltext,
.smalltext * {
  font-size: var(--font-smallest);
}

.caption {
  display: block;
  margin: -12px auto 35px;
  text-align: center;
}

.date {
  font-weight: 700;
  opacity: 0.7;
  text-align: right;
  margin-right: 5px;
}

.boxed {
  padding: 15px;
  border: 1px solid var(--color-base-60);
  margin: 50px auto;
  border-radius: var(--radius-m);
  max-width: 700px;
  text-align: center;
}

.callout {
  margin: 30px 0;
  padding: 10px;
  border-radius: var(--radius-m);
  border-left: 0;
}

.callout[data-callout="info"] {
  background-color: var(--background-secondary);
}

.callout[data-callout="links"] {
  --callout-color: var(--color-orange-rgb);
}

.callout[data-callout="timeline"] {
  --callout-color: var(--color-purple-rgb);
}

.callout[data-callout="noteinfo"] {
  background: transparent;
  padding: 0;
  margin: 0 0 50px;
  font-size: var(--font-smaller);
  color: var(--text-normal);
}

.callout[data-callout="noteinfo"] .callout-content {
  color: var(--text-muted);
}

.callout[data-callout="noteinfo"] a {
  color: var(--color-base-60);
  text-decoration-color: var(--color-base-35);
}

.callout[data-callout="noteinfo"] a:hover {
  color: var(--text-accent-hover);
  text-decoration-color: var(--text-accent-hover);
}

.callout[data-callout="small"] {
  background: transparent;
  padding: 0;
  margin: 0 0 50px;
  font-size: var(--font-smallest);
}

.callout[data-callout="cite"] {
  background-color: transparent;
  border-radius: 0;
  margin: 20px 30px;
  padding: 0;
}

.callout[data-callout="cite"] .callout-title,
.callout[data-callout="cite"] .callout-icon {
  display: none;
}

.callout[data-callout="cite"] .callout-content {
  padding: 0;
  font-style: italic;
  font-family: var(--font-primary-serif);
}

.callout[data-callout="clean"] {
  background: transparent;
  border: 0;
  padding: 30px 0 30px 50px;
}

.callout[data-callout="languages"] {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  background-color: transparent;
  font-size: var(--font-smallest);
  border: 0.01em solid var(--color-base-50);
  border-radius: 999px;
  margin: 0 0 10px;
  font-variant: all-small-caps;
}

.callout[data-callout="languages"] .callout-title {
  padding: 0;
  gap: 0.35rem;
}

.callout[data-callout="languages"] .callout-title-inner {
  letter-spacing: 0.08em;
  color: var(--color-base-70);
}

.callout[data-callout="languages"] .callout-content {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
}

.callout[data-callout="languages"] .callout-content > * {
  margin: 0;
}

.callout[data-callout="languages"] a {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--color-base-35);
  text-decoration: none;
  background: var(--background-primary);
}

.callout[data-callout="languages"] a:hover {
  border-color: var(--interactive-accent);
  background: var(--background-secondary);
}

.callout[data-callout="images"],
.callout[data-callout="portfolio"] {
  border: 1px solid var(--color-base-35);
  margin: 20px auto;
  border-radius: var(--radius-m);
  background-color: var(--bg1);
}

.theme-dark .callout[data-callout="images"],
.theme-dark .callout[data-callout="portfolio"] {
  background-color: rgba(0, 0, 0, 1);
}

.markdown-rendered blockquote {
  border-left-color: var(--blockquote-border-color);
  font-style: var(--blockquote-font-style);
  color: var(--text-muted);
}

.markdown-preview-view code,
.markdown-rendered code {
  color: var(--text-normal);
  font-size: 0.85em;
  background: var(--code-background);
}

.markdown-rendered table {
  border-radius: var(--radius-m);
  margin: 30px 0;
  border-collapse: collapse;
  border: var(--border-width) solid var(--background-modifier-border);
}

.markdown-rendered td,
.markdown-rendered th {
  padding: 4px 10px;
}

.markdown-rendered.clean-table tbody > tr > td,
.markdown-rendered.clean-table thead > tr > th {
  border: none;
}

.markdown-rendered.clean-table tbody tr > td:first-child,
.markdown-rendered.clean-table thead tr > th:first-child {
  text-align: right;
  color: var(--color-base-60);
}

.markdown-rendered.nolists ol,
.markdown-rendered.nolists ul {
  margin: 0;
  padding: 0;
}

.markdown-rendered.nolists ol > li,
.markdown-rendered.nolists ul > li {
  list-style-type: none;
  display: inline-block;
  margin-inline-start: 0;
}

.markdown-rendered.nolists ol > li::after,
.markdown-rendered.nolists ul > li::after {
  content: " / ";
}

.markdown-rendered.nolists ol > li:last-child::after,
.markdown-rendered.nolists ul > li:last-child::after {
  content: "";
}

.img-grid .markdown-preview-section > div:has(> .image-embed ~ .image-embed),
.img-grid .markdown-preview-section > div:has(> img ~ img),
.img-grid .markdown-preview-section > p:has(> .image-embed ~ .image-embed),
.img-grid .markdown-preview-section > p:has(> img ~ img) {
  display: grid;
  margin-block: var(--img-grid-gap);
  gap: var(--img-grid-gap);
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.img-grid .image-embed.is-loaded {
  display: flex;
  align-items: stretch;
  line-height: 0;
}

.img-grid .image-embed.is-loaded img {
  align-self: stretch;
  background-color: var(--img-grid-background);
  object-fit: var(--img-grid-fit);
}

.cards table,
.table-cards table {
  width: 100%;
}

.cards table tbody {
  clear: both;
  display: grid;
  grid-template-columns: var(--cards-columns);
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.cards table > tbody > tr {
  display: flex;
  flex-direction: column;
  max-width: var(--cards-max-width);
  margin: 0;
  padding: 0 0 calc(var(--cards-padding) / 3);
  overflow: hidden;
  border: var(--cards-border-width) solid var(--background-modifier-border);
  border-radius: var(--radius-s);
  background-color: var(--cards-background);
  transition: box-shadow 0.15s linear, border-color 0.15s linear;
}

.cards table > tbody > tr:hover {
  border-color: var(--background-modifier-border-hover);
  box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.05), 0 1px 3px 1px rgba(0, 0, 0, 0.025);
}

.cards table tbody > tr > td:first-child {
  border: none;
  font-weight: var(--bold-weight);
}

.cards table tbody > tr > td:not(:first-child) {
  color: var(--text-muted);
  font-size: calc(var(--font-small) * 0.9);
}

.cards table tbody > tr > td:has(img) {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0 !important;
  background-color: var(--background-secondary);
}

.cards table tbody > tr > td img {
  width: 100%;
  max-height: var(--cards-image-height);
  aspect-ratio: var(--cards-aspect-ratio);
  object-fit: var(--cards-image-fit);
  background-color: var(--background-secondary);
  vertical-align: bottom;
}

.cards table thead {
  display: none;
}

.cards.cards-cover,
.list-cards.cards-cover {
  --cards-image-fit: cover;
}

.cards.cards-16-9,
.list-cards.cards-16-9 {
  --cards-aspect-ratio: 16 / 9;
}

.cards.cards-1-1,
.list-cards.cards-1-1 {
  --cards-aspect-ratio: 1 / 1;
}

.cards.cards-cols-1,
.list-cards.cards-cols-1 {
  --cards-columns: repeat(1, minmax(0, 1fr));
}

.cards.cards-cols-2,
.list-cards.cards-cols-2 {
  --cards-columns: repeat(2, minmax(0, 1fr));
}

.markdown-preview-view img,
.markdown-rendered img {
  max-width: 100%;
  border-radius: var(--radius-m);
  display: block;
  margin: 0 auto;
  cursor: default;
}

/* Keep the contact QR code aligned with正文起始线 instead of global centered images. */
.markdown-preview-view img[src*="公众号二维码.png"],
.markdown-rendered img[src*="公众号二维码.png"],
.markdown-preview-view img[src*="%E5%85%AC%E4%BC%97%E5%8F%B7%E4%BA%8C%E7%BB%B4%E7%A0%81.png"],
.markdown-rendered img[src*="%E5%85%AC%E4%BC%97%E5%8F%B7%E4%BA%8C%E7%BB%B4%E7%A0%81.png"],
.markdown-preview-view span[src$="公众号二维码.png"] img,
.markdown-rendered span[src$="公众号二维码.png"] img,
.markdown-preview-view div[src$="公众号二维码.png"] img,
.markdown-rendered div[src$="公众号二维码.png"] img {
  margin-left: 0;
  margin-right: auto;
}

/* In dark theme, convert the QR foreground to light color for readability. */
.theme-dark .markdown-preview-view img[src*="公众号二维码.png"],
.theme-dark .markdown-rendered img[src*="公众号二维码.png"],
.theme-dark .markdown-preview-view img[src*="%E5%85%AC%E4%BC%97%E5%8F%B7%E4%BA%8C%E7%BB%B4%E7%A0%81.png"],
.theme-dark .markdown-rendered img[src*="%E5%85%AC%E4%BC%97%E5%8F%B7%E4%BA%8C%E7%BB%B4%E7%A0%81.png"],
.theme-dark .markdown-preview-view span[src$="公众号二维码.png"] img,
.theme-dark .markdown-rendered span[src$="公众号二维码.png"] img,
.theme-dark .markdown-preview-view div[src$="公众号二维码.png"] img,
.theme-dark .markdown-rendered div[src$="公众号二维码.png"] img {
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: screen;
  opacity: 1;
}

.theme-dark img {
  opacity: 0.8;
}

.theme-dark .lightbox img {
  opacity: 1;
}

.grayscale img {
  filter: grayscale(100%);
}

.grayscale img:hover {
  filter: none;
}

.desaturated {
  filter: grayscale(90%);
}

.blur {
  filter: blur(4px);
}

.blur:hover {
  filter: blur(0);
}

.theme-light img[src$="#blend"],
.theme-light span[src$="#blend"] img {
  mix-blend-mode: multiply;
}

.theme-dark img[src$="#invert"],
.theme-dark span[src$="#invert"] img {
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: screen;
}

.theme-light img[src$="#invert"],
.theme-light span[src$="#invert"] img {
  mix-blend-mode: multiply;
}

div[src$="#float"],
span[src$="#float"] {
  padding-right: 10px;
  float: left;
}

div[src$="#float"] img,
img[src$="#float"],
span[src$="#float"] img {
  width: 100px;
  height: auto;
}

div[src$="#boxed"] img,
img[src$="#boxed"],
span[src$="#boxed"] img {
  border: 1px solid var(--color-base-50);
}

.theme-dark svg.icon,
.theme-dark div[src$="#icon"] img,
.theme-dark span[src$="#icon"] img,
.theme-dark img[src$="#icon"] {
  height: 16px;
  width: 20px;
  filter: invert();
}

svg.icon,
div[src$="#icon"] img,
span[src$="#icon"] img,
img[src$="#icon"] {
  height: 16px;
  width: 20px;
}

div[src$="#icon"],
span[src$="#icon"] {
  display: inline-block;
  vertical-align: middle;
  opacity: 0.6;
}

span[src$="#icon"] + span[src$="#icon"] {
  margin-left: 2px;
}

div[src$="#icon"] img,
img[src$="#icon"],
span[src$="#icon"] img {
  cursor: default;
}

.lightbox {
  z-index: 99999;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--img-zoom-background);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox img {
  max-width: var(--img-zoom-max-width);
  max-height: var(--img-zoom-max-height);
  object-fit: contain;
  cursor: var(--img-zoom-out-cursor);
}

.lightbox div[src$="#float"],
.lightbox span[src$="#float"] {
  float: none;
  padding-right: 0;
}

.lightbox div[src$="#float"] img,
.lightbox img[src$="#float"],
.lightbox span[src$="#float"] img {
  width: auto;
}

.lightbox div[src$="#boxed"] img,
.lightbox img[src$="#boxed"],
.lightbox span[src$="#boxed"] img {
  border: 0;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: max-content;
  min-width: 180px;
  max-width: 100%;
  font-size: 11px;
  line-height: 1.45;
  gap: 8px;
  margin-inline: 0;
  padding: 10px 0 12px;
  background-color: var(--background-primary);
  text-align: left;
}

.site-footer a {
  text-decoration: none;
  color: var(--text-faint);
}

.site-footer a:hover {
  color: var(--text-accent);
}

.theme-light .site-footer {
  color: rgba(127, 127, 127, 1);
}

.theme-dark .site-footer {
  color: rgba(126, 126, 126, 1);
}

.social {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  text-decoration: none;
}

.social svg {
  width: auto;
  height: 16px;
  vertical-align: middle;
}

.social svg:hover {
  color: var(--text-accent);
}

.sliding-windows .site-footer {
  left: 0;
  right: auto;
  position: absolute;
  text-align: left;
  bottom: 0;
}

.foot-links {
  margin: 0;
  padding: 0;
  text-align: left;
}

@media screen and (min-width: 1180px), screen and (min-width: 1024px) and (max-width: 1179px) and (orientation: landscape) {
  .site-body-right-column {
    position: relative;
    pointer-events: auto;
  }

  .site-body-right-column .site-body-right-column-inner {
    padding-bottom: 96px;
    box-sizing: border-box;
  }

  .site-body-right-column > .site-footer {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 0;
    width: 252px;
    min-width: 0;
    max-width: calc(100% - 48px);
    padding: 4px 4px 10px;
    gap: 6px;
    align-items: flex-start;
    text-align: left;
    z-index: 5;
    pointer-events: auto;
  }

  .site-body-right-column > .site-footer .social {
    width: 100%;
    margin: 5px 0 4px;
    justify-content: flex-start;
    gap: 10px;
    pointer-events: auto;
  }

  .site-body-right-column > .site-footer .social a {
    margin: 0;
    color: var(--text-faint);
    pointer-events: auto;
  }

  .site-body-right-column > .site-footer .social svg {
    height: 12px;
  }

  .site-body-right-column > .site-footer .foot-links {
    width: 100%;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: var(--text-muted);
  }

  .site-body-right-column > .site-footer a {
    text-decoration: none;
  }

  .site-body-right-column > .site-footer a:hover {
    text-decoration: underline;
  }
}

@media screen and (min-width: 1024px) and (max-width: 1179px) and (orientation: landscape) {
  .graph-view-container .graph-icon.graph-expand,
  .graph-view-container .graph-icon.graph-global {
    top: 5px !important;
    width: 18px;
    height: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
  }

  .graph-view-container .graph-icon.graph-expand {
    right: 5px !important;
  }

  .graph-view-container .graph-icon.graph-global {
    right: 25px !important;
  }

  .graph-view-container .graph-icon.graph-expand svg,
  .graph-view-container .graph-icon.graph-global svg {
    display: block;
    width: 18px;
    height: 18px;
  }

  #toggle-sidebar-btn,
  .sliding-windows #toggle-sidebar-btn {
    top: 5px !important;
    right: 5px !important;
  }

  .site-body-right-column > .site-footer {
    align-items: flex-end;
    text-align: right;
  }

  .site-body-right-column > .site-footer .social {
    justify-content: flex-end;
  }

  .site-body-right-column > .site-footer .foot-links {
    text-align: right;
  }
}

.footnote-tooltip {
  display: none;
  position: absolute;
  z-index: 1000;
  max-width: 300px;
  padding: 10px;
  border: 1px solid var(--background-modifier-border);
  background-color: var(--background-primary);
  font-size: 0.9em;
}

.footnote-link:hover .footnote-tooltip {
  display: block;
}

#cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background-color: var(--bg2);
  text-align: center;
  padding: 10px 14px;
  z-index: 1000;
  border-top: 1px solid var(--background-modifier-border);
  font-size: var(--font-smaller);
}

#cookie-banner p {
  display: inline;
  margin: 0;
}

#cookie-banner .cookie-link {
  text-decoration: underline;
}

#cookie-banner button:not(.clickable-icon) {
  margin: 10px;
  padding: 5px 10px;
}

#mobile-tools-btn {
  display: none;
  margin: 0 12px 0 auto;
  width: 30px;
  padding: 5px;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-normal);
}

#mobile-tools-btn:hover {
  cursor: pointer;
  color: var(--text-accent-hover);
  background: transparent !important;
  box-shadow: none !important;
}

#mobile-tools-btn svg {
  display: block;
  width: 20px;
  height: 20px;
}

#mobile-tools-backdrop {
  display: none;
}

#toggle-sidebar-btn {
  margin: 0;
  width: 30px;
  border: 0 !important;
  padding: 5px;
  position: fixed;
  right: 20px;
  top: 18px;
  border-radius: 50%;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-normal);
  z-index: 100;
}

#toggle-sidebar-btn:hover {
  cursor: pointer;
  color: var(--text-accent-hover);
  background: transparent !important;
  box-shadow: none !important;
}

.sliding-windows #toggle-sidebar-btn {
  right: 20px;
  top: 18px;
}

#chooser {
  position: fixed;
  right: 20px;
  top: 58px;
  z-index: 99;
  display: none;
  gap: 6px;
  padding: 8px;
  background: color-mix(in srgb, var(--background-primary) 92%, transparent);
  border: 1px solid var(--background-modifier-border);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

#chooser a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  text-decoration: none;
}

#chooser a:hover {
  color: var(--text-accent-hover);
}

.theme-dark #toggle-sidebar-btn {
  top: 18px;
}

.site-body:has(.reader-view) #toggle-sidebar-btn {
  top: 5px;
  right: 5px;
  background: transparent;
}

.site-body:has(.reader-view) #toggle-sidebar-btn:hover {
  background: none;
}

.site-body:has(.reader-view) #toggle-sidebar-btn::before {
  content: none;
}

body:has(.modal-container .graph-view-container.mod-expanded) #toggle-sidebar-btn,
body:has(.modal-container .graph-view-container.mod-expanded) #chooser {
  display: none !important;
}

body:has(.modal-container .graph-view-container.mod-expanded) .site-body:has(.reader-view) #toggle-sidebar-btn::before {
  content: none !important;
}

.site-body:has(.reader-view) .published-container .markdown-rendered h1 {
  margin-top: 0;
}

.site-body:has(.reader-view) .markdown-preview-view {
  font-size: calc(0.8rem + 0.3vw);
}

.published-container:has(.reader-view) .site-header {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent;
  height: 0;
  padding: 0;
  pointer-events: none;
}

.published-container:has(.reader-view) .site-header .clickable-icon {
  display: none;
  position: fixed;
  top: 5px;
  left: 10px;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.published-container:has(.reader-view) .site-header .site-header-text::after {
  display: none;
}

.published-container:has(.reader-view) .site-header .site-header-text {
  display: inline-block;
  position: fixed;
  top: 40px;
  right: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.05;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.42em;
  color: var(--site-name-color) !important;
  text-decoration: none !important;
  text-align: center;
  pointer-events: auto;
}

.published-container:has(.reader-view) .site-header .site-header-text:link,
.published-container:has(.reader-view) .site-header .site-header-text:visited,
.published-container:has(.reader-view) .site-header .site-header-text:active {
  color: var(--site-name-color) !important;
}

.published-container:has(.reader-view) .site-header .site-header-text:hover {
  color: var(--site-name-color-hover) !important;
}

.site-body:has(.reader-view) #chooser {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  right: 0;
  top: auto;
  bottom: 5px;
  padding: 4px 8px 2px 0;
  gap: 6px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.site-body:has(.reader-view) #chooser a {
  width: auto;
  height: auto;
  margin: 0 4px 0 0;
}

.site-body:has(.reader-view) #chooser a:last-child {
  margin-right: 0;
}

.site-body:has(.reader-view) #chooser a svg {
  width: 16px;
  height: 16px;
}

@media screen and (pointer: coarse) and (orientation: landscape) {
  .published-container:has(.reader-view) .site-header .clickable-icon {
    display: none !important;
  }

  .site-body:has(.reader-view) #chooser {
    left: auto !important;
    right: 3px !important;
    transform: translateX(-3px);
  }

  .sliding-windows .publish-renderer.mod-squished .publish-article-heading,
  .sliding-windows .publish-renderer.mod-squished .markdown-rendered h1 {
    font-size: clamp(34px, 3.8vw, 48px) !important;
    line-height: 0.95 !important;
  }

  .sliding-windows .publish-renderer.mod-overlay .publish-article-heading,
  .sliding-windows .publish-renderer.mod-overlay .markdown-rendered h1 {
    font-size: clamp(26px, 3vw, 40px) !important;
    line-height: 0.95 !important;
  }
}

.sliding-windows .render-container-inner:not(:has(.publish-renderer.mod-overlay)) {
  width: 100%;
}

.sliding-windows .render-container-inner:not(:has(.publish-renderer.mod-overlay)) > .publish-renderer {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.sliding-windows:has(.reader-view) .publish-renderer,
.sliding-windows:has(.reader-view) .render-container,
body:has(.reader-view) {
  background-color: var(--background-reader);
}

.site-body:has(.reader-view) .render-container-inner {
  margin: 0 auto;
}

body:not(.sliding-windows):has(.reader-view) .publish-renderer > .markdown-preview-view > .markdown-preview-sizer {
  margin: 0 auto;
}

.sliding-windows .publish-renderer:has(.reader-view) {
  position: sticky;
  width: 800px;
  flex: 0 0 800px;
}

.popover.hover-popover,
.popover.hover-popover.is-loaded {
  max-width: min(92vw, 760px);
}

.sliding-windows div.hover-popover .publish-renderer,
.sliding-windows div.hover-popover.is-loaded .publish-renderer {
  width: inherit !important;
  flex: inherit !important;
}

div.popover.hover-popover .callout[data-callout="noteinfo"],
div.popover.hover-popover.is-loaded .callout[data-callout="noteinfo"] {
  margin-top: 0 !important;
}

.site-body:has(.reader-view) .site-body-center-column {
  padding-left: 0;
  box-shadow: none;
}

.sliding-windows .site-body:has(.reader-view) .site-body-center-column,
.sliding-windows .published-container.has-graph .site-body:has(.reader-view) .site-body-center-column {
  padding-right: 40px;
}

.site-body:has(.reader-view) .page-header,
.site-body:has(.reader-view) .mod-footer,
.site-body:has(.reader-view) .outline-view-outer,
.site-body:has(.reader-view) .graph-view-outer .published-section-header,
.site-body:has(.reader-view) .site-footer,
.site-body:has(.reader-view) .search-view-container,
.site-body:has(.reader-view) .nav-view-outer,
.site-body:has(.reader-view) .site-body-right-column,
.site-body:has(.reader-view) .site-body-left-column-site-name,
.site-body:has(.reader-view) .site-body-left-column-site-logo,
.site-body:has(.reader-view) .site-body-left-column {
  display: none;
}

.nav-view-outer,
.outline-view-outer {
  padding-bottom: 120px;
}

.outline-view-outer .outline-view {
  padding-bottom: 110px;
}

.theme-light .site-body-left-column-site-logo {
  opacity: 0.8;
}

@media screen and (min-width: 1800px) {
  .sliding-windows .publish-renderer {
    width: 800px;
    flex: 0 0 800px;
  }

  body,
  .site-body-left-column-site-name {
    font-size: 110%;
  }
}

@media screen and (min-width: 2100px) {
  .published-container {
    --sidebar-left-width: 300px;
  }

  body,
  .nav-view,
  .site-body-left-column-site-name {
    font-size: 120%;
  }
}

@media (max-width: 767px) and (orientation: portrait) {
  body {
    overflow-x: hidden !important;
    overflow-y: clip !important;
    height: 100svh;
    min-height: 100svh;
    overscroll-behavior-y: contain;
  }

  .published-container,
  .site-body,
  .site-body-center-column,
  .render-container,
  .render-container-inner {
    min-height: 0;
  }

  .published-container {
    display: flex !important;
    flex-direction: column;
    height: 100svh !important;
    min-height: 100svh;
    max-height: 100svh !important;
    overflow: hidden !important;
  }

  .site-body,
  .site-body-center-column {
    height: 100svh !important;
    min-height: 100svh;
    max-height: 100svh !important;
    overflow: hidden !important;
  }

  .site-body-center-column {
    display: flex;
    flex-direction: column;
  }

  .site-header,
  .site-footer {
    flex: 0 0 auto;
    position: relative;
    z-index: 20;
    background: var(--background-primary);
  }

  .render-container {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    max-width: 100%;
    width: 100%;
    flex-direction: column;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .render-container-inner {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    overflow-y: visible !important;
  }

  .site-body-right-column-inner {
    width: 0 !important;
    max-width: 0 !important;
    display: block;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible !important;
  }

  .site-body-right-column {
    line-height: 1.3;
    width: 0 !important;
    max-width: 0 !important;
    flex: 0 0 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    min-width: 0 !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    border-top: 0 !important;
    pointer-events: none;
  }

  .site-body-center-column {
    width: 100% !important;
    max-width: 100% !important;
  }

  .render-container-inner > .publish-renderer {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .site-header {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  #mobile-tools-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-right: 16px;
  }

  .site-body-right-column.mobile-tools-drawer {
    position: fixed !important;
    top: var(--mobile-shell-header-height, 50px);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    height: calc(100svh - var(--mobile-shell-header-height, 50px)) !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    border: 0 !important;
    background: var(--background-primary);
    box-shadow: none;
    transform: translate3d(100%, 0, 0);
    transition: transform 0.2s ease-in-out;
    z-index: 50;
    pointer-events: none;
    will-change: transform;
    isolation: isolate;
    contain: paint;
    backface-visibility: hidden;
  }

  .published-container.is-mobile-tools-open .site-body-right-column.mobile-tools-drawer {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
  }

  .published-container.is-mobile-tools-open .render-container-inner {
    visibility: hidden;
  }

  .site-body-right-column.mobile-tools-drawer .site-body-right-column-inner {
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100% !important;
    min-height: 0;
    margin: 0 !important;
    padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box;
    background: var(--background-primary);
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    contain: paint;
    backface-visibility: hidden;
  }

  .site-body-right-column.mobile-tools-drawer .graph-view-container .graph-icon.graph-expand.is-active,
  .site-body-right-column.mobile-tools-drawer .graph-view-container .graph-icon.graph-global.is-active {
    color: var(--text-accent);
    opacity: 1;
  }

  .site-body-right-column.mobile-tools-drawer .graph-view-container .graph-icon.graph-expand {
    top: 10px !important;
    right: 42px !important;
  }

  .site-body-right-column.mobile-tools-drawer .graph-view-container .graph-icon.graph-global {
    top: 10px !important;
    right: 10px !important;
  }

  .site-body-right-column.mobile-tools-drawer .graph-view-outer,
  .site-body-right-column.mobile-tools-drawer .outline-view-outer {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--background-primary) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    isolation: isolate;
  }

  .site-body-right-column.mobile-tools-drawer .outline-view-outer {
    padding-top: 6px !important;
    border-top: 0 !important;
  }

  .site-body-right-column.mobile-tools-drawer .published-section-header {
    padding: 0 0 8px;
    margin: 0;
    justify-content: flex-start;
  }

  .site-body-right-column.mobile-tools-drawer .published-section-header-label,
  .site-body-right-column.mobile-tools-drawer .published-section-header-icon + span {
    top: 0;
  }

  .site-body-right-column.mobile-tools-drawer .site-body-right-column-inner > *:not(.graph-view-outer):not(.outline-view-outer),
  .site-body-right-column.mobile-tools-drawer .graph-view-container,
  .site-body-right-column.mobile-tools-drawer .graph-view-container .graph-view,
  .site-body-right-column.mobile-tools-drawer .outline-view {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .site-body-right-column.mobile-tools-drawer .graph-view-container {
    min-height: min(38svh, 320px);
    overflow: hidden;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--background-primary) !important;
  }

  .site-body-right-column.mobile-tools-drawer .outline-view {
    overflow: visible !important;
    max-height: none;
    padding: 0;
    background: var(--background-primary) !important;
  }

  .site-body-right-column.mobile-tools-drawer .graph-view-container .graph-view {
    background: var(--background-primary) !important;
  }

  .graph-view-container .graph-icon.graph-expand {
    right: 8px !important;
  }

  .graph-view-container.mod-expanded {
    width: min(clamp(220px, 66vw, 320px), calc(100vw - 96px));
    max-width: min(clamp(220px, 66vw, 320px), calc(100vw - 96px));
  }

  .modal-container {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    padding: 28px 18px 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .modal-container .modal-bg {
    cursor: pointer;
  }

  .modal-container .graph-view-container.mod-expanded {
    position: relative;
    inset: auto !important;
    width: min(clamp(220px, 66vw, 320px), calc(100vw - 96px));
    max-width: min(clamp(220px, 66vw, 320px), calc(100vw - 96px));
    aspect-ratio: 1 / 1;
    height: auto;
    max-height: calc(100svh - 180px);
    margin: 0 auto;
    overflow: hidden;
    box-sizing: border-box;
  }

  .modal-container .graph-view-container.mod-expanded .graph-icon.graph-expand {
    right: 8px !important;
    top: 8px !important;
  }

  .modal-container .graph-view-container.mod-expanded .graph-view {
    width: 100% !important;
    height: 100% !important;
  }

  .publish-renderer > .markdown-preview-view > .markdown-preview-sizer {
    margin-right: 0;
  }

  body:not(:has(.reader-view)) .published-container.has-outline .site-body-right-column,
  body:not(:has(.reader-view)) .published-container.has-graph .site-body-right-column {
    display: block;
    position: relative;
    background: var(--sidebar-right-background) !important;
    box-shadow: none !important;
  }
}

@media screen and (max-width: 1023px) {
  .site-footer {
    width: 100%;
  }

  .site-footer .social {
    display: none;
  }

  .site-body-left-column .search-view-outer {
    margin: 20px 0 0;
  }

  #toggle-sidebar-btn {
    right: 10px;
  }

  #chooser {
    right: 10px;
  }

  .publish-renderer .publish-article-heading,
  .markdown-rendered h1 {
    margin-block-start: 16px !important;
  }

  .callout[data-callout="clean"] {
    padding: 10px 0;
  }

  body {
    --cards-min-width: var(--cards-mobile-width);
    --img-grid-gap: 0.25rem;
  }
}

@media screen and (max-width: 730px) {
  .site-header-text::after {
    display: block;
    text-align: left;
    margin: 0;
  }

  .page-header {
    display: none;
  }

  .site-footer {
    display: block !important;
    position: relative;
    width: 100%;
    text-align: center;
    right: 0;
  }

  .site-footer .social {
    display: flex;
    text-align: center;
  }

  .search-view-container {
    margin: 10px 15px 15px;
  }

  .search-view-container input {
    height: 50px;
  }

  .site-body-left-column-site-name {
    margin: 0 0 10px !important;
    position: relative;
    top: 0;
  }

  .site-body-left-column-site-theme-toggle {
    margin: 0 0 16px 5px !important;
    position: relative;
    top: 0;
  }
}

@media screen and (max-width: 750px) {
  #toggle-sidebar-btn,
  #chooser {
    display: none !important;
  }

  .site-body:has(.reader-view) .site-body-left-column {
    display: flex !important;
  }
}

@media screen and (max-width: 1023px) and (orientation: landscape) {
  .site-body-left-column-site-logo,
  .site-footer {
    display: none;
  }

  .site-body-right-column {
    display: none !important;
  }

  .site-body-left-column-site-name,
  .site-body-left-column-site-theme-toggle {
    margin: 0 !important;
  }
}

@media screen and (max-width: 1023px) and (orientation: landscape) and (max-height: 500px) {
  .site-body:has(.reader-view) #toggle-sidebar-btn {
    display: flex !important;
    top: 5px;
    right: 10px;
  }

  .site-body:has(.reader-view) #chooser {
    display: flex !important;
  }

  .published-container:has(.reader-view) .site-header .site-header-text {
    top: 40px;
    right: 10px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
  .published-container,
  .site-body,
  .site-body-center-column,
  .render-container,
  .render-container-inner {
    min-height: 0;
  }

  .site-body-right-column {
    display: none !important;
  }

  .sliding-windows .published-container.has-outline .site-body-center-column,
  .sliding-windows .published-container.has-graph .site-body-center-column {
    padding-right: 0 !important;
  }

  .sliding-windows .published-container.has-outline .render-container,
  .sliding-windows .published-container.has-graph .render-container,
  .sliding-windows .published-container.has-outline .render-container-inner,
  .sliding-windows .published-container.has-graph .render-container-inner,
  .sliding-windows .published-container.has-outline .render-container-inner > .publish-renderer,
  .sliding-windows .published-container.has-graph .render-container-inner > .publish-renderer {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .site-footer {
    display: block !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 8px 0 12px;
    text-align: center;
    background: var(--background-primary);
  }

  .site-footer .social {
    display: none !important;
  }

  .site-footer .foot-links {
    display: block !important;
    text-align: center;
  }

  #toggle-sidebar-btn {
    top: 5px;
    right: 10px;
  }
}

@media screen and (max-width: 767px) and (orientation: portrait) {
  body {
    --font-text-size: var(--font-text-size-mobile) !important;
  }

  .published-container:has(.reader-view) .site-header {
    display: none !important;
  }

  .site-body:has(.reader-view) #toggle-sidebar-btn {
    display: flex !important;
    top: 5px;
    right: 10px;
  }

  .site-body:has(.reader-view) #chooser,
  .site-body:has(.reader-view) #mobile-tools-btn {
    display: none !important;
  }

  .site-footer {
    text-align: center;
    width: 100%;
    right: 0;
  }

  .site-footer .social {
    text-align: center;
  }
}

@media screen and (max-width: 767px) and (orientation: portrait) {
  .site-footer {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: calc(26px + env(safe-area-inset-bottom, 0px));
    align-items: center;
    text-align: center;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    gap: 0;
  }

  .site-footer .social {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    gap: 16px;
  }

  .site-footer .social svg {
    display: block;
    height: 15px;
    transform: translateY(1px);
  }

  .site-footer .foot-links {
    display: none !important;
  }
}

@media print {
  #toggle-sidebar-btn,
  #chooser,
  #cookie-banner,
  .frontmatter-container,
  .page-header,
  .site-footer,
  .backlinks,
  .search-view-container,
  .callout.is-collapsed {
    display: none !important;
  }
}
