/* FedericoPrask / CNBlogs — standalone theme
   No external stylesheets, fonts, or theme framework. */

:root {
  color-scheme: light;
  --fp-page: #f4f3ee;
  --fp-page-2: #e9e8e1;
  --fp-paper: #fbfaf6;
  --fp-paper-2: #f1f0e9;
  --fp-ink: #18181b;
  --fp-ink-2: #3f3f46;
  --fp-muted: #6e6e76;
  --fp-line: rgba(24, 24, 27, 0.22);
  --fp-line-strong: rgba(24, 24, 27, 0.55);
  --fp-line-faint: rgba(24, 24, 27, 0.09);
  --fp-accent: #9cb8d7;
  --fp-accent-ink: #5b7da3;
  --fp-accent-wash: rgba(156, 184, 215, 0.14);
  --fp-code: #121216;
  --fp-code-ink: #e8e8e4;
  --fp-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --fp-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --fp-max: 1180px;
  --fp-rail: 258px;
  --fp-gap: 30px;
  --fp-text-xs: 11px;
  --fp-text-sm: 13px;
  --fp-text-base: 15px;
  --fp-text-lg: 18px;
  --fp-radius: 2px;
}

:root[data-fp-mode="dark"] {
  color-scheme: dark;
  /* Layered charcoal, deliberately not a flat near-black canvas. */
  --fp-page: #25282e;
  --fp-page-2: #2d3139;
  --fp-paper: #343941;
  --fp-paper-2: #3d434c;
  --fp-ink: #ecebe7;
  --fp-ink-2: #c9cbd0;
  --fp-muted: #a8abb3;
  --fp-line: rgba(236, 235, 231, 0.21);
  --fp-line-strong: rgba(236, 235, 231, 0.46);
  --fp-line-faint: rgba(236, 235, 231, 0.10);
  --fp-code: #22262c;
  --fp-code-ink: #ecebe7;
}

:root[data-fp-accent="blue"] {
  --fp-accent: #9cb8d7;
  --fp-accent-ink: #5b7da3;
  --fp-accent-wash: rgba(156, 184, 215, 0.14);
}
:root[data-fp-accent="blue"][data-fp-mode="dark"] {
  --fp-accent: #a9c5e4;
  --fp-accent-ink: #c2d8ec;
  --fp-accent-wash: rgba(169, 197, 228, 0.16);
}
:root[data-fp-accent="sage"] {
  --fp-accent: #9bb5a0;
  --fp-accent-ink: #54755c;
  --fp-accent-wash: rgba(155, 181, 160, 0.16);
}
:root[data-fp-accent="sage"][data-fp-mode="dark"] {
  --fp-accent: #a9c6ae;
  --fp-accent-ink: #c4dfc8;
  --fp-accent-wash: rgba(169, 198, 174, 0.16);
}
:root[data-fp-accent="amber"] {
  --fp-accent: #d2ad75;
  --fp-accent-ink: #89652e;
  --fp-accent-wash: rgba(210, 173, 117, 0.17);
}
:root[data-fp-accent="amber"][data-fp-mode="dark"] {
  --fp-accent: #e1bb82;
  --fp-accent-ink: #f0d5ac;
  --fp-accent-wash: rgba(225, 187, 130, 0.16);
}
:root[data-fp-accent="rose"] {
  --fp-accent: #d3a0aa;
  --fp-accent-ink: #995d6a;
  --fp-accent-wash: rgba(211, 160, 170, 0.16);
}
:root[data-fp-accent="rose"][data-fp-mode="dark"] {
  --fp-accent: #dfaab5;
  --fp-accent-ink: #f0c9d0;
  --fp-accent-wash: rgba(223, 170, 181, 0.16);
}
:root[data-fp-accent="violet"] {
  --fp-accent: #b4a8d5;
  --fp-accent-ink: #675892;
  --fp-accent-wash: rgba(180, 168, 213, 0.17);
}
:root[data-fp-accent="violet"][data-fp-mode="dark"] {
  --fp-accent: #c1b5e5;
  --fp-accent-ink: #ddd3f7;
  --fp-accent-wash: rgba(193, 181, 229, 0.17);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--fp-page);
}

body.skin-custom {
  min-width: 0 !important;
  margin: 0 !important;
  overflow-x: hidden;
  background: var(--fp-page) !important;
  color: var(--fp-ink) !important;
  font-family: var(--fp-sans) !important;
  font-size: var(--fp-text-base) !important;
  font-weight: 400;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.skin-custom :where(h1, h2, h3, h4, h5, h6, p, ul, ol) {
  margin-top: 0;
}

body.skin-custom a {
  color: var(--fp-accent-ink);
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
body.skin-custom a:hover {
  color: var(--fp-ink);
}
body.skin-custom :where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--fp-accent-ink);
  outline-offset: 3px;
}
body.skin-custom ::selection {
  color: var(--fp-ink);
  background: var(--fp-accent);
}

/* Page frame and shared alignment */
body.skin-custom #home {
  width: min(var(--fp-max), calc(100% - 40px)) !important;
  max-width: var(--fp-max) !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  text-align: left !important;
}

body.skin-custom #top_nav.navbar-custom {
  min-height: 42px;
  border-bottom: 1px solid var(--fp-line) !important;
  background: var(--fp-page) !important;
  color: var(--fp-muted) !important;
  font-size: var(--fp-text-xs) !important;
}
body.skin-custom #top_nav .navbar-main {
  width: min(var(--fp-max), calc(100% - 40px)) !important;
  max-width: var(--fp-max) !important;
  min-height: 42px;
  margin: 0 auto !important;
}
body.skin-custom #top_nav a {
  color: var(--fp-ink-2) !important;
}
body.skin-custom #top_nav a:hover {
  color: var(--fp-accent-ink) !important;
}
body.skin-custom #top_nav input[type="search"] {
  min-height: 32px;
  border: 1px solid var(--fp-line) !important;
  border-radius: var(--fp-radius) !important;
  background: var(--fp-paper) !important;
  color: var(--fp-ink) !important;
}

/* Masthead: title and navigation remain in normal document flow. */
body.skin-custom #header {
  position: relative !important;
  inset: auto !important;
  z-index: 2;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 1px solid var(--fp-line) !important;
  background: var(--fp-paper) !important;
  box-shadow: none !important;
}
body.skin-custom #lnkBlogLogo,
body.skin-custom #blogLogo {
  display: none !important;
}
body.skin-custom #blogTitle {
  position: relative;
  min-height: 164px;
  margin: 0 !important;
  padding: 30px clamp(22px, 4.8vw, 54px) 29px !important;
  overflow: hidden;
  border: 0 !important;
  background-color: var(--fp-paper) !important;
  background-image:
    linear-gradient(to right, var(--fp-line-faint) 1px, transparent 1px),
    linear-gradient(to bottom, var(--fp-line-faint) 1px, transparent 1px) !important;
  background-size: 48px 48px !important;
  text-align: left !important;
}
body.skin-custom #blogTitle::before {
  display: block;
  margin: 0 0 11px;
  color: var(--fp-accent-ink);
  content: "FIELD NOTES  /  PERSONAL BLOG";
  font-family: var(--fp-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
}
body.skin-custom #blogTitle::after {
  display: none !important;
  content: none !important;
}
body.skin-custom #blogTitle h1,
body.skin-custom #blogTitle .title {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--fp-ink) !important;
  font-family: var(--fp-sans) !important;
  font-size: clamp(30px, 3.6vw, 40px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.045em !important;
  line-height: 1.18 !important;
  text-shadow: none !important;
  overflow-wrap: anywhere;
}
body.skin-custom #blogTitle h1 a,
body.skin-custom #blogTitle .title a,
body.skin-custom #blogTitle .headermaintitle {
  color: inherit !important;
  font: inherit !important;
  text-decoration: none !important;
}
body.skin-custom #blogTitle h2,
body.skin-custom #blogTitle .subtitle {
  max-width: 72ch;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--fp-muted) !important;
  font-family: var(--fp-mono) !important;
  font-size: var(--fp-text-xs) !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  text-shadow: none !important;
}
body.skin-custom #blogTitle h2:empty,
body.skin-custom #blogTitle .subtitle:empty {
  display: none !important;
}
body.skin-custom #blogTitle h2::before,
body.skin-custom #blogTitle .subtitle::before {
  color: var(--fp-accent-ink);
  content: "// ";
}

/* Navigation */
body.skin-custom #navigator {
  position: relative !important;
  inset: auto !important;
  z-index: 1;
  display: flex !important;
  width: 100% !important;
  min-height: 54px;
  height: auto !important;
  margin: 0 !important;
  padding: 0 20px !important;
  align-items: center;
  gap: 20px;
  border: 0 !important;
  border-top: 2px solid var(--fp-accent) !important;
  background: var(--fp-page) !important;
  box-shadow: none !important;
}
body.skin-custom #navList {
  display: flex !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: clamp(14px, 2.2vw, 28px);
  list-style: none !important;
}
body.skin-custom #navList > li {
  position: relative;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  line-height: 1.3;
  list-style: none !important;
}
body.skin-custom #navList > li > a {
  display: inline-flex;
  min-height: 50px;
  padding: 0 !important;
  align-items: center;
  color: var(--fp-ink-2) !important;
  font-size: var(--fp-text-sm) !important;
  font-weight: 500;
  white-space: nowrap;
}
body.skin-custom #navList > li > a:hover {
  color: var(--fp-accent-ink) !important;
}
body.skin-custom .blogStats {
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  float: none !important;
  color: var(--fp-muted) !important;
  font-family: var(--fp-mono) !important;
  font-size: var(--fp-text-xs) !important;
}

/* Main grid: left rail / right article list or article body. */
body.skin-custom #main {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 28px 0 52px !important;
  padding: 0 !important;
  grid-template-columns: var(--fp-rail) minmax(0, 1fr);
  align-items: start;
  gap: var(--fp-gap);
  overflow: visible !important;
  background: transparent !important;
}
body.skin-custom #main > .clear {
  display: none !important;
}
body.skin-custom #mainContent {
  position: relative;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  grid-column: 2;
  grid-row: 1;
  background: transparent !important;
}
body.skin-custom #mainContent .forFlow,
body.skin-custom #post_detail,
body.skin-custom .forFlow {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.skin-custom #sideBar {
  position: static !important;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  grid-column: 1;
  grid-row: 1;
  background: transparent !important;
}
body.skin-custom #sideBarMain {
  display: flex;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  flex-direction: column;
  gap: 14px;
}

/* Sidebar panels and aligned profile card */
body.skin-custom #sideBar :where(.newsItem, .catList, .catListPostArchive, .catListTag, .catListEssay, .catListView, .catListFeedback, #blog-calendar, .profile-block) {
  min-width: 0;
  margin: 0 !important;
  padding: 15px !important;
  border: 1px solid var(--fp-line) !important;
  border-radius: var(--fp-radius) !important;
  background: var(--fp-paper) !important;
  color: var(--fp-ink-2) !important;
  box-shadow: none !important;
}
body.skin-custom #sideBar :where(h3, .catListTitle) {
  margin: 0 0 11px !important;
  padding: 0 0 9px !important;
  border: 0 !important;
  border-bottom: 1px dashed var(--fp-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--fp-ink) !important;
  font-family: var(--fp-sans) !important;
  font-size: var(--fp-text-sm) !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  line-height: 1.4 !important;
}
body.skin-custom #sideBar ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
body.skin-custom #sideBar li {
  margin: 0 !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid var(--fp-line-faint);
  color: var(--fp-ink-2);
  font-size: var(--fp-text-sm);
  line-height: 1.55;
  list-style: none !important;
}
body.skin-custom #sideBar li:last-child {
  border-bottom: 0;
}
body.skin-custom #sideBar li a {
  color: var(--fp-ink-2) !important;
}
body.skin-custom #sideBar li a:hover {
  color: var(--fp-accent-ink) !important;
}
body.skin-custom #sidebar_news > .catListTitle {
  color: var(--fp-muted) !important;
  font-family: var(--fp-mono) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.10em !important;
}
body.skin-custom #sidebar_news #blog-news {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
body.skin-custom #sidebar_news_container {
  min-width: 0;
}
body.skin-custom .fp-profile-card {
  display: grid;
  width: 100%;
  max-width: 360px;
  min-width: 0;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  gap: 10px 12px;
}
body.skin-custom .fp-profile-card__avatar-box {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  overflow: hidden;
  grid-column: 1;
  grid-row: 1;
  place-items: center;
  border: 1px solid var(--fp-line) !important;
  background: var(--fp-page-2);
}
body.skin-custom .fp-profile-card__avatar-box::after {
  position: absolute;
  color: var(--fp-muted);
  content: "FP";
  font-family: var(--fp-mono);
  font-size: 14px;
  font-weight: 600;
}
body.skin-custom .fp-profile-card__avatar-box img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: cover;
}
body.skin-custom .fp-profile-card__avatar-box.is-fallback img {
  display: none !important;
}
body.skin-custom .fp-profile-card__info {
  display: flex !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  grid-column: 2;
  grid-row: 1;
  flex-direction: column;
  gap: 6px;
  border: 0 !important;
  background: transparent !important;
  line-height: 1.35;
}
body.skin-custom .fp-profile-card__name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--fp-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em;
  line-height: 1.35 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.skin-custom .fp-profile-card__stats {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 9px;
}
body.skin-custom .fp-profile-card__stat {
  display: flex;
  min-width: 0;
  padding-top: 4px;
  flex-direction: column;
  border-top: 1px dashed var(--fp-line-faint);
  line-height: 1.25;
}
body.skin-custom .fp-profile-card__stat-label {
  color: var(--fp-muted);
  font-family: var(--fp-mono);
  font-size: 10px;
}
body.skin-custom .fp-profile-card__stat a {
  overflow: hidden;
  color: var(--fp-accent-ink) !important;
  font-size: 12px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.skin-custom .fp-profile-card > #p_b_follow {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  grid-column: 1 / -1;
  grid-row: 2;
  background: transparent !important;
  text-align: left;
}
body.skin-custom .fp-profile-card > #p_b_follow a {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px !important;
  border: 1px solid var(--fp-line) !important;
  border-radius: var(--fp-radius) !important;
  background: transparent !important;
  color: var(--fp-ink-2) !important;
  font-family: var(--fp-sans) !important;
  font-size: 12px !important;
  line-height: 1.6;
  text-align: center;
}
body.skin-custom .fp-profile-card > #p_b_follow a:hover {
  border-color: var(--fp-accent-ink) !important;
  background: var(--fp-accent-wash) !important;
  color: var(--fp-ink) !important;
}

/* Posts and article typography: one controlled scale, no oversized title jumps. */
body.skin-custom .day {
  margin: 0 0 22px !important;
  padding: 0 !important;
  background: transparent !important;
}
body.skin-custom .dayTitle {
  margin: 0 0 12px !important;
  padding: 0 0 8px !important;
  border: 0 !important;
  border-bottom: 1px dashed var(--fp-line) !important;
  background: transparent !important;
  color: var(--fp-muted) !important;
  font-family: var(--fp-mono) !important;
  font-size: var(--fp-text-xs) !important;
  font-weight: 400 !important;
  letter-spacing: 0.035em;
}
body.skin-custom .post,
body.skin-custom .entrylistItem,
body.skin-custom .forFlow > .post {
  position: relative;
  min-width: 0;
  margin: 0 0 16px !important;
  padding: clamp(20px, 2.8vw, 30px) !important;
  border: 1px solid var(--fp-line) !important;
  border-radius: var(--fp-radius) !important;
  background: var(--fp-paper) !important;
  color: var(--fp-ink-2) !important;
  box-shadow: none !important;
}
body.skin-custom .postTitle,
body.skin-custom .postTitle a,
body.skin-custom .entrylistItemTitle,
body.skin-custom .entrylistItemTitle a {
  margin: 0 0 12px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--fp-ink) !important;
  font-family: var(--fp-sans) !important;
  font-size: clamp(22px, 2.3vw, 28px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.28 !important;
  text-shadow: none !important;
  overflow-wrap: anywhere;
}
body.skin-custom .postTitle a:hover,
body.skin-custom .entrylistItemTitle a:hover {
  color: var(--fp-accent-ink) !important;
}
body.skin-custom .postCon,
body.skin-custom .postBody,
body.skin-custom .entrylistItemPostDesc,
body.skin-custom #cnblogs_post_body,
body.skin-custom .cnblogs-post-body,
body.skin-custom .cnblogs-markdown {
  min-width: 0;
  color: var(--fp-ink-2) !important;
  font-family: var(--fp-sans) !important;
  font-size: var(--fp-text-base) !important;
  line-height: 1.78 !important;
  overflow-wrap: anywhere;
}
body.skin-custom #post_detail .postTitle,
body.skin-custom #post_detail .postTitle a {
  margin-bottom: 18px !important;
  font-size: clamp(27px, 3.2vw, 36px) !important;
  line-height: 1.2 !important;
}
body.skin-custom .postDesc,
body.skin-custom .postDesc2,
body.skin-custom .postfoot,
body.skin-custom .postMeta,
body.skin-custom .entrylistItemPostDesc {
  color: var(--fp-muted) !important;
  font-family: var(--fp-mono) !important;
  font-size: var(--fp-text-xs) !important;
  line-height: 1.6 !important;
}
body.skin-custom .postDesc {
  margin-top: 14px !important;
  padding-top: 9px !important;
  border-top: 1px dashed var(--fp-line-faint) !important;
}
body.skin-custom .postCon a,
body.skin-custom #cnblogs_post_body a,
body.skin-custom .cnblogs-post-body a {
  color: var(--fp-accent-ink) !important;
  text-decoration: underline;
  text-decoration-color: var(--fp-line-strong);
  text-underline-offset: 3px;
}
body.skin-custom :where(blockquote, .cnblogs_Highlighter, .cnblogs_code) {
  border-color: var(--fp-accent) !important;
}
body.skin-custom blockquote {
  margin: 18px 0 !important;
  padding: 12px 18px !important;
  border-left: 2px solid var(--fp-accent) !important;
  background: var(--fp-paper-2) !important;
  color: var(--fp-ink-2) !important;
}
body.skin-custom pre,
body.skin-custom .cnblogs_code,
body.skin-custom .cnblogs_Highlighter,
body.skin-custom pre code {
  max-width: 100%;
  overflow: auto;
  background: var(--fp-code) !important;
  color: var(--fp-code-ink) !important;
  font-family: var(--fp-mono) !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
}
body.skin-custom img,
body.skin-custom video,
body.skin-custom iframe {
  max-width: 100%;
}
body.skin-custom table {
  max-width: 100%;
  border-collapse: collapse;
}
body.skin-custom th,
body.skin-custom td {
  padding: 7px 9px;
  border: 1px solid var(--fp-line);
}
body.skin-custom .pager,
body.skin-custom #nav_next_page {
  color: var(--fp-muted) !important;
  font-size: var(--fp-text-sm) !important;
}

/* Calendar, comments and other generated CNBlogs modules */
body.skin-custom #blog-calendar {
  overflow-x: auto;
  color: var(--fp-ink-2) !important;
}
body.skin-custom #blog-calendar table {
  width: 100%;
  min-width: 220px;
  border-collapse: collapse;
}
body.skin-custom #blog-calendar th,
body.skin-custom #blog-calendar td {
  padding: 5px 3px;
  border: 1px solid var(--fp-line-faint);
  color: var(--fp-ink-2) !important;
  font-size: 12px;
  text-align: center;
}
body.skin-custom #blog-calendar a,
body.skin-custom #blog-calendar .CalTodayDay {
  color: var(--fp-accent-ink) !important;
}
body.skin-custom #comment_form,
body.skin-custom #comment_nav,
body.skin-custom #comment_pager_bottom,
body.skin-custom #blog_post_info_block,
body.skin-custom #div_digg,
body.skin-custom #under_post_card1,
body.skin-custom #under_post_card2 {
  max-width: 100%;
  margin: 20px 0 !important;
  padding: 16px !important;
  border: 1px solid var(--fp-line) !important;
  border-radius: var(--fp-radius) !important;
  background: var(--fp-paper) !important;
  color: var(--fp-ink-2) !important;
}
body.skin-custom #comment_form_container,
body.skin-custom #commentform_main,
body.skin-custom #commentbox_opt,
body.skin-custom #comment_list {
  max-width: 100%;
  color: var(--fp-ink-2) !important;
}
body.skin-custom #comment_form_container,
body.skin-custom #comment_list {
  background: transparent !important;
}
body.skin-custom #comment_list :where(.feedbackItem, .commentItem, .comment-item) {
  margin: 12px 0 !important;
  padding: 14px !important;
  border: 1px solid var(--fp-line) !important;
  border-radius: var(--fp-radius) !important;
  background: var(--fp-paper) !important;
  color: var(--fp-ink-2) !important;
}
body.skin-custom :where(.feedback_area_title, #commentform_title) {
  color: var(--fp-ink) !important;
}
body.skin-custom :where(.feedbackListSubtitle, .comment_date, .comment_actions) {
  color: var(--fp-muted) !important;
}
body.skin-custom :where(.feedbackCon, .comment_text, .comment_body) {
  color: var(--fp-ink-2) !important;
}
body.skin-custom input,
body.skin-custom textarea,
body.skin-custom select,
body.skin-custom button {
  max-width: 100%;
  font: inherit;
}
body.skin-custom :where(
  input[type="text"], input[type="search"], input[type="email"],
  input[type="url"], input[type="tel"], input[type="password"],
  input[type="number"], input:not([type]), textarea, select
) {
  border: 1px solid var(--fp-line-strong) !important;
  border-radius: var(--fp-radius) !important;
  background: var(--fp-paper-2) !important;
  color: var(--fp-ink) !important;
}
body.skin-custom :where(input, textarea)::placeholder {
  color: var(--fp-muted) !important;
  opacity: 1;
}
body.skin-custom :where(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--fp-accent-ink);
}
body.skin-custom :where(input[type="submit"], input[type="button"], input[type="reset"], #comment_form_container button) {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--fp-line-strong) !important;
  border-radius: var(--fp-radius) !important;
  background: var(--fp-paper-2) !important;
  color: var(--fp-ink) !important;
  cursor: pointer;
}
body.skin-custom :where(input[type="submit"], input[type="button"], input[type="reset"], #comment_form_container button):hover {
  border-color: var(--fp-accent-ink) !important;
  background: var(--fp-accent-wash) !important;
}

/* Dark-mode safety net for generated modules and author-inline styling. */
:root[data-fp-mode="dark"] body.skin-custom :where(
  .postCon, .postBody, .entrylistItemPostDesc, #cnblogs_post_body,
  .cnblogs-post-body, .cnblogs-markdown
) :where(h1, h2, h3, h4, h5, h6) {
  color: var(--fp-ink) !important;
}
:root[data-fp-mode="dark"] body.skin-custom :where(
  #mainContent, #sideBar, #comment_form_container, #comment_nav,
  #comment_pager_bottom, #blog_post_info_block, #div_digg,
  #under_post_card1, #under_post_card2
) :where(
  :not(pre):not(pre *):not(code):not(code *):not(.cnblogs_code):not(.cnblogs_code *):not(.cnblogs_Highlighter):not(.cnblogs_Highlighter *):not(.hljs):not(.hljs *):not(input):not(textarea):not(select):not(button)[style*="color"],
  :not(pre):not(pre *):not(code):not(code *):not(.cnblogs_code):not(.cnblogs_code *):not(.cnblogs_Highlighter):not(.cnblogs_Highlighter *):not(.hljs):not(.hljs *):not(input):not(textarea):not(select):not(button)[color]
) {
  color: var(--fp-ink-2) !important;
}
:root[data-fp-mode="dark"] body.skin-custom :where(
  #mainContent, #sideBar, #comment_form_container, #comment_nav,
  #comment_pager_bottom, #blog_post_info_block, #div_digg,
  #under_post_card1, #under_post_card2
) :where(
  :not(pre):not(pre *):not(code):not(code *):not(.cnblogs_code):not(.cnblogs_code *):not(.cnblogs_Highlighter):not(.cnblogs_Highlighter *):not(.hljs):not(.hljs *):not(input):not(textarea):not(select):not(button)[style*="background"],
  :not(pre):not(pre *):not(code):not(code *):not(.cnblogs_code):not(.cnblogs_code *):not(.cnblogs_Highlighter):not(.cnblogs_Highlighter *):not(.hljs):not(.hljs *):not(input):not(textarea):not(select):not(button)[bgcolor]
) {
  background: var(--fp-paper-2) !important;
  background-image: none !important;
}
:root[data-fp-mode="dark"] body.skin-custom #mainContent table th {
  border-color: var(--fp-line) !important;
  background: var(--fp-paper-2) !important;
  color: var(--fp-ink) !important;
}
:root[data-fp-mode="dark"] body.skin-custom #mainContent table td {
  border-color: var(--fp-line) !important;
  background: var(--fp-paper) !important;
  color: var(--fp-ink-2) !important;
}
:root[data-fp-mode="dark"] body.skin-custom #blog-calendar th {
  background: var(--fp-paper-2) !important;
  color: var(--fp-ink) !important;
}
:root[data-fp-mode="dark"] body.skin-custom #blog-calendar td {
  background: var(--fp-paper) !important;
  color: var(--fp-ink-2) !important;
}
:root[data-fp-mode="dark"] body.skin-custom #comment_list :where(.feedbackItem, .commentItem, .comment-item) {
  border-color: var(--fp-line) !important;
  background: var(--fp-paper) !important;
  color: var(--fp-ink-2) !important;
}

body.skin-custom #footer {
  width: 100% !important;
  margin: 34px 0 0 !important;
  padding: 18px 0 28px !important;
  border-top: 1px dashed var(--fp-line-strong) !important;
  background: transparent !important;
  color: var(--fp-muted) !important;
  font-family: var(--fp-mono) !important;
  font-size: var(--fp-text-xs) !important;
  line-height: 1.6;
  text-align: center;
}

/* Independent theme dock */
#fp-theme-dock,
#fp-theme-dock * {
  box-sizing: border-box;
}
#fp-theme-dock {
  position: fixed;
  z-index: 2147483000;
  right: 18px;
  bottom: 18px;
  display: grid;
  justify-items: end;
  gap: 10px;
  font-family: var(--fp-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--fp-ink);
}
#fp-theme-dock button {
  font: inherit;
}
#fp-theme-dock [hidden] {
  display: none !important;
}
.fp-dock__launcher,
.fp-dock__top {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--fp-line-strong);
  border-radius: 50%;
  background: var(--fp-ink);
  color: var(--fp-page);
  box-shadow: 0 5px 18px rgba(18, 20, 24, 0.18);
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, color 150ms ease;
}
.fp-dock__launcher:hover,
.fp-dock__top:hover {
  background: var(--fp-accent-ink);
  color: var(--fp-paper);
  transform: translateY(-2px);
}
.fp-dock__launcher svg,
.fp-dock__top svg,
.fp-mode-button svg,
.fp-panel__close svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.fp-dock__top {
  width: 40px;
  height: 40px;
  border-radius: var(--fp-radius);
  background: var(--fp-paper);
  color: var(--fp-ink-2);
}
.fp-theme-panel {
  position: fixed;
  right: 78px;
  bottom: 18px;
  width: 288px;
  max-width: calc(100vw - 110px);
  max-height: min(420px, calc(100vh - 36px));
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--fp-line-strong);
  border-radius: var(--fp-radius);
  background: var(--fp-paper);
  color: var(--fp-ink);
  box-shadow: 0 10px 32px rgba(18, 20, 24, 0.16);
}
.fp-panel__head {
  display: flex;
  margin-bottom: 14px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.fp-panel__eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--fp-accent-ink);
  font-family: var(--fp-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.fp-panel__title {
  margin: 0;
  color: var(--fp-ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}
.fp-panel__close {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--fp-line);
  border-radius: var(--fp-radius);
  background: transparent;
  color: var(--fp-ink-2);
  cursor: pointer;
}
.fp-panel__close svg {
  width: 17px;
  height: 17px;
}
.fp-panel__section {
  padding: 14px 0;
  border-top: 1px solid var(--fp-line-faint);
}
.fp-panel__label {
  display: block;
  margin: 0 0 10px;
  color: var(--fp-muted);
  font-family: var(--fp-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.055em;
}
.fp-mode-button {
  display: flex;
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--fp-line);
  border-radius: var(--fp-radius);
  background: var(--fp-paper-2);
  color: var(--fp-ink);
  text-align: left;
  cursor: pointer;
}
.fp-mode-button svg {
  width: 17px;
  height: 17px;
  color: var(--fp-accent-ink);
}
.fp-mode-button__state {
  margin-left: auto;
  color: var(--fp-muted);
  font-family: var(--fp-mono);
  font-size: 12px;
}
.fp-palette-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.fp-palette-choice {
  display: grid;
  width: 100%;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--fp-radius);
  background: transparent;
  color: var(--fp-muted);
  cursor: pointer;
}
.fp-palette-choice:hover,
.fp-palette-choice[aria-pressed="true"] {
  border-color: var(--fp-line-strong);
  background: var(--fp-paper-2);
  color: var(--fp-ink);
}
.fp-palette-choice__swatch {
  display: block;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(24, 24, 27, 0.2);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 3px var(--fp-paper);
}
:root[data-fp-mode="dark"] .fp-palette-choice__swatch {
  border-color: rgba(231, 231, 228, 0.28);
  box-shadow: inset 0 0 0 3px var(--fp-paper);
}
.fp-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Header HTML skip link */
.fp-skip-link {
  position: fixed;
  z-index: 2147483001;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  transform: translateY(-160%);
  border: 1px solid var(--fp-line-strong);
  background: var(--fp-paper);
  color: var(--fp-ink) !important;
  font-size: 13px;
}
.fp-skip-link:focus {
  transform: translateY(0);
}

@media (max-width: 900px) {
  :root {
    --fp-gap: 22px;
  }
  body.skin-custom #home {
    width: min(var(--fp-max), calc(100% - 28px)) !important;
  }
  body.skin-custom #header {
    position: relative !important;
    margin-top: 12px !important;
  }
  body.skin-custom #main {
    grid-template-columns: minmax(0, 1fr) !important;
    margin-top: 20px !important;
    gap: 20px;
  }
  body.skin-custom #mainContent {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.skin-custom #sideBar {
    position: static !important;
    display: block !important;
    width: 100% !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
  body.skin-custom #sideBarMain {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
  }
  body.skin-custom #sideBarMain > * {
    min-width: 0;
  }
  body.skin-custom #sideBarMain > #sidebar_news {
    grid-column: 1 / -1;
  }
  body.skin-custom #mainContent table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
  body.skin-custom #footer {
    width: 100% !important;
  }
}

@media (max-width: 560px) {
  :root {
    --fp-rail: 1fr;
    --fp-gap: 18px;
    --fp-text-base: 14px;
  }
  body.skin-custom #home {
    width: calc(100% - 20px) !important;
  }
  body.skin-custom #header {
    margin-top: 10px !important;
  }
  body.skin-custom #blogTitle {
    min-height: 132px;
    padding: 22px 17px 22px !important;
    background-size: 36px 36px !important;
  }
  body.skin-custom #blogTitle::before {
    margin-bottom: 9px;
    font-size: 9px;
  }
  body.skin-custom #blogTitle h1,
  body.skin-custom #blogTitle .title {
    font-size: clamp(27px, 8vw, 34px) !important;
    letter-spacing: -0.04em !important;
  }
  body.skin-custom #blogTitle h2,
  body.skin-custom #blogTitle .subtitle {
    max-width: 100%;
    margin-top: 9px !important;
    font-size: 11px !important;
  }
  body.skin-custom #navigator {
    min-height: 48px;
    padding: 0 12px !important;
    gap: 8px;
  }
  body.skin-custom #navList {
    flex-wrap: nowrap;
    gap: 17px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body.skin-custom #navList::-webkit-scrollbar {
    display: none;
  }
  body.skin-custom #navList > li > a {
    min-height: 46px;
    font-size: 12px !important;
  }
  body.skin-custom .blogStats {
    display: none !important;
  }
  body.skin-custom #main {
    margin-top: 16px !important;
    margin-bottom: 30px !important;
    gap: 17px;
  }
  body.skin-custom .post,
  body.skin-custom .entrylistItem,
  body.skin-custom .forFlow > .post {
    padding: 18px !important;
  }
  body.skin-custom .postTitle,
  body.skin-custom .postTitle a,
  body.skin-custom .entrylistItemTitle,
  body.skin-custom .entrylistItemTitle a {
    font-size: clamp(20px, 6vw, 24px) !important;
  }
  body.skin-custom #post_detail .postTitle,
  body.skin-custom #post_detail .postTitle a {
    font-size: clamp(25px, 7.3vw, 31px) !important;
  }
  body.skin-custom #sideBarMain {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }
  body.skin-custom #sideBarMain > #sidebar_news {
    grid-column: 1;
  }
  body.skin-custom .fp-profile-card {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 9px 11px;
  }
  body.skin-custom .fp-profile-card__avatar-box {
    width: 60px;
    height: 60px;
  }
  body.skin-custom .fp-profile-card__name {
    font-size: 14px !important;
  }
  body.skin-custom .fp-profile-card__stat-label {
    font-size: 10px;
  }
  body.skin-custom .fp-profile-card__stat a {
    font-size: 11px !important;
  }
  body.skin-custom .fp-theme-panel {
    right: 8px;
    bottom: 72px;
    width: min(288px, calc(100vw - 16px));
    max-width: none;
    max-height: calc(100vh - 90px);
    max-height: calc(100dvh - 90px);
  }
  #fp-theme-dock {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 294px) {
  .fp-palette-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
