/* 青山映画 2026-11-29 顶栏按用户定稿回旧样式
 * 替换现网 topbar-unify-9eb385db1c55450e.css。
 * 只覆盖顶栏：恢复 4px / 34px 旧按钮，单行导航，面包屑单独一行。
 * 不改会员页/账号页正文 CTA。 */

/* 布局：品牌在左，操作在右；有面包屑时顶栏加高，导航仍留在第一行 */
#topbar .tb-main {
  display: flex !important;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
#topbar:not(.tb-has-crumb) .tb-sub {
  display: none !important;
}
#topbar.tb-has-crumb {
  display: flex;
  flex-direction: column;
  height: auto;
  align-items: stretch;
}
#topbar.tb-has-crumb .tb-main,
#topbar.tb-has-crumb .tb-sub {
  display: flex !important;
  width: 100%;
  align-items: center;
}
#topbar.tb-has-crumb .tb-sub {
  gap: 6px;
  min-width: 0;
}
#topbar .top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}
#topbar .top-right .yx-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 0 !important;
  flex: none !important;
  overflow: visible;
  justify-content: flex-end;
}
#topbar .top-right .userbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
  position: relative;
}

/* 回到改版前的顶栏按钮：34px 高、4px 圆角、薄荷描边，不要 8px 方钮 */
#topbar .pwnav,
#topbar .yx-nav,
#topbar .yx-switch,
#topbar .login-btn,
#topbar #qs-relay-entry,
#topbar [data-membership-visual-entry] {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 15px;
  border-radius: 4px !important;
  box-sizing: border-box;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
#topbar .pwnav,
#topbar .yx-nav,
#topbar #qs-relay-entry,
#topbar #qs-relay-entry.pwnav {
  background: rgba(92, 255, 186, .08);
  border: 1px solid var(--line2, #2a3a36);
  color: var(--mint, #5cffba);
}
#topbar .pwnav:hover,
#topbar .yx-nav:hover,
#topbar #qs-relay-entry:hover {
  background: rgba(92, 255, 186, .15);
  border-color: var(--mint, #5cffba);
}

/* 站点切换：定稿柠檬色，不是改版后的偏绿方钮 */
#topbar .yx-switch {
  background: #ceff24 !important;
  border: 1px solid #ceff24 !important;
  color: #172200 !important;
}
#topbar .yx-switch:is(:hover, :focus-visible) {
  background: #e2ff77 !important;
  border-color: #e2ff77 !important;
}

/* 「添加积分」等会员入口：同款柠檬按钮。研学只保留添加积分 */
#topbar [data-membership-visual-entry],
#topbar .coin[data-membership-visual-entry] {
  background: #ceff24 !important;
  border: 1px solid #ceff24 !important;
  color: #172200 !important;
  height: 34px;
  padding: 0 15px !important;
  font-weight: 700;
  font-size: 13px;
}
.yx-page #topbar .userbar .coin[data-membership-visual-entry][data-membership-period="addons"] {
  display: inline-flex !important;
}
.yx-page #topbar .userbar .coin[data-membership-visual-entry]:not([data-membership-period="addons"]) {
  display: none !important;
}

/* 积分：图标 + 数字，不要胶囊底 */
#topbar .coin[data-view="myCredits"],
#topbar .coin[data-action="nav"][data-view="myCredits"] {
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  height: 34px;
  padding: 0 4px !important;
  gap: 6px;
  box-shadow: none;
  color: var(--text, #eef2f3);
  font-weight: 700;
  font-size: 12.5px;
}
#topbar .coin[data-view="myCredits"] .ico,
#topbar .coin[data-action="nav"][data-view="myCredits"] .ico {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe38a, #e8c15a);
  color: transparent;
  font-size: 0;
}

/* 头像保持圆形；不要会员环（环已在 runtime-4 去掉） */
#topbar .avatar,
#topbar .avatar b,
#topbar .avatar-wrap img,
#topbar .av {
  border-radius: 50%;
}

/* 窄屏也要露出「探索课程」「我的课程」「青山映画」等文字，不要再剪掉 span / 藏 pwnav-t */
#topbar .yx-links a.yx-nav span,
#topbar .yx-links a.yx-switch span,
#topbar .tb-main > a.yx-switch span,
.yx-page #topbar .yx-links > a.yx-switch span,
#topbar .yx-nav span,
#topbar .pwnav span,
#topbar .pwnav-t {
  position: static !important;
  clip-path: none !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  display: inline !important;
}

/* 已下线功能：AI修图入口必须继续隐藏（改版 CSS 的 display:inline-flex !important 曾把它重新露出） */
#topbar button[data-action="open-ai-image-editor"],
button[data-action="open-ai-image-editor"] {
  display: none !important;
}

@media (max-width: 768px) {
  #topbar .pwnav,
  #topbar .yx-nav,
  #topbar #qs-relay-entry,
  #topbar [data-membership-visual-entry] {
    padding: 0 8px;
    font-size: 12px;
  }
  #topbar .yx-nav svg,
  #topbar .pwnav svg {
    display: inline;
  }
}

/* 现网 runtime-style 给 .brand 写了 order:1，.top-right 默认 order:0，
 * 会把左侧品牌排到头像后面。把品牌钉在最左，右侧整组放在后面。 */
#topbar .tb-main > .brand,
#topbar .tb-main > a.brand,
#topbar .tb-main > .yx-brand,
#topbar .brand,
#topbar a.yx-brand {
  order: -1 !important;
  margin-left: 0 !important;
  flex: 0 0 auto;
}
#topbar .top-right {
  order: 1 !important;
  margin-left: auto;
}
