:root {
  --faiyi-bg: #f3f7fc;
  --faiyi-ink: #1a2634;
  --faiyi-muted: #5d6f84;
  --faiyi-primary: #1f7ae0;
  --faiyi-primary-dark: #1459a8;
  --faiyi-panel: #ffffff;
  --faiyi-shadow: 0 16px 45px rgba(21, 44, 70, 0.12);
  --faiyi-radius: 16px;
}

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Noto+Sans+SC:wght@400;500;700;800&display=swap');

body.compass_theme {
  font-family: "Noto Sans SC", "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--faiyi-ink);
  background: radial-gradient(circle at 10% 0%, #dcecff 0%, #f3f7fc 55%, #e8f2ff 100%);
}

body.compass_theme p,
body.compass_theme li,
body.compass_theme input,
body.compass_theme textarea,
body.compass_theme button {
  font-family: inherit;
}

body.compass_theme .page_content_wrapper {
  border-radius: 24px;
  margin-top: 42px;
  margin-bottom: 80px;
  padding-top: 0;
  overflow: hidden;
  box-shadow: var(--faiyi-shadow);
}

body.compass_theme .header {
  margin: 0;
  padding: 22px 0;
  background: linear-gradient(100deg, #ffffff 0%, #eef6ff 100%);
  border-bottom: 1px solid #e5edf7;
}

body.compass_theme .header .logo img {
  max-height: 56px;
  width: auto;
}

body.compass_theme .header .logo {
  display: flex;
  align-items: center;
  min-height: 56px;
}

.faiyi-brand-link {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  color: #102321;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(120deg, #ffffff 0%, #edf8f4 100%);
  border: 1px solid #d8ebe4;
  box-shadow: 0 8px 18px rgba(18, 68, 57, 0.1);
}

.faiyi-brand-title {
  font-family: "Noto Sans SC", "Nunito", sans-serif;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
}

.faiyi-brand-sub {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a6a64;
}

/* Fix legacy fixed-width search widget layout in sidebar. */
body.compass_theme .sidebar .searchform {
  width: 100%;
  max-width: 100%;
  margin-bottom: 18px;
  border: 1px solid #c7ddd7;
  border-radius: 12px;
  background: #fff;
  position: relative;
  box-sizing: border-box;
  height: auto;
  padding: 4px;
}

body.compass_theme .sidebar .searchform > div {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

body.compass_theme .sidebar .searchform input[type="text"] {
  width: auto !important;
  flex: 1;
  height: 38px;
  border: 1px solid #c6ddd8;
  border-radius: 10px;
  padding: 0 12px;
  margin: 0;
  box-sizing: border-box;
}

body.compass_theme .sidebar .searchform input[type="submit"] {
  position: static;
  width: 74px;
  min-width: 74px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(140deg, #0f766e 0%, #1a998e 100%);
  color: #fff;
  box-sizing: border-box;
}

body.compass_theme .page_content .content_bar .post .post_content {
  font-size: 16px;
  line-height: 1.85;
  color: #2d3f53;
}

body.compass_theme #menu .sf-menu li a {
  border-radius: 10px;
  font-size: 16px;
  font-weight: 400;
}

body.compass_theme #menu li.current-menu-item a,
body.compass_theme #menu li.current_page_item a,
body.compass_theme #menu li.current-menu-parent a,
body.compass_theme #menu li.current_page_parent a,
body.compass_theme #menu li a.selected,
body.compass_theme #menu li a:hover {
  background: var(--faiyi-primary);
  border-bottom: 0;
}

body.compass_theme #slider {
  border-bottom: 1px solid #e8eef6;
}

body.compass_theme .salesdetails {
  background: rgba(11, 34, 58, 0.55);
  border-radius: 14px;
  padding: 20px 24px;
  backdrop-filter: blur(4px);
}

body.compass_theme .salesdetails h1,
body.compass_theme .salesdetails p {
  color: #fff;
}

body.compass_theme .home_wrapper {
  padding: 30px 24px 10px;
}

body.compass_theme .feature-content-inner {
  background: linear-gradient(165deg, #ffffff 0%, #f3f8ff 100%);
  border: 1px solid #e5edf8;
  border-radius: var(--faiyi-radius);
  box-shadow: 0 8px 25px rgba(22, 66, 108, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.compass_theme .feature-content-inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(22, 66, 108, 0.16);
}

body.compass_theme .content_bar.gallery > .post,
body.compass_theme .content_bar.gallery > [class*="post-"] {
  border: 1px solid #e4edf8;
  border-radius: var(--faiyi-radius);
  box-shadow: 0 6px 18px rgba(21, 58, 94, 0.06);
  padding: 20px;
  margin-bottom: 24px;
  background: var(--faiyi-panel);
}

body.compass_theme .post_title a {
  color: #0d2f51;
}

body.compass_theme .post_title a:hover {
  color: var(--faiyi-primary);
}

body.compass_theme .post_meta li {
  color: var(--faiyi-muted);
}

body.compass_theme .read_more {
  display: inline-block;
  background: var(--faiyi-primary);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  line-height: 1.2;
  font-size: 13px;
}

body.compass_theme .read_more:hover {
  background: var(--faiyi-primary-dark);
}

body.compass_theme .sidebar .sidebar_widget {
  border: 1px solid #e3eaf4;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(21, 58, 94, 0.06);
}

body.compass_theme .bottom_footer_content {
  background: linear-gradient(100deg, #17334f 0%, #1f4f77 100%);
  color: #d2e6ff;
  padding: 18px 22px;
}

body.compass_theme .bottom_footer_content a {
  color: #cce4ff;
}

.faiyi-ai-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
}

.faiyi-ai-toggle {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(140deg, #0f766e 0%, #199c90 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  box-shadow: 0 14px 30px rgba(16, 88, 80, 0.35);
  cursor: pointer;
}

.faiyi-ai-panel {
  width: min(360px, calc(100vw - 24px));
  height: 500px;
  margin-top: 12px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #d4e6df;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 50px rgba(20, 78, 66, 0.25);
}

.faiyi-ai-panel[hidden] {
  display: none !important;
}

.faiyi-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(110deg, #0f3f46 0%, #116b75 100%);
  color: #fff;
  padding: 12px 14px;
}

.faiyi-ai-header h3 {
  margin: 0;
  font-size: 15px;
  color: inherit;
}

.faiyi-ai-header button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  width: 28px;
  height: 28px;
}

.faiyi-ai-header button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.faiyi-ai-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.faiyi-ai-messages {
  flex: 1;
  overflow-y: auto;
  background: linear-gradient(180deg, #f5fbfa 0%, #ecf6f4 100%);
  padding: 10px;
}

.faiyi-ai-msg {
  max-width: 88%;
  padding: 8px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  line-height: 1.5;
  font-size: 13px;
  white-space: normal;
  word-break: break-word;
}

.faiyi-ai-msg.user {
  margin-left: auto;
  background: #127f73;
  color: #fff;
  border-bottom-right-radius: 4px;
  white-space: pre-wrap;
}

.faiyi-ai-msg.ai {
  margin-right: auto;
  background: #fff;
  color: #23403a;
  border: 1px solid #d6e8e2;
  border-bottom-left-radius: 4px;
}

.faiyi-ai-msg p,
.faiyi-ai-msg ul,
.faiyi-ai-msg ol {
  margin: 0 0 8px;
}

.faiyi-ai-msg p:last-child,
.faiyi-ai-msg ul:last-child,
.faiyi-ai-msg ol:last-child {
  margin-bottom: 0;
}

.faiyi-ai-msg ul,
.faiyi-ai-msg ol {
  padding-left: 18px;
}

.faiyi-ai-msg code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(18, 43, 70, 0.08);
}

.faiyi-ai-msg.ai a {
  color: #0f6f98;
  text-decoration: underline;
}

.faiyi-ai-msg.user a {
  color: #e9f3ff;
  text-decoration: underline;
}

.faiyi-ai-form {
  display: flex;
  gap: 8px;
  border-top: 1px solid #ddebe7;
  padding: 10px;
}

.faiyi-ai-form textarea {
  flex: 1;
  border: 1px solid #c6ddd8;
  border-radius: 10px;
  resize: none;
  padding: 8px;
  font-size: 13px;
}

.faiyi-ai-form button {
  border: 0;
  background: #117a6f;
  color: #fff;
  border-radius: 10px;
  padding: 0 14px;
  cursor: pointer;
}

@media only screen and (max-width: 960px) {
  body.compass_theme .page_content_wrapper {
    margin-top: 16px;
    border-radius: 0;
  }

  body.compass_theme .home_wrapper {
    padding: 20px 14px 4px;
  }

  body.compass_theme .header {
    padding-bottom: 8px;
  }

  body.compass_theme .header .grid_16.omega {
    width: 100%;
    float: none;
  }

  body.compass_theme .header .menu_wrapper {
    margin: 8px 10px 0;
    min-height: 54px;
    position: relative;
  }

  body.compass_theme .mean-container .mean-bar {
    background: transparent;
    min-height: 54px;
    padding: 0;
  }

  body.compass_theme .mean-container a.meanmenu-reveal {
    right: 0;
    top: 4px;
    width: auto;
    min-width: 84px;
    height: 42px;
    padding: 0 14px 0 42px;
    border-radius: 999px;
    background: linear-gradient(140deg, #0f766e 0%, #1a998e 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(14, 98, 91, 0.28);
    text-indent: 0;
    font-size: 13px;
    line-height: 42px;
    font-weight: 700;
    letter-spacing: .04em;
  }

  body.compass_theme .mean-container a.meanmenu-reveal span {
    display: none;
  }

  body.compass_theme .mean-container a.meanmenu-reveal::before {
    content: "\2261";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
  }

  body.compass_theme .mean-container a.meanmenu-reveal::after {
    content: "菜单";
  }

  body.compass_theme .mean-container a.meanmenu-reveal.meanclose::before {
    content: "\00d7";
    font-size: 28px;
    left: 15px;
  }

  body.compass_theme .mean-container a.meanmenu-reveal.meanclose::after {
    content: "关闭";
  }

  body.compass_theme .mean-container .mean-nav {
    margin-top: 56px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 26px rgba(14, 43, 38, 0.24);
  }

  body.compass_theme .mean-container .mean-nav ul li a {
    text-align: left;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 14px 16px;
  }

  .faiyi-ai-root {
    right: 10px;
    bottom: 12px;
  }
}
