/* ------------------------------------
 * Typecho Default Theme
 *
 * @author  Typecho Team
 * @link  http: //typecho.org/
 * @update  2013-10-28
 * --------------------------------- */

/* ------------------
 * Global style
 * --------------- */
 body {
  background-color: #FFF;
  color: #444;
  /*font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;*/
  font-family: "Droid Serif", Georgia, "Times New Roman", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "WenQuanYi Micro Hei","Microsoft Yahei", serif;
  font-size: 87.5%;
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
.post-content .more-link {
    color: #3354AA;
    text-decoration: none;
    font-weight: bold;
}
.post-content .more-link:hover {
    text-decoration: underline;
}
a {
  color: #3354AA;
  text-decoration: none;
}
a:hover, a:active {
  color: #444;
}
pre, code { 
  background: #F3F3F3;
  font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
  font-size: .92857em;
}
code { padding: 2px 4px; color: #B94A48; }
pre {
  padding: 8px;
  overflow: auto;
  max-height: 400px;
}
pre code {
  padding: 3px;
  color: #444;
}

blockquote {
  margin: 1em 0;
  padding-left: 1.5em;
  border-left: 4px solid #eee;
  color: #666;
}

table {
  border: 1px solid #ddd;
  width: 100%;
}
table th,
table td {
  padding: 5px 10px;
  border: 1px solid #eee;
}
table th {
  background: #f3f3f3;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei","Microsoft Yahei", sans-serif;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 5px;
  border: 1px solid #E9E9E9;
  width: 100%;

  border-radius: 2px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
textarea {
  resize: vertical;
}


/* Special link style */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
  border-bottom: 1px solid #EEE;
}

.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
  border-bottom-color: transparent;
}

/* ------------------
 * Header
 * --------------- */

#header {
  padding-top: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #EEE;
}

.header-top {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand actions"
    "nav actions";
  column-gap: 24px;
  row-gap: 12px;
  align-items: start;
}

.site-brand {
  grid-area: brand;
  min-width: 200px;
}

.header-nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 0;
}

.header-actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  position: relative;
}

#logo {
  display: inline-flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  overflow: visible !important;
  line-height: 1.1;
  text-decoration: none;
  color: inherit;
}
#logo img {
  display: block !important;
  height: 75px !important;
  width: 400px !important;
  max-height: none !important;
  max-width: none !important;
}
#logo .logo-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
#logo .logo-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: #777;
}

.description {
  margin: .5em 0 0;
  color: #999;
  font-style: italic;
}

/* Navigation menu 
#nav-menu {
  margin: 10px 0 0;
  padding: 0;
}
#nav-menu a {
  display: block;
  margin-right: -1px;
  padding: 0 20px;
  border: 1px solid #EEE;
  border-bottom: none;
  height: 32px;
  line-height: 32px;
  color: #444;
  float: left;
}
#nav-menu a:hover,
#nav-menu .current {
  background: #F6F6F6;
} */
/* ==================================================
   Top Navigation – iOS System Segmented (Final)
   ================================================== */

#nav-menu{
    display: inline-flex;
    align-items: center;
    gap: 0;

    margin: 0;
    padding: 4px;                /* iOS safe inset */

    background: #f2f2f7;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.04);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.9),
      0 1px 2px rgba(0,0,0,.04);
}

/* Item (NOT a capsule) */
#nav-menu a{
    padding: 8px 18px;

    font-size: 14px;
    font-weight: 500;
    color: #5a5a5f;

    border-radius: 999px;        /* only when active it matters */
    background: transparent;
    border: none;

    transition:
      color 160ms ease,
      background 160ms ease,
      box-shadow 160ms ease;
}
#nav-menu a.current {
    color: #111;
}
/* Hover: subtle iOS highlight (preview only) */
@media (hover:hover){
  #nav-menu a:not(.current):hover{
      background: rgba(255,255,255,.55);  /* 透明高光 */
      color: #000;
  }
}


/* Active: white pill (iOS canonical) */
#nav-menu a.current{
    background: #ffffff;
    color: #000;
    font-weight: 600;

    box-shadow:
      0 1px 2px rgba(0,0,0,.06),
      0 6px 16px rgba(0,0,0,.08);
}

/* Active press */
#nav-menu a:active{
    background: #ffffff;
    box-shadow:
      0 1px 2px rgba(0,0,0,.05);
}

/* Mobile */
@media (max-width: 768px){
    #nav-menu{
        margin: 10px auto 16px;
        padding: 4px;
    }
    #nav-menu a{
        padding: 7px 14px;
        font-size: 13px;
    }
}


/* Search */
/* ==================================================
   Search – Card-aligned System Control (Final)
   ================================================== */

#search {
    display: flex;
    align-items: center;

    margin-top: 0;
    max-width: 360px;

    /* Card-like container */
    background: #ffffff;
    border: 1px solid #e5e9f0;
    border-radius: 10px;

    box-shadow: 0 4px 14px rgba(0,0,0,.06);

    overflow: hidden; /* keep rounded corners */
}

/* Input */
#search input {
    flex: 1;
    padding: 10px 14px;   /* 给 placeholder 足够空间 */

    font-size: 14px;
    line-height: 1.6;
    color: #333;

    background: transparent;
    border: none;
    outline: none;
}

/* Placeholder */
#search input::placeholder {
    color: #9aa0a6;
}

/* Button */
#search button {
    padding: 10px 16px;

    font-size: 13px;
    font-weight: 500;
    color: #555;

    background: transparent;
    border: none;
    border-left: 1px solid #e5e9f0;

    cursor: pointer;

    transition:
      background 120ms ease,
      color 120ms ease;
}

/* Hover */
@media (hover:hover) {
    #search button:hover {
        background: rgba(0,0,0,.04);
        color: #111;
    }
}

/* Focus within: subtle elevation */
#search:focus-within {
    box-shadow:
      0 6px 20px rgba(0,0,0,.08);
}

/* Mobile */
@media (max-width: 768px) {
    #search {
        max-width: 100%;
    }
}


/* ------------------
 * Main
 * --------------- */

.post {
  padding: 15px 0 20px;
  border-bottom: 1px solid #EEE;
}
.post-title {
  margin: .83em 0;
  font-size: 1.4em;
}
.post-meta {
  margin-top: -0.5em;
  padding: 0;
  color: #999;
  font-size: .92857em;
}
.post-meta li {
  display: inline-block;
  margin: 0 8px 0 0;
  padding-left: 12px;
  border-left: 1px solid #EEE;
}
.post-meta li:first-child {
  margin-left: 0;
  padding-left: 0;
  border: none;
}
.post-content {
  line-height: 1.5;
}
.post .tags {
  clear: both;
}

.post-near {
  list-style: none;
  margin: 30px 0;
  padding: 0;
  color: #999;
}
.post-near li {
  margin: 10px 0;
}

.archive-title {
  margin: 1em 0 -1em;
  padding-top: 20px;
  color: #999;
  font-size: 1em;
}
.more {
  text-align: center;
}
.more a {
  border: none;
}
.protected .text {
  width: 50%;
}

/* Page nav */

.page-navigator {
  list-style: none;
  margin: 25px 0;
  padding: 0;
  text-align: center;
}
.page-navigator li {
  display: inline-block;
  margin: 0 4px;
}
.page-navigator a {
  display: inline-block;
  padding: 0 10px;
  height: 30px;
  line-height: 30px;
}
.page-navigator a:hover {
  background: #EEE;
  text-decoration: none;
}

.page-navigator .current a {
  color: #444;
  background: #EEE;
}

/* ------------------
 * Comment list
 * --------------- */
#comments {
  padding-top: 15px;
}
.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list li {
  padding: 14px;
  margin-top: 10px;
  border: 1px solid #EEE;
}
.comment-list li.comment-level-odd {
  background: #F6F6F3;
}
.comment-list li.comment-level-even {
  background: #FFF;
}
.comment-list li.comment-by-author {
  background: #FFF9E8;
}
.comment-list li .comment-reply {
  text-align: right;
  font-size: .92857em;
}
.comment-meta a {
  color: #999;
  font-size: .92857em;
}
.comment-author {
  display: block;
  margin-bottom: 3px;
  color: #444;
}
.comment-author .avatar {
  float: left;
  margin-right: 10px;
}
.comment-author .avatar.is-clickable {
  cursor: pointer;
  border-radius: 50%;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
@media (hover:hover) {
  .comment-author .avatar.is-clickable:hover {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  }
}
.comment-author cite {
  font-weight: bold;
  font-style: normal;
}
.comment-author cite .comment-verified-badge {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  vertical-align: -2px;
  cursor: pointer;
  position: relative;
}
.comment-author cite .comment-verified-badge.is-standard {
  background: url("img/verified-badge.svg") no-repeat center;
  background-size: contain;
}
.comment-author cite .comment-verified-badge.is-founder-single {
  background: url("img/verified-founder.svg") no-repeat center;
  background-size: contain;
}
.comment-author cite .comment-verified-badge.is-founder::before,
.comment-author cite .comment-verified-badge.is-founder::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.comment-author cite .comment-verified-badge.is-founder {
  width: 32px;
  height: 14px;
}
.comment-author cite .comment-verified-badge.is-founder::before {
  left: 0;
  background-image: url("img/verified-founder.svg");
}
.comment-author cite .comment-verified-badge.is-founder::after {
  right: 0;
  background-image: url("img/verified-org.svg");
}

.comment-verified-bubble {
  position: absolute;
  display: none;
  width: 260px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 12px 28px rgba(15,23,42,0.16);
  z-index: 9999;
}
.comment-verified-bubble.is-open {
  display: block;
}
.comment-verified-title {
  font-weight: 700;
  font-size: 13px;
  color: #111;
  margin-bottom: 4px;
}
.comment-verified-role {
  font-size: 12px;
  color: #111;
  margin-bottom: 6px;
}
.comment-verified-text {
  font-size: 12px;
  color: #444;
  line-height: 1.5;
}
.comment-verified-text a {
  color: #3354aa;
  text-decoration: none;
}
.comment-verified-text a:hover {
  text-decoration: underline;
}

.comment-avatar-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,0.55);
  z-index: 9999;
}
.comment-avatar-modal.is-open {
  display: flex;
}
.comment-avatar-modal img {
  width: min(72vw, 360px);
  height: auto;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(15,23,42,0.25);
}

.comment-avatar-pop {
  position: absolute;
  display: none;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 12px 28px rgba(15,23,42,0.16);
  z-index: 9999;
}
.comment-avatar-pop.is-open {
  display: block;
}
.comment-avatar-pop-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: #222;
  text-decoration: none;
}
@media (hover:hover) {
  .comment-avatar-pop-link:hover {
    background: #f2f2f7;
  }
}

/* Comment reply */
.comment-list .respond {
  margin-top: 15px;
  border-top: 1px solid #EEE;
}
.respond .cancel-comment-reply {
  float: right;
  margin-top: 15px;
  font-size: .92857em;
}
#comment-form label {
  display: block;
  margin-bottom: .5em;
  font-weight: bold;
}
#comment-form .required:after {
  content: " *";
  color: #C00;
}
.comment-textarea-wrap {
    position: relative;
}

#comment-form .comment-textarea {
    resize: none;
    min-height: 140px;
    padding: 12px 12px 36px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#comment-form .comment-textarea:focus {
    box-shadow: 0 8px 22px rgba(0,0,0,.08);
}

.comment-counter {
    position: absolute;
    right: 12px;
    bottom: 10px;
    font-size: 12px;
    color: #8a8f98;
    background: rgba(255,255,255,0.9);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.06);
    transform: translateY(2px);
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
}

.comment-counter.is-pulse {
    transform: translateY(0) scale(1.06);
}
.comment-counter.is-limit {
    color: #c0392b;
    border-color: rgba(192,57,43,0.25);
    background: rgba(255,235,232,0.9);
}

#comment-form .comment-textarea::-webkit-scrollbar {
    width: 10px;
}

#comment-form .comment-textarea::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.04);
    border-radius: 999px;
}

#comment-form .comment-textarea::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.18);
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.7);
}

#comment-form .comment-textarea {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) rgba(0,0,0,0.04);
}

#comment-form .submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ------------------
 * secondary
 * --------------- */
#secondary {
  padding-top: 15px;
  word-wrap: break-word;
}
.widget {
  margin-bottom: 30px;
}
.widget-list {
  list-style: none;
  padding: 0;
}
.widget-list li {
  margin: 5px 0;
  line-height: 1.6;
}

.widget-list li ul {
  margin-left: 15px;
}


/* ------------------
 * Footer 
 * --------------- */
#footer {
  padding: 3em 0;
  line-height: 1.5;
  text-align: center;
  color: #999;
}


/* -----------------
 * Error page
 * -------------- */
.error-page {
  margin-top: 100px;
  margin-bottom: 100px;
}


/* -----------------
 * Content format
 *--------------- */
.post-content, .comment-content {
  line-height: 1.5;
  word-wrap: break-word;
}
.post-content h2, .comment-content h2 {
  font-size: 1.28571em;
}
.post-content img, .comment-content img,
.post-content video, .comment-content video {
  max-width: 100%;
}
.post-content a img,
.comment-content a img {
  background: #FFF;
  position: relative;
  bottom: -4px;  /* hidden img parent link border  */
}
.post-content hr, .comment-content hr {
  margin: 2em auto;
  width: 100px;
  border: 1px solid #E9E9E9;
  border-width: 2px 0 0 0;
}


/* -----------------
 * Misc
 *--------------- */
.aligncenter, div.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.alignleft {
  float: left;
}
.alignright {
  float: right;
}
img.alignleft {
  margin: 0 15px 0 0;
}
img.alignright {
  margin: 0 0 0 15px;
}


/* -----------------
 * Responsive
 *--------------- */
@media (max-width: 767px) {
  body {
    font-size: 81.25%;
  }
  #nav-menu a {
    float: none;
    display: inline-block;
    margin: 0 -2px;
  }
}

@media (max-width: 768px) {
  #header,
  .post-title,
  .post-meta {
    text-align: center;
  }
  .header-top {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "actions"
      "nav";
    justify-items: center;
  }
  .header-nav {
    width: 100%;
    justify-content: center;
  }
  .header-actions,
  .site-tools {
    align-items: center;
  }
  #logo {
    display: block !important;
    max-width: 100%;
    align-items: center;
  }
  #logo img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }
  #logo .logo-title {
    font-size: 22px;
  }
  #logo .logo-subtitle {
    font-size: 12px;
  }

  #logo .logo-title,
  #logo .logo-subtitle {
    display: block;
    text-align: center;
  }

  .header-actions {
    width: 100%;
  }

  .site-tools {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "theme lang"
      "search search";
    gap: 10px;
  }

  .theme-toggle {
    grid-area: theme;
    width: 100%;
    justify-content: flex-start;
  }

  .theme-toggle-btn {
    width: 100%;
    justify-content: center;
  }

  .lang-switch {
    grid-area: lang;
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  .lang-btn {
    width: 100%;
    justify-content: center;
  }

  #search {
    grid-area: search;
    width: 100%;
    max-width: none;
  }

  .header-nav {
    width: 100%;
    justify-content: center;
  }

  #nav-menu {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 6px;
    border-radius: 14px;
    scrollbar-width: none;
  }

  #nav-menu::-webkit-scrollbar {
    display: none;
  }
}

@media (min-width: 992px) {

}

@media (min-width: 1200px) {
  .container {
    max-width: 952px;
  }
}


/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
  display: none !important;
  visibility: hidden; }

/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.sr-only {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px; }

/*
* Extends the .sr-only class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto; }

/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
  visibility: hidden; }
.cat-badge{
  margin-left: 6px;
  font-size: 0.85em;
  vertical-align: middle;
}
/* ===== Category title tooltip + icon swap (FINAL) ===== */

#secondary,
#secondary .widget{
  overflow: visible;
}

/* wrapper */
#secondary .widget-title .cat-tip-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: middle;
}

/* button reset */
#secondary .widget-title .cat-tip-btn{
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

/* icon overlay box: forces ONE footprint */
#secondary .widget-title .cat-tip-icon-box{
  position: relative;
  width: 14px;
  height: 14px;
}

/* icons: stacked at same position */
#secondary .widget-title .cat-tip-icon{
  position: absolute;
  inset: 0;                 /* top/right/bottom/left: 0 */
  width: 14px !important;
  height: 14px !important;
  max-width: none !important;
  display: block;
}

/* default state: show outline only */
#secondary .widget-title .cat-tip-icon.is-outline{
  opacity: .75;
}
#secondary .widget-title .cat-tip-icon.is-fill{
  opacity: 0;
}

/* hover: only emphasize the currently visible one (do NOT reveal the hidden one) */
#secondary .widget-title .cat-tip-wrap:hover .cat-tip-icon.is-outline{
  opacity: 1;
}
#secondary .widget-title .cat-tip-wrap.is-open .cat-tip-icon.is-fill{
  opacity: 1;
}

/* pinned open: swap to fill */
#secondary .widget-title .cat-tip-wrap.is-open .cat-tip-icon.is-outline{
  opacity: 0;
}

/* tooltip bubble */
#secondary .widget-title .cat-tip{
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  background: rgba(0,0,0,.88);
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 99999;
  display: none;
  pointer-events: none;
}

/* arrow */
#secondary .widget-title .cat-tip::before{
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: rgba(0,0,0,.88);
}

/* show tooltip on hover OR pinned open */
#secondary .widget-title .cat-tip-wrap:hover .cat-tip,
#secondary .widget-title .cat-tip-wrap.is-open .cat-tip{
  display: block;
}
/* Hover swap: outline -> fill */
#secondary .widget-title .cat-tip-wrap:hover .cat-tip-icon.is-outline{
  opacity: 0 !important;
}
#secondary .widget-title .cat-tip-wrap:hover .cat-tip-icon.is-fill{
  opacity: 1 !important;
}

/* Pinned open (click) keeps fill */
#secondary .widget-title .cat-tip-wrap.is-open .cat-tip-icon.is-outline{
  opacity: 0 !important;
}
#secondary .widget-title .cat-tip-wrap.is-open .cat-tip-icon.is-fill{
  opacity: 1 !important;
}
.comment-notice {
    background: #f7f9fc;
    border: 1px solid #e5e9f0;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.comment-notice p {
    margin: 0 0 10px;
    font-size: 13px;
    color: #333;
}

.comment-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.comment-btn-primary {
    background: #409eff;
    color: #fff;
}

.comment-btn-primary:hover {
    background: #337ecc;
}

.comment-btn-outline {
    border: 1px solid #409eff;
    color: #409eff;
    background: #fff;
}

.comment-btn-outline:hover {
    background: #ecf5ff;
}

.comment-note {
    font-size: 12px;
    color: #666;
}
/* ===== Comment Guideline Bubble ===== */
.comment-label-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comment-guideline {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.comment-guideline__btn {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #1f2937;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.comment-guideline__btn::before {
    content: "i";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.18);
    font-size: 10px;
    font-weight: 700;
    color: #5c667a;
}

@media (hover:hover) {
    .comment-guideline__btn:hover {
        background: #f3f4f6;
        border-color: #e5e7eb;
        box-shadow: 0 4px 10px rgba(15,23,42,.08);
        transform: translateY(-1px);
    }
}

.comment-guideline__btn:active {
    background: #eef2f7;
    transform: translateY(0);
    box-shadow: none;
}

.comment-guideline__btn:focus,
.comment-guideline__btn:focus-visible {
    background: #f9fafb;
    box-shadow: none;
    outline: none;
}

@media (hover: none) {
    .comment-guideline__btn {
        background: #f9fafb !important;
        border-color: #e5e7eb !important;
        box-shadow: none !important;
        outline: none !important;
    }
    .comment-guideline__btn:active,
    .comment-guideline__btn:focus,
    .comment-guideline__btn:focus-visible {
        background: #f9fafb !important;
        border-color: #e5e7eb !important;
        box-shadow: none !important;
        outline: none !important;
    }
}

.comment-guideline.is-open .comment-guideline__btn {
    background: #eef2f7;
    border-color: #dbe1ea;
    box-shadow: none;
}

.comment-guideline__bubble {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    max-width: 320px;
    width: max-content;
    white-space: normal;
    word-break: break-word;
    background: rgba(255,255,255,0.96);
    color: #333;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.6;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 10;
}

.comment-guideline__bubble::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 14px;
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.96);
    border-left: 1px solid rgba(0,0,0,0.08);
    border-top: 1px solid rgba(0,0,0,0.08);
    transform: rotate(45deg);
}

.comment-guideline.is-open .comment-guideline__bubble {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 480px) {
    .comment-guideline__bubble {
        max-width: 240px;
    }
}
/* ===== Auth Modal (Login / Register) ===== */
#login-modal,
#register-modal {
    padding: 20px;
}

#login-modal > div,
#register-modal > div {
    border-radius: 10px;
    border: 1px solid #e5e9f0;
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
    color: #333;
}

#login-modal h3,
#register-modal h3 {
    margin: 0 0 12px;
    font-size: 18px;
}
/* ===== Site Notice (Modern System Style, Container-Aligned) ===== */
.site-notice {
    background: rgba(255, 204, 0, 0.12);   /* iOS-style warm notice */
    border: 1px solid rgba(255, 204, 0, 0.35);
    color: #5c4a00;

    padding: 12px 16px;
    margin: 16px auto;          /* 居中 */

    max-width: 952px;           /* 与主题 container 对齐 */
    box-sizing: border-box;

    font-size: 14px;
    line-height: 1.6;
    text-align: center;

    border-radius: 8px;
}

/* ===== Site Notice: Mobile (with subtle system cue) ===== */
@media (max-width: 768px) {
    .site-notice {
        background: rgba(255, 204, 0, 0.14);
        border: 1px solid rgba(255, 204, 0, 0.4);
        border-left: 4px solid rgba(255, 159, 10, 0.9); /* system accent */

        padding: 12px 14px;
        margin: 10px 10px 14px;

        max-width: none;        /* 释放宽度 */
        border-radius: 8px;

        font-size: 14px;
        line-height: 1.7;
        color: #5c4a00;
        text-align: left;
    }

    .site-notice-meta {
        display: block;
        margin-bottom: 6px;
    }

    .site-notice-meta strong {
        display: block;
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 2px;
    }

    .site-notice-time {
        display: block;
        font-size: 12px;
        color: rgba(92, 74, 0, 0.75);
        margin-left: 0;
    }

    .site-notice-content {
        margin-top: 6px;
        font-size: 14px;
        line-height: 1.7;
        word-break: break-word;
    }
}


/* ===== Avatar Reminder (Comment Form) ===== */
/* ===== Avatar Reminder (Action Required, but Consistent) ===== */
.avatar-reminder {
    background: #fff8f0;              /* 比白色暖一点，但不黄 */
    border: 1px solid #ffd8bf;        /* 温和橙色边框 */
    border-radius: 6px;
    padding: 12px 14px;
    margin: 10px 0 16px;

    font-size: 13px;
    color: #333;

    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-reminder::before {
    content: "👤";
    font-size: 16px;
    line-height: 1;
    margin-top: 1px;
}

.avatar-reminder span {
    flex: 1;
    color: #333;
}

/* 行动按钮：仍然是系统蓝，但更明确 */
.avatar-reminder a {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 4px;

    background: #409eff;
    color: #fff;
    border: none;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.avatar-reminder a:hover {
    background: #337ecc;
}


@media (max-width: 768px) {
    .avatar-reminder {
        align-items: center;
    }

    .avatar-reminder a {
        width: auto;
        max-width: 100%;
        align-self: center;
        text-align: center;
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ==================================================
   Modern UI Override – FINAL
   Tone: Apple (A)
   Interaction: Linear (B)
   Place at VERY BOTTOM of style.css
   ================================================== */

/* ---------- Design Tokens (System-level) ---------- */
:root {
    --bg-surface: #ffffff;
    --border-soft: #e6e9ef;

    --text-main: #333;
    --text-muted: #666;

    --accent-primary: #409eff;
    --accent-primary-hover: #337ecc;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;

    /* Apple-style shadows: very soft, low presence */
    --shadow-rest: 0 1px 2px rgba(0,0,0,.03),
                   0 6px 18px rgba(0,0,0,.04);

    --shadow-hover: 0 2px 4px rgba(0,0,0,.04),
                    0 10px 28px rgba(0,0,0,.06);

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
}

/* ---------- Base Typography (Apple rhythm) ---------- */
body {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ---------- Links (quiet by default) ---------- */
a {
    color: #3354aa;
    transition: color var(--transition-fast);
}

a:hover {
    color: #1f3c88;
}

/* ---------- Card System (Apple-first) ---------- */
.post,
.widget,
#comments,
.comment-list li {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
}

/* Main content cards */
.post {
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-rest);
    transition: box-shadow var(--transition-base),
                transform var(--transition-base);
}

/* Very subtle lift – only hint of interaction */
@media (hover: hover) {
    .post:hover {
        box-shadow: var(--shadow-hover);
        transform: translateY(-1px);
    }
}

/* Widgets: quieter than posts */
.widget {
    padding: 16px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

/* ---------- Comment Items (no hover noise) ---------- */
.comment-list li {
    border: 1px solid var(--border-soft);
    box-shadow: none;
}

/* ---------- Forms & Inputs ---------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid var(--border-soft);
    transition: border-color var(--transition-fast),
                box-shadow var(--transition-fast);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(64,158,255,.14);
}

/* ---------- Buttons (Linear-style, controlled) ---------- */
button,
input[type="submit"],
#comment-form .submit {
    appearance: none;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;

    background: var(--accent-primary);
    color: #fff;

    transition: background var(--transition-fast),
                transform var(--transition-fast),
                box-shadow var(--transition-fast);
}

button:hover,
input[type="submit"]:hover,
#comment-form .submit:hover {
    background: var(--accent-primary-hover);
}

button:active,
input[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: none;
}



/* ---------- Footer ---------- */
#footer {
    font-size: 13px;
    color: #888;
}

/* ---------- Accessibility ---------- */
:focus-visible {
    outline: 2px solid rgba(64,158,255,.6);
    outline-offset: 2px;
}

/* ---------- Reduced Motion (system respect) ---------- */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- Mobile Refinement ---------- */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .post {
        padding: 16px;
        border-radius: var(--radius-lg);
        box-shadow: 0 1px 10px rgba(0,0,0,.05);
    }
}
/* ---------- Footer (Professional) ---------- */

#footer {
    margin-top: 60px;
    padding: 24px 16px;
    border-top: 1px solid #eee;
    background: #fafafa;
    font-size: 13px;
    color: #777;
}

#footer a {
    color: #555;
    text-decoration: none;
}

#footer a:hover {
    color: #000;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-left,
.footer-right {
    white-space: nowrap;
}

.footer-sep {
    margin: 0 6px;
    color: #bbb;
}

.footer-meta {
    font-size: 12px;
    color: #999;
}
/* ---------- Footer Responsive ---------- */

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .footer-left,
    .footer-right {
        white-space: normal;
        width: 100%;
    }

    .footer-right {
        font-size: 12px;
        color: #999;
    }
}
/* ==================================================
   Archive / Category Title – Modern System Header
   Fix overlap + visual upgrade
   ================================================== */

.archive-title {
    /* 修复旧主题遗留问题 */
    margin: 24px 0 20px;     /* 移除负 margin */
    padding: 0;

    /* 现代化视觉 */
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;

    /* 作为“页面分区标题”的系统感 */
    position: relative;
}

/* 可选：加一条非常克制的系统分隔线 */
.archive-title::after {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    margin-top: 8px;

    background: #409eff;
    border-radius: 2px;
}

/* 移动端微调 */
@media (max-width: 768px) {
    .archive-title {
        font-size: 16px;
        margin: 20px 0 16px;
    }
}
/* ==================================================
   User Bar – iOS System Account Controls
   ================================================== */

.user-bar {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-left: 12px;
}

/* separator 不再需要 */
.user-bar .sep {
    display: none;
}

/* Links as system pills */
.user-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 4px 9px;          /* 👈 关键：整体缩小 */
    font-size: 12px;           /* 更像系统文字 */
    font-weight: 500;
    color: #333;

    text-decoration: none;

    background: rgba(255,255,255,.6);
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 999px;

    transition:
      background 120ms ease,
      border-color 120ms ease,
      color 120ms ease;
}

/* Hover: subtle system highlight */
@media (hover:hover) {
    .user-bar a:hover {
        background: rgba(255,255,255,.85);
        border-color: rgba(0,0,0,.18);
        color: #000;
    }
}

/* Active / press */
.user-bar a:active {
    background: rgba(255,255,255,1);
}

/* Mobile: slightly tighter */
@media (max-width: 768px) {
    .user-bar a {
        padding: 5px 10px;
        font-size: 12.5px;
    }
}

/* ==================================================
   Account Pill
   ================================================== */

.account-anchor {
    position: relative;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
}

.account-pill {
    display: flex;
    align-items: center;
    gap: 10px;

    height: 44px;
    padding: 0 12px;
    border-radius: 999px;

    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #e5e7eb;
    flex: 0 0 32px;
}

.account-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.account-name {
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

.account-email {
    font-size: 12px;
    color: #6b7280;
}

.account-caret {
    font-size: 12px;
    color: #666;
    margin-left: 4px;
}

.account-bubble {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    display: none;
    max-width: 200px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    padding: 6px;
    z-index: 20;
}

.account-bubble.is-open {
    display: block;
}

.account-bubble-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    color: #222;
    text-decoration: none;
    white-space: nowrap;
}

.account-bubble-item-message {
    justify-content: space-between;
}


@media (hover:hover) {
    .account-bubble-item:hover {
        background: #f2f2f7;
    }
}

html[data-theme="dark"] .account-pill {
    background: rgba(20,22,28,0.9);
    border-color: rgba(255,255,255,0.12);
}

html[data-theme="dark"] .account-name {
    color: #e6e9ef;
}

html[data-theme="dark"] .account-email {
    color: #a1a1aa;
}

html[data-theme="dark"] .account-bubble {
    background: #1a1d23;
    border-color: rgba(255,255,255,0.12);
}

html[data-theme="dark"] .account-bubble-item {
    color: #e6e9ef;
}

html[data-theme="dark"] .account-pill-badge,
html[data-theme="dark"] .account-bubble-badge {
    background: #22c55e;
    color: #fff;
}

@media (hover:hover) {
    html[data-theme="dark"] .account-bubble-item:hover {
        background: #232833;
    }
}

/* ================================
   Language Switch – iOS Style
   ================================ */

.lang-switch {
    position: relative;
    margin-top: 12px;
    font-size: 14px;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 6px 12px;
    border-radius: 999px;

    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.08);

    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.lang-btn .lang-flag {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}
.lang-btn::after {
    content: "▾";
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

.lang-switch:hover > .lang-btn {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.lang-switch:hover > .lang-btn::after {
    transform: rotate(180deg);
}
.lang-switch.is-open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-btn:hover {
    background: #f9f9f9;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 下拉菜单容器（卡片） */
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 180px;

    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.06);

    padding: 6px 0;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;

    z-index: 999;
}

/* hover 整个区域时展开 */
.lang-switch:hover > .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 单个语言项 */
.lang-menu > div {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 14px;
    cursor: pointer;
    color: #333;
    font-size: 14px;

    transition:
        background-color 0.15s ease,
        transform 0.15s ease;
}

/* hover 动画 */
.lang-menu > div:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateX(2px);
}

/* 国旗图标 */
.lang-menu img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* 防止和 nav-menu 冲突 */
.site-tools .lang-switch {
    margin-top: 10px;
}

/* ================================
   Mobile fallback（可选）
   ================================ */
@media (max-width: 768px) {
    .lang-menu {
        position: absolute;
        transform: translateY(-6px);
        box-shadow:
            0 12px 24px rgba(0, 0, 0, 0.12),
            0 2px 6px rgba(0, 0, 0, 0.06);
        border-radius: 14px;
        margin-top: 0;
    }
}


.lang-switch-mobile {
    display: none !important;
}

.lang-switch-desktop {
    display: inline-flex;
    align-items: center;
}

/* ================================
   Back To Top (Post Only)
   ================================ */
.back-home,
.back-to-top {
    position: fixed;
    bottom: 18px;
    z-index: 999;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    box-sizing: border-box;
    width: 72px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.08);

    background: rgba(255,255,255,0.92);
    color: #111;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    text-decoration: none;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;

    box-shadow:
        0 8px 20px rgba(0,0,0,0.12),
        0 2px 6px rgba(0,0,0,0.06);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.back-home {
    left: 18px;
}

.back-to-top {
    right: 18px;
}

.back-home::before {
    content: "<";
    font-size: 12px;
    line-height: 1;
}

.back-home.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

@media (hover:hover) {
    .back-home:hover,
    .back-to-top:hover {
        background: #f2f2f7;
        border-color: rgba(0,0,0,0.14);
        color: #111;
        box-shadow:
            0 10px 24px rgba(0,0,0,0.12),
            0 3px 8px rgba(0,0,0,0.08);
        transform: translateY(-1px);
    }
}

.back-home:focus-visible,
.back-to-top:focus-visible {
    background: #f2f2f7;
    border-color: rgba(0,0,0,0.14);
    color: #111;
}

@media (max-width: 768px) {
    .back-home {
        left: 14px;
        bottom: 14px;
        width: 68px;
        height: 34px;
        padding: 0 10px;
    }
}

.back-to-top::before {
    content: "^";
    font-size: 12px;
    line-height: 1;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

@media (max-width: 768px) {
    .back-to-top {
        right: 14px;
        bottom: 14px;
        width: 68px;
        height: 34px;
        padding: 0 10px;
    }
}

/* ================================
   Theme Toggle (Day/Night)
   ================================ */

.site-tools {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.header-actions .user-bar {
    margin-left: 0;
}

@media (max-width: 768px) {
    .site-tools {
        align-items: center;
    }
}

.theme-toggle {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 6px 12px;
    border-radius: 999px;

    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.08);

    font-size: 12px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;

    transition:
      background 120ms ease,
      border-color 120ms ease,
      color 120ms ease,
      box-shadow 120ms ease,
      transform 120ms ease;
}

@media (hover:hover) {
    .theme-toggle-btn:hover {
        background: rgba(255,255,255,0.95);
        border-color: rgba(0,0,0,0.14);
        box-shadow: 0 6px 14px rgba(0,0,0,0.12);
        transform: translateY(-1px);
    }
}

.theme-toggle-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.theme-toggle-btn:focus,
.theme-toggle-btn:focus-visible {
    background: rgba(255,255,255,0.95);
    outline: none;
    box-shadow: none;
}

@media (hover: none) {
    .theme-toggle-btn:hover {
        background: rgba(255,255,255,0.9);
        border-color: rgba(0,0,0,0.08);
        box-shadow: none;
        transform: none;
    }
}

.theme-toggle-btn .theme-icon {
    font-size: 13px;
    line-height: 1;
}

.theme-toggle-btn .theme-icon-moon {
    display: none;
}

html[data-theme="dark"] .theme-toggle-btn .theme-icon-sun {
    display: none;
}

html[data-theme="dark"] .theme-toggle-btn .theme-icon-moon {
    display: inline;
}

html[data-theme="dark"] .theme-toggle-btn {
    background: rgba(20,22,28,0.9);
    border-color: rgba(255,255,255,0.12);
    color: #e6e9ef;
}

html[data-theme="dark"] .theme-toggle-btn:focus,
html[data-theme="dark"] .theme-toggle-btn:focus-visible {
    background: rgba(20,22,28,0.9);
}

@media (hover: none) {
    html[data-theme="dark"] .theme-toggle-btn:hover {
        background: rgba(20,22,28,0.9);
        border-color: rgba(255,255,255,0.12);
        box-shadow: none;
        transform: none;
    }
}

/* ================================
   Dark Mode
   ================================ */

html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --bg-surface: #121620;
    --border-soft: #242a36;

    --text-main: #e6e9ef;
    --text-muted: #a5adbb;

    --accent-primary: #5aa6ff;
    --accent-primary-hover: #3f8fe6;

    --shadow-rest: 0 1px 2px rgba(0,0,0,.35),
                   0 6px 18px rgba(0,0,0,.4);

    --shadow-hover: 0 2px 4px rgba(0,0,0,.4),
                    0 10px 28px rgba(0,0,0,.45);
}

html[data-theme="dark"] body {
    background-color: #0f1115;
    color: var(--text-main);
}

html[data-theme="dark"] a {
    color: #8bb6ff;
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:active {
    color: #c1d6ff;
}

html[data-theme="dark"] #header {
    border-bottom-color: #1f2430;
}

html[data-theme="dark"] #logo .logo-subtitle {
    color: var(--text-muted);
}

html[data-theme="dark"] #nav-menu {
    background: #1a1f2a;
    border-color: rgba(255,255,255,.06);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.04),
      0 1px 2px rgba(0,0,0,.4);
}

html[data-theme="dark"] #nav-menu a {
    color: #c6cbd6;
}

html[data-theme="dark"] #nav-menu a.current {
    background: #2a2f3b;
    color: #fff;
    box-shadow:
      0 1px 2px rgba(0,0,0,.6),
      0 6px 16px rgba(0,0,0,.5);
}

html[data-theme="dark"] #search {
    background: #151923;
    border-color: #2a2f3b;
    box-shadow: 0 4px 14px rgba(0,0,0,.5);
}

html[data-theme="dark"] #search input {
    color: #e6e9ef;
}

html[data-theme="dark"] #search input::placeholder {
    color: #9098a5;
}

html[data-theme="dark"] #search button {
    color: #c5ccd8;
    border-left-color: #2a2f3b;
}

html[data-theme="dark"] pre,
html[data-theme="dark"] code {
    background: #1a1f2a;
    color: #e6e9ef;
}

html[data-theme="dark"] code {
    color: #ff9aa0;
}

html[data-theme="dark"] blockquote {
    border-left-color: #2a2f3b;
    color: #b7bdc8;
}

html[data-theme="dark"] table,
html[data-theme="dark"] table th,
html[data-theme="dark"] table td {
    border-color: #2a2f3b;
}

html[data-theme="dark"] table th {
    background: #151a24;
}

html[data-theme="dark"] .comment-list li {
    border-color: #2a2f3b;
}

html[data-theme="dark"] .comment-list li.comment-level-odd {
    background: #151923;
}

html[data-theme="dark"] .comment-list li.comment-level-even {
    background: #121620;
}

html[data-theme="dark"] .comment-list li.comment-by-author {
    background: #1b1f2a;
}

html[data-theme="dark"] .comment-notice {
    background: #151923;
    border-color: #2a2f3b;
}

html[data-theme="dark"] .comment-notice p {
    color: #e6e9ef;
}

html[data-theme="dark"] .comment-note {
    color: #a5adbb;
}

html[data-theme="dark"] .comment-guideline__btn {
    background: #1a1f2a;
    border-color: #2a2f3b;
    color: #e6e9ef;
}

html[data-theme="dark"] .comment-guideline__btn::before {
    border-color: rgba(255,255,255,0.2);
    color: #b7c1d2;
}

html[data-theme="dark"] .comment-guideline__bubble {
    background: #151923;
    border-color: #2a2f3b;
    color: #e6e9ef;
    box-shadow: 0 10px 26px rgba(0,0,0,.45);
}

html[data-theme="dark"] .comment-guideline__bubble::before {
    background: #151923;
    border-left-color: #2a2f3b;
    border-top-color: #2a2f3b;
}

html[data-theme="dark"] .comment-btn-primary {
    background: #5aa6ff;
}

html[data-theme="dark"] .comment-btn-primary:hover {
    background: #3f8fe6;
}

html[data-theme="dark"] .comment-btn-outline {
    background: #141923;
    border-color: #5aa6ff;
    color: #8bb6ff;
}

html[data-theme="dark"] .comment-btn-outline:hover {
    background: rgba(90,166,255,.12);
}

html[data-theme="dark"] #login-modal,
html[data-theme="dark"] #register-modal {
    background: rgba(0,0,0,.6) !important;
}

html[data-theme="dark"] #login-modal > div,
html[data-theme="dark"] #register-modal > div {
    background: #151923 !important;
    border-color: #2a2f3b;
    color: #e6e9ef;
    box-shadow: 0 18px 40px rgba(0,0,0,.5);
}

html[data-theme="dark"] #login-modal h3,
html[data-theme="dark"] #register-modal h3,
html[data-theme="dark"] #login-modal label,
html[data-theme="dark"] #register-modal label {
    color: #e6e9ef;
}

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] textarea {
    background: #10141c;
    color: #e6e9ef;
    border-color: #2a2f3b;
}

html[data-theme="dark"] #footer {
    border-top-color: #1f2430;
    background: #0f1115;
    color: #9aa3b2;
}

html[data-theme="dark"] #footer a {
    color: #b7c1d2;
}

html[data-theme="dark"] #footer a:hover {
    color: #fff;
}

html[data-theme="dark"] .site-notice {
    background: rgba(255, 204, 0, 0.08);
    border-color: rgba(255, 204, 0, 0.25);
    color: #d9c070;
}

html[data-theme="dark"] .back-home,
html[data-theme="dark"] .back-to-top {
    background: rgba(20,22,28,0.92);
    border-color: rgba(255,255,255,0.12);
    color: #e6e9ef;
}

html[data-theme="dark"] .user-bar a,
html[data-theme="dark"] .lang-btn,
html[data-theme="dark"] .lang-menu {
    background: rgba(20,22,28,0.92);
    border-color: rgba(255,255,255,0.12);
    color: #e6e9ef;
}

html[data-theme="dark"] .lang-menu > div {
    color: #e6e9ef;
}

html[data-theme="dark"] .lang-menu > div:hover {
    background: rgba(255,255,255,0.06);
}

/* Dark mode: neutralize inline styles from rich text blocks */
html[data-theme="dark"] .post-content [style],
html[data-theme="dark"] .comment-content [style] {
    color: inherit !important;
    background: transparent !important;
    border-color: rgba(255,255,255,0.16) !important;
}

/* ===== Dark mode: comment textarea quick fix ===== */
html[data-theme="dark"] .comment-textarea-wrap textarea {
  background-color: #1c1c1c !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

html[data-theme="light"] .comment-textarea-wrap textarea {
  background-color: #ffffff !important;
  color: #222 !important;
  border-color: #ccc !important;
}
/* ===== Comment actions: right aligned ===== */
.comment-reply.comment-actions-right {
    display: flex;
    justify-content: flex-end; /* 右对齐 */
    margin-top: 6px;
}

.comment-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.85;
}

/* 通用链接风格 */
.comment-actions a {
    color: var(--link-color, #666);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.comment-actions a:hover {
    color: var(--link-hover-color, #007acc);
}

.comment-action-divider {
    color: #aaa;
    font-size: 12px;
}

/* 删除按钮：危险但克制 */
.comment-action-delete {
    color: #999;
    padding: 2px 6px;
    border-radius: 4px;
}

.comment-action-delete:hover {
    color: #b42318;
    background-color: rgba(180, 35, 24, 0.08);
}
