/* warm decor layer: 只做配色点缀/圆角/阴影/动效, 不含栅格或定位改动 */
@layer warm-skin;
/* warm-skin — 参考 xinghefurry 的暖棕橘体系: 奶油底, 六角橙, 柔和暖阴影, 上浮动效 */
@layer warm-skin {
  :root {
    --w-ink: #2b1b0d; --w-ink2: #4a3524; --w-muted: #7a6550;
    --w-line: #efdfc8; --w-line-hi: #e3cfb4; --w-soft: #fbf1e7; --w-cream: #faf3e7;
    --w-accent: #e8761b; --w-accent-2: #c85e10; --w-accent-soft: #fdf0e0;
    --w-ease: cubic-bezier(.22,.61,.36,1);
    --w-shadow-sm: 0 1px 2px rgba(43,27,13,.04), 0 8px 22px -14px rgba(200,94,16,.35);
    --w-shadow-md: 0 14px 40px -18px rgba(200,94,16,.42);
    --w-shadow-lg: 0 34px 70px -34px rgba(200,94,16,.55);
  }

  html, body {
    background-color: var(--w-cream) !important;
    scrollbar-color: #ddc4a8 var(--w-cream) !important;
  }
  body {
    background-image:
      radial-gradient(760px 520px at 88% -8%, rgba(232,118,27,.14), rgba(232,118,27,0) 62%),
      radial-gradient(680px 460px at -6% 92%, rgba(200,94,16,.10), rgba(200,94,16,0) 60%),
      radial-gradient(520px 320px at 50% 42%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%) !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: var(--w-ink) !important;
  }

  /* 卡片: 白瓷面 + 暖橙晕影 + 上浮 */
  :is(.fs-card, .fs-friend, .social-front, .social-back, .art-card, .series-card, .vd-video,
      .videos-side, .videos-main, .encrypt-card, .cvt-start, .cvt-app--result .cvt-card,
      .au-status #mcCard, .panel, .auth-card, .card) {
    background: #fffdf8 !important;
    border: 1px solid var(--w-line) !important;
    border-radius: 20px !important;
    box-shadow: var(--w-shadow-sm) !important;
    transition: transform .32s var(--w-ease), box-shadow .32s var(--w-ease),
      border-color .32s var(--w-ease) !important;
  }
  :is(.fs-card, .fs-friend, .art-card, .series-card, .vd-video, .panel, .encrypt-card):hover {
    border-color: #f5d3ae !important;
    box-shadow: var(--w-shadow-md) !important;
    transform: translateY(-3px) !important;
  }
  .fs-grid > .fs-card {
    background: #fffdf8 !important; border: 1px solid var(--w-line) !important;
    border-radius: 22px !important; padding: 34px 34px 38px !important;
    box-shadow: var(--w-shadow-sm) !important;
  }
  .fs-grid { gap: 22px !important; }
  body.quiet-home #support { padding: 22px 26px !important; align-self: start !important; }
  .fs-hero {
    background: none !important; border: 0 !important; box-shadow: none !important;
    border-radius: 0 !important; padding: 96px 0 64px !important; overflow: visible !important;
  }
  .fs-shell { padding-bottom: 96px !important; }

  /* hero 呼吸光斑 */
  .fs-hero::before, .fs-hero::after {
    content: '' !important; display: block !important; position: absolute !important;
    border-radius: 50% !important; pointer-events: none !important; z-index: 0 !important;
    filter: blur(46px) !important; opacity: .55 !important;
  }
  .fs-hero::before {
    width: 380px !important; height: 380px !important; right: 6% !important; top: -70px !important;
    background: radial-gradient(circle, rgba(232,118,27,.38), rgba(232,118,27,0) 68%) !important;
    animation: w-orb 16s var(--w-ease) infinite !important;
  }
  .fs-hero::after {
    width: 300px !important; height: 300px !important; left: -60px !important; bottom: -90px !important;
    background: radial-gradient(circle, rgba(200,94,16,.26), rgba(200,94,16,0) 70%) !important;
    animation: w-orb 21s var(--w-ease) infinite reverse !important;
  }
  .fs-profile { position: relative !important; z-index: 1 !important; }
  .fs-avatar {
    border-radius: 24px !important;
    box-shadow: 0 0 0 1px rgba(232,118,27,.22), 0 18px 40px -22px rgba(200,94,16,.55) !important;
  }
  .fs-avatar img { border-radius: 24px !important; }

  /* 标题: 保留衬线身份, 中文昵称走橙色 */
  .fs-id h1 { letter-spacing: -.03em !important; }
  .fs-cn {
    font-size: .58em !important; letter-spacing: .015em !important; vertical-align: baseline !important;
    background: linear-gradient(100deg, #f2892f, #e8761b 45%, #c85e10) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important; color: #e8761b !important;
  }
  :is(.fs-card h2, .fs-card-head, .section-head h2) { letter-spacing: -.02em !important; }
  .fs-card h2 { font-size: 28px !important; }
  :is(.fs-kicker, .art-kicker, .videos-kicker, .vd-kicker) { color: var(--w-accent) !important; }

  /* 标签与药丸 */
  .fs-pill, .fs-tags span, .tag, .chip, .badge {
    background: #fffdf8 !important; border: 1px solid #f3e2cc !important;
    border-radius: 999px !important; color: #5c4632 !important;
    padding: 5px 13px !important; font-size: 13px !important;
    transition: border-color .25s var(--w-ease), color .25s var(--w-ease),
      background-color .25s var(--w-ease), transform .25s var(--w-ease) !important;
  }
  .fs-pill:hover, .fs-tags span:hover { border-color: var(--w-accent) !important; color: var(--w-accent) !important; transform: translateY(-2px) !important; }
  .fs-pill.hot { background: var(--w-accent-soft) !important; border-color: #f6c8a0 !important; color: var(--w-accent-2) !important; }

  /* 按钮: 橙色药丸 + 暖光 */
  :is(.btn-primary, .go, .dark, .copy-ip, #go, .primary, #probeBtn, #downloadBtn) {
    background: linear-gradient(180deg, #f2892f, #e8761b 62%, #d96a12) !important;
    border: 1px solid #e8761b !important; color: #fffdf8 !important;
    border-radius: 999px !important; padding: 11px 26px !important; font-weight: 600 !important;
    box-shadow: 0 10px 26px -12px rgba(232,118,27,.75) !important;
    transition: transform .25s var(--w-ease), box-shadow .25s var(--w-ease), filter .25s var(--w-ease) !important;
  }
  :is(.btn-primary, .go, .dark, .copy-ip, #go, .primary, #probeBtn, #downloadBtn):hover:not(:disabled) {
    background: linear-gradient(180deg, #fa9640, #ef7f26 62%, #e0731a) !important;
    transform: translateY(-2px) !important; box-shadow: 0 16px 34px -14px rgba(232,118,27,.85) !important;
  }
  :is(.btn-secondary, .light, .secondary, .cvt-btn--secondary, .cvt-btn--quiet, #cacheBtn, .scheme-btn, .fs-menu-btn) {
    background: #fffdf8 !important; border: 1px solid var(--w-line-hi) !important;
    border-radius: 999px !important; color: #5c4632 !important;
    box-shadow: 0 6px 18px -14px rgba(43,27,13,.5) !important;
  }
  :is(.btn-secondary, .light, .cvt-btn--secondary, .cvt-btn--quiet, #cacheBtn, .scheme-btn):hover {
    border-color: var(--w-accent) !important; color: var(--w-accent) !important;
  }

  /* 站点入口与列表 */
  .fs-card .site-link {
    background: #fffaf1 !important; border: 1px solid #f6e8d4 !important;
    border-radius: 14px !important; padding: 14px !important;
  }
  .fs-card .site-link:hover { background: #fbf1e5 !important; }
  .site-link-icon { background: var(--w-accent-soft) !important; color: var(--w-accent-2) !important; border-radius: 12px !important; }
  .site-link-name { color: var(--w-ink) !important; }
  .site-link::after { color: var(--w-accent) !important; transition: transform .25s var(--w-ease) !important; }
  .site-link:hover::after { transform: translate(3px,-3px) !important; }
  .fs-list li { color: var(--w-ink2) !important; }
  .fs-article { border-bottom: 1px solid var(--w-line) !important; }
  .fs-article:hover { background: #fbf1e5 !important; }
  .fs-links a { color: #7a6550 !important; }
  .fs-links a:hover { color: var(--w-accent) !important; }

  /* 导航 */
  .fs-nav, .art-nav, .videos-nav, .vd-top, .ct-backbar {
    background: rgba(250,243,231,.92) !important;
    border-bottom: 1px solid var(--w-line) !important;
  }
  .fs-links a:hover { color: var(--w-accent) !important; }
  .fs-brand span { color: var(--w-ink) !important; }
  .site-footer { border-top: 1px solid var(--w-line) !important; color: var(--w-muted) !important; }

  :is(button, .site-link, .fs-links a, a):focus-visible {
    outline: 2px solid var(--w-accent) !important; outline-offset: 4px !important;
  }
  ::selection { background: #ffd9b3 !important; color: var(--w-ink) !important; }
  img { border-radius: 16px; }

  /* 入场动效: 逐块上浮 */
  html.warm-js .warm-el {
    opacity: 0 !important; transform: translateY(22px) !important;
    transition: opacity .72s var(--w-ease), transform .72s var(--w-ease) !important;
    transition-delay: calc(var(--warm-i, 0) * 70ms) !important;
  }
  html.warm-js .warm-el.in { opacity: 1 !important; transform: none !important; }
  html.warm-js .warm-el.warm-fast { transition-delay: 0ms !important; }
  @keyframes w-orb {
    0%, 100% { transform: translate3d(0,0,0) scale(1); }
    50% { transform: translate3d(-18px, 26px, 0) scale(1.08); }
  }
  @media (prefers-reduced-motion: reduce) {
    html.warm-js .warm-el { opacity: 1 !important; transform: none !important; transition: none !important; }
    .fs-hero::before, .fs-hero::after { animation: none !important; }
    :is(.fs-card, .fs-friend, .art-card, .panel):hover { transform: none !important; }
  }

  @media (max-width: 760px) {
    .fs-hero { padding: 64px 0 40px !important; }
    .fs-hero::before { width: 260px !important; height: 260px !important; right: -10% !important; }
    .fs-grid > .fs-card { padding: 26px 22px 30px !important; border-radius: 18px !important; }
    .fs-card h2 { font-size: 24px !important; }
  }
}

@layer warm-skin {
  /* hero 调形 */
  @media (min-width: 901px) {
    .fs-profile { grid-template-columns: minmax(0,1fr) 184px !important; }
    .fs-avatar { width: 184px !important; height: 184px !important; }
  }
  @media (max-width: 900px) and (min-width: 761px) {
    .fs-profile { grid-template-columns: minmax(0,1fr) 132px !important; align-items: start !important; gap: 20px !important; }
    .fs-avatar { width: 132px !important; height: 132px !important; }
  }
  @media (max-width: 760px) {
    .fs-profile { grid-template-columns: minmax(0,1fr) !important; align-items: start !important; gap: 20px !important; }
    .fs-avatar { width: 120px !important; height: 120px !important; grid-column: 1 !important; grid-row: 1 !important; }
    .fs-id { grid-column: 1 !important; grid-row: 2 !important; }
  }
  .fs-hero { padding: 88px 0 52px !important; }
  .fs-id h1 { font-size: clamp(30px, 4.4vw, 60px) !important; }
  @media (max-width: 760px) {
    .fs-id h1 { font-size: clamp(26px, 8vw, 34px) !important; line-height: 1.18 !important; }
    .fs-hero { padding: 46px 0 34px !important; }
  }
  .fs-bio { font-size: 16px !important; line-height: 1.9 !important; }

  /* 卡内小卡统一奶油底, 避免三重白框 */
  .fs-friend, .social-front, .social-back, .fs-qr-tile {
    background: #fffaf1 !important; border-color: #f7e9d6 !important;
  }
  .fs-friend:hover, .social-card:hover .social-front {
    border-color: #f3cf9d !important; box-shadow: 0 12px 28px -18px rgba(200,94,16,.5) !important;
  }
  .social-front, .social-back { border-radius: 16px !important; }

  /* 加密页 tab 用分段控件, 不用药丸 */
  .encrypt-tabs {
    display: grid !important; grid-template-columns: 1fr 1fr !important;
    gap: 6px !important; padding: 6px !important; margin-bottom: 24px !important;
    border: 1px solid var(--w-line) !important; border-radius: 16px !important;
    background: #fffaf1 !important;
  }
  .encrypt-tab {
    border: 0 !important; border-radius: 12px !important; background: transparent !important;
    color: var(--w-muted) !important; padding: 12px !important; font-weight: 600 !important;
    transition: background-color .25s var(--w-ease), color .25s var(--w-ease) !important;
  }
  .encrypt-tab.on {
    background: #fffdf8 !important; color: var(--w-accent-2) !important;
    box-shadow: 0 6px 16px -12px rgba(200,94,16,.6) !important;
  }

  /* 状态卡与加密卡统一圆角 */
  #mcCard, .encrypt-card, .cvt-start, .cvt-app--result .cvt-card, .videos-main, .videos-side {
    border-radius: 20px !important;
  }
}

@layer warm-skin {
  /* 色测大按钮: 圆角矩形, 保留副标题在内 */
  .cvt-btn { border-radius: 14px !important; padding: 12px 22px !important; min-height: 52px !important; }
  .cvt-btn--primary {
    background: linear-gradient(180deg, #f2892f, #e8761b 62%, #d96a12) !important;
    border-color: #e8761b !important; color: #fffdf8 !important;
    box-shadow: 0 10px 26px -14px rgba(232,118,27,.75) !important;
  }
  .cvt-btn--secondary { border-radius: 14px !important; }
  .cvt-shell { --c-green: #e8761b !important; --c-green-strong: #c85e10 !important; --c-green-soft: #fdf0e0 !important; }
  .cvt-start, .cvt-app--result .cvt-card { box-shadow: var(--w-shadow-sm) !important; }
  /* 后台登录卡 */
  .auth-card, .auth-wrap .panel { border-radius: 22px !important; box-shadow: var(--w-shadow-md) !important; }
  .primary, .secondary { min-height: 44px !important; padding: 10px 22px !important; }
}

@layer warm-skin {
  html, body { color-scheme: light !important; }
  :is(.scheme-btn, #themeSchemeBtn, .fs-actions .scheme-btn) { display: none !important; }
  :is(.fs-actions:empty, .fs-actions) { min-width: 0 !important; }
}

@layer warm-skin {
  /* 鼠标跟随的暖光与极轻微 3D 位移 */
  .warm-spot {
    position: fixed; inset: 0; z-index: 3; pointer-events: none; display: none;
    background:
      radial-gradient(620px circle at var(--w-spot-x, 50%) var(--w-spot-y, 30%),
        rgba(232,118,27,.13), rgba(232,118,27,.05) 42%, rgba(232,118,27,0) 68%),
      radial-gradient(160px circle at var(--w-spot-x, 50%) var(--w-spot-y, 30%),
        rgba(255,255,255,.10), rgba(255,255,255,0) 70%);
    transition: background-position .08s linear;
  }
  html.warm-pointer .warm-spot { display: block; }
  html.warm-pointer main { animation: none !important; }
  html.warm-pointer main {
    transform: perspective(1400px) rotateX(var(--w-tilt-x, 0deg)) rotateY(var(--w-tilt-y, 0deg)) !important;
    transform-origin: 50% 42%;
    will-change: transform;
  }
  @media (prefers-reduced-motion: reduce) {
    .warm-spot { display: none !important; }
    html.warm-pointer main { transform: none !important; }
  }
  @media (hover: none), (pointer: coarse) {
    .warm-spot { display: none !important; }
    html.warm-pointer main { transform: none !important; }
  }
  /* 测验页返回按钮适配亮色 */
  #btn-prev { background: rgba(43, 27, 13, .07) !important; color: #2b1b0d !important; }
  #btn-prev:hover { background: rgba(43, 27, 13, .14) !important; }
}

@layer warm-skin {
  /* 页脚 */
  .site-footer {
    background: transparent !important; text-align: left !important;
    border-top: 1px solid #f0dfc9 !important;
    padding: 48px 40px 26px !important;
  }
  .site-footer::before { display: none !important; }
  .w-footer {
    display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 48px !important; align-items: start !important; max-width: 1160px !important; margin: 0 auto !important;
  }
  .w-foot-brand {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-disp), Georgia, serif; font-size: 20px; letter-spacing: .01em; color: #2b1b0d;
  }
  .w-foot-brand img { border-radius: 6px; }
  .w-foot-brand em { font-style: normal !important; font-size: .68em !important; color: #bf6410 !important; letter-spacing: .02em !important; }
  .w-foot-note { margin: 10px 0 0 !important; font-size: 13px !important; line-height: 1.85 !important; color: #8d7c6b !important; }
  .w-foot-cols { display: flex !important; gap: 56px !important; }
  .w-foot-col { display: flex; flex-direction: column; gap: 9px; }
  .w-foot-title { font-size: 11.5px !important; letter-spacing: .16em !important; color: #b6a08a !important; margin-bottom: 3px !important; }
  .w-foot-col a { font-size: 13.5px !important; color: #5a4a3a !important; text-decoration: none !important; transition: color .18s ease !important; }
  .w-foot-col a:hover { color: #bf6410 !important; }
  .w-foot-bar {
    display: flex !important; justify-content: space-between !important; align-items: center; gap: 16px;
    flex-wrap: wrap !important; max-width: 1160px !important; margin: 34px auto 0 !important; padding-top: 16px !important;
    border-top: 1px solid #f2e3d0 !important; font-size: 12.5px !important; color: #a08f7e !important;
  }
  .w-foot-meta { color: #b6a08a !important; }
  @media (max-width: 860px) {
    .w-footer { grid-template-columns: 1fr !important; gap: 26px !important; }
    .w-foot-cols { gap: 30px !important; flex-wrap: wrap !important; }
    .w-foot-bar { flex-direction: column !important; align-items: flex-start !important; gap: 6px !important; }
  }
}

@layer warm-skin {
  /* 只支持亮色, 明确声明避免浏览器强制深色把配色和二维码反相 */
  html { color-scheme: only light !important; }
  html, body { background-color: #faf3e7 !important; }
  @media (prefers-color-scheme: dark) {
    html, body { background-color: #faf3e7 !important; color: #34332e !important; }
    img, video, canvas { filter: none !important; }
  }
}
