/* ============================================================
   Idmanos 用户系统样式
   设计语言对齐站点：Open Sans / 黑灰单色 / 细线 / 无投影 / 大留白
   作用域：body.uauth（仅登录、账户页），另有少量全站微调
   ============================================================ */

/* ---------- 全站微调（页头头像、语言按钮、筛选、作品卡） ---------- */
.usr-av { display: inline-block; border-radius: 50%; overflow: hidden; flex: none; background: #ddd; }
.usr-av img { width: 100%; height: 100%; display: block; }
.usr-entry { display: inline-flex; align-items: center; margin-left: 0; text-decoration: none; }

/* 页头：语言按钮与头像间距收紧、边框变细 */
.member-container { gap: 8px; }
.lang-btn { border-width: 1px; }

/* 艺术页筛选按钮：只保留图标，不显示文字（所有屏幕宽度） */
.filter-btn .filter-label { display: none; }

/* 作品卡说明底：浅色下用卡片底色，深色交给 art.css 的媒体查询 */
.artwork-caption { background: #ffffff; }

/* 首页订阅 banner（桌面） */
html.has-sub-banner, html.has-sub-banner body { height: auto !important; min-height: 100vh; overflow-x: hidden !important; overflow-y: auto !important; }
html.has-sub-banner main { height: 100vh; min-height: 100vh; overflow: visible; }

.idmanos-sub-banner { position: relative; z-index: 5; padding: 72px 24px 96px; background: #111; color: #f5f2ec; }
.idmanos-sub-banner .isb-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.idmanos-sub-banner .isb-kicker { margin: 0 0 10px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; opacity: .6; font-weight: 700; }
.idmanos-sub-banner .isb-title { margin: 0 0 10px; font-size: clamp(24px, 3.2vw, 36px); font-weight: 500; letter-spacing: -.01em; line-height: 1.25; }
.idmanos-sub-banner .isb-sub { margin: 0; font-size: 15px; opacity: .62; }
.idmanos-sub-banner .isb-cta { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 13px 30px; border-radius: 999px; background: #f5f2ec; color: #111; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .2s ease, background-color .2s ease; }
.idmanos-sub-banner .isb-cta:hover { background: #fff; transform: translateY(-1px); }

/* 首页订阅按钮（移动端，替代 banner） */
.idmanos-mobile-member { display: none; }
@media (max-width: 768px) {
    .idmanos-sub-banner { display: none; }
    html.has-sub-banner, html.has-sub-banner body { overflow: hidden !important; height: 100% !important; }
    html.has-sub-banner main { height: auto; min-height: 100vh; }
    .idmanos-mobile-member {
        display: inline-flex; align-items: center; justify-content: center;
        margin: 14px auto 0; padding: 11px 26px; border-radius: 999px;
        background: #111; color: #fff; font-family: 'Open Sans', sans-serif;
        font-size: 14px; font-weight: 600; text-decoration: none; letter-spacing: .01em;
    }
    .idmanos-mobile-member-wrap { display: flex; justify-content: center; width: 100%; }
}

/* ============================================================
   登录 / 账户页（body.uauth）
   ============================================================ */
body.uauth {
    margin: 0;
    background: rgb(250, 250, 250);
    font-family: 'Open Sans', sans-serif;
    color: #1b1b1b;
    -webkit-font-smoothing: antialiased;
}
body.uauth .uauth-top {
    height: 64px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; border-bottom: 1px solid #eeeeee;
    background: rgba(250, 250, 250, .85);
    position: sticky; top: 0; z-index: 10;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
body.uauth .uauth-logo { height: 22px; }
body.uauth .uauth-back { font-size: 13.5px; color: #8a8a8a; text-decoration: none; }
body.uauth .uauth-back:hover { color: #1b1b1b; }
body.uauth .uauth-main {
    max-width: 840px; margin: 0 auto;
    padding: 96px 24px 0;
    min-height: 100vh; box-sizing: border-box;
    display: flex; flex-direction: column;
}
body.uauth #accApp { display: flex; flex-direction: column; flex: 1 0 auto; min-height: 0; }

/* 账户 / 登录页：去掉顶栏底部那条灰线 */
body.uauth .header,
body.uauth .header.header-scrolled { border-bottom: none; box-shadow: none; }
body.uauth .header::after { display: none; }

/* ---------- 登录 / 注册 ---------- */
body.uauth .auth-box { max-width: 380px; margin: 0 auto; }
body.uauth .auth-title { font-size: 28px; margin: 0 0 22px; font-weight: 600; letter-spacing: -.01em; }
body.uauth .auth-tabs { display: flex; gap: 22px; margin-bottom: 4px; }
body.uauth .auth-tabs button {
    background: none; border: none; font: inherit; font-size: 15px; color: #a0a0a0;
    cursor: pointer; padding: 0 0 8px; border-bottom: 1px solid transparent; transition: color .2s;
}
body.uauth .auth-tabs button.on { color: #1b1b1b; border-bottom-color: #1b1b1b; font-weight: 600; }
body.uauth .auth-form label {
    display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: #9a9a9a; font-weight: 700; margin: 20px 0 7px;
}
body.uauth .auth-form input {
    width: 100%; box-sizing: border-box; padding: 12px 14px;
    border: 1px solid #e8e8e8; border-radius: 8px;
    font: inherit; font-size: 14.5px; outline: none; background: #fff;
    transition: border-color .2s;
}
body.uauth .auth-form input:focus { border-color: #1b1b1b; }
body.uauth .btn-primary {
    width: 100%; margin-top: 24px; border: 1px solid #1b1b1b; background: #1b1b1b; color: #fff;
    border-radius: 999px; padding: 13px; font: inherit; font-weight: 600; font-size: 14.5px;
    cursor: pointer; transition: opacity .2s;
}
body.uauth .btn-primary:hover { opacity: .84; }
body.uauth .auth-links { margin-top: 18px; font-size: 13px; color: #a0a0a0; text-align: center; }
body.uauth .auth-links button {
    background: none; border: none; color: #1b1b1b; font: inherit; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px; padding: 0;
}
body.uauth .auth-msg { margin-top: 14px; font-size: 13px; min-height: 18px; }
body.uauth .auth-msg.err { color: #b3362a; }
body.uauth .auth-msg.ok { color: #2b6a45; }

/* ---------- 账户页 ---------- */
body.uauth .acc-title { font-size: 40px; margin: 0 0 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
body.uauth .acc-sub { color: #a0a0a0; font-size: 13.5px; margin: 0 0 52px; letter-spacing: .01em; }

/* 堆叠：整叠置底，一张白纸，黑色细线做错层分隔
   --fh 层高，--step 相邻层错位距离，--amp 锯齿振幅（> step 才会交叉叠压） */
body.uauth .acc-stack {
    --fh: 46px;
    --step: 25px;
    --amp: 34px;
    --strip: var(--amp);
    margin-top: auto;
    background: #fff;
    position: relative;
    padding-bottom: 0;
}
body.uauth .acc-mask {
    position: absolute; left: 0;
    top: calc(var(--step) - var(--amp));
    width: 100%; height: var(--amp);
    display: block; pointer-events: none; z-index: 1;
}
/* 每层都是独立的白色文件夹（凸起区域的遮白由 SVG 里的白块负责） */
body.uauth .fold {
    position: relative; background: #fff;
    --tab: calc(var(--amp) - var(--step));
}
/* 每层向上叠压，露出 --step 高度 */
body.uauth .fold + .fold { margin-top: calc(var(--step) - var(--fh)); }
body.uauth .acc-stack .fold:last-child { padding-bottom: 40px; }
/* 锯齿线：高度取振幅，允许越过上下相邻层 */
body.uauth .fold-shape {
    position: absolute; left: 0;
    top: calc(var(--step) - var(--amp));
    width: 100%; height: var(--amp);
    display: block; pointer-events: none; z-index: 2;
}
body.uauth .fold-h {
    position: relative; display: block; width: 100%;
    height: var(--fh, 46px); padding: 0; margin: 0;
    border: none; background: transparent; cursor: pointer;
    font: inherit; text-align: left;
}
body.uauth .fold-label {
    position: absolute;
    top: -3px; height: var(--step, 25px);
    display: flex; align-items: center;
    line-height: 1;
    white-space: nowrap;
    font-size: 13px; letter-spacing: .02em; color: #1b1b1b;
    transition: opacity .2s ease; z-index: 3;
}
/* 标签居中在各自凸起段里：偶数层 0–25%（中心 12.5%），奇数层 75–100%（中心 87.5%） */
body.uauth .fold-label.l { left: 12.5%; transform: translateX(-50%); }
body.uauth .fold-label.r { left: 87.5%; transform: translateX(-50%); }
/* 展开面板底部留出被下一层压住的高度，避免内容被盖 */
body.uauth .fold.active .fb-inner { padding-bottom: calc(var(--step) + 40px); }
/* 悬停变灰只在有鼠标的设备上生效，避免手机点完残留灰色 */
@media (hover: hover) and (pointer: fine) {
    body.uauth .fold-h:hover .fold-label { opacity: .55; }
    body.uauth .fold.active .fold-h:hover .fold-label { opacity: 1; }
}
/* 展开的那一层：字重加粗、纯黑 */
body.uauth .fold.active .fold-label {
    font-weight: 700;
    color: #000;
    opacity: 1;
    letter-spacing: .01em;
}
/* 滚动条：隐藏且不占位（页面级 + 面板级） */
html.uauth-root, body.uauth,
body.uauth .fold-body {
    scrollbar-width: none;
    -ms-overflow-style: none;
    scrollbar-gutter: auto;
}
html.uauth-root::-webkit-scrollbar,
body.uauth::-webkit-scrollbar,
body.uauth .fold-body::-webkit-scrollbar { width: 0; height: 0; display: none; }

body.uauth .fold-body {
    background: transparent;
    height: 0; overflow: hidden;
    transition: height .34s cubic-bezier(.22, .61, .36, 1);
}
body.uauth .fb-inner { padding: 6px 26px 40px; }
@keyframes accFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 概览：头像 + 身份 */
body.uauth .acc-profile { display: flex; align-items: center; gap: 26px; margin-bottom: 34px; }
body.uauth .acc-avatar { position: relative; flex: none; }
body.uauth .acc-avatar .usr-av { width: 92px; height: 92px; }
body.uauth .acc-cam {
    position: absolute; right: 1px; bottom: 1px;
    width: 29px; height: 29px; border-radius: 50%;
    border: 1px solid #e8e8e8; background: #fff; color: #444444;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; transition: border-color .2s, color .2s;
}
body.uauth .acc-cam:hover { border-color: #1b1b1b; color: #1b1b1b; }
body.uauth .acc-cam svg { width: 15px; height: 15px; }
body.uauth .acc-id .p-name { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
body.uauth .acc-id .p-mail { color: #9a9a9a; font-size: 13.5px; margin-top: 3px; }
body.uauth .acc-badge {
    display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 600;
    letter-spacing: .04em; color: #8f8f8f; border: 1px solid #e8e8e8;
    padding: 3px 11px; border-radius: 999px;
}
body.uauth .acc-badge.active { color: #1b1b1b; border-color: #1b1b1b; }

/* 头像候选（默认收起，点相机/换一批才展开） */
body.uauth .acc-cands { display: none; gap: 10px; margin: -14px 0 30px; flex-wrap: wrap; align-items: center; }
body.uauth .acc-cands.show { display: flex; }
body.uauth .acc-cand {
    width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
    border: 1px solid transparent; padding: 0; background: none; cursor: pointer;
    transition: border-color .18s, transform .18s;
}
body.uauth .acc-cand:hover { transform: translateY(-2px); }
body.uauth .acc-cand.sel { border-color: #1b1b1b; }
body.uauth .acc-shuffle {
    width: 40px; height: 40px; border-radius: 50%; padding: 0;
    border: 1px dashed #c9c9c9; background: #fff; color: #8f8f8f;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: border-color .18s, color .18s;
}
body.uauth .acc-shuffle:hover { border-color: #1b1b1b; color: #1b1b1b; }
body.uauth .acc-shuffle svg { width: 16px; height: 16px; }

/* 字段 */
body.uauth .acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 26px; }
body.uauth .field { display: flex; flex-direction: column; gap: 7px; }
body.uauth .field.full { grid-column: 1 / -1; }
body.uauth .field label {
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: #9a9a9a; font-weight: 700;
}
body.uauth .field input,
body.uauth .field select {
    padding: 11px 13px; border: 1px solid #e8e8e8; border-radius: 8px;
    font: inherit; font-size: 14px; background: #fff; outline: none;
    transition: border-color .2s; color: #1b1b1b;
}
body.uauth .field input:focus,
body.uauth .field select:focus { border-color: #1b1b1b; }

/* 按钮 */
body.uauth .btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #1b1b1b; background: #1b1b1b; color: #fff;
    border-radius: 999px; padding: 11px 26px;
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: opacity .2s, border-color .2s, color .2s;
}
body.uauth .btn:hover { opacity: .85; }
body.uauth .btn.ghost { background: #fff; color: #1b1b1b; border-color: #e8e8e8; }
body.uauth .btn.ghost:hover { border-color: #1b1b1b; opacity: 1; }
body.uauth .btn.sm { padding: 8px 18px; font-size: 13px; }
body.uauth .acc-actions { display: flex; gap: 12px; align-items: center; margin-top: 30px; flex-wrap: wrap; }

/* 分区标题 */
body.uauth .acc-hr { height: 1px; background: #eeeeee; margin: 42px 0 30px; }
body.uauth .acc-h3 {
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    color: #9a9a9a; font-weight: 700; margin: 0 0 18px;
}

/* 键值行 */
body.uauth .acc-rows { display: flex; flex-direction: column; }
body.uauth .acc-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
    padding: 15px 0; border-bottom: 1px solid #f0f0f0; font-size: 14.5px;
}
body.uauth .acc-row:last-child { border-bottom: none; }
body.uauth .acc-row .k { color: #9a9a9a; }
body.uauth .acc-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }

/* 地址 */
body.uauth .acc-addr {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    padding: 16px 0; border-bottom: 1px solid #f0f0f0;
}
body.uauth .acc-addr:last-of-type { border-bottom: none; }
body.uauth .acc-addr .d { font-size: 14.5px; }
body.uauth .acc-addr .m { color: #9a9a9a; font-size: 13px; margin-top: 4px; }
body.uauth .acc-x {
    border: none; background: none; cursor: pointer; color: #b8b8b8;
    font-size: 18px; line-height: 1; padding: 4px 6px; border-radius: 6px;
}
body.uauth .acc-x:hover { color: #1b1b1b; }
body.uauth .acc-empty { color: #a0a0a0; font-size: 13.5px; padding: 6px 0 2px; }

/* 会员 */
body.uauth .acc-perks { margin: 0 0 30px; padding: 0; list-style: none; }
body.uauth .acc-perks li {
    font-size: 14px; color: #444444; padding: 9px 0 9px 24px; position: relative;
}
body.uauth .acc-perks li::before {
    content: ''; position: absolute; left: 2px; top: 16px;
    width: 9px; height: 5px; border-left: 1px solid #1b1b1b; border-bottom: 1px solid #1b1b1b;
    transform: rotate(-45deg);
}
body.uauth .acc-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 26px; }
body.uauth .acc-plan {
    text-align: left; padding: 22px 22px 24px;
    border: 1px solid #e8e8e8; border-radius: 12px; background: #fff;
    font: inherit; cursor: pointer; transition: border-color .2s;
}
body.uauth .acc-plan:hover { border-color: #b8b8b8; }
body.uauth .acc-plan.sel { border-color: #1b1b1b; }
body.uauth .acc-plan .t { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #9a9a9a; font-weight: 700; }
body.uauth .acc-plan .p { font-size: 30px; font-weight: 500; margin-top: 10px; letter-spacing: -.01em; }
body.uauth .acc-plan .p small { font-size: 13px; color: #9a9a9a; font-weight: 400; margin-left: 2px; }
body.uauth .acc-plan .n { font-size: 12.5px; color: #9a9a9a; margin-top: 6px; }

/* 订单 */
body.uauth .acc-order {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 22px 0; border-bottom: 1px solid #f0f0f0;
}
body.uauth .acc-order:last-child { border-bottom: none; }
body.uauth .acc-order .t { font-size: 15px; font-weight: 600; }
body.uauth .acc-order .d { color: #9a9a9a; font-size: 13px; margin-top: 4px; }
body.uauth .acc-order a { font-size: 13.5px; color: #1b1b1b; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
body.uauth .acc-note { color: #a0a0a0; font-size: 13px; margin: 0 0 6px; }

/* 关于：直接用站点 about.css 的原排版，这里只做必要的容器适配 */
body.uauth .acc-about { width: 100%; }
body.uauth .acc-about .about {
    margin: 0; padding: 0; width: 100%;
    opacity: 1; animation: none; display: flex;
}
/* 关闭展开时的入场动画，避免闪动 */
body.uauth .acc-about .brand-image,
body.uauth .acc-about .team-title,
body.uauth .acc-about .brand-story,
body.uauth .acc-about .about-contact-wrapper,
body.uauth .acc-about .story-block,
body.uauth .acc-about .team-more {
    opacity: 1; transform: none; animation: none;
}
body.uauth .acc-about .brand-image-img { max-width: 100%; height: auto; }
body.uauth .acc-about .tile-head-icon { width: 16px; height: 16px; }
/* 关于：去掉与 .fb-inner 叠加的双重左右间距（只作用于 .about 的直接子区块） */
body.uauth .fold[data-k="about"] .fb-inner { padding-left: 0; padding-right: 0; }
body.uauth .acc-about > .about > .brand-image,
body.uauth .acc-about > .about > .brand-story,
body.uauth .acc-about > .about > .about-contact-wrapper { padding-left: 26px; padding-right: 26px; }
/* 内层容器不再叠加间距 */
body.uauth .acc-about .story-block,
body.uauth .acc-about .team-more,
body.uauth .acc-about .contact,
body.uauth .acc-about .team-title { padding-left: 0; padding-right: 0; }
body.uauth .acc-locked { color: #a0a0a0; font-size: 14px; }
body.uauth .acc-locked a { color: #1b1b1b; text-decoration: underline; text-underline-offset: 3px; }
body.uauth .acc-about-loading { color: #a0a0a0; font-size: 13.5px; }

/* Toast：放到顶栏下方居中，避免被底部菜单栏遮挡 */
.uauth-toast {
    position: fixed; left: 50%; top: 46%; bottom: auto;
    transform: translate(-50%, -50%) translateY(-8px);
    background: #1b1b1b; color: #fff; padding: 11px 22px; border-radius: 999px;
    font-family: 'Open Sans', sans-serif; font-size: 13.5px;
    opacity: 0; pointer-events: none; transition: .25s; z-index: 1200; max-width: 90vw;
    text-align: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
}
.uauth-toast.show { opacity: 1; transform: translate(-50%, -50%); }


/* ---------- 桌面端：白底与描边铺满屏幕宽度，内容居中 792px ---------- */
@media (min-width: 641px) {
    body.uauth .uauth-main {
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }
    body.uauth .fb-inner {
        max-width: 792px;
        margin-left: auto;
        margin-right: auto;
    }
    /* 标题与内容栏对齐 */
    body.uauth .acc-title {
        width: 100%;
        max-width: 792px;
        box-sizing: border-box;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
    body.uauth .uauth-main { padding: 62px 20px 0; }
    body.uauth .acc-title { font-size: 28px; margin-bottom: 14px; }
    body.uauth .acc-sub { margin-bottom: 34px; }
    body.uauth .acc-stack { --fh: 40px; --step: 25px; --amp: 34px; margin-left: -20px; margin-right: -20px; }
    body.uauth .acc-stack .fold:last-child { padding-bottom: 48px; }
    body.uauth .fold-h { height: var(--fh); }
    body.uauth .fold.active .fb-inner { padding-bottom: calc(var(--step) + 32px); }
    body.uauth .acc-about > .about > .brand-image,
    body.uauth .acc-about > .about > .brand-story,
    body.uauth .acc-about > .about > .about-contact-wrapper { padding-left: 20px; padding-right: 20px; }
    body.uauth .fb-inner { padding: 4px 20px 32px; }
    body.uauth .acc-profile { gap: 16px; margin-bottom: 26px; }
    body.uauth .acc-avatar .usr-av { width: 76px; height: 76px; }
    body.uauth .acc-id .p-name { font-size: 19px; }
    body.uauth .acc-grid { grid-template-columns: 1fr; gap: 18px; }
    body.uauth .acc-plans { grid-template-columns: 1fr; }
    body.uauth .acc-order { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* 账户页：不依赖 JS 时序，第 4 项（Account）始终显示选中下横线 */body.uauth[data-page="account"] .navitem:nth-child(4) span::after {
    opacity: 1;
    width: 50%;
}
body.uauth[data-page="account"] .tabitem:nth-child(4) span::after {
    opacity: 1;
    width: 60%;
}
body.uauth[data-page="account"] .tabitem:nth-child(4) span {
    opacity: 1;
    font-weight: 700;
}

/* 全站：手机端顶栏左右留白收窄，logo / 头像与内容左边缘（约 20px）对齐 */
@media (max-width: 640px) {
    .header { padding-left: 1px; padding-right: 1px; }
}

/* ==========================================================================
   移动端输入框：字号必须 >= 16px，否则 iOS Safari 聚焦时会把整个页面放大
   （这是 Safari 的默认行为，只能靠字号规避，不要用 user-scalable=no）
   ========================================================================== */

@media (max-width: 1024px), (max-height: 499px) {
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
  textarea,
  select,
  [contenteditable="true"] {
    font-size: 16px !important;
    line-height: 1.35;
  }

  /* 自定义搜索/聊天输入框同样保持 16px，外观用内边距微调 */
  .input-field,
  .search-input,
  #searchInput,
  #messageInput,
  .ap-field input {
    font-size: 16px !important;
  }
}

/* ==========================================================================
   账户页「纸张折叠」设计：深色模式适配
   原来纸面写死 #fff、文字写死 #1b1b1b，夜间模式下标题/标签贴在深色背景上
   看不见，纸面又是刺眼的纯白 —— 这里统一改成跟随主题的纸色与墨色
   ========================================================================== */
body.uauth {
  /* 浅色：暖奶油纸感，避免纯白 #fff 与冷灰 */
  --uauth-page: #ffffff;
  --uauth-paper: #ffffff;
  --uauth-ink: #1a1a1a;
  --uauth-line: #e6e6e6;
  --uauth-line-soft: #f0f0f0;
  --uauth-muted: #8f8f8f;
  --uauth-field: #ffffff;
  background: var(--uauth-page);
  color: var(--uauth-ink);
}

body.uauth .acc-stack,
body.uauth .fold {
  background: var(--uauth-paper);
}

body.uauth .fold-label {
  color: var(--uauth-ink);
}

body.uauth .fold.active .fold-label {
  color: var(--uauth-ink);
}

body.uauth .btn.ghost {
  background: var(--uauth-paper);
  color: var(--uauth-ink);
  border-color: var(--uauth-line);
}

body.uauth .acc-cam,
body.uauth .acc-shuffle,
body.uauth .acc-plan {
  background: var(--uauth-paper);
  border-color: var(--uauth-line);
}

body.uauth .acc-badge {
  border-color: var(--uauth-line);
}

body.uauth .acc-hr {
  background: var(--uauth-line-soft);
}

body.uauth .acc-row,
body.uauth .acc-addr,
body.uauth .acc-order {
  border-bottom-color: var(--uauth-line-soft);
}

body.uauth .field input,
body.uauth .field select,
body.uauth .auth-form input {
  background: var(--uauth-field);
  border-color: var(--uauth-line);
  color: var(--uauth-ink);
}

body.uauth .acc-perks li {
  color: var(--uauth-ink);
  opacity: .82;
}

body.uauth .acc-order a,
body.uauth .acc-locked a,
body.uauth .acc-id .p-name {
  color: var(--uauth-ink);
}

@media (prefers-color-scheme: dark) {
  /* 深色：暖棕黑，避免纯黑与中性深灰 */
  body.uauth {
    --uauth-page: #131313;
    --uauth-paper: #131313;
    --uauth-ink: #f2f2f2;
    --uauth-line: #2e2e2e;
    --uauth-line-soft: #242424;
    --uauth-muted: #a0a0a0;
    --uauth-field: #1a1a1a;
    background: var(--uauth-page);
    color: var(--uauth-ink);
  }

  body.uauth .acc-title,
  body.uauth .acc-sub,
  body.uauth .acc-h3,
  body.uauth .acc-note,
  body.uauth .acc-empty,
  body.uauth .acc-locked,
  body.uauth .acc-about-loading,
  body.uauth .field label,
  body.uauth .auth-form label {
    color: var(--uauth-muted);
  }

  body.uauth .acc-title {
    color: var(--uauth-ink);
  }

  body.uauth .acc-note[style] {
    color: #d8c9b6 !important;
  }

  body.uauth .acc-row .k,
  body.uauth .acc-plan .t,
  body.uauth .acc-plan .p small,
  body.uauth .acc-plan .n,
  body.uauth .acc-order .d,
  body.uauth .acc-addr .m,
  body.uauth .acc-id .p-mail,
  body.uauth .acc-x,
  body.uauth .acc-shuffle {
    color: var(--uauth-muted);
  }

  body.uauth .acc-x:hover,
  body.uauth .acc-shuffle:hover,
  body.uauth .acc-plan:hover {
    color: var(--uauth-ink);
    border-color: var(--uauth-line);
  }

  body.uauth .acc-plan.sel {
    border-color: var(--uauth-ink);
  }

  body.uauth .fold.active .fold-label {
    color: var(--uauth-ink);
  }

  /* 主按钮：夜间反色，保持对比 */
  body.uauth .btn,
  body.uauth .btn-primary {
    background: var(--uauth-ink);
    border-color: var(--uauth-ink);
    color: var(--uauth-page);
  }

  body.uauth .btn.ghost {
    background: transparent;
    color: var(--uauth-ink);
    border-color: var(--uauth-line);
  }

  body.uauth .acc-badge.active {
    color: var(--uauth-ink);
    border-color: var(--uauth-line);
  }

  body.uauth .acc-plan {
    background: var(--uauth-paper);
  }
}

/* ==========================================================================
   账户页纵向节奏
   原来 .acc-stack 用 margin-top:auto 贴底，在手机/长屏上会把整叠纸推到下面，
   标题和「概览」之间出现一大片空白；底部还会被 Tab 栏遮住
   ========================================================================== */
body.uauth .acc-stack {
  margin-top: 0;
}

body.uauth .uauth-main {
  padding-bottom: 88px;   /* 给底部 Tab 栏留出空间 */
}

@media (max-width: 1024px), (max-height: 499px) {
  body.uauth .uauth-main {
    padding-top: 76px;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  body.uauth .acc-title {
    margin-bottom: 26px;
  }
}

/* ==========================================================================
   浅色补充：把残留的纯白 / 冷灰统一换成暖色变量
   （深色同名规则在上面已经写好了，这里只在浅色生效，避免互相覆盖）
   ========================================================================== */
@media (prefers-color-scheme: light) {
  body.uauth .btn,
  body.uauth .btn-primary {
    background: var(--uauth-ink);
    border-color: var(--uauth-ink);
    color: var(--uauth-paper);
  }

  body.uauth .btn.ghost {
    background: transparent;
    color: var(--uauth-ink);
    border-color: var(--uauth-line);
  }

  body.uauth .acc-h3,
  body.uauth .acc-sub,
  body.uauth .acc-note,
  body.uauth .acc-empty,
  body.uauth .acc-locked,
  body.uauth .acc-about-loading,
  body.uauth .acc-row .k,
  body.uauth .acc-plan .t,
  body.uauth .acc-plan .p small,
  body.uauth .acc-plan .n,
  body.uauth .acc-order .d,
  body.uauth .acc-addr .m,
  body.uauth .acc-id .p-mail,
  body.uauth .acc-x,
  body.uauth .acc-shuffle,
  body.uauth .field label,
  body.uauth .auth-form label {
    color: var(--uauth-muted);
  }

  body.uauth .acc-perks li {
    color: var(--uauth-ink);
    opacity: .78;
  }

  body.uauth .acc-hr {
    background: var(--uauth-line-soft);
  }

  body.uauth .acc-row,
  body.uauth .acc-addr,
  body.uauth .acc-order {
    border-bottom-color: var(--uauth-line-soft);
  }

  body.uauth .acc-plan,
  body.uauth .acc-cam,
  body.uauth .acc-shuffle {
    background: var(--uauth-paper);
    border-color: var(--uauth-line);
  }

  body.uauth .acc-badge {
    border-color: var(--uauth-line);
  }

  body.uauth .acc-note[style] {
    color: var(--uauth-muted) !important;
  }
}

/* 展开面板底部留白：避免「保存 / 退出登录」被下一层的纸边压住 */
body.uauth .fold.active .fb-inner {
  padding-bottom: calc(var(--step, 25px) + 72px);
}

/* 层与层不再互相压住内容：去掉负的叠压间距，并给面板底部留够空间 */
body.uauth .acc-stack .fold + .fold {
  margin-top: 0;
}

body.uauth .fold.active .fb-inner {
  padding-bottom: calc(var(--step, 25px) + 56px);
}

/* ==========================================================================
   账户中心：资料卡片 / 统计 / 键值行 / 会员卡 / 列表项
   全部走主题变量，浅色深色都不出现纯白纯黑
   ========================================================================== */
.acc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.acc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--uauth-line);
  color: var(--uauth-muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.acc-tag.ok {
  border-color: #4a9e6a;
  color: #4a9e6a;
}

.acc-tag.warn {
  border-color: #c08a3e;
  color: #c08a3e;
}

.acc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.acc-stat {
  border: 1px solid var(--uauth-line);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  background: var(--uauth-field);
}

.acc-stat .sv {
  font-size: 20px;
  font-weight: 800;
  color: var(--uauth-ink);
  line-height: 1.2;
}

.acc-stat .sk {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--uauth-muted);
}

.acc-kvs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acc-kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--uauth-line-soft);
  font-size: 13px;
}

.acc-kv .k {
  color: var(--uauth-muted);
  font-weight: 600;
  flex: 0 0 auto;
}

.acc-kv .v {
  color: var(--uauth-ink);
  text-align: right;
  word-break: break-word;
}

/* 会员卡 */
.acc-mcard {
  border: 1px solid var(--uauth-line);
  border-radius: 14px;
  padding: 16px 16px 8px;
  background: var(--uauth-field);
}

.acc-mcard.on {
  border-color: var(--uauth-ink);
}

.mc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.mc-state {
  font-size: 15px;
  font-weight: 800;
  color: var(--uauth-ink);
}

.mc-plan {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--uauth-ink);
  color: var(--uauth-ink);
}

.mc-rows .acc-kv:last-child {
  border-bottom: 0;
}

/* 列表项（会员记录 / 创作作品） */
.acc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--uauth-line-soft);
}

.acc-item:last-child {
  border-bottom: 0;
}

.acc-item .it-main {
  min-width: 0;
}

.acc-item .it-t {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--uauth-ink);
}

.acc-item .it-d {
  margin-top: 3px;
  font-size: 12px;
  color: var(--uauth-muted);
  word-break: break-word;
}

/* 通知开关 */
.acc-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 4px;
}

.acc-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--uauth-ink);
  cursor: pointer;
}

.acc-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  border: 1px solid var(--uauth-line);
  background: var(--uauth-page);
  position: relative;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
  flex: 0 0 auto;
}

.acc-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--uauth-muted);
  transition: transform .18s ease, background .18s ease;
}

.acc-toggle input[type="checkbox"]:checked {
  background: var(--uauth-ink);
  border-color: var(--uauth-ink);
}

.acc-toggle input[type="checkbox"]:checked::after {
  transform: translateX(17px);
  background: var(--uauth-page);
}

/* 文本域跟随主题 */
body.uauth textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--uauth-line);
  border-radius: 10px;
  background: var(--uauth-field);
  color: var(--uauth-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
  min-height: 76px;
}

body.uauth textarea:focus {
  outline: none;
  border-color: var(--uauth-ink);
}

body.uauth input:disabled {
  color: var(--uauth-muted);
  background: var(--uauth-page);
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .acc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .acc-stat .sv {
    font-size: 18px;
  }
}

/* 账户中心：收紧纵向节奏，让「基本资料」在首屏就能看到字段 */
body.uauth .fb-inner > .acc-hr {
  margin-top: 26px;
  margin-bottom: 20px;
}

body.uauth .fb-inner > .acc-h3 {
  margin-bottom: 14px;
}

body.uauth .fb-inner > .acc-h3 + .acc-grid {
  margin-top: 0;
}

body.uauth .fb-inner > .acc-stats {
  margin: 8px 0 12px;
}

body.uauth .fb-inner > .acc-kvs + .acc-hr {
  margin-top: 20px;
}

body.uauth .fb-inner > .acc-profile {
  margin-bottom: 20px;
}

body.uauth .fb-inner > .acc-cands {
  margin-bottom: 20px;
}

/* 兑换码输入行 */
.acc-redeem {
  display: flex;
  gap: 10px;
  margin: 10px 0 4px;
}

.acc-redeem input {
  flex: 1 1 auto;
  min-width: 0;
}

.acc-redeem .btn {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 420px) {
  .acc-redeem {
    flex-wrap: wrap;
  }
  .acc-redeem .btn {
    width: 100%;
  }
}
