/* 咸鱼电竞设计系统 · 13 Identity & Notices —— 业主 2026-10-12 v7 部署
   「选择你的身份」/ 统一登录 / 注册 / 找回密码这一屏，和全站的轻提示（toast）、确认框，按玻璃风格重做。
   不分层、排在 12-glass 之后，用 #identitySessionScreen / #toast / #uiConfirmBackdrop 提权，压过 legacy 层（stage6 / tailwind / ui-redesign）的同名规则；
   legacy 里带 !important 的（toast 定位）放 hotfix 层处理。只改外观，不动结构与交互。 */

/* ═══════════════ 身份屏 ═══════════════ */
#identitySessionScreen.identity-session-screen {
  place-items: center; padding: 40px 20px;
  background:
    radial-gradient(760px 520px at 50% -12%, rgba(244, 179, 207, .17), transparent 64%),
    radial-gradient(640px 480px at 104% 104%, rgba(176, 146, 240, .11), transparent 66%),
    radial-gradient(560px 460px at -4% 92%, rgba(220, 119, 166, .08), transparent 70%),
    #0d0a0f;
}
#identitySessionScreen .identity-session-shell {
  position: relative; display: flex; flex-direction: column; gap: 0;
  padding: 24px 28px 28px; border: 0; border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 240, 248, .085), rgba(255, 240, 248, .032) 62%), rgba(22, 17, 26, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px var(--glass-edge-strong), 0 40px 90px -30px rgba(0, 0, 0, .9);
}
#identitySessionScreen .identity-session-shell:not(.identity-session-shell--center) { width: min(100%, 440px); animation: idn-in .55s cubic-bezier(.22, 1, .36, 1) backwards; }
#identitySessionScreen[data-redraw="1"] .identity-session-shell { animation: none; }
#identitySessionScreen .identity-session-shell::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(380px 200px at 12% 0%, rgba(244, 179, 207, .13), transparent 72%);
}

/* 品牌行 + 返回 */
#identitySessionScreen .identity-session-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 30px; }
#identitySessionScreen .identity-session-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
#identitySessionScreen .identity-session-brand img {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px var(--hairline-strong), 0 8px 18px -8px rgba(244, 179, 207, .55);
}
#identitySessionScreen .identity-session-mark { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#identitySessionScreen .identity-session-mark b,
#identitySessionScreen .identity-session-mark h1 { margin: 0; font-family: var(--font-serif); font-size: 15px; font-weight: 700; letter-spacing: .12em; line-height: 1.3; color: var(--text-1); }
#identitySessionScreen .identity-session-mark em { font-family: var(--font-accent); font-style: italic; font-size: 12px; line-height: 1.2; color: var(--accent); }
#identitySessionScreen .identity-session-mark p { margin: 4px 0 0; font-size: 12px; color: var(--text-3); }
#identitySessionScreen .identity-session-heading > .ghost {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  height: 36px; min-height: 36px; padding: 0 14px 0 11px; border: 0; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
#identitySessionScreen .identity-session-heading > .ghost svg { width: 15px; height: 15px; transition: transform var(--t-base) var(--ease-out); }
#identitySessionScreen .identity-session-heading > .ghost:hover svg { transform: translateX(-2px); }

/* 标题 */
#identitySessionScreen .identity-session-title { position: relative; margin: 0 0 24px; }
#identitySessionScreen .identity-session-eyebrow { display: block; margin-bottom: 4px; font-family: var(--font-accent); font-style: italic; font-size: 15px; line-height: 1.3; color: var(--accent); }
#identitySessionScreen .identity-session-title h1 { margin: 0; font-family: var(--font-serif); font-size: 28px; font-weight: 700; letter-spacing: .12em; line-height: 1.25; color: var(--text-1); }
#identitySessionScreen .identity-session-title p { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-3); }
#identitySessionScreen .identity-session-content { position: relative; display: flex; flex-direction: column; gap: 14px; }

/* 可用身份 */
#identitySessionScreen .identity-choices-panel { display: flex; flex-direction: column; gap: 12px; }
#identitySessionScreen .identity-choices-head { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
#identitySessionScreen .identity-choices-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
#identitySessionScreen .identity-choices-head h2 {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .16em; color: var(--text-3);
}
#identitySessionScreen .identity-choices-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--accent-tint); color: var(--accent);
  font-family: var(--font-num); font-size: 11px; font-weight: 600; line-height: 20px; letter-spacing: 0; text-align: center;
}
#identitySessionScreen .identity-choices-head > button {
  display: inline-flex; align-items: center; gap: 5px; width: auto;
  height: 30px; min-height: 30px; padding: 0 12px 0 10px; border: 0; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; color: var(--text-3);
}
#identitySessionScreen .identity-choices-head > button svg { width: 13px; height: 13px; }
#identitySessionScreen .identity-choices-head > button:disabled svg { animation: idn-spin .9s linear infinite; }

#identitySessionScreen .identity-choices-grid { display: flex; flex-direction: column; gap: 10px; }
#identitySessionScreen .identity-choice-card {
  --glyph: var(--accent);
  position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-rows: auto auto;
  column-gap: 14px; row-gap: 3px; align-items: center; align-content: center;
  min-height: 76px; padding: 14px; border: 0; border-radius: 18px; opacity: 1;
  background: linear-gradient(180deg, rgba(255, 240, 248, .07), rgba(255, 240, 248, .028));
  box-shadow: inset 0 1px 0 var(--glass-top), inset 0 0 0 1px var(--glass-edge);
  transition: background var(--t-fast), box-shadow var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
  animation: idn-rise .5s cubic-bezier(.22, 1, .36, 1) backwards;
}
#identitySessionScreen .identity-choice-card:nth-child(2) { animation-delay: .05s; }
#identitySessionScreen .identity-choice-card:nth-child(3) { animation-delay: .1s; }
#identitySessionScreen .identity-choice-card:nth-child(n+4) { animation-delay: .15s; }
#identitySessionScreen .identity-choice-card[data-status="active"] { cursor: pointer; }
#identitySessionScreen .identity-choice-card[data-status="active"]:hover {
  background: linear-gradient(180deg, rgba(255, 240, 248, .1), rgba(255, 240, 248, .045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px var(--glass-edge-strong), 0 18px 36px -22px rgba(0, 0, 0, .9);
  transform: translateY(-1px);
}
#identitySessionScreen .identity-choice-card button:focus-visible { outline: 0; }
#identitySessionScreen .identity-choice-card:has(button:focus-visible) { box-shadow: inset 0 0 0 1px rgba(244, 179, 207, .5), 0 0 0 3px rgba(244, 179, 207, .16); }
#identitySessionScreen .identity-choice-card[data-current="true"] {
  background: radial-gradient(260px 120px at 0% 0%, rgba(244, 179, 207, .14), transparent 72%), linear-gradient(180deg, rgba(255, 240, 248, .08), rgba(255, 240, 248, .03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(244, 179, 207, .32), 0 14px 32px -20px rgba(244, 179, 207, .45);
}
#identitySessionScreen .identity-choice-card:not([data-status="active"]) > :not(button) { opacity: .55; }

#identitySessionScreen .identity-choice-glyph {
  grid-column: 1; grid-row: 1 / 3; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: rgba(255, 255, 255, .06); background: color-mix(in srgb, var(--glyph) 14%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); color: var(--glyph);
}
#identitySessionScreen .identity-choice-glyph svg { width: 21px; height: 21px; stroke-width: 1.8; }
#identitySessionScreen .identity-choice-card .role-owner { --glyph: var(--role-owner); }
#identitySessionScreen .identity-choice-card .role-staff { --glyph: var(--role-staff); }
#identitySessionScreen .identity-choice-card .role-player { --glyph: var(--role-player); }
#identitySessionScreen .identity-choice-card .role-customer { --glyph: var(--role-customer); }
#identitySessionScreen .identity-choice-card:not([data-status="active"]) .identity-choice-glyph { --glyph: var(--text-4); }

#identitySessionScreen .identity-choice-top { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; }
#identitySessionScreen .identity-choice-type.role-tag {
  margin: 0; padding: 0; border: 0; background: none; box-shadow: none;
  font-family: var(--font-serif); font-size: 17px; font-weight: 700; letter-spacing: .1em; line-height: 1.3; color: var(--text-1);
}
#identitySessionScreen .identity-choice-state {
  flex: 0 0 auto; padding: 0 8px; border: 0; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .06); color: var(--text-3); font-size: 11px; font-weight: 600; line-height: 19px;
}
#identitySessionScreen .identity-choice-card[data-status="active"]:not([data-current]) .identity-choice-state { display: none; }
#identitySessionScreen .identity-choice-card[data-current="true"] .identity-choice-state { background: var(--accent-tint); color: var(--accent); }
#identitySessionScreen .identity-choice-card[data-status="disabled"] .identity-choice-state { background: var(--st-err-tint); color: var(--rose-400); }
#identitySessionScreen .identity-choice-card[data-status="unavailable"] .identity-choice-state { background: var(--st-warn-tint); color: var(--honey-400); }

#identitySessionScreen .identity-choice-uid { grid-column: 2; grid-row: 2; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
#identitySessionScreen .identity-choice-uid span { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; color: var(--text-4); }
#identitySessionScreen .identity-choice-uid strong { font-family: var(--font-num); font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--text-3); overflow-wrap: anywhere; }

/* 「进入」：整张卡都可点（按钮的 ::after 铺满卡片）；按钮自身不位移，否则 ::after 会缩回按钮里 */
#identitySessionScreen .identity-choice-card button {
  position: static; grid-column: 3; grid-row: 1 / 3; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: auto; height: 40px; min-height: 40px; padding: 0 15px 0 18px; border: 0; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 700; letter-spacing: .14em;
}
#identitySessionScreen .identity-choice-card button::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
#identitySessionScreen .identity-choice-card button:hover,
#identitySessionScreen .identity-choice-card button:active { transform: none; }
#identitySessionScreen .identity-choice-card button svg { width: 15px; height: 15px; transition: transform var(--t-base) var(--ease-out); }
#identitySessionScreen .identity-choice-card[data-status="active"]:hover button svg { transform: translateX(3px); }
#identitySessionScreen .identity-choice-card button:disabled {
  background: rgba(255, 255, 255, .05) !important; color: var(--text-4) !important; text-shadow: none;
  box-shadow: inset 0 0 0 1px var(--hairline) !important; filter: none; cursor: not-allowed;
}
#identitySessionScreen .identity-choice-card button:disabled svg { width: 13px; height: 13px; }
/* 切换中整列表禁用：卡片不再浮起 */
#identitySessionScreen .identity-choice-card[data-status="active"]:has(button:disabled) { cursor: progress; transform: none; }

/* 骨架 + 空 */
#identitySessionScreen .identity-choice-skel {
  height: 76px; border-radius: 18px;
  background: linear-gradient(100deg, rgba(255, 240, 248, .035) 30%, rgba(255, 240, 248, .085) 50%, rgba(255, 240, 248, .035) 70%);
  background-size: 220% 100%; box-shadow: inset 0 0 0 1px var(--glass-edge);
  animation: idn-shimmer 1.4s ease-in-out infinite;
}
#identitySessionScreen .identity-choice-skel + .identity-choice-skel { animation-delay: .12s; opacity: .7; }
#identitySessionScreen .identity-session-note {
  display: block; padding: 28px 12px; border: 0; border-radius: 18px; text-align: center;
  background: rgba(255, 240, 248, .025); box-shadow: inset 0 0 0 1px var(--glass-edge);
  font-size: 13px; line-height: 1.5; color: var(--text-4);
}

/* 状态：一枚胶囊，指示点 / 转圈按 data-tone（文字被 textContent 整体覆写，图标只能走伪元素） */
#identitySessionScreen .identity-session-status { display: none; }
#identitySessionScreen .identity-session-status.show {
  position: relative; display: flex; align-items: center; gap: 9px; align-self: center;
  width: fit-content; max-width: 100%; margin: 18px auto 0; padding: 7px 15px 7px 12px; border: 0; border-radius: var(--r-pill);
  background: rgba(255, 240, 248, .05); box-shadow: inset 0 0 0 1px var(--glass-edge);
  font-size: 12.5px; line-height: 1.4; color: var(--text-2); animation: idn-fade .3s var(--ease-out) backwards;
}
#identitySessionScreen .identity-session-status.show::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: var(--sky-400); box-shadow: 0 0 0 3px rgba(145, 185, 240, .16);
}
#identitySessionScreen .identity-session-status.show[data-tone="loading"]::before {
  width: 13px; height: 13px; box-sizing: border-box; background: none; box-shadow: none;
  border: 2px solid rgba(244, 179, 207, .22); border-top-color: var(--accent); animation: idn-spin .8s linear infinite;
}
#identitySessionScreen .identity-session-status.show[data-tone="success"]::before { background: var(--mint-400); box-shadow: 0 0 0 3px rgba(134, 212, 171, .16); }
#identitySessionScreen .identity-session-status.show[data-tone="error"] { color: #f6b3ba; }
#identitySessionScreen .identity-session-status.show[data-tone="error"]::before { background: var(--rose-400); box-shadow: 0 0 0 3px rgba(242, 143, 152, .16); }
#identitySessionScreen .identity-session-status i,
#identitySessionScreen .identity-session-status svg { display: none; }

#identitySessionScreen .identity-session-error { display: none; }
#identitySessionScreen .identity-session-error.show {
  position: relative; display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 11px 14px; border: 0; border-radius: 14px;
  background: rgba(242, 143, 152, .08); box-shadow: inset 0 0 0 1px rgba(242, 143, 152, .22);
  font-size: 13px; line-height: 1.55; color: #f6b3ba; animation: idn-fade .3s var(--ease-out) backwards;
}
#identitySessionScreen .identity-session-error.show::before {
  content: "!"; flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  background: rgba(242, 143, 152, .2); color: var(--rose-400);
  font-family: var(--font-num); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* 表单（统一登录 / 注册 / 找回密码） */
#identitySessionScreen .identity-session-form { display: flex; flex-direction: column; gap: 14px; padding: 0; }
#identitySessionScreen .identity-session-form .field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; }
#identitySessionScreen .identity-session-form label { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--text-3); }
#identitySessionScreen .identity-session-form input {
  width: 100%; height: 46px; min-height: 46px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--bg-sunken); color: var(--text-1); font-size: 15px;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
#identitySessionScreen .identity-session-form input::placeholder { color: var(--text-4); }
#identitySessionScreen .identity-session-form input:hover { border-color: var(--hairline-strong); }
#identitySessionScreen .identity-session-form input:focus { border-color: var(--accent); outline: 0; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35), 0 0 0 3px var(--accent-tint); }
#identitySessionScreen .identity-session-form .sms-code-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; align-items: end; gap: 8px; }
#identitySessionScreen .identity-session-form .sms-code-row > button { height: 46px; min-height: 46px; padding: 0 10px; border: 0; border-radius: var(--r-md); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
#identitySessionScreen .captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) 118px 46px; align-items: end; gap: 8px; }
#identitySessionScreen .captcha-row input { letter-spacing: .16em; text-transform: uppercase; }
#identitySessionScreen .captcha-image { width: 118px; height: 46px; padding: 0; overflow: hidden; border: 0; border-radius: var(--r-md); background: #f4eef2; box-shadow: inset 0 0 0 1px var(--hairline-strong); cursor: pointer; }
#identitySessionScreen .captcha-placeholder { display: grid; place-items: center; height: 100%; font-size: 12px; color: #6b5562; }
#identitySessionScreen .captcha-refresh { width: 46px; height: 46px; min-height: 46px; padding: 0; border: 0; border-radius: var(--r-md); justify-content: center; }
#identitySessionScreen .captcha-refresh span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#identitySessionScreen .captcha-refresh svg { width: 16px; height: 16px; }
#identitySessionScreen .identity-session-form .identity-session-actions { display: flex; margin-top: 8px; }
#identitySessionScreen .identity-session-form .identity-session-actions .primary {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; min-height: 48px; border: 0; border-radius: var(--r-pill); font-size: 15px; font-weight: 700; letter-spacing: .2em;
}
#identitySessionScreen .identity-session-form .identity-session-actions .primary svg { width: 17px; height: 17px; }
#identitySessionScreen .identity-auth-switch { margin-top: 2px; text-align: center; font-size: 12.5px; color: var(--text-4); }
#identitySessionScreen .identity-auth-switch button {
  height: auto; min-height: 0; padding: 0 2px; border: 0; background: none; box-shadow: none;
  color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
#identitySessionScreen .identity-auth-switch button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 手机：卡片去掉，内容直接铺在画布上（同登录页） */
@media (max-width: 560px) {
  #identitySessionScreen.identity-session-screen { place-items: start center; padding: calc(28px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom)); }
  #identitySessionScreen .identity-session-shell:not(.identity-session-shell--center) { width: 100%; padding: 0; background: none; box-shadow: none; border-radius: 0; }
  #identitySessionScreen .identity-session-shell:not(.identity-session-shell--center)::before { display: none; }
  #identitySessionScreen .identity-session-heading { margin-bottom: 40px; }
  #identitySessionScreen .identity-session-title h1 { font-size: 26px; }
  #identitySessionScreen .identity-choice-card { grid-template-columns: 42px minmax(0, 1fr) auto; column-gap: 12px; min-height: 72px; padding: 13px 12px 13px 13px; }
  #identitySessionScreen .identity-choice-glyph { width: 42px; height: 42px; border-radius: 13px; }
  #identitySessionScreen .identity-choice-card button { height: 38px; min-height: 38px; padding: 0 13px 0 16px; }
}
/* ≤640 旧层把「换一张」藏了（点图即换），这里跟着收成两列 */
@media (max-width: 640px) {
  #identitySessionScreen .captcha-row { grid-template-columns: minmax(0, 1fr) 118px; }
}

/* ═══════════════ 轻提示 toast ═══════════════ */
/* 底部居中一枚玻璃胶囊，粉点开头；手机在底栏上方。位置 / 位移的 !important 放 hotfix 层——
   ui-redesign.css 在 legacy 层用 !important 钉在右上角，层内 !important 只有更早声明的 hotfix 压得住。 */
html body #toast.toast {
  display: flex; align-items: center; gap: 10px; min-width: 0; max-width: min(440px, calc(100vw - 32px));
  padding: 11px 20px 11px 15px; border: 0; border-radius: var(--r-pill);
  background: rgba(36, 28, 42, .78); -webkit-backdrop-filter: var(--glass-float-blur); backdrop-filter: var(--glass-float-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13), 0 0 0 1px var(--glass-edge-strong), 0 22px 50px -18px rgba(0, 0, 0, .9);
  color: var(--text-1); font-size: 13.5px; font-weight: 500; line-height: 1.45; letter-spacing: .02em;
  opacity: 0; pointer-events: none;
}
html body #toast.toast::before {
  content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(244, 179, 207, .18), 0 0 12px rgba(244, 179, 207, .7);
}
html body #toast.toast.show { pointer-events: auto; }
@layer hotfix {
  html body #toast.toast {
    top: auto !important; right: auto !important; left: 50% !important; bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
    width: max-content !important; transform: translate(-50%, 14px) scale(.96) !important;
    transition: opacity .22s cubic-bezier(.2, .7, .2, 1), transform .42s cubic-bezier(.22, 1, .36, 1) !important;
  }
  html body #toast.toast.show { opacity: 1 !important; transform: translate(-50%, 0) scale(1) !important; }
  @media (max-width: 980px) {
    html body #toast.toast { bottom: calc(var(--bottom-nav-h, 60px) + 16px + env(safe-area-inset-bottom, 0px)) !important; }
  }
  @media (prefers-reduced-motion: reduce) {
    html body #toast.toast { transition: opacity .12s linear !important; }
  }
}

/* ═══════════════ 确认框 ═══════════════ */
#uiConfirmBackdrop.ui-confirm-backdrop {
  padding: 20px; background: rgba(6, 3, 8, .5);
  -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%);
  transition: opacity .22s var(--ease-out);
}
#uiConfirmBackdrop .ui-confirm-dialog {
  --tone: var(--rose-400); --tone-tint: rgba(242, 143, 152, .14);
  position: relative; display: flex; flex-direction: column; gap: 0;
  width: min(400px, 100%); padding: 26px 26px 22px; border: 0; border-radius: 26px; outline: 0;
  background: radial-gradient(340px 180px at 0% 0%, color-mix(in srgb, var(--tone) 12%, transparent), transparent 72%), var(--glass-float-bg);
  -webkit-backdrop-filter: var(--glass-float-blur); backdrop-filter: var(--glass-float-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .11), 0 0 0 1px var(--glass-edge-strong), 0 40px 90px -24px rgba(0, 0, 0, .95);
  transform: translateY(10px) scale(.96); opacity: 0;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1), opacity .22s var(--ease-out);
}
#uiConfirmBackdrop[data-tone="primary"] .ui-confirm-dialog { --tone: var(--accent); --tone-tint: var(--accent-tint); }
#uiConfirmBackdrop.show .ui-confirm-dialog { transform: none; opacity: 1; }
#uiConfirmBackdrop .ui-confirm-icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin: 0 0 16px; border: 0; border-radius: 50%;
  background: var(--tone-tint); color: var(--tone); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 28%, transparent);
}
#uiConfirmBackdrop .ui-confirm-icon svg { width: 20px; height: 20px; }
#uiConfirmBackdrop .ui-confirm-close {
  position: absolute; top: 16px; right: 16px; display: grid; place-items: center;
  width: 34px; height: 34px; min-height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--glass-edge); color: var(--text-3);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-base) var(--ease-out);
}
#uiConfirmBackdrop .ui-confirm-close:hover { background: rgba(255, 255, 255, .1); color: var(--text-1); transform: rotate(90deg); }
#uiConfirmBackdrop .ui-confirm-close svg { width: 16px; height: 16px; }
#uiConfirmBackdrop .ui-confirm-copy h2 { margin: 0; padding-inline-end: 36px; font-family: var(--font-serif); font-size: 20px; font-weight: 700; letter-spacing: .1em; line-height: 1.35; color: var(--text-1); }
#uiConfirmBackdrop .ui-confirm-copy p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--text-3); }
#uiConfirmBackdrop .ui-confirm-copy p:empty { display: none; }
#uiConfirmBackdrop .ui-confirm-detail { margin-top: 14px; padding: 11px 14px; border: 0; border-radius: 14px; background: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--hairline); font-size: 12.5px; line-height: 1.6; color: var(--text-2); }
#uiConfirmBackdrop .ui-confirm-field { margin-top: 16px; gap: 8px; }
#uiConfirmBackdrop .ui-confirm-field label { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--text-3); }
#uiConfirmBackdrop .ui-confirm-field textarea { min-height: 92px; padding: 11px 13px; border: 1px solid var(--hairline); border-radius: 14px; background: var(--bg-sunken); color: var(--text-1); font-size: 14px; }
#uiConfirmBackdrop .ui-confirm-field textarea:focus { border-color: var(--accent); outline: 0; }
#uiConfirmBackdrop .ui-confirm-field small { font-size: 11.5px; color: var(--text-4); }
#uiConfirmBackdrop .ui-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding: 0; }
#uiConfirmBackdrop .ui-confirm-actions button { min-width: 96px; height: 42px; min-height: 42px; padding: 0 20px; border: 0; border-radius: var(--r-pill); font-size: 14px; font-weight: 700; letter-spacing: .12em; }
@media (max-width: 640px) {
  #uiConfirmBackdrop.ui-confirm-backdrop { align-items: end; padding: 0; }
  #uiConfirmBackdrop .ui-confirm-dialog {
    width: 100%; padding: 26px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0;
    transform: translateY(32px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .11), 0 0 0 1px var(--glass-edge-strong), 0 -20px 60px -20px rgba(0, 0, 0, .9);
  }
  #uiConfirmBackdrop .ui-confirm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #uiConfirmBackdrop[data-mode="notice"] .ui-confirm-actions { grid-template-columns: minmax(0, 1fr); }
  #uiConfirmBackdrop .ui-confirm-actions button { width: 100%; min-width: 0; height: 46px; min-height: 46px; }
}

/* ── 老板端：状态条 / 员工入职 / 资料空值（业主 2026-10-12 v7 部署） ──
   .identity-customer-state 原来是 tailwind 里一块灰底长条 + 图标；现在和身份屏同一套胶囊：
   左侧指示点 / 转圈按 data-tone，读取失败换成玫瑰色卡 + 「重试」小胶囊。 */
.identity-customer-state {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; width: fit-content; max-width: 100%; min-width: 0;
  margin: 0; padding: 8px 16px 8px 13px; border: 0; border-radius: var(--r-pill);
  background: rgba(255, 240, 248, .05); box-shadow: inset 0 0 0 1px var(--glass-edge);
  color: var(--text-2); font-size: 12.5px; line-height: 1.45; animation: idn-fade .3s var(--ease-out) backwards;
}
.identity-customer-state::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: var(--sky-400); box-shadow: 0 0 0 3px rgba(145, 185, 240, .16);
}
.identity-customer-state > span { min-width: 0; overflow-wrap: anywhere; }
.identity-customer-state[data-tone="loading"]::before {
  width: 13px; height: 13px; box-sizing: border-box; background: none; box-shadow: none;
  border: 2px solid rgba(244, 179, 207, .22); border-top-color: var(--accent); animation: idn-spin .8s linear infinite;
}
.identity-customer-state[data-tone="success"]::before { background: var(--mint-400); box-shadow: 0 0 0 3px rgba(134, 212, 171, .16); }
.identity-customer-state[data-tone="error"] {
  align-items: center; width: auto; padding: 10px 10px 10px 14px; border-radius: 14px;
  background: rgba(242, 143, 152, .08); box-shadow: inset 0 0 0 1px rgba(242, 143, 152, .22); color: #f6b3ba;
}
.identity-customer-state[data-tone="error"]::before {
  content: "!"; width: 18px; height: 18px; background: rgba(242, 143, 152, .2); box-shadow: none; color: var(--rose-400);
  font-family: var(--font-num); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.identity-customer-state[data-tone="error"] > span { flex: 1 1 160px; }
.identity-customer-state button {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; min-height: 32px; margin-left: auto; padding: 0 14px;
  border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600;
}
.identity-customer-state button svg { width: 14px; height: 14px; }
.identity-customer-state button span { color: inherit; font-size: inherit; }
/* 整页读取中 / 失败：居中一枚，不再套一张空卡 */
.boss-page > .identity-customer-state, .dashboard-page > .identity-customer-state { margin: 56px auto; }
.boss-page > .identity-customer-state[data-tone="error"], .dashboard-page > .identity-customer-state[data-tone="error"] { width: min(440px, 100%); }
#identityCustomerProfileForm > .identity-customer-state { grid-column: 1 / -1; }

/* 员工入职：邀请码 | 性别 | 核销，一行排开；手机竖排、按钮拉满 */
.xy-join .identity-customer-section { display: block; margin: 0; padding: 4px 0 0; border: 0; background: none; }
.xy-join .identity-customer-form {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; align-items: end; gap: 12px; margin: 0;
}
.xy-join .identity-customer-form .field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; }
.xy-join .identity-customer-form label { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.xy-join .identity-customer-form :is(input, select) {
  width: 100%; height: 46px; min-height: 46px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--bg-sunken); color: var(--text-1); font-size: 15px;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.xy-join .identity-customer-form input { font-family: var(--font-num); letter-spacing: .06em; }
.xy-join .identity-customer-form input::placeholder { color: var(--text-4); font-family: inherit; letter-spacing: .02em; }
.xy-join .identity-customer-form :is(input, select):hover { border-color: var(--hairline-strong); }
.xy-join .identity-customer-form :is(input, select):focus { border-color: var(--accent); outline: 0; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35), 0 0 0 3px var(--accent-tint); }
.xy-join .identity-customer-form > button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; min-height: 46px; padding: 0 24px;
  border-radius: var(--r-pill); font-size: 14px; font-weight: 600; letter-spacing: .12em; white-space: nowrap;
}
.xy-join .identity-customer-form > button svg { width: 16px; height: 16px; }
.xy-join .identity-customer-form > button span { color: inherit; font-size: inherit; }
.xy-join .identity-customer-section > .identity-customer-state { margin-top: 14px; }
@media (max-width: 640px) {
  .xy-join .identity-customer-form { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .xy-join .identity-customer-form > button { width: 100%; }
}

/* 个人资料格子里的空值（未填写 / 未绑定）用弱色，和真数据区分开 */
.xy-pg .pg-field dd .pg-field-muted { color: var(--text-4); font-weight: 500; }

@keyframes idn-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes idn-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes idn-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes idn-spin { to { transform: rotate(360deg); } }
@keyframes idn-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

@media (prefers-reduced-motion: reduce) {
  #identitySessionScreen *, #identitySessionScreen *::before { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  #identitySessionScreen .identity-session-status.show[data-tone="loading"]::before { animation: idn-spin 1.6s linear infinite !important; }
  .identity-customer-state { animation: none; }
  .identity-customer-state[data-tone="loading"]::before { animation-duration: 1.6s; }
  #uiConfirmBackdrop .ui-confirm-dialog { transition: opacity .12s linear !important; }
}
/* 一行的输入（改标题这类短字，openUiDialog singleLine）：和普通输入框一样高，不留三行空框 */
#uiConfirmBackdrop .ui-confirm-field.is-single textarea { min-height: 0; height: 44px; margin-bottom: 8px; padding: 11px 13px; border-radius: 12px; resize: none; overflow: hidden; white-space: nowrap; }
#uiConfirmBackdrop .ui-confirm-field.is-single small:empty { display: none; }

/* 右上角切身份（第 14 项，xy/30-identity.js）：电脑和手机都是按钮下方小菜单 */
.user-chip[role="button"] { cursor: pointer; }
/* 玻璃拟态：半透明 + 背后模糊（变量在 xy/12-glass.css），比例收小 */
.xy-idmenu { position: fixed; z-index: 1200; width: 188px; padding: 5px; border-radius: 14px; background: linear-gradient(180deg, rgba(255, 238, 247, .12), rgba(255, 238, 247, .05)), rgba(36, 24, 38, .42); -webkit-backdrop-filter: var(--glass-float-blur); backdrop-filter: var(--glass-float-blur); box-shadow: inset 0 1px 0 var(--glass-top), 0 0 0 1px var(--glass-edge-strong), 0 18px 44px -16px rgba(0, 0, 0, .7); }
.xy-idmenu-head { margin: 0; padding: 6px 9px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.xy-idmenu-row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 0 9px; border-radius: 9px; font-size: 13px; color: var(--text-1); cursor: pointer; }
.xy-idmenu-row:hover:not([disabled]), .xy-idmenu-row:focus-visible { background: var(--glass-3); }
.xy-idmenu-row.is-on { cursor: default; color: var(--accent); }
.xy-idmenu-row svg { width: 15px; height: 15px; flex: none; }
.xy-idmenu-row span { flex: 1; }
.xy-idmenu-row small { font-size: 11px; color: var(--text-4); }
.xy-idmenu-tick { color: var(--accent); }
/* 没打勾的行也留出勾的位置，UID 才能上下对齐 */
.xy-idmenu-row:not(.is-on)::after { content: ""; width: 15px; flex: none; }
