/* ============================================================
   非必要造物 · 共享顶栏（portal / prompt / 后续子站）
   颜色来自 web/theme.css；不依赖门户的 pf- CSS。
   ============================================================ */

@font-face {
  font-family: "Smiley Sans";
  src: url("/portal/fonts/SmileySans.woff2?v=20261201u") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "LXGW WenKai";
  src: url("/portal/fonts/LXGWWenKai.woff2?v=20261201u") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Xiaolai SC";
  src: url("/portal/fonts/XiaolaiSC.woff2?v=20261201u") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

.sh-top {
  position: sticky; top: 0; z-index: 800;
  background: var(--c-shell);
  color: var(--c-shell-text);
  border-bottom: 1px solid var(--c-shell-line);
  box-shadow: 0 8px 28px rgba(70, 45, 26, .16);
}
.sh-top a,
.sh-top a:link,
.sh-top a:visited,
.sh-top a:hover,
.sh-top a:focus {
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  border-bottom: 0 !important;
}
.sh-wrap {
  width: 100%; max-width: none; margin: 0;
  padding: 0 clamp(16px, 2vw, 32px); box-sizing: border-box;
}
.sh-top-in { height: 64px; display: flex; align-items: center; gap: 24px; }
.sh-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: inherit; }
.sh-logo {
  object-fit: cover; padding: 0; background: var(--c-butter);
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-butter); color: var(--c-vip-text);
  font: 800 17px/1 "Microsoft YaHei", "PingFang SC", sans-serif;
  box-shadow: inset 0 -2px 0 rgba(74, 46, 23, .14);
}
.sh-brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.sh-brand-txt b { font: 400 15px/1.2 "Smiley Sans", "PingFang SC", sans-serif; letter-spacing: .04em; }
.sh-brand-txt small { margin-top: 2px; font: 400 7.5px/1.2 "Xiaolai SC", "PingFang SC", sans-serif; letter-spacing: .08em; opacity: .64; }
.sh-nav { display: flex; align-items: center; gap: 3px; flex: 1; min-width: 0; }
.sh-nav a, .sh-nav .sh-soon {
  position: relative; padding: 8px 10px; border-radius: 8px;
  font: 400 12.5px/1.2 "LXGW WenKai", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--c-shell-dim); white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}
.sh-nav a:hover, .sh-nav a:focus-visible { color: var(--c-shell-text); background: rgba(251, 243, 230, .08); }
.sh-nav a.on { color: var(--c-butter); font-weight: 700; }
.sh-nav a.on::after {
  content: ""; display: block; position: absolute; left: 11px; right: 11px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--c-butter);
}
.sh-nav .sh-soon { opacity: .62; cursor: default; }
.sh-nav em {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  border: 1px solid rgba(251, 243, 230, .24); border-radius: 999px;
  font-style: normal; font-size: 7.5px; line-height: 14px; vertical-align: 1px;
}
.sh-nav em.sh-new { background: var(--c-butter); color: var(--c-vip-text); border-color: transparent; font-weight: 700; }
.sh-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.sh-quota {
  height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid rgba(251, 243, 230, .24); background: transparent;
  color: var(--c-butter); font: 400 11px/1 "LXGW WenKai", "PingFang SC", sans-serif;
  cursor: pointer; white-space: nowrap;
}
.sh-quota:hover { border-color: rgba(251, 243, 230, .5); background: rgba(251, 243, 230, .08); }
.sh-quota[hidden] { display: none !important; }
.sh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 13px; border-radius: 9px; border: 1px solid transparent;
  cursor: pointer; font: 400 12px/1 "LXGW WenKai", "PingFang SC", sans-serif;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .1s ease;
}
.sh-btn[hidden], [data-sh-member][hidden] { display: none !important; }
.sh-btn:active { transform: translateY(1px); }
.sh-btn:focus-visible { outline: 2px solid var(--c-butter); outline-offset: 2px; }
.sh-btn-ghost { background: transparent; color: var(--c-shell-dim); border-color: rgba(251, 243, 230, .24); }
.sh-btn-ghost:hover { color: var(--c-shell-text); border-color: rgba(251, 243, 230, .48); }
.sh-btn-login { background: var(--c-butter); color: var(--c-vip-text); box-shadow: 0 5px 16px rgba(0, 0, 0, .12); }
.sh-btn-login:hover { background: var(--c-vip-hover); }
.sh-btn-login.is-in { background: var(--c-shell-text); color: var(--c-shell); }
.sh-user-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-vip-text); opacity: .55; }
.sh-help {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(251, 243, 230, .28);
  background: transparent; color: var(--c-shell-dim); cursor: pointer;
  font: 400 14px/1 "LXGW WenKai", sans-serif;
}
.sh-help:hover { color: var(--c-shell-text); border-color: rgba(251, 243, 230, .5); }
.sh-burger {
  display: none; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid rgba(251, 243, 230, .24); background: transparent;
  color: var(--c-shell-text); cursor: pointer; font-size: 16px;
}
.sh-drawer {
  position: fixed; left: 0; right: 0; top: 64px; z-index: 799;
  background: var(--c-bg-2); border-bottom: 1px solid var(--c-line);
  box-shadow: 0 18px 50px rgba(120, 95, 70, .13);
}
.sh-drawer nav { display: flex; flex-direction: column; padding: 8px 24px 16px; }
.sh-drawer a, .sh-drawer span, .sh-drawer button {
  display: block; width: 100%; padding: 11px 8px; text-align: left;
  background: transparent; border: 0; border-bottom: 1px solid var(--c-line);
  font: 400 14px/1.3 "LXGW WenKai", "PingFang SC", sans-serif;
  color: var(--c-text); cursor: pointer;
}
.sh-drawer span { color: var(--c-dim); }
.sh-drawer button { color: var(--c-accent-text); font-weight: 600; }
.sh-toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 999; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 999px; background: var(--c-shell);
  color: var(--c-shell-text); font: 400 12px/1.4 "LXGW WenKai", sans-serif;
  box-shadow: 0 10px 30px rgba(45, 32, 22, .2); opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
.sh-toast.on { opacity: 1; }
.sh-offscreen { position: absolute; left: -9999px; }

@media (max-width: 980px) {
  .sh-wrap { width: 100%; padding: 0 14px; }
  .sh-top-in { height: 58px; gap: 12px; }
  .sh-nav { display: none; }
  .sh-actions .sh-btn-ghost { display: none; }
  .sh-actions .sh-quota { display: none; }
  .sh-burger { display: inline-flex; align-items: center; justify-content: center; }
  .sh-drawer { top: 58px; }
  .sh-brand-txt b { font-size: 14px; }
  .sh-brand-txt small { font-size: 7px; }
  .sh-quota {
  height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid rgba(251, 243, 230, .24); background: transparent;
  color: var(--c-butter); font: 400 11px/1 "LXGW WenKai", "PingFang SC", sans-serif;
  cursor: pointer; white-space: nowrap;
}
.sh-quota:hover { border-color: rgba(251, 243, 230, .5); background: rgba(251, 243, 230, .08); }
.sh-quota[hidden] { display: none !important; }
.sh-btn { height: 32px; padding: 0 11px; }
}

/* 账号菜单 / 共享登录弹窗 */
.sh-actions { position: relative; }
[data-sh-login-label] { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.sh-account {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 850;
  min-width: 168px; padding: 7px;
  border: 1px solid var(--c-line); border-radius: 12px;
  background: var(--c-elevate); color: var(--c-text);
  box-shadow: 0 18px 44px rgba(45, 32, 22, .18);
}
.sh-account a, .sh-account button {
  display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--c-text); text-align: left;
  font: 400 12px/1.4 "LXGW WenKai", "PingFang SC", sans-serif; cursor: pointer;
}
.sh-account a:hover, .sh-account button:hover { background: var(--c-bg-2); color: var(--c-accent-text); }
.sh-account .sh-account-sep { height: 1px; margin: 5px 4px; background: var(--c-line); }

.sh-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(30, 22, 16, .48); backdrop-filter: blur(4px);
  overflow-y: auto;
}
.sh-modal[hidden] { display: none; }
.sh-modal-card {
  width: min(380px, 100%); padding: 26px 24px 20px;
  max-height: min(92dvh, 720px); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--c-line); border-radius: 18px;
  background: var(--c-elevate); color: var(--c-text);
  box-shadow: 0 24px 70px rgba(30, 22, 16, .26);
}
.sh-modal-card h2 {
  margin: 0; font: 400 26px/1.2 "Smiley Sans", "PingFang SC", sans-serif;
}
.sh-modal-card p { margin: 8px 0 18px; color: var(--c-dim); font-size: 12px; line-height: 1.7; }
.sh-modal-card label {
  display: block; margin: 11px 0 5px; color: var(--c-dim); font-size: 11px;
}
.sh-modal-card input {
  width: 100%; height: 40px; padding: 0 11px;
  border: 1px solid var(--c-line); border-radius: 9px;
  background: rgba(255, 253, 249, .7); color: var(--c-text);
  font: 400 13px/1 "LXGW WenKai", "PingFang SC", sans-serif; outline: none;
}
.sh-modal-card input:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(139, 94, 60, .1); }
.sh-pw-wrap { position: relative; }
.sh-pw-wrap input { padding-right: 40px !important; }
.sh-pw-eye {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--c-dim); cursor: pointer; padding: 0;
}
.sh-pw-eye:hover { color: var(--c-text); background: var(--c-bg-2); }
.sh-pw-eye.on { color: var(--c-accent-text); }
.sh-remember { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; font-size: 11px; color: var(--c-dim); cursor: pointer; }
.sh-remember input { width: 14px; height: 14px; accent-color: var(--c-accent); }
.sh-remember span { margin-left: auto; font-size: 10px; color: var(--c-dim-2); }
@media (max-width: 380px) {
  .sh-modal { padding: 10px; }
  .sh-modal-card { padding: 22px 14px 16px; max-height: calc(100dvh - 20px); }
}
.sh-modal-actions { display: flex; align-items: center; gap: 9px; margin-top: 18px; }
.sh-modal-actions .sh-quota {
  height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid rgba(251, 243, 230, .24); background: transparent;
  color: var(--c-butter); font: 400 11px/1 "LXGW WenKai", "PingFang SC", sans-serif;
  cursor: pointer; white-space: nowrap;
}
.sh-quota:hover { border-color: rgba(251, 243, 230, .5); background: rgba(251, 243, 230, .08); }
.sh-quota[hidden] { display: none !important; }
.sh-btn { height: 38px; padding: 0 16px; }
.sh-modal-actions .sh-modal-link {
  margin-left: auto; border: 0; background: transparent; color: var(--c-dim);
  font-size: 11px; cursor: pointer;
}
.sh-modal-error { min-height: 18px; margin-top: 10px; color: var(--c-err-text); font-size: 11px; }
.sh-modal-hint { margin: 10px 0 0; text-align: right; font-size: 11px; }
.sh-modal-hint a { color: var(--c-dim); text-decoration: none; }
.sh-modal-hint a:hover { color: var(--c-accent-text); text-decoration: underline; }
.sh-modal-cancel {
  position: absolute; right: 6px; top: 4px; width: 44px; height: 44px;
  border: 0; border-radius: 10px; background: transparent;
  color: var(--c-dim); font-size: 20px; cursor: pointer;
}
.sh-modal-card { position: relative; }

@media (max-width: 980px) {
  [data-sh-login-label] { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.sh-account { right: -2px; }
  .sh-modal-card { padding: 24px 18px 18px; }
}

/* 页面切换：支持跨文档 View Transitions 的浏览器做 1 秒叠化 */
@view-transition { navigation: auto; }
::view-transition-old(root) {
  animation: cc-page-out 1s cubic-bezier(.4, 0, .2, 1) both;
}
::view-transition-new(root) {
  animation: cc-page-in 1s cubic-bezier(.4, 0, .2, 1) both;
}
@keyframes cc-page-out { to { opacity: 0; } }
@keyframes cc-page-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .001ms; }
}

/* 登录人机验证：三个独立控件排成一行，不做外框套内框 */
.sh-captcha-hint { margin-left: 5px; color: var(--c-dim-2); font-size: 11px; font-weight: 400; }
.sh-captcha-box {
  display: flex; align-items: center; gap: 7px;
  padding: 0; border: 0; background: transparent;
}
.sh-captcha-box input {
  flex: 1; min-width: 0; width: auto; height: 44px;
  padding: 0 10px; border: 1px solid var(--c-line); border-radius: 9px;
  background: rgba(255, 253, 249, .7); color: var(--c-text);
  font: 400 13px/1 "LXGW WenKai", "PingFang SC", "Microsoft YaHei", sans-serif;
  outline: none;
}
.sh-captcha-box input:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(139, 94, 60, .1); }
.sh-captcha-img {
  width: 124px; height: 44px; border-radius: 9px;
  border: 1px solid var(--c-line); object-fit: cover;
  background: var(--c-bg-2); cursor: pointer; flex: none;
}
.sh-captcha-refresh {
  height: 44px; padding: 0 9px; border-radius: 9px;
  border: 1px solid var(--c-line); background: transparent;
  color: var(--c-accent-text); font: 400 10px/1 "LXGW WenKai", sans-serif;
  cursor: pointer; flex: none; white-space: nowrap;
}
.sh-captcha-refresh:hover { border-color: var(--c-accent); background: var(--c-bg-2); }
@media (max-width: 380px) {
  .sh-captcha-box { gap: 5px; }
  .sh-captcha-img { width: 108px; }
  .sh-captcha-refresh { padding: 0 7px; font-size: 9.5px; }
}

/* Chrome 自动填充的蓝色底改成暖色，避免和登录卡片割裂 */
.sh-modal-card input:-webkit-autofill,
.sh-modal-card input:-webkit-autofill:hover,
.sh-modal-card input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #FBF3E6 inset !important;
  -webkit-text-fill-color: var(--c-text) !important;
  caret-color: var(--c-text);
}
