/* ==========================================================================
   Fuwari 閫傞厤灞傦細鎶?ruby 閬楃暀鐨勫畾鍒剁粍浠惰瀺鍏?Fuwari 鐨勮瑙変笌甯冨眬
   浣嶇疆锛氬繀椤绘斁鍦ㄦ墍鏈?ruby 杩佺Щ鍧椾箣鍚庯紝鎵嶈兘瑕嗙洊瀹冧滑
   ========================================================================== */

/* ---------- 1. 椤舵爮鍒嗙被瀵艰埅锛坓h-outer-tags锛?--------- */
/* ruby 鍘熸牱寮忔槸娣辫壊 header 涓撶敤锛堟繁搴?+ 娴呭瓧鑳跺泭锛夛紝
   鍦?Fuwari 鐨勬祬鑹查《鏍忎笅闇€瑕佹敼涓烘祬鑹蹭富棰橈紱娣辫壊妯″紡鍐嶅垏鍥炴繁鑹?*/
.fw-site .gh-outer-tags {
  background: var(--fw-card) !important;
  border-bottom: 1px solid var(--fw-line) !important;
  border-top: 1px solid var(--fw-line) !important;
}
.fw-site .gh-outer-tags .gh-inner {
  max-width: var(--fw-maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.fw-site .sub-nav-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 0 !important;
  list-style: none;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}
.fw-site .sub-nav-tags::-webkit-scrollbar { display: none; }
.fw-site .sub-nav-tags > li {
  position: relative;
  flex: 0 0 auto;
  padding: 0 !important;
}

.fw-site .sub-nav-tags a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 1.32rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fw-text-2) !important;
  background: var(--fw-soft) !important;
  border: 1px solid transparent !important;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .15s, background-color .15s, border-color .15s;
}
.fw-site .sub-nav-tags a:hover {
  color: var(--fw-primary) !important;
  background: var(--fw-primary-soft) !important;
  border-color: color-mix(in srgb, var(--fw-primary) 32%, transparent) !important;
}
.fw-site .sub-nav-tags a.active {
  color: #fff !important;
  background: var(--fw-primary) !important;
  border-color: var(--fw-primary) !important;
}

/* 涓嬫媺绠ご鎸囩ず */
.fw-site .sub-nav-tags > li.has-dropdown > a::after {
  content: "鈻?;
  margin-left: 3px;
  font-size: .86em;
  opacity: .65;
}

/* 涓嬫媺鑿滃崟 */
.fw-site .sub-nav-tags .dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 70;
  display: none;
  flex-direction: column;
  min-width: 210px;
  padding: 8px;
  background: var(--fw-card);
  border: 1px solid var(--fw-line);
  border-radius: 13px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .14);
}
@media (min-width: 768px) {
  .fw-site .sub-nav-tags > li.has-dropdown:hover .dropdown-menu,
  .fw-site .sub-nav-tags > li.has-dropdown:focus-within .dropdown-menu {
    display: flex;
  }
}
.fw-site .sub-nav-tags .dropdown-menu a {
  min-height: 0;
  padding: 9px 13px;
  font-size: 1.34rem;
  font-weight: 600;
  color: var(--fw-text-2);
  background: transparent !important;
  border: 0;
  border-radius: 8px;
}
.fw-site .sub-nav-tags .dropdown-menu a:hover {
  color: var(--fw-primary) !important;
  background: var(--fw-primary-soft) !important;
}

/* 娣辫壊妯″紡涓嬬殑鍒嗙被瀵艰埅 */
html[data-fw-theme="dark"] .fw-site .gh-outer-tags {
  background: var(--fw-card) !important;
}
html[data-fw-theme="dark"] .fw-site .sub-nav-tags .dropdown-menu {
  box-shadow: 0 16px 34px rgba(0, 0, 0, .55);
}

/* 鏈夊垎绫诲鑸椂锛屼富鍐呭鍖轰笉瑕侀澶栫暀鐧?*/
.fw-site .gh-outer-tags + .fw-shell .fw-layout { padding-top: 20px; }

/* ---------- 2. 搴曢儴 tabbar锛氬彧鍦ㄧЩ鍔ㄧ鏄剧ず ---------- */
@media (min-width: 768px) {
  .fw-site .iso-tabbar { display: none !important; }
}
@media (max-width: 767px) {
  .fw-site .iso-tabbar { display: block; }
}

/* ==========================================================================
   6. 鍙充笅瑙掓偓娴厓绱犲畾浣嶉噸鎺?   浠庝笅寰€涓婏細tabbar(0~60) 鈫?杩斿洖椤堕儴 鈫?鑱旂郴鏂瑰紡
   妗岄潰绔棤 tabbar锛屼袱鑰呰创鍙充笅瑙掞紱绉诲姩绔暣浣撲笂绉诲埌 tabbar 涔嬩笂
   ========================================================================== */
:root {
  --fw-tabbar-h: 0px;
  --fw-float-gap: 96px;   /* 杩斿洖椤堕儴璺濆簳閮ㄧ殑闂撮殭 */
  --fw-float-size: 48px;  /* 杩斿洖椤堕儴鎸夐挳鐩村緞锛堜笌瀹㈡湇鍚屽昂瀵革級 */
  --fw-float-stack: 28px; /* 涓や釜鎸夐挳涔嬮棿鐨勫噣闂撮殭 */
}
@media (max-width: 767px) {
  :root {
    --fw-tabbar-h: 62px;
    --fw-float-gap: 72px;
    --fw-float-size: 48px;
    --fw-float-stack: 24px;
  }
}

/* 杩斿洖椤堕儴锛氭偓娴湪 tabbar 涓婃柟 */
.fw-site .iso-back-to-top,
body .iso-back-to-top {
  right: max(22px, env(safe-area-inset-right)) !important;
  bottom: calc(var(--fw-float-gap) + env(safe-area-inset-bottom, 0px) + var(--fw-tabbar-h)) !important;
  width: var(--fw-float-size) !important;
  height: var(--fw-float-size) !important;
  z-index: 91 !important;
}

/* 瀹㈡湇锛氬彔鍦ㄨ繑鍥為《閮ㄤ箣涓?= 闂撮殭 + 鎸夐挳楂?+ 鍑€闂撮殭 */
.fw-site .iso-contact-wrap,
body .iso-contact-wrap {
  right: max(22px, env(safe-area-inset-right)) !important;
  bottom: calc(var(--fw-float-gap) + var(--fw-float-size) + var(--fw-float-stack)
              + env(safe-area-inset-bottom, 0px) + var(--fw-tabbar-h)) !important;
  z-index: 90 !important;
}

@media (max-width: 767px) {
  .fw-site .iso-back-to-top,
  body .iso-back-to-top {
    right: max(14px, env(safe-area-inset-right)) !important;
  }
  .fw-site .iso-contact-wrap,
  body .iso-contact-wrap {
    right: max(14px, env(safe-area-inset-right)) !important;
  }
}

/* 椤佃剼涓?tabbar 鐣欏嚭瀹夊叏璺濈锛岄伩鍏嶅唴瀹硅閬?*/
@media (max-width: 767px) {
  .fw-site .fw-footer { padding-bottom: 84px; }
}

/* 鍟嗗煄椤垫病鏈?tabbar锛坮uby 閲岀殑绾﹀畾锛夛紝鎮诞鍏冪礌鍥炶惤鍒版渶搴曢儴 */
body.is-shop-page {
  --fw-tabbar-h: 0px;
}

/* ---------- 3. 绉诲姩绔鑸爮锛氭柊 fw-navbar 缁撴瀯 ---------- */
@media (max-width: 767px) {
  .fw-site .fw-navbar {
    height: 4rem;
    padding: 0 .75rem;
    gap: .5rem;
  }
  .fw-site .fw-brand {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fw-site .fw-brand img { max-height: 26px; }
  .fw-site .fw-brand svg { width: 1.25rem; height: 1.25rem; }
  .fw-site .fw-nav-right { gap: .25rem; }
  .fw-site .fw-search-box { display: none; }
  .fw-site .fw-icon-btn { width: 2.5rem; height: 2.5rem; }
  .fw-site #fw-theme-toggle { display: none; }
  .fw-site .fw-btn {
    height: 2.5rem;
    padding: 0 .875rem;
    font-size: .9375rem;
  }
  .fw-site .fw-signin { display: none; }
  .fw-site .fw-burger { display: block; padding: .375rem; }
}

/* ---------- 4. 鏃犳í骞呮椂鐨勫唴瀹硅捣鐐?---------- */
body:not(.fw-banner-on) .fw-shell--banner { margin-top: 0; }
body:not(.fw-banner-on) .fw-banner { display: none !important; }

/* ---------- 5. ruby 閬楃暀缁勪欢鐨勬繁鑹查€傞厤缁熶竴 ---------- */
html[data-fw-theme="dark"] .fw-site .iso-command-wrap,
html[data-fw-theme="dark"] .fw-site .iso-file-tree {
  background: #16181e !important;
  border-color: var(--fw-line) !important;
}
html[data-fw-theme="dark"] .fw-site .iso-command-tools {
  background: #1f2229 !important;
  border-bottom-color: var(--fw-line) !important;
}
html[data-fw-theme="dark"] .fw-site .iso-command-label { color: #9aa5b8 !important; }
html[data-fw-theme="dark"] .fw-site .iso-command-copy {
  color: #cbd5e1 !important;
  background: #262a33 !important;
  border-color: #3a404d !important;
}

/* ==========================================================================
   7. 浠ｇ爜楂樹寒閰嶈壊閫傞厤灞?   鑳屾櫙锛歳uby 鏃朵唬鐨?--iso-code-bg: #0b0f19 鏄粰銆屾繁鑹叉枃绔犻〉銆嶈璁＄殑锛?         鐜板湪鏂囩珷椤垫槸娴呰壊锛屽鑷磋鍐呬唬鐮佸姣斿害涓嶈冻銆佷唬鐮佸潡鍙戠伆鐪嬩笉娓呫€?   鏂规锛氳鍐?code 鐢ㄣ€屼富鑹叉祬搴?+ 涓昏壊娣卞瓧銆嶏紝浠ｇ爜鍧椾繚鎸佹繁鑹插簳浣嗘彁楂樺姣斿害銆?   ========================================================================== */

/* ---------- 琛屽唴浠ｇ爜锛堜笉闄愬鍣紝鏂囩珷姝ｆ枃閲屼换浣曚綅缃兘閫傜敤锛?---------- */
.gh-content code:not([class*="language-"]),
.fw-content code:not([class*="language-"]),
article code:not([class*="language-"]),
.iso-article-body code:not([class*="language-"]),
body.post-template .fw-main code:not([class*="language-"]) {
  padding: .15em .42em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .875em;
  font-weight: 600;
  color: var(--fw-primary);
  background: color-mix(in srgb, var(--fw-primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--fw-primary) 22%, transparent);
  border-radius: .3rem;
  white-space: nowrap;
  word-break: break-word;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- 浠ｇ爜鍧楀鍣?---------- */
.gh-content pre,
.fw-content pre,
article pre,
body.post-template .fw-main pre {
  position: relative;
  margin: 1.5em 0;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  font-size: .875rem;
  line-height: 1.75;
  color: #e6edf3;
  background: #0f1620;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--fw-radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  tab-size: 2;
}

/* 浠ｇ爜鍧楀唴鐨?code 涓嶈缁ф壙琛屽唴鏍峰紡 */
.gh-content pre code,
.fw-content pre code,
.fw-content pre code[class*="language-"] {
  display: block;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: inherit;
  font-weight: 400;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  white-space: pre;
  word-break: normal;
}

/* ---------- Prism 璇硶鐫€鑹诧紙鑷缓楂樺姣斿害涓婚锛?---------- */
.gh-content .token.,
.fw-content .token.comment,
.gh-content .token.,
.fw-content .token.prolog,
.gh-content .token.,
.fw-content .token.doctype,
.gh-content .token.,
.fw-content .token.cdata { color: #8b969e; font-style: italic; }

.gh-content .token.,
.fw-content .token.punctuation { color: #c9d1d9; }

.gh-content .token.,
.fw-content .token.property,
.gh-content .token.,
.fw-content .token.tag,
.gh-content .token.,
.fw-content .token.boolean,
.gh-content .token.,
.fw-content .token.number,
.gh-content .token.,
.fw-content .token.constant,
.gh-content .token.,
.fw-content .token.symbol,
.gh-content .token.,
.fw-content .token.deleted { color: #ff7b72; }

.gh-content .token.,
.fw-content .token.selector,
.gh-content .token.,
.fw-content .token.attr-name,
.gh-content .token.,
.fw-content .token.string,
.gh-content .token.,
.fw-content .token.char,
.gh-content .token.,
.fw-content .token.builtin,
.gh-content .token.,
.fw-content .token.inserted { color: #7ee787; }

.gh-content .token.,
.fw-content .token.operator,
.gh-content .token.,
.fw-content .token.entity,
.gh-content .token.,
.fw-content .token.url,
.fw-content .language-css .token.string,
.fw-content .style .token.string { color: #ffa657; }

.gh-content .token.,
.fw-content .token.atrule,
.gh-content .token.,
.fw-content .token.attr-value,
.gh-content .token.,
.fw-content .token.keyword { color: #79c0ff; font-weight: 600; }

.gh-content .token.,
.fw-content .token.function,
.gh-content .token.,
.fw-content .token.class-name { color: #d2a8ff; }

.gh-content .token.,
.fw-content .token.regex,
.gh-content .token.,
.fw-content .token.important,
.gh-content .token.,
.fw-content .token.variable { color: #ffa657; }

.gh-content .token.,
.fw-content .token.important,
.gh-content .token.,
.fw-content .token.bold { font-weight: 700; }
.gh-content .token.,
.fw-content .token.italic { font-style: italic; }

/* 娣辫壊妯″紡涓嬩唬鐮佸潡鍐嶅帇鏆椾竴鐐癸紝閬垮厤鍒虹溂 */
html[data-fw-theme="dark"] .gh-content pre,
.fw-content pre,
article pre,
body.post-template .fw-main pre {
  background: #0b1017;
  border-color: rgba(255, 255, 255, .07);
}

/* 楂樹寒琛岋紙Ghost 鐨?.highlight 绫伙紝濡傛灉鐢ㄥ埌锛?*/
.fw-content pre .highlight,
.fw-content pre .highlight-line {
  display: block;
  margin: 0 -1.25rem;
  padding: 0 1.25rem;
  background: rgba(110, 168, 254, .12);
  border-left: .2rem solid var(--fw-primary);
}
