/* Release WCP-0120: distinct cached asset identity. */
/* Final single style authority: one phone DOM, no override layer. */
/* One desktop UI — single authoritative style layer.
   Per-app controls are always independent:
   --icon-shell controls only the icon frame/background;
   --icon-logo controls only the logo artwork;
   --icon-scale controls only the logo size. */
:root {
  --app-height: 100vh;
  --screen-max: 460px;
  --status-h: 50px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --page-content-start: calc(var(--status-h) + var(--safe-top) + 8px);
  --settings-surface-radius: 8px;
  --settings-title-size: 32px;
  --settings-title-weight: 600;
  --settings-title-font: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --page-title-font: "Source Han Sans SC", "Noto Sans SC", "HarmonyOS Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --app-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --wallpaper-base: #C9C9C9;
  --wallpaper-image: radial-gradient(circle, #FFEEF2 0 3.85px, transparent 4.35px), radial-gradient(circle, #FFEEF2 0 3.85px, transparent 4.35px);
  --wallpaper-size: 49px 49px;
  --wallpaper-position: 13.5px 14.5px, 37.5px 38.5px;
  color-scheme: light;
  font-family: var(--app-font-family);
}

* { box-sizing: border-box; }
html, body {
  width: 100%;
  height: var(--app-height);
  min-height: var(--app-height);
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  position: fixed;
  inset: 0;
  min-height: 0;
  overflow: hidden;
  color: #111111;
  background: #C9C9C9;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
button, input, textarea, select { font: inherit; }
button { border: 0; }
#MergedPhone :is(button, [role="button"], a, label) {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
#MergedPhone button:focus { outline: 0; }
[hidden] { display: none; }

.merged-phone {
  position: absolute;
  top: 0;
  left: 50%;
  isolation: isolate;
  width: min(100vw, var(--screen-max));
  height: var(--app-height);
  min-height: 0;
  overflow: hidden;
  transform: translateX(-50%);
  background-color: var(--wallpaper-base);
  background-image: var(--wallpaper-image);
  background-size: var(--wallpaper-size);
  background-position: var(--wallpaper-position);
}


/* Startup is a single transaction: no default-state paint is shown before IndexedDB hydration completes. */
.merged-phone.is-hydrating {
  visibility: hidden;
  pointer-events: none;
}

.merged-phone.is-status-bar-hidden {
  --status-h: 0px;
  --safe-top: 0px;
}
.merged-phone.is-status-bar-hidden .status-bar {
  display: none;
}

.status-bar {
  height: calc(var(--status-h) + var(--safe-top));
  padding: var(--safe-top) 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #111111;
  user-select: none;
  pointer-events: none;
}
.status-time {
  min-width: 64px;
  font-size: 20px;
  font-weight: 680;
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.status-right {
  min-width: 118px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.signal-icon { width: 24px; height: 16px; flex: 0 0 auto; }
.wifi-icon { width: 25px; height: 18px; flex: 0 0 auto; margin-left: -2px; }
.battery { position: relative; width: 35px; height: 16px; flex: 0 0 auto; margin-left: -2px; }
.battery-shell { position: relative; width: 30px; height: 16px; overflow: hidden; border-radius: 5px; background: #D5D5D5; }
.battery-level { position: absolute; inset: 0 auto 0 0; width: 80%; background: #111111; }
.battery-num { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; color: #FFFFFF; font-size: 15px; font-weight: 800; line-height: 1; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.battery-cap { position: absolute; left: 31px; top: 50%; width: 3px; height: 5px; transform: translateY(-50%); border-radius: 0 999px 999px 0; background: #D5D5D5; }



/* Home: final DOM topology, one icon-size source, no compatibility layer. */
.desktop-layer, .lock-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.desktop-layer {
  z-index: 1;
  background-color: var(--wallpaper-base);
  background-image: var(--wallpaper-image);
  background-size: var(--wallpaper-size);
  background-position: var(--wallpaper-position);
  --app-shell-size: 60px;
  --desktop-icon-radius: 17px;
  --desktop-label-size: 12px;
  --home-page-top: calc(var(--status-h) + var(--safe-top) + 10px);
  --home-dock-h: 84px;
  --home-dock-bottom: max(34px, calc(var(--safe-bottom) + 28px));
  --home-page-gap: 20px;
  --home-horizontal-gutter: 12px;
  --home-dock-side: 12px;
  --home-cell: 84px;
  --home-row-step: 88px;
}
.desktop-layer .phone-screen { position: relative; width: 100%; height: 100%; min-height: 100%; }
.desktop-layer .desktop-status-bar { position: absolute; inset: 0 0 auto; z-index: 5; }
.desktop-layer .home-canvas { position: absolute; inset: 0; z-index: 1; overflow: hidden; touch-action: none; }
.desktop-layer .app-page-viewport {
  position: absolute;
  top: var(--home-page-top);
  right: 0;
  bottom: calc(var(--home-dock-h) + var(--home-dock-bottom) + var(--home-page-gap));
  left: 0;
  pointer-events: none;
}
/* The tile layer is never shown at its default origin. The only reveal point is a successful canonical layout commit. */
.desktop-layer .app-tile-layer { position: absolute; inset: 0; z-index: 3; overflow: hidden; visibility: hidden; }
#MergedPhone.is-desktop-positioned .desktop-layer .app-tile-layer { visibility: visible; }
.desktop-layer .app-tile {
  --icon-shell: #FFF2F5;
  --icon-logo: #D8D8DD;
  --icon-scale: 1;
  --tile-wiggle-duration: 920ms;
  --tile-wiggle-delay: 0ms;
  position: absolute;
  top: 0;
  left: 0;
  width: var(--home-cell);
  height: var(--home-row-step);
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: default;
  transition: opacity .16s ease, filter .16s ease;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.desktop-layer .app-tile-motion {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: var(--app-shell-size) 16px;
  align-content: start;
  justify-items: center;
  gap: 5px;
  transform-origin: 50% 50%;
}
.desktop-layer .home-canvas.is-motion-ready .app-tile:not(.is-drag-source) {
  transition: transform .24s cubic-bezier(.2,.8,.2,1), opacity .16s ease, filter .16s ease;
}
.desktop-layer .app-tile.is-dock-surface {
  width: var(--app-shell-size);
  height: var(--app-shell-size);
}
.desktop-layer .app-tile.is-dock-surface .app-tile-motion {
  grid-template-rows: var(--app-shell-size);
  align-content: center;
}
.desktop-layer .app-tile.is-dock-surface .app-label { display: none; }
.desktop-layer .app-dock {
  position: absolute;
  right: var(--home-dock-side);
  bottom: var(--home-dock-bottom);
  left: var(--home-dock-side);
  z-index: 2;
  height: var(--home-dock-h);
  margin: 0;
  padding: 6px 8px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 26px;
  background: rgba(245,245,255,.35);
  box-shadow: 0 15px 40px rgba(0,0,0,.15), inset 0 0 0 .5px rgba(255,255,255,.2);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  pointer-events: none;
}


/* Desktop edit controls use the same static desktop hierarchy; they appear only in edit mode. */
.desktop-layer .desktop-edit-controls {
  --desktop-edit-control-height: 31px;
  --desktop-edit-control-shell: rgba(20,20,22,.92);
  --desktop-edit-control-ink: #FFFFFF;
  position: absolute;
  top: max(10px, calc(var(--safe-top) + 8px));
  right: 17px;
  left: 17px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.desktop-layer .desktop-edit-controls[hidden] { display: none; }
.desktop-layer .desktop-edit-add-button,
.desktop-layer .desktop-edit-done-button {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  pointer-events: auto;
}
/* Both controls draw from one shell token: the left is a circle, the right is a pill. */
.desktop-layer .desktop-edit-add-button {
  width: var(--desktop-edit-control-height);
  height: var(--desktop-edit-control-height);
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--desktop-edit-control-ink);
  background: var(--desktop-edit-control-shell);
  box-shadow: 0 2px 8px rgba(17,17,17,.10);
}
.desktop-layer .desktop-edit-add-button svg {
  width: 16px;
  height: 16px;
  display: block;
}
.desktop-layer .desktop-edit-done-button {
  min-width: 57px;
  height: var(--desktop-edit-control-height);
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--desktop-edit-control-ink);
  background: var(--desktop-edit-control-shell);
  box-shadow: 0 2px 8px rgba(17,17,17,.10);
  font: 600 14px/1 var(--app-font-family);
  letter-spacing: .01em;
}
.desktop-layer .desktop-edit-add-button:active,
.desktop-layer .desktop-edit-done-button:active { transform: scale(.94); opacity: .78; }
.desktop-layer .desktop-edit-add-button:focus,
.desktop-layer .desktop-edit-add-button:focus-visible,
.desktop-layer .desktop-edit-done-button:focus,
.desktop-layer .desktop-edit-done-button:focus-visible { outline: 0; }
#MergedPhone.is-dark-mode .desktop-layer .desktop-edit-controls {
  --desktop-edit-control-shell: rgba(245,245,247,.95);
  --desktop-edit-control-ink: #171717;
}

/* The canonical tile never moves during drag. It remains in its rendered grid slot and only the permanent fixed shadow follows the pointer. */
.desktop-layer .app-tile.is-drag-source {
  opacity: 0;
  pointer-events: none;
  transition: none;
}
.desktop-drag-shadow {
  --app-shell-size: 60px;
  --icon-shell: #FFF2F5;
  --icon-logo: #D8D8DD;
  --icon-label: #101014;
  --icon-scale: 1;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483000;
  width: var(--desktop-drag-width, 60px);
  height: var(--desktop-drag-height, 76px);
  display: grid;
  place-items: start center;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-1000px, -1000px, 0);
  transition: opacity .12s ease;
  will-change: transform;
}
.desktop-drag-shadow.is-active { visibility: visible; opacity: 1; }
.desktop-drag-shadow .app-tile-motion {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: var(--app-shell-size) 16px;
  align-content: start;
  justify-items: center;
  gap: 5px;
  transform: scale(1.075);
  filter: drop-shadow(0 14px 18px rgba(17,17,17,.23));
}
.desktop-drag-shadow.is-dock-source .app-tile-motion { grid-template-rows: var(--app-shell-size); align-content: center; }
.desktop-drag-shadow.is-dock-source .app-label { display: none; }
.desktop-drag-shadow .icon-box {
  width: var(--app-shell-size);
  height: var(--app-shell-size);
  display: grid;
  place-items: center;
  border-radius: var(--desktop-icon-radius, 17px);
  color: var(--icon-logo);
  background: var(--icon-shell);
  background-size: cover;
  background-position: center;
}
.desktop-drag-shadow .icon-svg { width: calc(var(--app-shell-size) * var(--icon-scale)); height: calc(var(--app-shell-size) * var(--icon-scale)); fill: currentColor; }
.desktop-drag-shadow .app-label { max-width: 100%; height: 16px; overflow: hidden; color: var(--icon-label); font-size: var(--desktop-label-size, 12px); line-height: 16px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.desktop-drag-shadow[data-icon-material="frosted"] .icon-box { border: 1px solid rgba(255,255,255,.42); background: rgba(255,255,255,.26); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.18); backdrop-filter: blur(18px) saturate(145%); -webkit-backdrop-filter: blur(18px) saturate(145%); }
.desktop-drag-shadow[data-icon-material="transparent"] .icon-box { border: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.desktop-drag-shadow.has-custom-icon .icon-svg { opacity: 0; }
.desktop-layer .page-indicators {
  position: absolute;
  left: 50%;
  bottom: calc(var(--home-dock-h) + var(--home-dock-bottom) + 7px);
  z-index: 4;
  display: flex;
  min-height: 8px;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.desktop-layer .page-indicators .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #CFCFD5;
  transition: width .2s ease, background .2s ease;
}
.desktop-layer .page-indicators .dot.active {
  width: 16px;
  border-radius: 999px;
  background: #8F8F96;
}
.desktop-layer .home-canvas.is-dock-target .app-dock {
  background: rgba(245,245,255,.56);
  border-color: rgba(255,255,255,.74);
}
.desktop-layer .home-canvas.is-editing .app-tile:not(.is-drag-source) .app-tile-motion {
  animation: independentHomeJiggle var(--tile-wiggle-duration) cubic-bezier(.42,.03,.58,.97) var(--tile-wiggle-delay) infinite both;
  animation-play-state: running;
  will-change: transform;
}
@keyframes independentHomeJiggle {
  0%, 100% { transform: translate3d(-.55px,.18px,0) rotate(-1.42deg); }
  24% { transform: translate3d(.62px,-1.02px,0) rotate(1.34deg); }
  50% { transform: translate3d(-.24px,-.18px,0) rotate(-.72deg); }
  76% { transform: translate3d(.48px,.82px,0) rotate(1.53deg); }
}
.desktop-layer .home-canvas:not(.is-editing) .app-tile-motion { animation: none; transform: none; }
/* Icon frame and artwork use independent variables. */
.desktop-layer .app-tile:active .icon-box { transform: scale(.94); }
.desktop-layer .icon-box {
  width: var(--app-shell-size);
  height: var(--app-shell-size);
  display: grid;
  place-items: center;
  flex: 0 0 var(--app-shell-size);
  overflow: hidden;
  border-radius: var(--desktop-icon-radius);
  background: var(--icon-shell);
  transform: translateZ(0);
  transition: transform .16s cubic-bezier(.2, .9, .2, 1);
}
.desktop-layer .icon-svg {
  width: 100%;
  height: 100%;
  display: block;
  flex: 0 0 auto;
  color: var(--icon-logo);
  transform: scale(var(--icon-scale));
  transform-origin: 50% 50%;
  user-select: none;
  pointer-events: none;
}
.desktop-layer .app-label {
  max-width: calc(var(--app-shell-size) + 30px);
  height: 16px;
  overflow: hidden;
  color: var(--icon-label, #111111);
  font-size: var(--desktop-label-size);
  font-weight: 400;
  line-height: 16px;
  letter-spacing: .01em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* App artwork: one Font Awesome Free SVG per application. The external frame is always the shared icon shell. */
.desktop-layer .app-tile .icon-svg,
.icon-preview-art .icon-svg {
  color: var(--icon-logo);
  fill: currentColor;
}
.desktop-layer .app-tile .icon-svg path,
.icon-preview-art .icon-svg path { fill: currentColor; }

/* Lock screen. */
.lock-layer {
  z-index: 5;
  opacity: 1;
  transition: opacity .4s cubic-bezier(.22, .75, .18, 1);
  touch-action: none;
}
.merged-phone.is-unlocked .lock-layer { opacity: 0; pointer-events: none; }
.lock-layer .s {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--wallpaper-base);
  background-image: var(--wallpaper-image);
  background-size: var(--wallpaper-size);
  background-position: var(--wallpaper-position);
}
.lock-layer .lock-status-bar { position: relative; z-index: 2; width: 100%; }
.lock-layer .t {
  position: absolute;
  top: var(--page-content-start);
  left: 50%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  color: #FFFFFF;
  text-align: center;
  user-select: none;
}
.lock-layer .d { font-size: 17px; font-weight: 520; line-height: 1.2; letter-spacing: .018em; text-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.lock-layer .m { margin-top: 9px; color: #FFFFFF; font-size: clamp(112px, 30vw, 132px); font-weight: 550; line-height: .86; letter-spacing: -.056em; transform: scaleY(1.16); transform-origin: center top; font-variant-numeric: tabular-nums; text-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.lock-layer .a { position: absolute; right: 0; bottom: max(38px, calc(var(--safe-bottom) + 28px)); left: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; pointer-events: none; }
.lock-layer .btn { position: relative; width: 64px; height: 64px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .24); border-radius: 50%; background: rgba(92, 92, 97, .25); backdrop-filter: blur(18px) saturate(116%); -webkit-backdrop-filter: blur(18px) saturate(116%); }
.lock-layer .i { position: relative; z-index: 1; display: block; overflow: visible; }
.lock-layer .f { width: 41px; height: 41px; }
.lock-layer .c { width: 35px; height: 35px; }
.lock-layer .fill, .lock-layer .mf { fill: #FFFFFF; }
.lock-layer .cut { fill: #000000; }
.lock-layer .cam { fill-rule: evenodd; clip-rule: evenodd; }
.lock-home-hit { position: absolute; inset: 0; z-index: 7; display: block; cursor: grab; touch-action: none; }
.lock-home-hit:active { cursor: grabbing; }
.global-home-indicator { position: absolute; z-index: 60; left: 50%; bottom: max(8px, calc(var(--safe-bottom) + 6px)); width: 134px; height: 5px; padding: 0; border: 0; border-radius: 999px; background: rgba(94, 94, 101, .52); box-shadow: 0 1px 2px rgba(255,255,255,.24), 0 1px 3px rgba(0,0,0,.10); transform: translateX(-50%); transition: transform .28s cubic-bezier(.22, .75, .18, 1), opacity .24s ease; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }

/* Settings page. */
.settings-page { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; overflow: auto; color: #000000; background: #F2F2F7; opacity: 0; pointer-events: none; transform: translateX(100%); transition: transform .38s cubic-bezier(.32,.72,.24,1), opacity .2s ease; -webkit-overflow-scrolling: touch; }
.settings-page.is-visible { opacity: 1; pointer-events: auto; transform: translateX(0); }
.settings-page.is-exiting { opacity: 0; pointer-events: none; transform: translateX(100%); }
.settings-page .status-bar { position: sticky; top: 0; z-index: 4; flex: 0 0 calc(var(--status-h) + var(--safe-top)); background: #F2F2F7; }
.settings-content { width: 100%; max-width: 600px; margin: 0 auto; padding: 8px 16px 80px; }
.settings-title { width:auto; margin:0 0 16px; padding:4px 0; border:0; color:#000000; background:transparent; font-family:var(--page-title-font); font-size:var(--settings-title-size); font-weight:var(--settings-title-weight); font-synthesis:none; letter-spacing:-.02em; text-align:left; user-select:none; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.settings-title:active { opacity: .6; }
.settings-search { height: 36px; display: flex; align-items: center; gap: 6px; margin-bottom: 24px; padding: 0 10px; border-radius: var(--settings-surface-radius); background: #E5E5EA; }
.settings-search svg { width: 16px; height: 16px; flex: 0 0 auto; color: #8E8E93; }
.settings-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: #000000; background: transparent; font-size: 16px; }
.settings-search input::placeholder { color: #8E8E93; }
.settings-profile { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding: 12px; overflow: hidden; isolation: isolate; border-radius: var(--settings-surface-radius); background: #FFFFFF; }
.settings-profile::after { content: ''; position: absolute; right: -18px; bottom: -22px; z-index: 0; width: 124px; height: 84px; opacity: .62; pointer-events: none; background: repeating-radial-gradient(ellipse at 100% 100%, transparent 0 7px, rgba(142,142,147,.18) 7px 8px, transparent 8px 15px); transform: rotate(-16deg); }
.settings-profile > * { position: relative; z-index: 1; }
.settings-profile-avatar { position: relative; width: 56px; height: 56px; min-width: 56px; min-height: 56px; max-width: 56px; max-height: 56px; display: grid; place-items: center; flex: 0 0 56px; overflow: hidden; aspect-ratio: 1 / 1; border-radius: 50%; color: #C7C7CC; background: #E5E5EA; }
.settings-profile-avatar svg { width: 33px; height: 33px; fill: currentColor; }
.settings-profile-info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.settings-profile-name { color: #000000; font-size: 18px; font-weight: 400; line-height: 1.3; }
.settings-profile-desc { margin-top: 2px; color: #8E8E93; font-size: 13px; font-weight: 400; line-height: 1.3; }
.settings-group { margin-bottom: 20px; overflow: hidden; border-radius: 10px; background: #FFFFFF; }
.settings-group-item { position: relative; min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 8px 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.settings-group-item:active {opacity: .72;}
.settings-group-item + .settings-group-item { border-top: .5px solid #C6C6C8; }
.settings-item-icon { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; }
.settings-item-icon svg { width: 28px; height: 28px; }
.settings-item-label { flex: 1; color: #000000; font-size: 16px; line-height: 1.3; }
.settings-chevron { display: grid; place-items: center; flex: 0 0 auto; }
.settings-chevron svg { width: 7px; height: 12px; color: #C7C7CC; }
.settings-version { padding: 24px 0 16px; color: #8E8E93; font-size: 12px; text-align: center; user-select: none; }
/* iOS Settings icon system: stable 28px color plate and 20px glyph optical target. */
.settings-page .settings-source-icon { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 6.5px; color: #FFFFFF; background: var(--settings-icon-color); box-shadow: none; }
.settings-page .settings-source-icon .settings-source-glyph { width: 20px; height: 20px; display: block; flex: 0 0 auto; fill: currentColor; color: currentColor; }
.settings-page .settings-profile-avatar .settings-profile-source-glyph { width: 33px; height: 33px; display: block; flex: 0 0 auto; fill: currentColor; color: currentColor; }
.settings-page .settings-search .settings-search-source-glyph { width: 16px; height: 16px; display: block; flex: 0 0 auto; fill: currentColor; color: currentColor; }
.settings-page .settings-chevron-source { width: 7px; height: 12px; display: block; flex: 0 0 auto; fill: #C7C7CC; color: #C7C7CC; }
.settings-page .settings-keepalive-item,
.settings-page .settings-status-bar-item,
.settings-page .settings-dark-mode-item { cursor: default; }
.settings-page .settings-keepalive-glyph { width: 18px; height: 20px; }
.settings-page .settings-studio-glyph { width: 14px; height: 14px; }
.settings-page .settings-cloud-assist-glyph { width: 20px; height: 20px; }
.settings-power-switch { position: relative; width: 51px; height: 31px; display: inline-flex; align-items: center; justify-content: flex-start; flex: 0 0 auto; margin: 0; padding: 3px; border: 0; border-radius: 999px; background: #34C759; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.08); cursor: pointer; transition: background .18s ease; -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent; }
.settings-power-switch:focus { outline: 0; }
.settings-power-switch:focus-visible { outline: 2px solid rgba(52,199,89,.48); outline-offset: 2px; }
.settings-power-switch-knob { width: 25px; height: 25px; display: block; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 2px 6px rgba(0,0,0,.12); transform: translateX(20px); transition: transform .18s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.settings-power-switch[aria-checked="false"] { background: #E5E5EA; }
.settings-power-switch[aria-checked="false"] .settings-power-switch-knob { transform: translateX(0); }
/* The setting parent is rendered in real dark colors when the dedicated switch is on. */
.merged-phone.is-dark-mode .settings-page,
.merged-phone.is-dark-mode .settings-page .status-bar { color: #F5F5F7; background: #000000; }
.merged-phone.is-dark-mode .settings-title,
.merged-phone.is-dark-mode .settings-item-label,
.merged-phone.is-dark-mode .settings-profile-name { color: #F5F5F7; }
.merged-phone.is-dark-mode .settings-search { background: #2C2C2E; }
.merged-phone.is-dark-mode .settings-search input { color: #F5F5F7; }
.merged-phone.is-dark-mode .settings-search input::placeholder,
.merged-phone.is-dark-mode .settings-profile-desc,
.merged-phone.is-dark-mode .settings-version { color: #98989D; }
.merged-phone.is-dark-mode .settings-profile,
.merged-phone.is-dark-mode .settings-group { background: #1C1C1E; }
.merged-phone.is-dark-mode .settings-group-item:active {opacity: .72;}
.merged-phone.is-dark-mode .settings-group-item + .settings-group-item { border-color: #38383A; }



/* Apple ID and profile hierarchy: static page topology; account data only updates existing surfaces. */
.settings-profile-button { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.settings-profile-button:active {opacity: .72;}
.apple-id-page, .apple-id-register-page, .personal-profile-page { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; overflow: auto; color: #000000; background: #F2F2F7; opacity: 0; pointer-events: none; transform: translateX(100%); transition: transform .38s cubic-bezier(.32,.72,.24,1), opacity .2s ease; -webkit-overflow-scrolling: touch; }
.apple-id-page [hidden], .apple-id-register-page [hidden], .personal-profile-page [hidden] { display: none; }
.apple-id-register-page { z-index: 9; }
.personal-profile-page { z-index: 10; }
.apple-id-page.is-visible, .apple-id-register-page.is-visible, .personal-profile-page.is-visible { opacity: 1; pointer-events: auto; transform: translateX(0); }
.apple-id-page.is-exiting, .apple-id-register-page.is-exiting, .personal-profile-page.is-exiting { opacity: 0; pointer-events: none; transform: translateX(100%); }
.apple-id-page .status-bar, .apple-id-register-page .status-bar, .personal-profile-page .status-bar { position: sticky; top: 0; z-index: 2; flex: 0 0 calc(var(--status-h) + var(--safe-top)); background: #F2F2F7; }
.apple-id-navigation { position:sticky; top:calc(var(--status-h) + var(--safe-top)); z-index:2; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; min-height:58px; padding:0 16px; background:#F2F2F7; }
.apple-id-navigation-title { min-width:0; grid-column:1; overflow:hidden; color:#000000; font-family:var(--page-title-font); font-size:var(--settings-title-size); font-weight:var(--settings-title-weight); line-height:1.12; text-align:left; text-overflow:ellipsis; letter-spacing:-.042em; white-space:nowrap; }
.apple-id-navigation-title--back { min-height:58px; padding:0; border:0; background:transparent; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.apple-id-navigation-title--back:active,.apple-id-nav-action:active { opacity:.55; }
.apple-id-nav-action { min-width:44px; height:58px; display:grid; place-items:center; grid-column:2; padding:0; border:0; color:#007AFF; background:transparent; font-size:16px; font-weight:500; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.apple-id-content { width: 100%; max-width: 600px; margin: 0 auto; padding: 46px 24px calc(48px + var(--safe-bottom)); }
.apple-id-profile-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.apple-id-avatar, .personal-profile-avatar { position: relative; display: grid; place-items: center; border-radius: 50%; color: #BFC0C7; background: #E5E5EA; }
.apple-id-avatar { width: 102px; height: 102px; overflow: hidden; isolation: isolate; }
.apple-id-avatar svg { width: 59px; height: 59px; fill: currentColor; }
.profile-avatar-image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: 100%; max-height: 100%; border-radius: inherit; object-fit: cover; }
.settings-profile-avatar .profile-avatar-image { width: 56px; height: 56px; min-width: 56px; min-height: 56px; max-width: 56px; max-height: 56px; border-radius: 50%; }
.personal-profile-avatar .profile-avatar-image { border-radius: 50%; }
.apple-id-profile-name { margin: 17px 0 0; color: #000000; font-size: 23px; font-weight: 400; line-height: 1.2; letter-spacing: -.028em; }
.apple-id-profile-placeholder { margin: 6px 0 0; color: #8E8E93; font-size: 15px; font-weight: 400; line-height: 1.35; }
.apple-id-register-button { width: min(100%, 320px); min-height: 48px; display: flex; align-items: center; justify-content: center; margin: 39px auto 0; padding: 0 18px; border: 0; border-radius: 13px; color: #FFFFFF; background: #007AFF; box-shadow: 0 1px 1px rgba(0,122,255,.18); font: inherit; font-size: 17px; font-weight: 600; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.apple-id-register-button:active {transform: scale(.982); opacity: .72;}
.apple-id-wechat-authorization { width:min(100%,340px); display:grid; gap:12px; margin:25px auto 0; padding:16px; box-sizing:border-box; border:1px solid #DDE9F8; border-radius:14px; background:#FFFFFF; box-shadow:0 1px 2px rgba(0,122,255,.06); }
.apple-id-wechat-authorization-copy { display:grid; gap:5px; }
.apple-id-wechat-authorization-copy h2 { margin:0; color:#111111; font-size:16px; font-weight:600; line-height:1.25; letter-spacing:-.015em; }
.apple-id-wechat-authorization-copy p { margin:0; color:#6E6E73; font-size:13px; line-height:1.45; }
.apple-id-wechat-authorization-button { width:100%; min-height:44px; border:0; border-radius:11px; color:#FFFFFF; background:#007AFF; font:600 15px/1 inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.apple-id-wechat-authorization-button:active {transform:scale(.985); opacity: .72;}
.apple-id-wechat-authorization-button:disabled { color:#9B9BA1; background:#E5E5EA; cursor:default; transform:none; }
.apple-id-account-actions { width: min(100%, 340px); margin: 31px auto 0; overflow: hidden; border-radius: 12px; background: #FFFFFF; }
.apple-id-account-action { width: 100%; min-height: 54px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 12px; align-items: center; column-gap: 12px; padding: 0 14px; border: 0; color: #000000; background: #FFFFFF; text-align: left; font: inherit; font-size: 17px; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.apple-id-account-action:active {opacity: .72;}
.apple-id-logout-button { width: min(100%, 340px); min-height: 44px; display: block; margin: 22px auto 0; padding: 0 16px; border: 0; border-radius: 12px; color: #007AFF; background: transparent; font: inherit; font-size: 16px; font-weight: 500; line-height: 1; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.apple-id-logout-button:active {color: #006DE1; opacity: .72;}
.apple-id-account-action-icon { width: 22px; height: 22px; display: block; fill: #8E8E93; }
.apple-id-account-action-label { min-width: 0; }
.apple-id-account-action-chevron { width: 8px; height: 14px; display: block; fill: #C7C7CC; justify-self: end; }
.apple-id-register-content { width: 100%; max-width: 600px; margin: 0 auto; padding: 42px 24px calc(48px + var(--safe-bottom)); }
.apple-id-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.apple-id-brand-mark { width: 48px; height: 57px; display: block; color: #000000; fill: currentColor; }
.apple-id-brand-title { margin: 15px 0 0; color: #000000; font-size: 28px; font-weight: 600; line-height: 1.12; letter-spacing: -.035em; }
.apple-id-register-form { width: min(100%, 340px); display: grid; gap: 15px; margin: 41px auto 0; }
.apple-id-register-field-group { display: grid; gap: 7px; }
.apple-id-register-label { padding-left: 2px; color: #6D6D72; font-size: 14px; font-weight: 500; line-height: 1.2; }
.apple-id-register-field { width: 100%; height: 52px; padding: 0 15px; border: 0; border-radius: 12px; outline: 0; color: #000000; background: #FFFFFF; box-shadow: inset 0 0 0 .5px rgba(60,60,67,.12); font: inherit; font-size: 17px; caret-color: #007AFF; }
.apple-id-register-field:focus { box-shadow: inset 0 0 0 1.5px #007AFF; }
.apple-id-register-submit { width: 100%; height: 50px; margin-top: 8px; padding: 0 16px; border: 0; border-radius: 13px; color: #FFFFFF; background: #007AFF; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.apple-id-register-submit:active {transform: scale(.982); opacity: .72;}


  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  /* Apple ID account switcher: a single bottom-sheet layer with scrollable registered accounts. */
  .apple-id-register-notice { min-height: 18px; margin: -4px 2px 0; color: #FF3B30; font-size: 13px; line-height: 1.35; text-align: center; }
  .apple-id-register-submit:disabled { opacity: .55; cursor: default; }
  .apple-account-picker { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; visibility: hidden; pointer-events: none; }
  .apple-account-picker.is-visible { visibility: visible; pointer-events: auto; }
  .apple-account-picker-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.24); opacity: 0; transition: opacity .24s ease; }
  .apple-account-picker.is-visible .apple-account-picker-backdrop { opacity: 1; }
  .apple-account-picker-sheet { position: relative; z-index: 1; width: min(100%, 600px); display: flex; flex-direction: column; max-height: min(79%, 610px); padding: 9px 12px calc(12px + var(--safe-bottom)); border-radius: 22px 22px 0 0; background: rgba(247,247,247,.98); box-shadow: 0 -10px 36px rgba(0,0,0,.12); transform: translateY(104%); transition: transform .34s cubic-bezier(.32,.72,.24,1); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
  .apple-account-picker.is-visible .apple-account-picker-sheet { transform: translateY(0); }
  .apple-account-picker-grabber { width: 36px; height: 5px; flex: 0 0 auto; margin: 0 auto 13px; border-radius: 999px; background: #C7C7CC; }
  .apple-account-picker-heading { padding: 0 8px 12px; text-align: center; }
  .apple-account-picker-title { margin: 0; color: #000000; font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
  .apple-account-picker-subtitle { margin: 5px 0 0; color: #8E8E93; font-size: 13px; line-height: 1.3; }
  .apple-account-picker-list { display: grid; gap: 8px; min-height: 0; max-height: min(42vh, 330px); overflow-y: auto; overscroll-behavior: contain; padding: 0 2px 11px; -webkit-overflow-scrolling: touch; }
  .apple-account-picker-list::-webkit-scrollbar { width: 0; height: 0; }
  .apple-account-picker-empty { margin: 8px 0 17px; color: #8E8E93; font-size: 14px; line-height: 1.45; text-align: center; }
  .apple-account-picker-item { min-height: 70px; display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 13px; border-radius: 14px; background: #FFFFFF; box-shadow: 0 0 0 .5px rgba(60,60,67,.09); }
  .apple-account-picker-item-main { min-width: 0; flex: 1; display: grid; gap: 4px; text-align: left; }
  .apple-account-picker-item-name { overflow: hidden; color: #000000; font-size: 16px; font-weight: 500; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .apple-account-picker-item-meta { overflow: hidden; color: #8E8E93; font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  .apple-account-picker-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
  .apple-account-picker-switch, .apple-account-picker-delete { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .apple-account-picker-switch { width: 34px; padding: 0; border-radius: 0; color: #007AFF; background: transparent; }
  .apple-account-picker-switch:active {color: #006DE1; opacity: .56;}
  .apple-account-picker-switch svg { width: 17px; height: 17px; display: block; fill: currentColor; stroke: none; }
  .apple-account-picker-delete { width: 36px; padding: 0; border-radius: 10px; color: #FF3B30; background: transparent; }
  .apple-account-picker-delete:active {opacity: .72;}
  .apple-account-picker-delete svg { width: 17px; height: 17px; fill: currentColor; }
  .apple-account-picker-footer { display: grid; gap: 8px; flex: 0 0 auto; padding-top: 1px; }
  .apple-account-picker-footer-button { width: 100%; min-height: 52px; border: 0; border-radius: 13px; font: inherit; font-size: 17px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .apple-account-picker-register { color: #FFFFFF; background: #007AFF; }
  .apple-account-picker-register:active {opacity: .72;}
  .apple-account-picker-cancel { color: #007AFF; background: #FFFFFF; }
  .apple-account-picker-cancel:active {opacity: .72;}
  .apple-account-confirm { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 24px; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .18s ease, visibility 0s linear .18s; }
  .apple-account-confirm.is-visible { visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }
  .apple-account-confirm-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.28); cursor: pointer; }
  .apple-account-confirm-dialog { position: relative; width: min(100%, 320px); padding: 21px 18px 16px; border-radius: 18px; color: #000000; background: rgba(255,255,255,.98); box-shadow: 0 18px 48px rgba(0,0,0,.22); transform: translateY(10px) scale(.98); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
  .apple-account-confirm.is-visible .apple-account-confirm-dialog { transform: translateY(0) scale(1); }
  .apple-account-confirm-title { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.25; text-align: center; }
  .apple-account-confirm-message { margin: 8px 0 0; color: #636366; font-size: 14px; line-height: 1.45; text-align: center; white-space: pre-line; }
  .apple-account-confirm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
  .apple-account-confirm-button { height: 42px; border: 0; border-radius: 10px; color: #1C1C1E; background: #E5E5EA; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .apple-account-confirm-button:active { transform: scale(.98); }
  .apple-account-confirm-button.is-primary { color: #FFFFFF; background: #007AFF; }
  .apple-account-confirm-button.is-destructive { color: #FFFFFF; background: #FF3B30; }

.personal-profile-content { width: 100%; max-width: 600px; margin: 0 auto; padding: 20px 16px calc(48px + var(--safe-bottom)); }
.personal-profile-top { display: flex; flex-direction: column; align-items: center; padding: 8px 0 24px; }
.personal-profile-avatar { width: 96px; height: 96px; overflow: hidden; isolation: isolate; padding: 0; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.personal-profile-avatar:active { transform: scale(.97); }
.personal-profile-avatar svg { width: 54px; height: 54px; fill: currentColor; }
.personal-profile-avatar-hint { margin: 10px 0 0; color: #8E8E93; font-size: 13px; line-height: 1.2; }
.profile-mode-switch { width: min(100%, 292px); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: 18px; padding: 2px; border-radius: 10px; background: #E5E5EA; }
.profile-mode-option { height: 30px; border: 0; border-radius: 8px; color: #3A3A3C; background: transparent; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.profile-mode-option.is-active { color: #000000; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.10); }
.profile-group { margin: 0 0 18px; overflow: hidden; border-radius: 11px; background: #FFFFFF; }
.profile-group-title { margin: 0 0 8px 2px; color: #6D6D72; font-size: 13px; font-weight: 500; line-height: 1.2; }
.profile-group-wrap { margin-bottom: 18px; }
.profile-field { min-height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 14px; }
.profile-field + .profile-field { border-top: .5px solid rgba(60,60,67,.18); }
.profile-group > [hidden] + .profile-field { border-top: 0; }
.profile-group > [hidden] + .profile-rich-field { border-top: 0; }
.profile-field-label { flex: 0 0 auto; color: #000000; font-size: 16px; line-height: 1.25; }
.profile-field-control { min-width: 0; flex: 1; border: 0; outline: 0; color: #3A3A3C; background: transparent; font: inherit; font-size: 16px; line-height: 1.25; text-align: right; caret-color: #007AFF; }
.profile-field-control::placeholder { color: #C7C7CC; }
.profile-field-control:focus { color: #000000; }
/* Contact group: free typing remains available; the right-side picker opens the reliable native choice sheet. */
.profile-field--contact-group { position: relative; }
.contact-group-control { min-width: 0; flex: 1; display: flex; align-items: center; justify-content: flex-end; }
.contact-group-input { min-width: 0; width: 100%; padding-right: 38px; }
.contact-group-picker-wrap { width: 34px; height: 34px; position: absolute; right: 10px; display: grid; place-items: center; }
.contact-group-picker { width: 34px; height: 34px; position: absolute; inset: 0; z-index: 1; margin: 0; padding: 0; border: 0; appearance: none; -webkit-appearance: none; opacity: 0; cursor: pointer; }
.contact-group-picker-chevron { width: 12px; height: 7px; position: relative; z-index: 0; fill: #8E8E93; pointer-events: none; }
.contact-group-picker:focus-visible + .contact-group-picker-chevron { outline: 2px solid #007AFF; outline-offset: 4px; border-radius: 3px; }

.profile-select-wrap { position: relative; min-width: 0; flex: 1; }
.profile-field-select { width: 100%; height: 52px; appearance: none; -webkit-appearance: none; padding: 0 25px 0 0; color: #3A3A3C; background: transparent; text-align: right; }
.profile-field-select:focus { color: #000000; }
.profile-select-chevron { position: absolute; top: 50%; right: 0; width: 12px; height: 7px; display: block; color: #8E8E93; fill: currentColor; pointer-events: none; transform: translateY(-50%); }
.profile-sky-reference-field { min-height: 52px; }
.profile-sky-reference-controls { min-width: 0; flex: 1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 8px; }
.profile-sky-reference-select-wrap { position: relative; min-width: 0; }
.profile-sky-reference-select { width: 100%; height: 34px; padding: 0 24px 0 9px; border: 0; border-radius: 8px; outline: 0; color: #3A3A3C; background: #F2F2F7; font: inherit; font-size: 14px; appearance: none; -webkit-appearance: none; text-align: left; }
.profile-sky-reference-select:focus { box-shadow: inset 0 0 0 1.5px #007AFF; }
.profile-sky-reference-chevron { position: absolute; top: 50%; right: 9px; width: 10px; height: 6px; display: block; color: #8E8E93; fill: currentColor; pointer-events: none; transform: translateY(-50%); }
.profile-rich-field { display: block; padding: 12px 14px 14px; }
.profile-field + .profile-rich-field, .profile-rich-field + .profile-field, .profile-rich-field + .profile-rich-field { border-top: .5px solid rgba(60,60,67,.18); }
.profile-rich-field-head { display: flex; align-items: center; justify-content: space-between; min-height: 24px; margin: 0 0 8px; }
.profile-rich-field-label { color: #000000; font-size: 16px; line-height: 1.25; }
.profile-rich-import-button { width: 28px; height: 28px; display: grid; place-items: center; margin: -2px -4px -2px 10px; padding: 0; border: 0; border-radius: 8px; color: #007AFF; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.profile-rich-import-button:active {opacity: .7;}
.profile-rich-import-button:disabled { opacity: .42; cursor: default; }
.profile-rich-import-button svg { width: 18px; height: 18px; display: block; fill: currentColor; }
/* Same native Jingxu 设置「导入数据」glyph as the world-book importer. */
.profile-rich-import-button svg.profile-import-data-icon { width: 18px; height: 18px; fill: currentColor; }
.profile-rich-input { width: 100%; min-height: 142px; display: block; box-sizing: border-box; padding: 11px 12px; border: 0; border-radius: 10px; outline: 0; color: #3A3A3C; background: #F2F2F7; font: inherit; font-size: 15px; line-height: 1.48; resize: vertical; caret-color: #007AFF; }
.profile-rich-input--setting { min-height: 184px; }
.profile-rich-input::placeholder { color: #AEAEB2; }
.profile-rich-input:focus { color: #000000; box-shadow: inset 0 0 0 1.5px #007AFF; }
.profile-upload-button { width: min(68%, 220px); min-height: 32px; overflow: hidden; border: 0; border-radius: 8px; color: #007AFF; background: transparent; font: inherit; font-size: 15px; text-align: right; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.profile-upload-button:active { opacity: .55; }
.profile-field-note { min-width: 0; flex: 1; overflow: hidden; color: #8E8E93; font-size: 15px; line-height: 1.25; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.profile-form-notice { min-height: 18px; margin: -4px 2px 14px; color: #FF3B30; font-size: 13px; line-height: 1.3; text-align: center; }
.profile-form-notice[data-tone="neutral"] { color: #8E8E93; }
.profile-form-notice[data-tone="success"] { color: #34C759; }
/* Main API action banner: shown only after an API-dependent user action cannot run. */
.main-api-action-banner { position:absolute; z-index:96; top:calc(var(--status-h) + var(--safe-top) + 10px); right:12px; left:12px; min-height:64px; display:grid; grid-template-columns:minmax(0,1fr) auto 30px; align-items:center; gap:10px; padding:11px 10px 11px 14px; border:1px solid rgba(255,159,10,.34); border-radius:17px; color:#4A3212; background:rgba(255,248,231,.98); box-shadow:0 14px 30px rgba(55,43,20,.18); opacity:0; pointer-events:none; transform:translateY(-10px) scale(.985); transition:opacity .18s ease,transform .22s cubic-bezier(.22,.8,.26,1); }
.main-api-action-banner.is-visible { opacity:1; pointer-events:auto; transform:translateY(0) scale(1); }
.main-api-action-copy { min-width:0; display:grid; gap:3px; }
.main-api-action-copy b { overflow:hidden; color:inherit; font-size:14px; font-weight:700; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.main-api-action-copy span { overflow:hidden; color:#7A6240; font-size:12px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.main-api-action-open { min-height:34px; padding:0 11px; border:0; border-radius:11px; color:#FFFFFF; background:#FF9500; font:600 13px/1 inherit; white-space:nowrap; cursor:pointer; }
.main-api-action-dismiss { width:30px; height:30px; display:grid; place-items:center; padding:0; border:0; border-radius:50%; color:#8A6D3B; background:transparent; font:400 24px/1 -apple-system,BlinkMacSystemFont,sans-serif; cursor:pointer; }
.main-api-action-open:active,.main-api-action-dismiss:active { opacity:.62; transform:scale(.94); }
.main-api-action-banner[hidden] { display:none; }
.profile-complete-row { display: flex; justify-content: stretch; padding: 2px 0 10px; }
.profile-complete-button { width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 20px; border: 0; border-radius: 12px; color: #007AFF; background: rgba(0,122,255,.10); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.profile-complete-button:active {transform: scale(.98); opacity: .72;}
.profile-complete-button:disabled { opacity: .48; cursor: default; }
.profile-complete-button svg { width: 17px; height: 17px; display: block; fill: currentColor; }
.profile-complete-button .profile-complete-icon { width: 17px; height: 17px; flex: 0 0 17px; }

/* Main API page: one static page and one shared form for all categories. */
.api-page { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; overflow: auto; color: #000000; background: #F2F2F7; opacity: 0; pointer-events: none; transform: translateX(100%); transition: transform .38s cubic-bezier(.32,.72,.24,1), opacity .2s ease; -webkit-overflow-scrolling: touch; }
.api-page.is-visible { opacity: 1; pointer-events: auto; transform: translateX(0); }
.api-page.is-exiting { opacity: 0; pointer-events: none; transform: translateX(100%); }
.api-page .status-bar { position: sticky; top: 0; z-index: 4; flex: 0 0 calc(var(--status-h) + var(--safe-top)); background: #F2F2F7; }
.api-content { width: 100%; max-width: 600px; margin: 0 auto; padding: 8px 16px 88px; }
.api-title { margin: 0 0 16px; padding: 4px 0; border: 0; color: #000000; background: transparent; font-family: var(--page-title-font); font-size: var(--settings-title-size); font-weight: var(--settings-title-weight); font-synthesis: none; letter-spacing: -.02em; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.api-title:active { opacity: .6; }
.api-category-grid { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 0 0 20px; }
.api-category-button { min-width: 0; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border: 0; border-radius: 14px; color: #1C1C1E; background: #FFFFFF; font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.api-category-button:active { transform: scale(.98); }
.api-category-button.is-active { color: #FFFFFF; background: #1C1C1E; }
.api-category-icon { width: 20px; height: 20px; display: block; flex: 0 0 auto; overflow: visible; fill: currentColor; color: currentColor; }
.api-category-icon path, .api-category-icon g { fill: currentColor; }
.api-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 46px 46px; gap: 10px; align-items: center; margin-bottom: 22px; }
.api-control, .api-text-input { width: 100%; height: 48px; box-sizing: border-box; border: 0; border-radius: var(--settings-surface-radius); outline: 0; color: #000000; background: #FFFFFF; font-family: inherit; font-size: 16px; line-height: 1; }
.api-control { padding: 0 38px 0 14px; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8E8E93 50%), linear-gradient(135deg, #8E8E93 50%, transparent 50%); background-position: calc(100% - 19px) 20px, calc(100% - 14px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.api-text-input { padding: 0 14px; }
.api-control:focus-visible, .api-text-input:focus-visible, .api-context-input:focus-visible, .api-icon-button:focus-visible, .api-category-button:focus-visible, .api-action-button:focus-visible, .api-title:focus-visible, .api-stream-switch:focus-visible { outline: 2px solid rgba(0,122,255,.42); outline-offset: 2px; }
.api-icon-button { width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--settings-surface-radius); color: #007AFF; background: #FFFFFF; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.api-icon-button:active {transform: scale(.96); opacity: .72;}
.api-icon-button:disabled { opacity: .42; cursor: default; }
.api-icon-button svg { width: 20px; height: 20px; display: block; fill: currentColor; }
.api-model-select { min-width: 0; }
#ApiPresetSave svg, #ApiModelRefresh svg { width: 26px; height: 26px; }
.api-field { margin-bottom: 18px; }
.api-connection-group { overflow: hidden; margin-bottom: 18px; border-radius: var(--settings-surface-radius); background: #FFFFFF; }
.api-connection-row { min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.api-connection-row + .api-connection-row { border-top: .5px solid #C6C6C8; }
.api-connection-label { flex: 0 0 auto; color: #3A3A3C; font-size: 13px; font-weight: 500; letter-spacing: .01em; line-height: 1.2; }
.api-connection-group .api-text-input { min-width: 0; height: 47px; flex: 1; padding: 0; border-radius: 0; background: transparent; text-align: right; }
.api-field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; color: #3A3A3C; font-size: 13px; font-weight: 500; letter-spacing: .01em; line-height: 1.2; }
.api-field-value { color: #8E8E93; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.api-model-row { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 10px; align-items: center; }
.api-temperature-wrap { height: 48px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--settings-surface-radius); background: #FFFFFF; }
.api-temperature { --temperature-progress: 50%; width: 100%; height: 28px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.api-temperature::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: linear-gradient(to right, #007AFF 0 var(--temperature-progress), #E5E5EA var(--temperature-progress) 100%); }
.api-temperature::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -10.5px; border: 0; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.22), 0 3px 8px rgba(0,0,0,.12); appearance: none; -webkit-appearance: none; }
.api-temperature::-moz-range-track { height: 5px; border: 0; border-radius: 999px; background: #E5E5EA; }
.api-temperature::-moz-range-progress { height: 5px; border-radius: 999px; background: #007AFF; }
.api-temperature::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.22), 0 3px 8px rgba(0,0,0,.12); }
.api-context-control { width: 100%; min-height: 96px; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--settings-surface-radius); background: #FFFFFF; }
.api-context-input { width: 100%; min-width: 0; height: 48px; flex: 0 0 48px; padding: 0 14px; border: 0; outline: 0; color: #000000; background: transparent; font-family: inherit; font-size: 16px; line-height: 1; }
.api-context-input::-webkit-outer-spin-button, .api-context-input::-webkit-inner-spin-button { margin: 0; }
.api-stream-control { height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px 0 14px; border-top: .5px solid #C6C6C8; color: #3A3A3C; }
.api-stream-label { font-size: 13px; font-weight: 500; letter-spacing: .01em; line-height: 1; }
.api-stream-switch { width: 51px; height: 31px; display: inline-flex; align-items: center; justify-content: flex-start; flex: 0 0 auto; margin: 0; padding: 3px; border: 0; border-radius: 999px; background: #34C759; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.08); cursor: pointer; transition: background .18s ease; -webkit-tap-highlight-color: transparent; }
.api-stream-switch-knob { width: 25px; height: 25px; display: block; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 2px 6px rgba(0,0,0,.12); transform: translateX(20px); transition: transform .18s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.api-stream-switch[aria-checked="false"] { background: #E5E5EA; }
.api-stream-switch[aria-checked="false"] .api-stream-switch-knob { transform: translateX(0); }
.api-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 4px; }
.api-action-button { height: 48px; border: 0; border-radius: var(--settings-surface-radius); font-family: inherit; font-size: 16px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.api-action-button:active { transform: scale(.98); }
.api-action-button:disabled { opacity: .48; cursor: default; }
.api-test-button { color: #1C1C1E; background: #E5E5EA; }
.api-save-button { color: #FFFFFF; background: #007AFF; }
.api-notice { position: absolute; z-index: 8; top: 50%; left: 50%; width: min(280px, calc(100% - 56px)); padding: 15px 18px; border-radius: 16px; color: #FFFFFF; background: rgba(28,28,30,.9); box-shadow: 0 10px 26px rgba(0,0,0,.2); font-size: 14px; font-weight: 500; line-height: 1.45; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, -44%) scale(.96); transition: opacity .2s ease, transform .2s ease; }
.api-notice[data-tone="error"] { background: rgba(112,29,29,.92); }
.api-notice.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.api-dialog-scrim { position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; height: 100%; min-height: 0; overflow: hidden; padding: 24px; background: rgba(0,0,0,.22); opacity: 0; pointer-events: none; transform: translateZ(0); transition: opacity .18s ease; }
.api-dialog-scrim.is-visible { opacity: 1; pointer-events: auto; }
.api-dialog { width: min(100%, 320px); max-height: calc(100% - 48px); overflow: auto; padding: 20px 18px 14px; border-radius: 18px; color: #000000; background: rgba(255,255,255,.97); box-shadow: 0 18px 48px rgba(0,0,0,.22); overscroll-behavior: contain; transform: translateY(10px) scale(.98); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.api-dialog-scrim.is-visible .api-dialog { transform: translateY(0) scale(1); }
.api-dialog-title { margin: 0; font-family: var(--settings-title-font); font-size: 18px; font-weight: 600; line-height: 1.25; text-align: center; }
.api-dialog-message { margin: 8px 0 0; color: #636366; font-size: 13px; line-height: 1.45; text-align: center; }
.api-dialog-input { width: 100%; min-height: 42px; margin-top: 16px; padding: 10px 12px; border: 0; border-radius: var(--settings-surface-radius); outline: 0; color: #000000; background: #F2F2F7; font-family: inherit; font-size: 16px; line-height: 1.45; resize: none; }
.api-dialog-input:focus-visible { outline: 2px solid rgba(0,122,255,.42); outline-offset: 2px; }
.api-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.api-dialog-button { height: 42px; border: 0; border-radius: var(--settings-surface-radius); background: #E5E5EA; color: #1C1C1E; font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.api-dialog-button:active { transform: scale(.98); }
.api-dialog-confirm { color: #FFFFFF; background: #007AFF; }
.api-dialog-confirm.is-destructive { background: #FF3B30; }



/* World book: one static hierarchy: library, book detail, and entry editor. */
.worldbook-page { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; overflow: auto; color: #000000; background: #F2F2F7; opacity: 0; pointer-events: none; transform: translateX(100%); transition: transform .38s cubic-bezier(.32,.72,.24,1), opacity .2s ease; -webkit-overflow-scrolling: touch; }
.worldbook-page.is-visible { opacity: 1; pointer-events: auto; transform: translateX(0); }
.worldbook-page.is-exiting { opacity: 0; pointer-events: none; transform: translateX(100%); }
.worldbook-detail-page { z-index: 6; }
.worldbook-editor-page { z-index: 7; }
.worldbook-page .status-bar { position: sticky; top: 0; z-index: 4; flex: 0 0 calc(var(--status-h) + var(--safe-top)); background: #F2F2F7; }
.worldbook-content { width: 100%; max-width: 600px; margin: 0 auto; padding: 6px 16px 90px; }
.worldbook-nav { min-height:58px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; margin-bottom:15px; }
.worldbook-nav-title { position:static; min-width:0; grid-column:1; width:auto; margin:0; overflow:hidden; color:#000000; font-family:var(--page-title-font); font-size:var(--settings-title-size); font-weight:var(--settings-title-weight); letter-spacing:-.042em; line-height:1.12; text-align:left; text-overflow:ellipsis; transform:none; white-space:nowrap; }
.worldbook-nav-title--back { min-height:58px; padding:0; border:0; background:transparent; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.worldbook-nav-title--back:active,.worldbook-nav-text:active,.worldbook-nav-icon:active { opacity:.56; }
.worldbook-nav-text { min-width:60px; min-height:58px; padding:0; border:0; color:#007AFF; background:transparent; font-family:inherit; font-size:16px; font-weight:400; line-height:1; text-align:right; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.worldbook-create-text { grid-column:2; }
.worldbook-nav-icon { width:58px; height:58px; display:grid; place-items:center; padding:0; border:0; color:#007AFF; background:transparent; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.worldbook-nav-icon svg { width:22px; height:22px; display:block; fill:currentColor; }
/* Match the parent Settings row chevron weight and proportions; only the direction is mirrored for navigation back. */
.worldbook-nav-icon svg.worldbook-detail-back-chevron { width: 9px; height: 15px; fill: currentColor; }
.worldbook-detail-back { color: #007AFF; }
/* Inline extraction of Jingxu Settings → 导入数据 (Font Awesome file-import) icon. */
.worldbook-nav-icon svg.worldbook-import-data-icon { width: 18px; height: 18px; fill: currentColor; }
.worldbook-detail-actions { display: flex; align-items: center; margin-right: -5px; }
.worldbook-search { height: 38px; position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 22px; border-radius: 10px; color: #8E8E93; background: #E5E5EA; }
.worldbook-search svg { width: 15px; height: 15px; position: absolute; left: calc(50% - 54px); fill: currentColor; pointer-events: none; }
.worldbook-search input { width: 100%; height: 100%; padding: 0 38px; border: 0; outline: 0; color: #000000; background: transparent; font-family: inherit; font-size: 15px; text-align: center; }
.worldbook-search input::placeholder { color: #8E8E93; opacity: 1; }
.worldbook-search:focus-within { box-shadow: 0 0 0 2px rgba(0,122,255,.20); }
.worldbook-folder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.worldbook-folder-card { --worldbook-folder-color:#5856D6; --worldbook-folder-front:#7775DE; --worldbook-folder-back:#615B96; --worldbook-folder-ink:#2E2D70; --worldbook-folder-edge:#2B2A69; min-width: 0; display: block; padding: 0; border: 0; border-radius: 15px; color: #000000; background: transparent; text-align: left; cursor: pointer; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.worldbook-folder-card:active { transform: scale(.985); }
.worldbook-folder-card.is-pressing { transform: scale(.975); }
.worldbook-folder-art-shell { width: 100%; position: relative; display: block; aspect-ratio: 512 / 406; }
.worldbook-folder-art { width: 100%; height: 100%; position: absolute; inset: 0; display: block; filter: drop-shadow(0 8px 10px rgba(0,0,0,.08)); }
.worldbook-folder-front-content { position: absolute; right: 7.5%; bottom: 7.2%; left: 12.5%; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; color: var(--worldbook-folder-ink); pointer-events: none; }
.worldbook-folder-meta { min-width: 0; display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 3px; }
.worldbook-folder-name { max-width: 100%; overflow: hidden; color: inherit; font-size: 15px; font-weight: 600; line-height: 1.22; text-overflow: ellipsis; white-space: nowrap; }
.worldbook-folder-kind { display: block; color: inherit; font-size: 12px; font-weight: 500; line-height: 1.2; }
.worldbook-folder-kind::before { content: none; }
.worldbook-folder-editor { flex: 0 0 auto; color: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
/* Only the three internal document sheets move as one grouped layer. */
.worldbook-folder-card.is-opening .worldbook-folder-docs { transform-box: fill-box; transform-origin: center; animation: worldbookFolderDocumentsNudge 1000ms cubic-bezier(.25,.72,.30,1) both; }
@keyframes worldbookFolderDocumentsNudge {
  0% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(-24px, -18px) rotate(-2.95deg); }
  72% { transform: translate(-9px, -7px) rotate(-1.1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
.worldbook-empty { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 20px; color: #8E8E93; text-align: center; }
.worldbook-empty svg { width: 42px; height: 42px; margin-bottom: 4px; fill: #C7C7CC; }
.worldbook-empty strong { color: #3A3A3C; font-size: 16px; font-weight: 500; }
.worldbook-empty span { font-size: 13px; line-height: 1.45; }
.worldbook-empty[hidden] { display: none; }
.worldbook-dialog-scrim { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; height: 100%; min-height: 0; overflow: hidden; padding: 22px; background: rgba(0,0,0,.28); opacity: 0; pointer-events: none; transform: translateZ(0); transition: opacity .2s ease; }
.worldbook-dialog-scrim.is-visible { opacity: 1; pointer-events: auto; }
.worldbook-dialog { width: min(100%, 340px); max-height: calc(100% - 44px); overflow: auto; padding: 21px; border-radius: 18px; background: #FFFFFF; box-shadow: 0 16px 34px rgba(0,0,0,.16); overscroll-behavior: contain; }
.worldbook-dialog h2 { margin: 0 0 18px; color: #1C1C1E; font-size: 18px; font-weight: 600; line-height: 1.25; text-align: center; }
.worldbook-dialog p { margin: -7px 0 18px; color: #636366; font-size: 14px; line-height: 1.45; text-align: center; }
.worldbook-field-label { display: block; margin: 0 0 7px; color: #636366; font-size: 13px; font-weight: 500; }
.worldbook-dialog-input, .worldbook-editor-input, .worldbook-editor-select, .worldbook-editor-textarea { width: 100%; box-sizing: border-box; border: 0; border-radius: 10px; outline: 0; color: #1C1C1E; background: #F2F2F7; font-family: inherit; font-size: 16px; }
.worldbook-dialog-input { height: 43px; margin-bottom: 16px; padding: 0 12px; }
.worldbook-segment { height: 37px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: 16px; padding: 3px; border-radius: 10px; background: #E5E5EA; }
.worldbook-segment button { border: 0; border-radius: 8px; color: #636366; background: transparent; font-family: inherit; font-size: 14px; cursor: pointer; }
.worldbook-segment button[aria-pressed="true"] { color: #1C1C1E; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.10); }
.worldbook-color-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.worldbook-color-choice, .worldbook-custom-color { width: 28px; height: 28px; position: relative; display: block; overflow: hidden; padding: 0; border: 0; border-radius: 50%; background: var(--worldbook-choice); cursor: pointer; }
.worldbook-color-choice::after { position: absolute; inset: 5px; border: 2px solid #FFFFFF; border-radius: 50%; content: ''; opacity: 0; }
.worldbook-color-choice.is-selected::after { opacity: 1; }
.worldbook-custom-color { margin-left: auto; border: 2px solid #D1D1D6; background: conic-gradient(#ff3b30, #ffcc00, #34c759, #007aff, #af52de, #ff3b30); }
.worldbook-custom-color input { width: 100%; height: 100%; display: block; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.worldbook-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.worldbook-dialog-button { height: 42px; border: 0; border-radius: 10px; color: #1C1C1E; background: #E5E5EA; font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.worldbook-dialog-button:active { transform: scale(.98); }
.worldbook-dialog-primary { color: #FFFFFF; background: #007AFF; }
.worldbook-dialog-destructive { color: #FFFFFF; background: #FF3B30; }
.worldbook-edit-actions { grid-template-columns: .86fr 1fr 1fr; }
.worldbook-import-notice { min-height: 0; margin: -4px 0 12px; color: #007AFF; font-size: 13px; line-height: 1.35; }
.worldbook-import-notice:empty { display: none; }
#WorldBookImportInput { width: 0; height: 0; position: absolute; overflow: hidden; opacity: 0; pointer-events: none; }
.worldbook-entry-list { display: grid; gap: 10px; }
.worldbook-entry-swipe { position: relative; overflow: hidden; border-radius: 14px; background: #FFFFFF; isolation: isolate; }
.worldbook-entry-delete { width: 78px; position: absolute; top: 0; right: 0; bottom: 0; z-index: 0; display: grid; place-items: center; padding: 0; border: 0; color: #FFFFFF; background: #FF3B30; font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.worldbook-entry-card { width: 100%; min-height: 90px; position: relative; z-index: 1; box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; overflow: hidden; padding: 14px 40px 14px 16px; border: 0; border-radius: 14px; color: #1C1C1E; background: #FFFFFF; box-shadow: 0 1px 1px rgba(0,0,0,.04); text-align: left; transform: translateX(0); transition: transform .22s cubic-bezier(.2,.8,.2,1); touch-action: pan-y; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.worldbook-entry-card::before { width: 42px; position: absolute; top: 0; right: 0; bottom: 0; z-index: 0; background: #FFFFFF; content: ''; }
.worldbook-entry-card::after { width: 15px; height: 28px; position: absolute; top: 0; right: 17px; z-index: 2; border-radius: 0 0 4px 4px; background: var(--entry-book-color); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); content: ''; }
.worldbook-entry-card > * { position: relative; z-index: 1; }
.worldbook-entry-swipe.is-open .worldbook-entry-card { transform: translateX(-78px); }
.worldbook-entry-card:active {opacity: .72;}
.worldbook-entry-name { max-width: 100%; overflow: hidden; color: #1C1C1E; font-size: 16px; font-weight: 500; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.worldbook-entry-description { display: -webkit-box; overflow: hidden; color: #8E8E93; font-size: 13px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.worldbook-entry-meta { display: flex; align-items: center; gap: 7px; color: #8E8E93; font-size: 12px; line-height: 1; }
.worldbook-entry-position { display: inline-flex; align-items: center; gap: 4px; }
.worldbook-entry-position::before { width: 5px; height: 5px; display: block; border-radius: 999px; background: #8E8E93; content: ''; }
.worldbook-entry-empty { min-height: 260px; }
.worldbook-editor-content { padding-bottom: 48px; }
.worldbook-editor-group { margin-bottom: 16px; padding: 15px; border-radius: 13px; background: #FFFFFF; }
.worldbook-editor-input { height: 43px; padding: 0 12px; }
.worldbook-editor-select { height: 43px; padding: 0 38px 0 12px; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8E8E93 50%), linear-gradient(135deg, #8E8E93 50%, transparent 50%); background-position: calc(100% - 19px) 19px, calc(100% - 14px) 19px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.worldbook-entry-settings-group { padding: 0; overflow: hidden; }
.worldbook-entry-settings-row { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 15px; }
.worldbook-entry-settings-row + .worldbook-entry-settings-row, .worldbook-keyword-input-wrap + .worldbook-entry-settings-row { border-top: .5px solid rgba(60,60,67,.18); }
.worldbook-entry-settings-label { flex: 0 0 auto; color: #1C1C1E; font-size: 16px; line-height: 1.25; }
.worldbook-entry-settings-group .worldbook-editor-input, .worldbook-entry-settings-group .worldbook-editor-select { min-width: 0; height: 51px; flex: 1; padding-top: 0; padding-bottom: 0; border-radius: 0; background-color: transparent; text-align: right; }
.worldbook-switch-row { display: flex; align-items: center; justify-content: space-between; color: #1C1C1E; font-size: 16px; }
.worldbook-switch { width: 51px; height: 31px; display: inline-flex; align-items: center; justify-content: flex-start; padding: 3px; border: 0; border-radius: 999px; background: #E5E5EA; cursor: pointer; transition: background .18s ease; }
.worldbook-switch span { width: 25px; height: 25px; display: block; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 2px 6px rgba(0,0,0,.12); transform: translateX(0); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.worldbook-switch[aria-checked="true"] { background: #34C759; }
.worldbook-switch[aria-checked="true"] span { transform: translateX(20px); }
.worldbook-keyword-input-wrap { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .22s ease, opacity .18s ease; }
.worldbook-keyword-group.is-expanded .worldbook-keyword-input-wrap { max-height: 148px; opacity: 1; }
.worldbook-keyword-row { display: block; min-height: 0; padding-top: 12px; padding-bottom: 14px; border-top: .5px solid rgba(60,60,67,.18); }
.worldbook-keyword-row .worldbook-field-label { margin-bottom: 8px; }
.worldbook-editor-textarea { min-height: 86px; resize: vertical; padding: 11px 12px; line-height: 1.45; }
.worldbook-keywords { min-height: 75px; }
.worldbook-body-group { min-height: 286px; display: flex; flex-direction: column; }
.worldbook-content-textarea { min-height: 266px; flex: 1; }
.worldbook-toast { min-width: 120px; max-width: calc(100% - 52px); position: absolute; left: 50%; bottom: calc(var(--safe-bottom) + 28px); z-index: 30; padding: 10px 14px; border-radius: 999px; color: #FFFFFF; background: rgba(28,28,30,.90); font-size: 13px; line-height: 1.3; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .2s ease, transform .2s ease; }
.worldbook-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.worldbook-nav-text:focus-visible, .worldbook-nav-icon:focus-visible, .worldbook-folder-card:focus-visible, .worldbook-dialog-button:focus-visible, .worldbook-color-choice:focus-visible, .worldbook-segment button:focus-visible, .worldbook-switch:focus-visible, .worldbook-entry-card:focus-visible, .worldbook-entry-delete:focus-visible { outline: 2px solid rgba(0,122,255,.45); outline-offset: 2px; }
@media (min-width: 560px) { .worldbook-content { padding-right: 24px; padding-left: 24px; } }


/* Contacts page. */
.contacts-page { --contacts-photo-large: #F0F0F2; --contacts-photo-small: #F0F0F2; --contacts-message-text: #514952; position: absolute; inset: 0; z-index: 11; display: flex; flex-direction: column; overflow: auto; color: #1C1C1E; background: #FBFBFC; opacity: 0; pointer-events: none; transform: translateX(100%); transition: transform .38s cubic-bezier(.32,.72,.24,1), opacity .2s ease; -webkit-overflow-scrolling: touch; }
.contacts-page[data-contacts-group="friend"], .contacts-page[data-contacts-group="family"] { --contacts-photo-large: #F0F0F2; --contacts-photo-small: #F0F0F2; --contacts-message-text: #514952; }
.contacts-page.is-visible { opacity: 1; pointer-events: auto; transform: translateX(0); }
.contacts-page.is-exiting { opacity: 0; pointer-events: none; transform: translateX(100%); }
.contacts-page .status-bar { position: sticky; top: 0; z-index: 2; flex: 0 0 calc(var(--status-h) + var(--safe-top)); background: #FBFBFC; }
.contacts-content { width: 100%; max-width: 600px; margin: 0 auto; padding: 10px 22px calc(56px + var(--safe-bottom)); }
.contacts-heading { display: flex; align-items: flex-start; justify-content: space-between; min-height: 46px; margin: 0 0 18px; }
.contacts-title { margin: 0; color: #1C1C1E; font-family: var(--page-title-font); font-size: var(--settings-title-size); font-weight: var(--settings-title-weight); line-height: 1.12; letter-spacing: -.042em; font-synthesis: none; }
.contacts-title-button { min-height: 42px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.contacts-title-button:active { opacity: .56; transform: scale(.985); }
.contacts-title-button:focus-visible { outline: 2px solid rgba(28,28,30,.28); outline-offset: 3px; border-radius: 8px; }
.contacts-star-pendant-button { width: 46px; height: 46px; display: grid; place-items: start center; margin: -3px -2px 0 0; padding: 0; border: 0; color: #707076; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.contacts-star-pendant-button:active { opacity: .55; transform: scale(.96); }
.contacts-star-pendant-button:focus-visible { outline: 2px solid rgba(28,28,30,.28); outline-offset: 2px; border-radius: 12px; }
.contacts-star-pendant { width: 36px; height: 42px; overflow: visible; transform-origin: 24px 4px; animation: contactsPendantSwing 4.2s ease-in-out infinite; filter: drop-shadow(0 1px 1px rgba(42,42,48,.075)); }
@keyframes contactsPendantSwing { 0%, 100% { transform: rotate(-4.8deg); } 50% { transform: rotate(4.8deg); } }
.contacts-mosaic { width: min(100%, 360px); aspect-ratio: 2 / 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 auto; }
.contacts-photo-tile, .contacts-message { min-width: 0; overflow: hidden; border-radius: 11px; box-shadow: 0 1px 2px rgba(25,25,30,.03), 0 7px 16px rgba(25,25,30,.035); }
.contacts-photo-tile { position: relative; display: block; isolation: isolate; padding: 0; border: 0; appearance: none; -webkit-appearance: none; background: #F0F0F2; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; -webkit-tap-highlight-color: transparent; }
.contacts-photo-tile:active { transform: scale(.986); box-shadow: 0 1px 2px rgba(25,25,30,.025); }
.contacts-photo-image { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none; }
.contacts-photo-image.is-empty { display: none; }
.contacts-photo-tile::after, .contacts-photo-tile.has-image::after { content: none; }
.contacts-photo-tile--large { grid-column: 1 / span 2; grid-row: 1 / span 2; background: var(--contacts-photo-large); }
.contacts-photo-tile--small { grid-column: 3 / span 2; grid-row: 1; background: var(--contacts-photo-small); }
.contacts-message { grid-column: 3 / span 2; grid-row: 2; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 1px; padding: 11px 12px; border: 0; color: var(--contacts-message-text); background-color: #FFFFFF; background-image: radial-gradient(circle at 1px 1px, rgba(174,174,178,.20) .78px, transparent .92px); background-size: 8px 8px; background-position: -1px -1px; font-family: var(--page-title-font); font-size: clamp(13px, 3.35vw, 14px); font-weight: 520; line-height: 1.4; letter-spacing: -.024em; text-align: right; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; -webkit-tap-highlight-color: transparent; }
.contacts-message:focus-visible { outline: 2px solid rgba(28,28,30,.28); outline-offset: 2px; }
.contacts-message:active { transform: scale(.986); box-shadow: 0 1px 2px rgba(25,25,30,.025); }
.contacts-message-line { display: block; width: 100%; text-align: right; }
.contacts-group-controls { width: min(100%, 360px); display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px auto 0; }
.contacts-group-next { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; padding: 0; border: 0; border-radius: 50%; color: #1C1C1E; background: #FFFFFF; box-shadow: 0 1px 2px rgba(25,25,30,.04); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; -webkit-tap-highlight-color: transparent; }
.contacts-group-next:active {transform: scale(.94); box-shadow: none; opacity: .72;}
.contacts-group-next svg { display: block; fill: currentColor; }
.contacts-group-next .contacts-npc-magic-wand { width: 16px; height: 16px; flex: 0 0 auto; }
.contacts-group-segment { min-width: 0; flex: 1 1 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: 999px; background: #F0F0F2; box-shadow: inset 0 1px 1px rgba(28,28,30,.035); }
.contacts-group-button { min-width: 0; height: 30px; padding: 0 4px; border: 0; border-radius: 999px; color: #8E8E93; background: transparent; font-family: var(--page-title-font); font-size: clamp(9.5px, 2.55vw, 10.5px); font-weight: 560; line-height: 1; letter-spacing: -.02em; white-space: nowrap; cursor: pointer; transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease; -webkit-tap-highlight-color: transparent; }
.contacts-group-button[aria-pressed="true"] { color: #1C1C1E; background: #FFFFFF; box-shadow: 0 1px 3px rgba(28,28,30,.09); }
.contacts-group-button:active { transform: scale(.965); }
.contacts-group-button:focus-visible { outline: 2px solid rgba(28,28,30,.28); outline-offset: 2px; }
.contacts-directory { width: min(100%, 360px); margin: 14px auto 0; }
.contacts-directory-list { display: grid; gap: 8px; }
.contacts-directory-empty { margin: 0; padding: 18px 8px 7px; color: #8E8E93; font-size: 13px; line-height: 1.4; text-align: center; }
.contacts-directory-card { position: relative; min-height: 62px; display: flex; align-items: center; gap: 11px; padding: 8px 10px; overflow: hidden; isolation: isolate; border-radius: 13px; background: #FFFFFF; box-shadow: 0 1px 2px rgba(25,25,30,.025), 0 5px 12px rgba(25,25,30,.03); cursor: pointer; touch-action: pan-y; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; -webkit-tap-highlight-color: transparent; }
.contacts-directory-card:active, .contacts-directory-card.is-long-pressing {transform: scale(.985); box-shadow: 0 1px 2px rgba(25,25,30,.02), 0 2px 6px rgba(25,25,30,.035); opacity: .72;}
.contacts-directory-card:focus-visible { outline: 2px solid rgba(0,122,255,.42); outline-offset: 2px; }
.contacts-directory-card::after { content: ''; position: absolute; right: -16px; bottom: -25px; z-index: 0; width: 112px; height: 72px; opacity: .56; pointer-events: none; background: repeating-radial-gradient(ellipse at 100% 100%, transparent 0 6px, rgba(142,142,147,.16) 6px 7px, transparent 7px 13px); transform: rotate(-16deg); }
.contacts-directory-card > * { position: relative; z-index: 1; }
.contacts-directory-avatar { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 46px; overflow: hidden; border-radius: 12px; color: #C7C7CC; background: #E5E5EA; }
.contacts-directory-avatar svg { width: 25px; height: 25px; fill: currentColor; }
.contacts-directory-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.contacts-directory-copy { min-width: 0; flex: 1; }
.contacts-directory-name { overflow: hidden; color: #1C1C1E; font-size: 15px; font-weight: 400; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.contacts-directory-meta { overflow: hidden; margin: 3px 0 0; color: #8E8E93; font-size: 12px; font-weight: 400; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.contacts-npc-dialog-scrim { position: absolute; inset: 0; z-index: 75; display: grid; place-items: center; height: 100%; min-height: 0; overflow: hidden; padding: 22px; background: rgba(0,0,0,.24); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.contacts-npc-dialog-scrim.is-visible { opacity: 1; pointer-events: auto; }
.contacts-npc-dialog { width: min(100%, 352px); max-height: calc(100% - 44px); overflow: auto; padding: 21px 18px 16px; border-radius: 19px; color: #000000; background: rgba(255,255,255,.98); box-shadow: 0 18px 48px rgba(0,0,0,.22); overscroll-behavior: contain; transform: translateY(10px) scale(.98); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.contacts-npc-dialog-scrim.is-visible .contacts-npc-dialog { transform: translateY(0) scale(1); }
.contacts-npc-dialog-title { margin: 0; font-family: var(--settings-title-font); font-size: 18px; font-weight: 600; line-height: 1.25; text-align: center; }
.contacts-npc-dialog-label { display: block; margin: 14px 0 8px; color: #636366; font-size: 12px; font-weight: 500; line-height: 1.2; }
.contacts-npc-identity-list { display: grid; gap: 7px; max-height: 176px; overflow: auto; padding: 1px; overscroll-behavior: contain; }
.contacts-npc-identity-empty { margin: 0; padding: 14px 10px; border-radius: 12px; color: #8E8E93; background: #F2F2F7; font-size: 12px; line-height: 1.45; text-align: center; }
.contacts-npc-identity-option { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; align-items: start; min-height: 62px; padding: 9px 10px; border-radius: 12px; color: #1C1C1E; background: #F2F2F7; cursor: pointer; transition: background .16s ease, transform .16s ease, box-shadow .16s ease; -webkit-tap-highlight-color: transparent; }
.contacts-npc-identity-option.is-selected { background: #FFFFFF; box-shadow: 0 1px 3px rgba(28,28,30,.08); }
.contacts-npc-identity-option:active { transform: scale(.987); }
.contacts-npc-identity-option:focus-within { outline: 2px solid rgba(0,122,255,.42); outline-offset: 2px; }
.contacts-npc-identity-checkbox { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #007AFF; }
.contacts-npc-identity-copy { min-width: 0; }
.contacts-npc-identity-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.contacts-npc-identity-name { overflow: hidden; min-width: 0; font-size: 14px; font-weight: 560; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.contacts-npc-identity-kind { flex: 0 0 auto; padding: 2px 5px; border-radius: 5px; color: #6C6C70; background: rgba(142,142,147,.15); font-size: 10px; font-weight: 600; line-height: 1.1; }
.contacts-npc-identity-setting { display: -webkit-box; overflow: hidden; margin: 4px 0 0; color: #8E8E93; font-size: 11px; line-height: 1.38; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.contacts-npc-stepper-button:focus-visible, .contacts-npc-dialog-button:focus-visible { outline: 2px solid rgba(0,122,255,.42); outline-offset: 2px; }
.contacts-npc-count-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 8px; align-items: center; }
.contacts-npc-stepper-button { height: 42px; padding: 0; border: 0; border-radius: var(--settings-surface-radius); color: #1C1C1E; background: #F2F2F7; font-size: 21px; font-weight: 400; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.contacts-npc-stepper-button:active { transform: scale(.97); }
.contacts-npc-count-input { width: 100%; height: 42px; padding: 0 10px; border: 0; border-radius: var(--settings-surface-radius); outline: 0; color: #000000; background: #F2F2F7; font-size: 16px; line-height: 1; text-align: center; }
.contacts-npc-count-input:focus-visible, .contacts-npc-setting-content:focus-visible, .contacts-npc-requirement:focus-visible { outline: 2px solid rgba(0,122,255,.42); outline-offset: 2px; }
.contacts-npc-setting-content, .contacts-npc-requirement { width: 100%; min-height: 68px; padding: 10px 12px; border: 0; border-radius: var(--settings-surface-radius); outline: 0; color: #000000; background: #F2F2F7; font-family: inherit; font-size: 15px; line-height: 1.45; resize: vertical; }
.contacts-npc-requirement { min-height: 50px; }
.contacts-npc-generator-notice { min-height: 18px; margin: 9px 0 0; color: #8E8E93; font-size: 12px; line-height: 1.45; text-align: center; }
.contacts-npc-generator-notice[data-tone="error"] { color: #D70015; }
.contacts-npc-generator-notice[data-tone="success"] { color: #248A3D; }
.contacts-npc-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 17px; }
.contacts-npc-dialog-button { height: 42px; padding: 0 10px; border: 0; border-radius: var(--settings-surface-radius); color: #1C1C1E; background: #E5E5EA; font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.contacts-npc-dialog-button:active { transform: scale(.98); }
.contacts-npc-dialog-button--primary { color: #FFFFFF; background: #007AFF; }
.contacts-npc-dialog-button:disabled, .contacts-npc-stepper-button:disabled, .contacts-npc-identity-checkbox:disabled { opacity: .48; cursor: default; }
.contacts-announcement { width: 1px; height: 1px; position: absolute; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* Contact creation is a dedicated source page, not a modal or injected overlay. */
.contacts-create-page { position: absolute; inset: 0; z-index: 12; display: flex; flex-direction: column; overflow: auto; color: #000000; background: #F2F2F7; opacity: 0; pointer-events: none; transform: translateX(100%); transition: transform .38s cubic-bezier(.32,.72,.24,1), opacity .2s ease; -webkit-overflow-scrolling: touch; }
.contacts-create-page[hidden], .contacts-create-page [hidden] { display: none; }
.contacts-create-page.is-visible { opacity: 1; pointer-events: auto; transform: translateX(0); }
.contacts-create-page.is-exiting { opacity: 0; pointer-events: none; transform: translateX(100%); }
.contacts-create-page .status-bar { position: sticky; top: 0; z-index: 2; flex: 0 0 calc(var(--status-h) + var(--safe-top)); background: #F2F2F7; }
.contacts-create-navigation { position:sticky; top:calc(var(--status-h) + var(--safe-top)); z-index:2; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; min-height:58px; padding:0 16px; background:#F2F2F7; }
.contacts-create-navigation-title { min-width:0; grid-column:1; margin:0; overflow:hidden; color:#000000; font-family:var(--page-title-font); font-size:var(--settings-title-size); font-weight:var(--settings-title-weight); line-height:1.12; letter-spacing:-.042em; text-align:left; text-overflow:ellipsis; white-space:nowrap; }
.contacts-create-navigation-title--back { min-height:58px; padding:0; border:0; background:transparent; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.contacts-create-navigation-title--back:active { opacity:.55; }
.contacts-create-content { width: 100%; max-width: 600px; margin: 0 auto; padding: 12px 16px calc(48px + var(--safe-bottom)); }
.contact-badge-stage { display: flex; flex-direction: column; align-items: center; padding: 2px 0 20px; }
.contact-badge { position: relative; width: min(100%, 360px); aspect-ratio: 1.48 / 1; padding: 8.8% 5.3% 4.8%; }
.contact-badge-clip { position: absolute; top: 0; left: 50%; z-index: 4; width: 38px; height: 54px; transform: translateX(-50%); }
.contact-badge-clip::before { content: ''; position: absolute; top: 0; left: 50%; width: 19px; height: 11px; border: 2px solid #B5B5B7; border-bottom: 0; border-radius: 7px 7px 0 0; background: rgba(255,255,255,.7); box-shadow: inset 0 1px 1px rgba(255,255,255,.95); transform: translateX(-50%); }
.contact-badge-clip::after { content: ''; position: absolute; top: 10px; left: 50%; width: 29px; height: 34px; border: .5px solid #828286; border-radius: 6px; background: linear-gradient(180deg,#F4F4F5 0%,#B9B9BD 38%,#DBDBDD 68%,#959599 100%); box-shadow: inset 0 1px 1px rgba(255,255,255,.9), inset -1px 0 2px rgba(0,0,0,.16), 0 4px 7px rgba(0,0,0,.17); transform: translateX(-50%); }
.contact-badge-clip span { position: absolute; top: 22px; left: 50%; z-index: 1; width: 9px; height: 9px; border: .5px solid #6F6F73; border-radius: 50%; background: radial-gradient(circle at 30% 30%,#FFF,#9A9A9F 60%,#55555A); box-shadow: inset 0 1px 1px rgba(255,255,255,.9),0 1px 2px rgba(0,0,0,.25); transform: translateX(-50%); }
.contact-badge-strap { position: absolute; top: 32px; left: 50%; z-index: 3; width: 37px; height: 43px; display: grid; place-items: end center; padding-bottom: 7px; border: .5px solid rgba(255,255,255,.95); border-bottom-color: rgba(135,135,141,.55); border-radius: 8px; background: rgba(255,255,255,.48); box-shadow: inset 0 0 7px rgba(255,255,255,.8),0 5px 8px rgba(0,0,0,.13); transform: translateX(-50%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.contact-badge-strap span { width: 8px; height: 8px; border: .5px solid #77777C; border-radius: 50%; background: radial-gradient(circle at 35% 35%,#FFF,#AAA 50%,#666); box-shadow: inset 0 -1px 1px rgba(0,0,0,.25),0 1px 2px rgba(0,0,0,.22); }
.contact-badge-sleeve { position: relative; z-index: 2; width: 100%; height: 100%; display: flex; padding: 8px; border-radius: 18px; background: rgba(255,255,255,.34); box-shadow: inset 0 0 0 1px rgba(255,255,255,.82),inset 0 0 14px rgba(255,255,255,.5),0 10px 22px rgba(0,0,0,.09); backdrop-filter: blur(12px) saturate(120%); -webkit-backdrop-filter: blur(12px) saturate(120%); }
.contact-badge-sleeve::before { content: ''; position: absolute; inset: 5px; border: 1px dashed rgba(255,255,255,.92); border-radius: 13px; pointer-events: none; }
.contact-badge-paper { position: relative; z-index: 1; width: 100%; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px; overflow: hidden; border: 1px solid rgba(111,113,119,.16); border-radius: 8px; background-color: #FFFFFF; background-image: radial-gradient(circle at 1px 1px, rgba(142,142,147,.155) .95px, transparent 1.06px), linear-gradient(135deg, rgba(255,255,255,.58), rgba(255,255,255,0) 42%); background-size: 8px 8px, 100% 100%; background-position: 0 0, 0 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.72), inset 0 -1px 0 rgba(93,95,101,.05), 0 2px 6px rgba(0,0,0,.06); }
.contact-badge-paper::after { content: ''; position: absolute; right: -22px; bottom: -31px; width: 118px; height: 84px; opacity: .56; pointer-events: none; background: repeating-radial-gradient(ellipse at 100% 100%, transparent 0 6px, rgba(89,91,97,.16) 6px 7px, transparent 7px 13px); transform: rotate(-15deg); }
.contact-badge-paper > * { position: relative; z-index: 1; }
.contact-badge-photo { position: relative; width: 31%; height: 82%; min-height: 94px; display: grid; place-items: center; flex: 0 0 31%; overflow: hidden; padding: 0; border: 0; border-radius: 5px; color: #C7C7CC; background: #E5E5EA; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.contact-badge-photo:active { transform: scale(.98); }
.contact-badge-photo svg { width: 39px; height: 39px; fill: currentColor; }
.contact-badge-avatar-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.contact-badge-info { min-width: 0; flex: 1; display: grid; gap: 7px; }
.contact-badge-row { min-width: 0; display: flex; align-items: baseline; gap: 3px; margin: 0; color: #66686E; font-size: clamp(11px,2.85vw,13px); line-height: 1.25; }
.contact-badge-row span { flex: 0 0 auto; }
.contact-badge-row strong { min-width: 0; overflow: hidden; color: #24262B; font-size: inherit; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.contact-badge-row--signature {
  --contact-quote-size: clamp(10px, 3.65vw, 15px);
  --contact-signature-gap: clamp(3px, 1.1vw, 5px);
  display: block;
  width: 100%;
  overflow: hidden;
}
/* 签名与两侧世界书装饰作为同一内容组：右侧装饰始终贴随文字末端，而不是固定在工牌右侧。 */
.contact-badge-signature-frame {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  gap: var(--contact-signature-gap);
  vertical-align: top;
}
.contact-badge-row--signature strong {
  display: block;
  min-width: 0;
  max-width: calc(100% - (var(--contact-quote-size) * 2) - (var(--contact-signature-gap) * 2));
  overflow: hidden;
  flex: 0 1 auto;
  white-space: nowrap;
}
/* 直接提取自 xiyu 世界书底部的 wb-quote-icon；图形保持原始路径，大小随工牌可用宽度响应。 */
.contact-badge-worldbook-quote {
  width: var(--contact-quote-size);
  height: var(--contact-quote-size);
  min-width: var(--contact-quote-size);
  display: block;
  flex: 0 0 var(--contact-quote-size);
  fill: #E0E0E0;
  transform: translateY(-.25px);
}
.contact-badge-hint { margin: 11px 0 0; color: #8E8E93; font-size: 12px; line-height: 1.25; }
.contacts-create-mode-switch { margin-right: auto; margin-left: auto; }
.profile-rich-input--opening { min-height: 94px; }
@media (max-width: 360px) { .contacts-content { padding-right: 16px; padding-left: 16px; } .contacts-group-button { padding-right: 3px; padding-left: 3px; } .contact-badge-paper { gap: 10px; padding: 11px; } .contact-badge-info { gap: 7px; } }

@media (max-width: 360px) {
  .desktop-layer { --desktop-icon-radius: 16px; --desktop-label-size: 11px; --home-horizontal-gutter: 8px; --home-dock-side: 8px; }
  .desktop-layer .app-dock { padding-right: 5px; padding-left: 5px; }
}
@media (max-height: 720px) {
  .desktop-layer {
    --home-dock-h: 78px;
    --home-dock-bottom: max(24px, calc(var(--safe-bottom) + 18px));
    --home-page-gap: 12px;
  }
  .desktop-layer .app-dock { border-radius: 23px; }
  .desktop-layer .page-indicators { bottom: calc(var(--home-dock-h) + var(--home-dock-bottom) + 5px); }
}
@media (max-height: 640px) {
  :root { --status-h: 46px; }
  .merged-phone { height: max(100lvh, calc(626px + var(--safe-top) + var(--safe-bottom))); min-height: calc(626px + var(--safe-top) + var(--safe-bottom)); }
  .status-bar { padding-right: 22px; padding-left: 22px; }
  .status-time { font-size: 19px; }
  .desktop-layer {
    --home-page-top: calc(var(--status-h) + var(--safe-top) + 8px);
    --home-dock-h: 74px;
    --home-dock-bottom: max(16px, calc(var(--safe-bottom) + 14px));
    --home-page-gap: 8px;
  }
  .desktop-layer .app-label { height: 13px; font-size: 11px; line-height: 13px; }
  .desktop-layer .app-dock { border-radius: 22px; }
}
@media (min-width: 470px) {
  .desktop-layer { --home-dock-side: 18px; }
}
@media (min-width: 560px) {
  .merged-phone { border-radius: 42px; box-shadow: 0 18px 48px rgba(0,0,0,.14); }
  .settings-content { padding-right: 24px; padding-left: 24px; }
  .settings-title, .api-title { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .lock-layer, .settings-page, .contacts-page, .global-home-indicator, .desktop-layer .icon-box { transition: none; }
  .contacts-star-pendant { animation: none; }
}


/* WeChat — single signed-in surface with static detail views and data-backed contacts. */
.wechat-next-icon{width:1em;height:1em;display:inline-block;flex:none;fill:currentColor;vertical-align:middle}
.wechat-next-page{position:absolute;top:calc(var(--status-h) + var(--safe-top));right:0;bottom:0;left:0;z-index:30;display:flex;flex-direction:column;overflow:hidden;color:#171717;background:#f7f7f7;opacity:0;pointer-events:none;transform:translateX(100%);transition:transform .38s cubic-bezier(.32,.72,.24,1),opacity .2s ease}
.wechat-next-page.is-visible{opacity:1;pointer-events:auto;transform:translateX(0)}
.wechat-next-page.is-exiting{opacity:0;pointer-events:none;transform:translateX(100%)}
.merged-phone:has(.wechat-next-page.is-visible) .desktop-status-bar{color:#111;background:#f7f7f7}
.merged-phone.is-dark-mode:has(.wechat-next-page.is-visible) .desktop-status-bar{color:#fff;background:#000}
.wechat-next-page :is(button,input){font-family:inherit}
.wechat-next-login{flex:1 1 auto;min-height:0;overflow-y:auto;padding:44px 31px calc(30px + var(--safe-bottom));background:#f7f7f7}
.wechat-next-login:not([hidden]){display:flex;flex-direction:column}
.wechat-next-login-brand{display:grid;justify-items:center;gap:13px;color:#111}
.wechat-next-logo{font-size:46px;color:#07c160}
.wechat-next-login-brand h1{margin:0;font-size:21px;font-weight:600;letter-spacing:-.025em}
.wechat-next-login-form{display:grid;gap:13px;margin-top:50px}
.wechat-next-field{display:grid;gap:8px;color:#777;font-size:12px}
.wechat-next-field input{width:100%;height:49px;box-sizing:border-box;padding:0 14px;border:1px solid #e5e5e5;border-radius:13px;outline:0;color:#171717;background:#fff;font:15px/1 inherit}
.wechat-next-field input:focus{border-color:#07c160;box-shadow:0 0 0 3px rgba(7,193,96,.12)}
.wechat-next-login-submit{min-height:49px;margin-top:5px;border:0;border-radius:13px;color:#fff;background:#07c160;font:600 15px/1 inherit}
.wechat-next-login-submit:active{opacity:.72}
.wechat-next-login-notice{min-height:18px;margin:10px 0 0;color:#888;font-size:12px;line-height:1.4;text-align:center}
.wechat-next-login-notice.is-error{color:#e15353}
.wechat-next-login-footer{margin-top:auto;padding-top:37px;text-align:center}
.wechat-next-or{margin:0 0 17px;color:#aaa;font-size:12px}
.wechat-next-shortcuts{display:flex;justify-content:center;gap:12px}
.wechat-next-shortcut{width:46px;height:46px;display:grid;place-items:center;padding:0;border:1px solid #e6e6e6;border-radius:50%;color:#3b3b3b;background:#fff;font-size:18px}
.wechat-next-shortcut:active{opacity:.72}
.wechat-next-confirm{position:absolute;inset:0;z-index:70;display:grid;place-items:center;padding:24px;background:rgba(0,0,0,.31);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.wechat-next-confirm[hidden],.wechat-contact-delete-confirm[hidden]{display:none}
.wechat-next-confirm-card{width:min(100%,282px);box-sizing:border-box;overflow:hidden;border-radius:18px;color:#191919;background:#fff;box-shadow:0 18px 48px rgba(0,0,0,.19)}
.wechat-next-confirm-card h3{margin:22px 20px 5px;font-size:17px;font-weight:600;text-align:center}
.wechat-next-confirm-card p{margin:0 20px 20px;color:#777;font-size:13px;line-height:1.45;text-align:center}
.wechat-next-confirm-card>div{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #e8e8e8}
.wechat-next-confirm-card button{min-height:47px;border:0;border-right:1px solid #e8e8e8;color:#1677e8;background:#fff;font:500 14px/1 inherit}
.wechat-next-confirm-card button:last-child{border-right:0}
.wechat-next-confirm-card button.is-destructive{color:#e14444}
.wechat-next-confirm-card button:active{opacity:.72}
.wechat-next-app{position:relative;flex:1 1 auto;min-height:0;overflow:hidden;background:#f7f7f7}
.wechat-next-app[hidden]{display:none}
.wechat-next-main{position:absolute;inset:0;overflow:hidden}
.wechat-next-panel{position:absolute;inset:0;display:none;overflow-y:auto;overscroll-behavior:contain;padding:0 14px calc(124px + var(--safe-bottom));background:#f7f7f7}
.wechat-next-panel.is-active{display:block}
.wechat-next-nav{min-height:64px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px}
.wechat-next-primary-nav{grid-template-columns:36px minmax(0,1fr) 36px;gap:0;padding:0 1px}
.wechat-next-primary-return{justify-self:start}
.wechat-next-primary-title{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;font-size:18px;letter-spacing:-.028em}
.wechat-next-primary-nav .wechat-next-top-button{justify-self:end}
.wechat-next-title{min-width:0;margin:0;padding:0;border:0;color:#171717;background:transparent;font:600 20px/1.1 inherit;letter-spacing:-.035em;text-align:left}
.wechat-next-top-button{width:37px;height:37px;display:grid;place-items:center;padding:0;border:0;border-radius:11px;color:#171717;background:transparent;font-size:19px}
.wechat-next-top-button:active{opacity:.56}
.wechat-next-search{height:42px;display:flex;align-items:center;gap:9px;box-sizing:border-box;margin:2px 0 10px;padding:0 12px;border:1px solid #e6e6e6;border-radius:12px;color:#9a9a9a;background:#fff;font-size:15px}
.wechat-next-search input{min-width:0;flex:1;border:0;outline:0;color:#171717;background:transparent;font:14px/1 inherit}
.wechat-next-search input::placeholder{color:#aaa}
.wechat-next-function-list{display:grid;gap:9px;margin-top:4px}
.wechat-next-entry{width:100%;min-height:58px;display:grid;grid-template-columns:35px minmax(0,1fr) 12px;align-items:center;gap:11px;padding:9px 13px;border:1px solid #e8e8e8;border-radius:14px;color:#171717;background:#fff;text-align:left}
.wechat-next-entry:active{opacity:.7}
.wechat-next-entry-icon{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;color:#fff;font-size:16px}
.wechat-next-entry-icon.is-green{background:#07c160}
.wechat-next-entry-icon.is-blue{background:#4086f4}
.wechat-next-entry-icon.is-orange{background:#f6a33d}
.wechat-next-entry-icon.is-yellow{background:#f4bd2f}
.wechat-next-entry-icon.is-purple{background:#a566e3}
.wechat-next-entry-icon.is-red{background:#e85b5b}
.wechat-next-entry-icon.is-gray{background:#8e8e93}
.wechat-next-entry-copy{min-width:0;overflow:hidden;font-size:15px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
.wechat-next-entry-chevron{width:7px;height:12px;color:#b7b7b7}
.wechat-next-contact-groups{display:grid;gap:10px;margin-top:13px}
.wechat-next-group{overflow:hidden;border:1px solid #e8e8e8;border-radius:14px;background:#fff}
.wechat-next-group-toggle{width:100%;min-height:47px;display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:9px;padding:0 13px;border:0;border-bottom:1px solid #eee;color:#343434;background:#fff;text-align:left}
.wechat-next-group.is-collapsed .wechat-next-group-toggle{border-bottom:0}
.wechat-next-group-toggle:active{opacity:.68}
.wechat-next-group-arrow{width:9px;height:9px;color:#777;transform:rotate(90deg);transition:transform .18s ease}
.wechat-next-group.is-collapsed .wechat-next-group-arrow{transform:rotate(0)}
.wechat-next-group-name{overflow:hidden;font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.wechat-next-group-count{color:#999;font-size:12px;font-variant-numeric:tabular-nums}
.wechat-next-contact-list{overflow:hidden}
.wechat-next-contact-row{width:100%;min-height:63px;display:grid;grid-template-columns:40px minmax(0,1fr) 14px;align-items:center;gap:11px;padding:10px 13px;border:0;border-bottom:1px solid #efefef;color:#171717;background:#fff;text-align:left;touch-action:manipulation}
.wechat-next-contact-row:last-child{border-bottom:0}
.wechat-next-contact-row:active{opacity:.72}
.wechat-next-contact-avatar,.wechat-next-me-avatar,.wechat-next-moment-avatar,.wechat-profile-avatar,.wechat-chat-person-avatar,.wechat-chat-message-avatar{overflow:hidden;display:grid;place-items:center;color:#fff;background:#5da27a}
.wechat-next-contact-avatar{width:40px;height:40px;border-radius:10px;font-size:15px}
.wechat-next-contact-avatar img,.wechat-next-me-avatar img,.wechat-next-moment-avatar img,.wechat-profile-avatar img,.wechat-chat-person-avatar img,.wechat-chat-message-avatar img{width:100%;height:100%;object-fit:cover}
.wechat-next-contact-copy{min-width:0;display:grid;gap:4px}
.wechat-next-contact-copy strong{overflow:hidden;color:#202020;font-size:14px;font-weight:600;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}
.wechat-next-contact-copy span{overflow:hidden;color:#8b8b8b;font-size:11px;line-height:1.15;text-overflow:ellipsis;white-space:nowrap}
.wechat-next-contact-chevron{width:7px;height:12px;color:#b7b7b7}
.wechat-next-empty{min-height:175px;display:grid;align-content:center;justify-items:center;gap:10px;color:#b2b2b2}
.wechat-next-empty-icon{font-size:33px}
.wechat-next-empty p{margin:0;font-size:12px}
.wechat-next-moments-panel{padding:0;overflow:hidden}
.wechat-next-moments-surface{position:relative;min-height:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;background:#f7f7f7}
.wechat-next-moment-cover{height:45%;flex:none;position:relative;display:block;width:100%;padding:0;border:0;color:#999;background:#eee center/cover no-repeat;cursor:pointer}
.wechat-next-moment-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.06),transparent 42%,rgba(0,0,0,.14))}
.wechat-next-moment-cover.has-image::after{background:linear-gradient(to bottom,rgba(0,0,0,.16),transparent 42%,rgba(0,0,0,.2))}
.wechat-next-cover-caption{position:absolute;z-index:1;right:17px;bottom:12px;padding:5px 8px;border-radius:8px;color:rgba(255,255,255,.92);background:rgba(0,0,0,.23);font-size:11px}
.wechat-next-moment-tools{position:absolute;z-index:3;top:12px;right:13px;display:flex;gap:8px}
.wechat-next-moment-back{position:absolute;z-index:3;top:12px;left:13px;width:40px;height:40px;display:grid;place-items:center;padding:0;border:0;border-radius:0;color:#fff;background:transparent;box-shadow:none;font-size:19px;filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.38))}
.wechat-next-moment-back:active{opacity:.62}
.wechat-next-hero-button{width:40px;height:40px;display:grid;place-items:center;padding:0;border:0;color:#fff;background:transparent;box-shadow:none;font-size:18px;filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.38));cursor:pointer}
.wechat-next-hero-button:active{transform:scale(.94)}
.wechat-next-moment-profile{position:absolute;z-index:3;top:calc(45% - 52px);right:17px;display:grid;justify-items:end;gap:8px;min-width:218px;color:#171717}
.wechat-next-moment-name-line{display:flex;align-items:center;justify-content:flex-end;gap:9px}
.wechat-next-moment-name-line strong{max-width:157px;overflow:hidden;font-size:18px;font-weight:600;letter-spacing:-.025em;line-height:1.05;text-overflow:ellipsis;white-space:nowrap}
.wechat-next-moment-avatar{width:76px;height:76px;border:3px solid #fff;border-radius:12px;box-shadow:0 1px 4px rgba(0,0,0,.13);font-size:25px}
.wechat-next-moment-profile p{max-width:154px;margin:0 3px 0 0;overflow:hidden;color:#777;font-size:12px;line-height:1.25;text-align:right;text-overflow:ellipsis;white-space:nowrap}
.wechat-next-moment-content{flex:1 1 auto;min-height:0;overflow-y:auto;padding:93px 17px calc(118px + var(--safe-bottom));background:#f7f7f7}
.wechat-next-moment-empty{min-height:148px;display:grid;align-content:center;justify-items:center;gap:8px;color:#b0b0b0}
.wechat-next-moment-empty p{margin:0;font-size:12px}
.wechat-next-me-panel{padding-top:0}
.wechat-next-me-entry{grid-template-columns:36px minmax(0,1fr) 12px;gap:10px}
.wechat-next-me-entry .wechat-next-entry-icon{width:36px;height:36px;border-radius:0;color:#171717;background:transparent;font-size:23px}
.wechat-next-me-entry .wechat-next-entry-icon.is-green{color:#07c160;background:transparent}
.wechat-next-me-entry .wechat-next-entry-icon.is-blue{color:#4086f4;background:transparent}
.wechat-next-me-entry .wechat-next-entry-icon.is-orange{color:#f6a33d;background:transparent}
.wechat-next-me-entry .wechat-next-entry-icon.is-yellow{color:#d89c1e;background:transparent}
.wechat-next-me-entry .wechat-next-entry-icon.is-purple{color:#a566e3;background:transparent}
.wechat-next-me-entry .wechat-next-entry-icon.is-red{color:#e85b5b;background:transparent}
.wechat-next-me-entry .wechat-next-entry-icon.is-gray{color:#707075;background:transparent}
.wechat-next-me-entry .wechat-next-entry-icon .wechat-next-icon{width:23px;height:23px}
.wechat-next-me-profile{margin-top:18px}
.wechat-next-me-profile{width:100%;display:grid;grid-template-columns:66px minmax(0,1fr) auto;align-items:center;gap:13px;margin-top:8px;padding:14px;border:1px solid #e9e9e9;border-radius:15px;color:#171717;background:#fff;text-align:left;cursor:pointer}
.wechat-next-me-profile:active{opacity:.72}
.wechat-next-me-avatar{width:66px;height:66px;border-radius:14px;font-size:22px}
.wechat-next-me-copy{min-width:0;display:grid;gap:5px}
.wechat-next-me-copy strong{overflow:hidden;color:#161616;font-size:18px;font-weight:600;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}
.wechat-next-me-copy small,.wechat-next-me-copy em{overflow:hidden;color:#8b8b8b;font-size:12px;font-style:normal;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}
.wechat-next-status-button{min-height:29px;display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 10px;border:1px solid #e5e5e5;border-radius:999px;color:#535356;background:#f6f6f7;font:600 12px/1 inherit;cursor:pointer}
.wechat-next-status-button:active{opacity:.58}
.wechat-next-me-menu{display:grid;gap:9px;margin-top:13px}
.wechat-next-personalization-menu{gap:0;overflow:hidden;padding:0;border:1px solid #e6e6e6;border-radius:14px;background:#fff}
.wechat-next-personalization-menu .wechat-next-entry{border:0;border-radius:0}
.wechat-next-personalization-menu .wechat-next-entry+.wechat-next-entry{border-top:1px solid #eee}
.wechat-next-dock{position:absolute;z-index:7;left:50%;bottom:calc(var(--safe-bottom) + 30px);width:min(calc(100% - 82px),318px);min-height:64px;box-sizing:border-box;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:8px 9px;border:1px solid rgba(0,0,0,.07);border-radius:21px;background:rgba(255,255,255,.96);box-shadow:0 10px 25px rgba(0,0,0,.14);transform:translateX(-50%)}
.wechat-next-dock-button{display:grid;grid-template-rows:25px 14px;align-content:center;justify-items:center;gap:2px;min-width:0;padding:0;border:0;color:#8a8a8a;background:transparent;font-family:inherit;font-size:10px;font-weight:500;line-height:14px;cursor:pointer}
.wechat-next-dock-icon{width:22px;height:22px}
.wechat-next-dock-button span{display:block;max-width:100%;height:14px;overflow:hidden;line-height:14px;text-overflow:ellipsis;white-space:nowrap}
.wechat-next-dock-button.is-active{color:#07c160}
.wechat-next-dock-button:active{opacity:.58}
.wechat-detail-view{position:absolute;z-index:20;inset:0;display:flex;flex-direction:column;overflow:hidden;color:#171717;background:#f7f7f7}
.wechat-detail-view[hidden]{display:none}
.wechat-detail-view .wechat-next-nav{flex:none;padding:0 14px}
.wechat-detail-view .wechat-next-title{font-size:18px;text-align:center}
.wechat-detail-view .wechat-next-nav{grid-template-columns:36px minmax(0,1fr) 36px}
.wechat-detail-view .wechat-next-nav::after{content:"";width:36px;height:36px}
.wechat-next-nav-back{width:36px;height:36px;display:grid;place-items:center;padding:0;border:0;border-radius:10px;color:#171717;background:transparent;font-size:17px}
.wechat-next-nav-back:active{opacity:.55}
.wechat-detail-scroll{flex:1 1 auto;overflow-y:auto;padding:7px 14px calc(28px + var(--safe-bottom))}
.wechat-request-scroll{display:grid;align-content:start}
.wechat-detail-empty{margin:30px 0;color:#aaa;font-size:13px;text-align:center}
.wechat-add-friend-scroll{padding-top:19px}
.wechat-add-friend-field{display:block;margin:0}.wechat-add-friend-hint{margin:9px 3px 0;color:#929292;font-size:12px;line-height:1.35}
.wechat-add-friend-field input{width:100%;height:52px;box-sizing:border-box;padding:0 15px;border:1px solid #e4e4e4;border-radius:13px;outline:0;color:#171717;background:#fff;font:15px/1 inherit}
.wechat-add-friend-field input:focus{border-color:#07c160;box-shadow:0 0 0 3px rgba(7,193,96,.12)}
.wechat-primary-action{width:100%;min-height:49px;display:flex;align-items:center;justify-content:center;margin-top:12px;padding:0;border:0;border-radius:13px;color:#fff;background:#07c160;font:600 15px/1 inherit}
.wechat-primary-action:active{opacity:.72}
.wechat-add-friend-notice{min-height:20px;margin:12px 3px;color:#888;font-size:12px;text-align:center}
.wechat-add-friend-notice.is-error{color:#e15353}
.wechat-profile-scroll{display:grid;align-content:start;gap:12px;padding-top:15px}
.wechat-contact-hero{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:14px;padding:4px 2px 17px;border-bottom:1px solid #e8e8e8;background:transparent}
.wechat-profile-avatar{width:76px;height:76px;border-radius:8px;font-size:27px}
.wechat-contact-hero div{min-width:0}
.wechat-contact-hero strong,.wechat-contact-hero small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wechat-contact-hero strong{font-size:20px;font-weight:600;letter-spacing:-.028em}
.wechat-contact-hero small{margin-top:8px;color:#898989;font-size:12px}
.wechat-contact-action-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:0 14px}.wechat-contact-action-grid button{min-height:62px;display:flex;align-items:center;justify-content:flex-start;gap:14px;padding:0 18px;border:1px solid #ebebed;border-radius:18px;color:#202020;background:#fff;box-shadow:0 3px 12px rgba(0,0,0,.035);font:600 15px/1 inherit;text-align:left}.wechat-contact-action-grid button .wechat-next-icon,.wechat-contact-action-grid button svg{width:20px;height:20px;display:block;flex:0 0 20px}.wechat-contact-action-grid button:active{opacity:.68}
.wechat-chat-view{padding:0;background:#f7f7f7}
.wechat-chat-topbar{z-index:2;display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:10px;flex:none;padding:14px 16px 16px;border-bottom:1px solid rgba(0,0,0,.05);border-radius:0 0 28px 28px;color:#202020;background:rgba(255,255,255,.97);box-shadow:0 6px 18px rgba(0,0,0,.04)}.wechat-chat-back{width:24px;height:24px;display:grid;place-items:center;padding:0;border:0;color:#202020;background:transparent}.wechat-chat-back:active{opacity:.68}
.wechat-chat-person-chip{min-width:0;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:11px;padding:2px 0;border:0;color:#202020;background:transparent;text-align:left}.wechat-chat-person-chip:active{opacity:.7}.wechat-chat-person-avatar{width:44px;height:44px;border-radius:10px;font-size:15px}.wechat-chat-person-chip span:last-child{min-width:0;display:grid;gap:3px}.wechat-chat-person-chip strong,.wechat-chat-person-chip small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wechat-chat-person-chip strong{font-size:15px;line-height:1.05}.wechat-chat-person-chip small{color:#07a950;font-size:11px;line-height:1}
.wechat-chat-toolbar{display:flex;align-items:center;gap:10px}.wechat-chat-toolbar button{width:22px;height:22px;display:grid;place-items:center;padding:0;border:0;color:#252525;background:transparent;font-size:18px}.wechat-chat-toolbar button:active{opacity:.56}
.wechat-chat-messages{min-height:0;flex:1 1 auto;overflow-y:auto;padding:20px 16px 26px}.wechat-chat-message-group{display:grid;gap:7px;margin:0 0 20px}.wechat-chat-message-group.is-incoming{justify-items:start}.wechat-chat-message-group.is-outgoing{justify-items:end}.wechat-chat-message-time{color:#aaa;font-size:10px;font-variant-numeric:tabular-nums;line-height:1}.wechat-chat-message-avatar{width:38px;height:38px;border-radius:10px;font-size:13px}.wechat-chat-bubbles{display:grid;gap:4px;max-width:min(78%,270px)}.wechat-chat-message-group.is-incoming .wechat-chat-bubbles{justify-items:start}.wechat-chat-message-group.is-outgoing .wechat-chat-bubbles{justify-items:end}
.wechat-chat-bubble{max-width:100%;box-sizing:border-box;margin:0;padding:10px 13px;border:0;color:#262626;background:#fff;font-size:13.5px;line-height:1.42;word-break:break-word;box-shadow:none}.wechat-chat-message-group.is-outgoing .wechat-chat-bubble{color:#1f1f1f;border:0;box-shadow:none}.wechat-chat-message-group.is-outgoing .wechat-chat-bubble[data-bubble-tone="1"]{background:#f1f3f5}.wechat-chat-message-group.is-outgoing .wechat-chat-bubble[data-bubble-tone="2"]{background:#e6eaee}.wechat-chat-message-group.is-outgoing .wechat-chat-bubble[data-bubble-tone="3"]{background:#dce2e7}.wechat-chat-message-group.is-outgoing .wechat-chat-bubble[data-bubble-tone="4"]{background:#d2d9df}.wechat-chat-bubble.is-single{border-radius:19px}.wechat-chat-message-group.is-incoming .wechat-chat-bubble.is-first{border-radius:19px 19px 19px 4px}.wechat-chat-message-group.is-incoming .wechat-chat-bubble.is-middle{border-radius:4px 19px 19px 4px}.wechat-chat-message-group.is-incoming .wechat-chat-bubble.is-last{border-radius:4px 19px 19px 19px}.wechat-chat-message-group.is-outgoing .wechat-chat-bubble.is-first{border-radius:19px 19px 4px 19px}.wechat-chat-message-group.is-outgoing .wechat-chat-bubble.is-middle{border-radius:19px 4px 4px 19px}.wechat-chat-message-group.is-outgoing .wechat-chat-bubble.is-last{border-radius:19px 4px 19px 19px}
.wechat-chat-composer-zone{flex:none;display:grid;grid-template-rows:auto auto;row-gap:12px;box-sizing:border-box;padding:12px 14px calc(16px + var(--safe-bottom) + 10px);border-top:1px solid rgba(0,0,0,.05);border-radius:28px 28px 0 0;background:rgba(255,255,255,.97);box-shadow:0 -6px 16px rgba(0,0,0,.03)}.wechat-chat-quick-actions{min-height:48px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));align-items:stretch;column-gap:2px;row-gap:0;overflow:hidden;margin:0;padding:0 2px;background:transparent;box-shadow:none;scrollbar-width:none}.wechat-chat-quick-actions::-webkit-scrollbar{display:none}.wechat-chat-quick-actions button{min-width:0;min-height:48px;display:grid;grid-template-rows:23px 11px;justify-items:center;align-items:center;gap:4px;padding:0;border:0;color:#555;background:transparent;font-size:18px}.wechat-chat-quick-actions button .wechat-next-icon{width:20px;height:20px;display:block}.wechat-chat-quick-actions button span{max-width:100%;overflow:hidden;font-size:8px;line-height:11px;white-space:nowrap;text-overflow:ellipsis;letter-spacing:0}.wechat-chat-quick-actions button:active{color:#07c160}
.wechat-chat-composer{display:grid;grid-template-columns:minmax(0,1fr) 66px;gap:14px;align-items:center;min-height:48px;padding:0;background:transparent;box-shadow:none}.wechat-chat-message-field{min-height:48px;display:flex;align-items:center;box-sizing:border-box;padding:0 14px;border-radius:26px;background:#fff;box-shadow:0 8px 18px rgba(0,0,0,.05)}.wechat-chat-message-field input{width:100%;height:36px;min-width:0;padding:8px 0;border:0;outline:0;color:#202020;background:transparent;font:15px/20px inherit;box-sizing:border-box}.wechat-chat-message-field input::placeholder{color:#a8a8a8}.wechat-chat-composer-actions{width:66px;height:48px;display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:0;background:transparent}.wechat-chat-composer-actions button{width:28px;height:44px;display:grid;place-items:center;padding:0;border:0;border-radius:0;color:#555;background:transparent;font-size:18px;box-shadow:none}.wechat-chat-send{width:28px;min-width:28px;height:44px;border:0;border-radius:0;color:#202020;background:transparent;font:inherit;box-shadow:none}.wechat-chat-send svg{width:20px;height:20px;display:block}.wechat-chat-composer-actions #WeChatChatAttach svg{width:19px;height:19px;display:block}.wechat-chat-composer-actions button:active{opacity:.58}.wechat-contact-delete-confirm{position:absolute;z-index:80;inset:0;display:grid;place-items:center;padding:24px;background:rgba(0,0,0,.31);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.wechat-next-settings{position:absolute;z-index:25;inset:0;overflow-y:auto;overscroll-behavior:contain;padding:0 17px calc(34px + var(--safe-bottom));color:#171717;background:#f7f7f7}
.wechat-next-settings[hidden]{display:none}
.wechat-next-settings-caption{margin:20px 3px 8px;color:#8d8d8d;font-size:12px;font-weight:600}
.wechat-next-settings-card{overflow:hidden;border:1px solid #e7e7e7;border-radius:15px;background:#fff}
.wechat-next-signout{width:100%;min-height:55px;display:flex;align-items:center;justify-content:space-between;padding:0 15px;border:0;color:#e14444;background:#fff;font:500 14px/1 inherit}
.wechat-next-signout .wechat-next-icon{font-size:19px}
.wechat-next-signout:active{opacity:.72}
.wechat-next-settings-note{margin:10px 5px;color:#989898;font-size:12px;line-height:1.55}
.wechat-next-toast{position:absolute;z-index:90;left:50%;bottom:calc(112px + var(--safe-bottom));max-width:calc(100% - 60px);margin:0;padding:8px 12px;border-radius:10px;color:#fff;background:rgba(25,25,25,.86);font-size:12px;line-height:1.25;opacity:0;pointer-events:none;transform:translate(-50%,8px);transition:opacity .16s ease,transform .16s ease;text-align:center}
.wechat-next-toast.is-visible{opacity:1;transform:translate(-50%,0)}
#MergedPhone.is-dark-mode .wechat-next-page,#MergedPhone.is-dark-mode .wechat-next-login,#MergedPhone.is-dark-mode .wechat-next-app,#MergedPhone.is-dark-mode .wechat-next-panel,#MergedPhone.is-dark-mode .wechat-next-settings,#MergedPhone.is-dark-mode .wechat-next-moment-content,#MergedPhone.is-dark-mode .wechat-detail-view,#MergedPhone.is-dark-mode .wechat-chat-view{color:#f5f5f7;background:#000;color-scheme:dark}
#MergedPhone.is-dark-mode .wechat-next-login-brand h1,#MergedPhone.is-dark-mode .wechat-next-title,#MergedPhone.is-dark-mode .wechat-next-top-button,#MergedPhone.is-dark-mode .wechat-next-nav-back,#MergedPhone.is-dark-mode .wechat-next-contact-copy strong,#MergedPhone.is-dark-mode .wechat-next-me-copy strong,#MergedPhone.is-dark-mode .wechat-chat-back{color:#f5f5f7}
#MergedPhone.is-dark-mode .wechat-next-field input,#MergedPhone.is-dark-mode .wechat-next-shortcut,#MergedPhone.is-dark-mode .wechat-next-search,#MergedPhone.is-dark-mode .wechat-next-group,#MergedPhone.is-dark-mode .wechat-next-group-toggle,#MergedPhone.is-dark-mode .wechat-next-contact-row,#MergedPhone.is-dark-mode .wechat-next-entry,#MergedPhone.is-dark-mode .wechat-next-me-profile,#MergedPhone.is-dark-mode .wechat-next-settings-card,#MergedPhone.is-dark-mode .wechat-next-signout,#MergedPhone.is-dark-mode .wechat-next-confirm-card,#MergedPhone.is-dark-mode .wechat-add-friend-field input,#MergedPhone.is-dark-mode .wechat-contact-hero,#MergedPhone.is-dark-mode .wechat-contact-action-grid button,#MergedPhone.is-dark-mode .wechat-chat-person-chip,#MergedPhone.is-dark-mode .wechat-chat-message-field,#MergedPhone.is-dark-mode .wechat-chat-bubble{color:#f5f5f7;border-color:#38383a;background:#1c1c1e}
#MergedPhone.is-dark-mode .wechat-next-group-toggle{border-bottom-color:#38383a}
#MergedPhone.is-dark-mode .wechat-next-contact-row{border-bottom-color:#38383a}
#MergedPhone.is-dark-mode .wechat-next-search input,#MergedPhone.is-dark-mode .wechat-next-field input,#MergedPhone.is-dark-mode .wechat-add-friend-field input,#MergedPhone.is-dark-mode .wechat-chat-message-field input{color:#f5f5f7}
#MergedPhone.is-dark-mode .wechat-next-field input::placeholder,#MergedPhone.is-dark-mode .wechat-next-search input::placeholder,#MergedPhone.is-dark-mode .wechat-next-contact-copy span,#MergedPhone.is-dark-mode .wechat-next-me-copy small,#MergedPhone.is-dark-mode .wechat-next-me-copy em,#MergedPhone.is-dark-mode .wechat-next-settings-caption,#MergedPhone.is-dark-mode .wechat-next-settings-note,#MergedPhone.is-dark-mode .wechat-next-moment-profile p,#MergedPhone.is-dark-mode .wechat-request-intro p,#MergedPhone.is-dark-mode .wechat-add-friend-hint,#MergedPhone.is-dark-mode .wechat-add-friend-notice,#MergedPhone.is-dark-mode .wechat-contact-hero small,#MergedPhone.is-dark-mode .wechat-contact-hero p,#MergedPhone.is-dark-mode .wechat-detail-empty{color:#98989d}
#MergedPhone.is-dark-mode .wechat-next-moment-cover{background-color:#242426}
#MergedPhone.is-dark-mode .wechat-next-moment-profile{color:#f5f5f7}
#MergedPhone.is-dark-mode .wechat-next-personalization-menu{border-color:#38383a;background:#1c1c1e}
#MergedPhone.is-dark-mode .wechat-next-personalization-menu .wechat-next-entry+.wechat-next-entry{border-color:#38383a}
#MergedPhone.is-dark-mode .wechat-next-dock{border-color:#38383a;background:rgba(28,28,30,.96)}
#MergedPhone.is-dark-mode .wechat-next-dock-button{color:#a9a9ae}
#MergedPhone.is-dark-mode .wechat-next-dock-button.is-active{color:#16ce70}
#MergedPhone.is-dark-mode .wechat-chat-topbar,#MergedPhone.is-dark-mode .wechat-chat-composer-zone{border-color:#38383a;background:rgba(28,28,30,.97)}
#MergedPhone.is-dark-mode .wechat-chat-toolbar button,#MergedPhone.is-dark-mode .wechat-chat-quick-actions button{color:#c9c9ce}
#MergedPhone.is-dark-mode .wechat-chat-message-group.is-incoming .wechat-chat-bubble{background:#2c2c2e}


/* Personalization: static page topology and one persisted source of truth. */
#MergedPhone { font-family: var(--app-font-family); }
#MergedPhone :is(button, input, textarea, select) { font-family: inherit; }

.appearance-detail-page { position:absolute; inset:0; z-index:22; display:flex; flex-direction:column; overflow:auto; color:#000000; background:#F2F2F7; opacity:0; pointer-events:none; transform:translateX(100%); transition:transform .38s cubic-bezier(.32,.72,.24,1), opacity .2s ease; -webkit-overflow-scrolling:touch; }
.appearance-detail-page.is-visible { opacity:1; pointer-events:auto; transform:translateX(0); }
.appearance-detail-page.is-exiting { opacity:0; pointer-events:none; transform:translateX(100%); }
.appearance-detail-page .status-bar { position:sticky; top:0; z-index:4; flex:0 0 calc(var(--status-h) + var(--safe-top)); background:#F2F2F7; }
.appearance-navigation { position:sticky; top:calc(var(--status-h) + var(--safe-top)); z-index:4; min-height:58px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; padding:0 16px; background:#F2F2F7; }
.appearance-navigation-title { min-width:0; grid-column:1; margin:0; overflow:hidden; color:inherit; font-family:var(--page-title-font); font-size:var(--settings-title-size); font-weight:var(--settings-title-weight); letter-spacing:-.042em; line-height:1.12; text-align:left; text-overflow:ellipsis; white-space:nowrap; }
.appearance-navigation-title--back { min-height:58px; padding:0; border:0; background:transparent; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.appearance-navigation-title--back:active,.appearance-navigation-action:active { opacity:.56; }
.appearance-navigation-action { grid-column:2; min-width:44px; min-height:58px; display:flex; align-items:center; justify-content:flex-end; padding:0; border:0; color:#007AFF; background:transparent; font-size:15px; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.appearance-content { width:100%; max-width:600px; margin:0 auto; padding:18px 16px calc(48px + var(--safe-bottom)); }
.appearance-page-caption { min-height:19px; margin:14px 0 18px; color:#8E8E93; font-size:13px; text-align:center; }
.appearance-section-caption { margin:24px 2px 10px; color:#6D6D72; font-size:13px; font-weight:500; }
.appearance-action-stack { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.appearance-action-button { min-height:50px; display:flex; align-items:center; justify-content:center; gap:7px; padding:0 10px; border:0; border-radius:13px; color:#FFFFFF; background:#007AFF; font-size:15px; font-weight:600; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.appearance-action-button svg { width:17px; height:17px; fill:currentColor; }
.appearance-action-button:active { transform:scale(.985); }
.appearance-action-button--muted { color:#007AFF; background:rgba(0,122,255,.1); }

/* Wallpaper editor: independent desktop and lock-screen assets. */
.wallpaper-preview-stage { width:min(70%,213px); aspect-ratio:9 / 16; margin:0 auto 8px; }
.wallpaper-preview-card { position:relative; width:142.857143%; margin:0; padding:8px; border-radius:30px; background:#111113; box-shadow:0 16px 34px rgba(0,0,0,.18); transform:scale(.7); transform-origin:top left; }
.wallpaper-phone-preview { position:relative; width:100%; aspect-ratio:9 / 15.5; overflow:hidden; border-radius:23px; background:#C9C9C9; }
.wallpaper-phone-preview::after { content:''; position:absolute; inset:0; pointer-events:none; box-shadow:inset 0 0 0 1px rgba(255,255,255,.18); }
.wallpaper-preview-island { position:absolute; z-index:2; top:10px; left:50%; width:76px; height:22px; border-radius:999px; background:#08080A; transform:translateX(-50%); }
.wallpaper-preview-time { position:absolute; z-index:2; top:52px; right:0; left:0; color:#FFFFFF; font-size:42px; font-weight:650; letter-spacing:-.055em; text-align:center; text-shadow:0 2px 8px rgba(0,0,0,.24); }
.wallpaper-preview-date { position:absolute; z-index:2; top:34px; right:0; left:0; color:#FFFFFF; font-size:12px; font-weight:600; letter-spacing:.02em; text-align:center; text-shadow:0 1px 4px rgba(0,0,0,.22); }
.wallpaper-preview-widget { position:absolute; z-index:2; top:126px; right:18px; left:18px; display:flex; flex-direction:column; gap:4px; padding:13px; border:1px solid rgba(255,255,255,.3); border-radius:16px; color:#FFFFFF; background:rgba(255,255,255,.16); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); }
.wallpaper-preview-widget b { font-size:14px; font-weight:600; }
.wallpaper-preview-widget span { font-size:11px; opacity:.9; }
.wallpaper-preview-icons { position:absolute; z-index:2; right:22px; bottom:115px; left:22px; display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.wallpaper-preview-icons i,.wallpaper-preview-dock i { display:block; aspect-ratio:1; border-radius:14px; background:rgba(255,255,255,.82); box-shadow:inset 0 0 0 1px rgba(255,255,255,.46),0 4px 8px rgba(0,0,0,.12); }
.wallpaper-preview-dock { position:absolute; z-index:2; right:17px; bottom:17px; left:17px; display:grid; grid-template-columns:repeat(4,1fr); gap:9px; padding:8px; border:1px solid rgba(255,255,255,.34); border-radius:24px; background:rgba(255,255,255,.24); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); }
.wallpaper-phone-preview[data-wallpaper-preview="lock"] .wallpaper-preview-icons,.wallpaper-phone-preview[data-wallpaper-preview="lock"] .wallpaper-preview-dock { display:none; }
.wallpaper-phone-preview[data-wallpaper-preview="desktop"] .wallpaper-preview-time,.wallpaper-phone-preview[data-wallpaper-preview="desktop"] .wallpaper-preview-date { display:none; }
.wallpaper-phone-preview.is-lock-wallpaper-off { background:#1C1C1E; }

#WallpaperPage .appearance-page-caption { margin:10px 0 12px; }
.wallpaper-scope-segment { display:grid; grid-template-columns:1fr 1fr; gap:3px; margin:8px 0 0; padding:3px; border-radius:11px; background:#E5E5EA; }
.wallpaper-scope-segment button { min-height:34px; border:0; border-radius:8px; color:#636366; background:transparent; font-size:14px; cursor:pointer; }
.wallpaper-scope-segment button.is-active { color:#1C1C1E; background:#FFFFFF; box-shadow:0 1px 2px rgba(0,0,0,.12); }
.wallpaper-lock-control { min-height:56px; display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:8px; padding:0 14px; border-radius:13px; background:#FFFFFF; }
.wallpaper-lock-copy { display:grid; gap:3px; }
.wallpaper-lock-copy b { color:#1C1C1E; font-size:16px; font-weight:400; }
.wallpaper-lock-copy span { color:#8E8E93; font-size:12px; }
.wallpaper-power-switch { position:relative; width:51px; height:31px; flex:0 0 auto; padding:0; border:0; border-radius:999px; background:#C7C7CC; cursor:pointer; transition:background .18s ease; }
.wallpaper-power-switch::after { content:''; position:absolute; top:2px; left:2px; width:27px; height:27px; border-radius:50%; background:#FFFFFF; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:transform .18s ease; }
.wallpaper-power-switch[aria-checked="true"] { background:#34C759; }
.wallpaper-power-switch[aria-checked="true"]::after { transform:translateX(20px); }

/* Fonts: no global, per-node text-size rewriting. The editor previews real selected type only. */
.font-preview-stage { position:relative; min-height:194px; display:grid; align-content:space-between; overflow:hidden; padding:23px 22px 22px; border:1px solid rgba(60,60,67,.12); border-radius:18px; color:#1C1C1E; background:#FFFFFF; box-shadow:0 1px 1px rgba(0,0,0,.02); }
.font-preview-stage::after { content:'Aa'; position:absolute; right:14px; bottom:-29px; color:rgba(0,122,255,.075); font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display",sans-serif; font-size:158px; font-weight:700; letter-spacing:-.12em; line-height:1; pointer-events:none; }
.font-preview-stage>* { position:relative; z-index:1; }
.font-preview-kicker { margin:0; color:#8E8E93; font-size:13px; font-weight:500; }
.font-preview-name { margin:7px 0 0; color:#007AFF; font-size:13px; font-weight:600; }
.font-preview-stage strong { max-width:285px; margin:28px 0 0; font-size:29px; font-weight:600; letter-spacing:-.048em; line-height:1.17; }
.font-preview-stage span { margin-top:14px; color:#6D6D72; font-size:13px; line-height:1.45; }
.font-slot-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.font-slot { min-height:84px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:8px; padding:13px 14px; overflow:hidden; border:1px solid rgba(60,60,67,.16); border-radius:13px; color:#1C1C1E; background:#FFFFFF; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.font-slot span { font-size:14px; font-weight:600; }
.font-slot em { max-width:100%; overflow:hidden; color:#53535A; font-size:18px; font-style:normal; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.font-slot--serif { font-family:Georgia,"Songti SC",serif; }
.font-slot--rounded { font-family:"Arial Rounded MT Bold","PingFang SC",sans-serif; }
.font-slot--mono { font-family:ui-monospace,"SFMono-Regular",Menlo,monospace; }
.font-slot--editorial { font-family:Baskerville,"Songti SC",serif; }
.font-slot.is-active { border-color:#007AFF; box-shadow:inset 0 0 0 1px #007AFF; }
.font-custom-composer { display:grid; gap:0; overflow:hidden; border-radius:14px; background:#FFFFFF; }
.font-custom-field { min-height:52px; display:flex; align-items:center; gap:12px; padding:0 14px; }
.font-custom-field + .font-custom-field { border-top:.5px solid rgba(60,60,67,.16); }
.font-custom-field label { flex:0 0 auto; color:#1C1C1E; font-size:16px; }
.font-custom-field input { min-width:0; flex:1; padding:0; border:0; outline:0; color:#1C1C1E; background:transparent; font-size:16px; text-align:right; }
.font-custom-field input::placeholder { color:#C7C7CC; }
.font-custom-local { width:100%; min-height:52px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 14px; border:0; border-top:.5px solid rgba(60,60,67,.16); color:#007AFF; background:#FFFFFF; font:inherit; font-size:16px; cursor:pointer; }
.font-custom-local span:last-child { max-width:58%; overflow:hidden; color:#8E8E93; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.font-custom-add { width:100%; min-height:56px; margin-top:11px; border:0; border-radius:14px; color:#FFFFFF; background:#007AFF; font:inherit; font-size:16px; font-weight:600; cursor:pointer; }
.font-custom-add:active { transform:scale(.985); }
.font-custom-notice { min-height:18px; margin:9px 3px 0; color:#8E8E93; font-size:12px; line-height:1.35; text-align:center; }
.font-custom-notice.is-error { color:#FF3B30; }
.font-custom-list { display:grid; gap:8px; }
.font-custom-empty { margin:0; color:#8E8E93; font-size:13px; text-align:center; }
.font-custom-item { min-height:56px; display:flex; align-items:center; gap:12px; width:100%; padding:0 14px; border:0; border-radius:14px; color:#1C1C1E; background:#FFFFFF; font:inherit; text-align:left; cursor:pointer; }
.font-custom-item .font-custom-item-name { min-width:0; flex:1; overflow:hidden; font-size:16px; text-overflow:ellipsis; white-space:nowrap; }
.font-custom-item .font-custom-item-sample { color:#6D6D72; font-size:17px; }
.font-custom-item .font-custom-check { width:18px; color:#007AFF; font-size:17px; text-align:right; }
.font-custom-item.is-active { color:#007AFF; }

/* Icon editor: all app icons, local-file replacement, multi-select, and desktop geometry. */
.icon-selection-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:11px; }
.icon-selection-summary b { font-size:16px; font-weight:600; }
.icon-selection-summary span { color:#8E8E93; font-size:13px; }
.icon-quick-select { display:flex; gap:8px; margin:0 -2px 14px; overflow-x:auto; padding:1px 2px 2px; scrollbar-width:none; }
.icon-quick-select::-webkit-scrollbar { display:none; }
.icon-quick-select button { min-height:31px; padding:0 12px; border:0; border-radius:999px; color:#007AFF; background:rgba(0,122,255,.1); font-size:13px; white-space:nowrap; cursor:pointer; }
.icon-app-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px 5px; }
.icon-app-item { position:relative; min-width:0; display:grid; justify-items:center; gap:5px; padding:3px 0 5px; border:0; border-radius:11px; color:#1C1C1E; background:transparent; font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.icon-app-item::after { content:''; position:absolute; inset:0; border:1.5px solid transparent; border-radius:11px; pointer-events:none; }
.icon-app-item.is-selected::after { border-color:#007AFF; background:rgba(0,122,255,.07); }
.icon-app-item.is-selected .icon-app-check { opacity:1; transform:scale(1); }
.icon-app-box { --icon-shell:#FFF2F5; --icon-logo:#D8D8DD; position:relative; width:min(52px,100%); aspect-ratio:1; display:grid; place-items:center; overflow:hidden; border-radius:15px; background:var(--icon-shell); color:var(--icon-logo); }
/* Frosted is intentionally neutral: it never reads or blends --icon-shell. */
.icon-app-box[data-icon-material="frosted"] {
  border:1px solid rgba(255,255,255,.78);
  background:rgba(255,255,255,.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 6px 16px rgba(65,84,110,.14);
  backdrop-filter:blur(14px) saturate(150%);
  -webkit-backdrop-filter:blur(14px) saturate(150%);
}
.icon-app-box[data-icon-material="transparent"] { background:transparent; box-shadow:none; }
.icon-app-box.has-custom-icon { background-size:cover; background-position:center; }
.icon-app-box.has-custom-icon .icon-preview-art { opacity:0; }
.icon-preview-art { width:100%; height:100%; display:grid; place-items:center; }
.icon-preview-art .icon-svg { width:100%; height:100%; display:block; color:var(--icon-logo); transform:scale(var(--icon-scale,1)); transform-origin:50% 50%; }
.icon-app-label { width:100%; overflow:hidden; font-size:11px; line-height:1.2; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
.icon-app-check { position:absolute; z-index:2; top:1px; right:2px; width:17px; height:17px; display:grid; place-items:center; border:2px solid #FFFFFF; border-radius:50%; color:#FFFFFF; background:#007AFF; box-shadow:0 1px 3px rgba(0,0,0,.16); font-size:11px; font-weight:700; opacity:0; transform:scale(.72); transition:opacity .14s ease,transform .14s ease; }
.icon-editor-geometry { display:grid; gap:1px; overflow:hidden; border-radius:14px; background:#FFFFFF; }
.icon-geometry-row { min-height:62px; display:grid; grid-template-columns:64px minmax(0,1fr) 38px; align-items:center; gap:10px; padding:0 14px; }
.icon-geometry-row + .icon-geometry-row { border-top:.5px solid rgba(60,60,67,.16); }
.icon-geometry-row label { color:#1C1C1E; font-size:15px; }
.icon-geometry-row output { color:#007AFF; font-size:13px; text-align:right; font-variant-numeric:tabular-nums; }
.icon-range { --icon-range-progress:50%; width:100%; height:28px; margin:0; appearance:none; -webkit-appearance:none; background:transparent; cursor:pointer; }
.icon-range::-webkit-slider-runnable-track { height:5px; border-radius:999px; background:linear-gradient(90deg,#007AFF 0 var(--icon-range-progress),#D8D8DE var(--icon-range-progress) 100%); }
.icon-range::-webkit-slider-thumb { width:22px; height:22px; margin-top:-8.5px; border:0; border-radius:50%; background:#FFFFFF; box-shadow:0 1px 2px rgba(0,0,0,.22),0 3px 8px rgba(0,0,0,.12); appearance:none; -webkit-appearance:none; }
.icon-range::-moz-range-track { height:5px; border-radius:999px; background:#D8D8DE; }
.icon-range::-moz-range-progress { height:5px; border-radius:999px; background:#007AFF; }
.icon-range::-moz-range-thumb { width:22px; height:22px; border:0; border-radius:50%; background:#FFFFFF; box-shadow:0 1px 2px rgba(0,0,0,.22),0 3px 8px rgba(0,0,0,.12); }
.icon-material-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.icon-material-grid button { min-height:88px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; border:1px solid rgba(60,60,67,.16); border-radius:14px; color:#1C1C1E; background:#FFFFFF; font:inherit; font-size:13px; cursor:pointer; }
.icon-material-grid i { width:35px; height:35px; display:block; border-radius:11px; background:#FFF2F5; }
.icon-material-grid button[data-icon-material="frosted"] i { border:1px solid rgba(255,255,255,.85); background:rgba(255,255,255,.16); box-shadow:inset 0 1px rgba(255,255,255,.9),0 3px 8px rgba(65,84,110,.12); backdrop-filter:blur(10px) saturate(135%); -webkit-backdrop-filter:blur(10px) saturate(135%); }
.icon-material-grid button[data-icon-material="transparent"] i { border:1px solid #9CA3AF; background:linear-gradient(45deg,transparent 45%,#D1D1D6 46% 54%,transparent 55%); }
.icon-material-grid button.is-active { border-color:#007AFF; box-shadow:inset 0 0 0 1px #007AFF; color:#007AFF; }
.icon-color-controls { overflow:hidden; border-radius:14px; background:#FFFFFF; }
.icon-color-control { min-height:60px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:0 14px; }
.icon-color-control + .icon-color-control { border-top:.5px solid rgba(60,60,67,.16); }
.icon-color-control label { color:#1C1C1E; font-size:16px; }
.icon-palette { display:flex; align-items:center; gap:8px; }
.icon-palette button { width:24px; height:24px; padding:0; border:2px solid rgba(60,60,67,.16); border-radius:50%; background:var(--icon-swatch); cursor:pointer; }
.icon-palette button[data-icon-color="shell"]:nth-child(1) { --icon-swatch:#FFF2F5; }.icon-palette button[data-icon-color="shell"]:nth-child(2) { --icon-swatch:#EAF4FF; }.icon-palette button[data-icon-color="shell"]:nth-child(3) { --icon-swatch:#F1EDFF; }.icon-palette button[data-icon-color="shell"]:nth-child(4) { --icon-swatch:#EAF8F1; }
.icon-palette button[data-icon-color="logo"]:nth-child(1) { --icon-swatch:#D8D8DD; }.icon-palette button[data-icon-color="logo"]:nth-child(2) { --icon-swatch:#FFFFFF; }.icon-palette button[data-icon-color="logo"]:nth-child(3) { --icon-swatch:#7487A1; }.icon-palette button[data-icon-color="logo"]:nth-child(4) { --icon-swatch:#8C7CB7; }
.icon-palette button[data-icon-color="label"]:nth-child(1) { --icon-swatch:#111111; }.icon-palette button[data-icon-color="label"]:nth-child(2) { --icon-swatch:#FFFFFF; }.icon-palette button[data-icon-color="label"]:nth-child(3) { --icon-swatch:#697386; }.icon-palette button[data-icon-color="label"]:nth-child(4) { --icon-swatch:#8B5E7B; }
.icon-palette button.is-active { border-color:#007AFF; box-shadow:0 0 0 2px rgba(0,122,255,.18); }
.icon-palette input[type="color"] { width:25px; height:25px; padding:0; border:0; border-radius:50%; background:transparent; cursor:pointer; }
/* The desktop frame uses the exact same neutral, colourless frosted treatment as the editor preview. */
.desktop-layer .app-tile[data-icon-material="frosted"] .icon-box {
  border:1px solid rgba(255,255,255,.78);
  background:rgba(255,255,255,.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 6px 16px rgba(65,84,110,.14);
  backdrop-filter:blur(14px) saturate(150%);
  -webkit-backdrop-filter:blur(14px) saturate(150%);
}
.desktop-layer .app-tile[data-icon-material="transparent"] .icon-box { border:0; background:transparent; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
.desktop-layer .app-tile.has-custom-icon .icon-box { background-size:cover; background-position:center; }
.desktop-layer .app-tile.has-custom-icon .icon-svg { opacity:0; }
.deployment-form { padding-top:12px; }
.deployment-hero { display:flex; flex-direction:column; align-items:center; padding:18px 18px 25px; text-align:center; }
.deployment-hero-mark { width:54px; height:54px; display:grid; place-items:center; border-radius:18px; color:#FFFFFF; background:#007AFF; }
.deployment-hero-mark svg { width:30px; height:30px; display:block; fill:currentColor; }
.deployment-hero h1 { margin:16px 0 6px; font-size:23px; font-weight:600; letter-spacing:-.03em; }
.deployment-hero p { max-width:280px; margin:0; color:#8E8E93; font-size:13px; line-height:1.5; }
.appearance-form-group { overflow:hidden; border-radius:12px; background:#FFFFFF; }
.appearance-form-group label { min-height:56px; display:flex; align-items:center; gap:14px; padding:0 14px; color:#000; font-size:16px; }
.appearance-form-group label+label { border-top:.5px solid rgba(60,60,67,.16); }
.appearance-form-group input { min-width:0; flex:1; padding:0; border:0; outline:0; color:#3A3A3C; background:transparent; font-size:16px; text-align:right; }
.appearance-form-group input::placeholder { color:#C7C7CC; }
.deployment-save { width:100%; min-height:48px; margin-top:20px; border:0; border-radius:14px; color:#FFFFFF; background:#007AFF; font-size:16px; font-weight:600; cursor:pointer; }
.deployment-notice { min-height:19px; margin:12px 3px; color:#8E8E93; font-size:13px; text-align:center; }
.deployment-notice.is-error { color:#FF3B30; }
.deployment-notice.is-success { color:#34C759; }
.settings-item-value { margin-left:auto; color:#8E8E93; font-size:15px; font-variant-numeric:tabular-nums; }

/* Dark mode covers the static settings topology without adding runtime layers. */
#MergedPhone.is-dark-mode { color:#F5F5F7; background-color:#000000; }
#MergedPhone.is-dark-mode .desktop-layer,#MergedPhone.is-dark-mode .lock-layer .s { background-color:#161618; background-blend-mode:multiply; }
#MergedPhone.is-dark-mode :is(.settings-page,.apple-id-page,.apple-id-register-page,.personal-profile-page,.api-page,.worldbook-page,.worldbook-detail-page,.worldbook-editor-page,.contacts-page,.contact-create-page,.appearance-detail-page,.theme-aware-page) { color:#F5F5F7; background:#000000; color-scheme:dark; }
#MergedPhone.is-dark-mode .theme-aware-page :is(.status-bar,.appearance-navigation) { color:#FFFFFF; background:#000000; }
#MergedPhone.is-dark-mode :is(.settings-page,.apple-id-page,.apple-id-register-page,.personal-profile-page,.api-page,.worldbook-page,.worldbook-detail-page,.worldbook-editor-page,.contacts-page,.contact-create-page,.appearance-detail-page) .status-bar,#MergedPhone.is-dark-mode .appearance-navigation { color:#FFFFFF; background:#000000; }
#MergedPhone.is-dark-mode .status-bar { color:#FFFFFF; }
#MergedPhone.is-dark-mode :is(.settings-title,.settings-item-label,.settings-profile-name,.apple-id-navigation-title,.contacts-create-navigation-title,.apple-id-profile-name,.profile-field-label,.profile-rich-field-label,.api-title,.worldbook-nav-title,.appearance-navigation-title,.appearance-section-caption,.appearance-form-group label,.deployment-hero h1) { color:#F5F5F7; }
#MergedPhone.is-dark-mode :is(.settings-search,.profile-sky-reference-select,.profile-rich-input,.api-control,.api-context-control,.api-category-button,.appearance-form-group,.icon-color-controls,.icon-editor-geometry,.font-slot,.icon-material-grid button,.wallpaper-lock-control,.font-preview-stage,.font-custom-composer,.font-custom-item) { color:#F5F5F7; background:#1C1C1E; }
#MergedPhone.is-dark-mode :is(.settings-profile,.settings-group,.profile-group,.api-field,.worldbook-folder-card,.contacts-directory-card,.appearance-form-group,.icon-color-controls,.icon-editor-geometry) { background:#1C1C1E; }
#MergedPhone.is-dark-mode :is(.settings-group-item + .settings-group-item,.profile-field + .profile-field,.profile-rich-field + .profile-field,.profile-field + .profile-rich-field,.profile-rich-field + .profile-rich-field,.appearance-form-group label + label,.icon-color-control + .icon-color-control,.icon-geometry-row + .icon-geometry-row,.font-custom-field + .font-custom-field,.font-custom-local) { border-color:#38383A; }
#MergedPhone.is-dark-mode :is(input,textarea,select,.profile-field-control,.profile-rich-input,.appearance-form-group input,.font-custom-field input) { color:#F5F5F7; }
#MergedPhone.is-dark-mode :is(.settings-profile-desc,.settings-search input::placeholder,.profile-field-note,.appearance-page-caption,.font-preview-stage span,.font-custom-empty,.font-custom-local span:last-child,.deployment-hero p,.icon-selection-summary span,.wallpaper-lock-copy span) { color:#98989D; }
#MergedPhone.is-dark-mode .font-preview-stage { border-color:#38383A; }
#MergedPhone.is-dark-mode .font-preview-stage::after { color:rgba(94,170,255,.11); }
#MergedPhone.is-dark-mode .font-preview-kicker,.is-dark-mode .font-preview-stage span,.is-dark-mode .font-custom-empty,.is-dark-mode .font-custom-local span:last-child { color:#98989D; }
#MergedPhone.is-dark-mode :is(.font-custom-field label,.icon-color-control label,.icon-geometry-row label,.wallpaper-lock-copy b) { color:#F5F5F7; }
#MergedPhone.is-dark-mode .wallpaper-scope-segment { background:#2C2C2E; }
#MergedPhone.is-dark-mode .wallpaper-scope-segment button.is-active { color:#F5F5F7; background:#3A3A3C; }
#MergedPhone.is-dark-mode .appearance-action-button--muted { color:#5EAAFF; background:rgba(10,132,255,.18); }
#MergedPhone.is-dark-mode .global-home-indicator { background:rgba(255,255,255,.76); box-shadow:none; }
#MergedPhone.is-dark-mode .apple-id-wechat-authorization { border-color:#38383A; background:#1C1C1E; box-shadow:none; }#MergedPhone.is-dark-mode .apple-id-wechat-authorization-copy h2 { color:#F5F5F7; }#MergedPhone.is-dark-mode .apple-id-wechat-authorization-copy p { color:#98989D; }#MergedPhone.is-dark-mode .apple-id-wechat-authorization-button:disabled { color:#8E8E93; background:#38383A; }
body.is-app-dark-mode .apple-account-picker-sheet,body.is-app-dark-mode .apple-account-confirm-dialog { color:#F5F5F7; background:#1C1C1E; }
body.is-app-dark-mode .apple-account-picker-title,body.is-app-dark-mode .apple-account-confirm-title { color:#F5F5F7; }
body.is-app-dark-mode .apple-account-picker-subtitle,body.is-app-dark-mode .apple-account-confirm-message { color:#98989D; }
body.is-app-dark-mode .apple-account-picker-item,body.is-app-dark-mode .apple-account-picker-footer-button,body.is-app-dark-mode .apple-account-confirm-button { color:#F5F5F7; background:#2C2C2E; border-color:#38383A; }


/* Data management is one static appearance page; all state is read from bundled Dexie storage. */
.data-management-page .appearance-content { padding-top:14px; }
.data-management-content { display:grid; gap:16px; }
.data-management-overview { overflow:hidden; border:1px solid rgba(60,60,67,.12); border-radius:22px; background:#FFFFFF; box-shadow:0 10px 28px rgba(28,28,30,.055); }
.data-management-overview-head { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:18px 18px 14px; }
.data-management-overview-head h1 { margin:0; color:#1C1C1E; font-family:var(--page-title-font); font-size:19px; font-weight:650; letter-spacing:-.03em; }
.data-management-overview-head p { margin:5px 0 0; color:#8E8E93; font-size:12px; line-height:1.25; }
.data-management-overview-icon { width:37px; height:37px; display:grid; place-items:center; border-radius:13px; color:#FFFFFF; background:linear-gradient(145deg,#5AC8FA,#0A84FF); box-shadow:0 6px 13px rgba(10,132,255,.22); }
.data-management-overview-glyph { width:18px; height:18px; }
.data-management-chart-wrap { display:grid; grid-template-columns:132px minmax(0,1fr); align-items:center; gap:15px; padding:0 18px 19px; }
.data-management-chart { --data-management-chart:conic-gradient(#DCEBFF 0 20%,#DFF5E5 20% 40%,#FFF1D7 40% 60%,#F0E5FF 60% 80%,#FFE2EA 80% 100%); width:132px; aspect-ratio:1; display:grid; place-items:center; border-radius:50%; background:var(--data-management-chart); box-shadow:inset 0 0 0 1px rgba(60,60,67,.08),0 8px 18px rgba(28,28,30,.07); }
.data-management-chart::before { content:""; grid-area:1/1; width:72px; height:72px; border-radius:50%; background:#FFFFFF; box-shadow:0 1px 2px rgba(28,28,30,.04); }
.data-management-chart > div { position:relative; z-index:1; grid-area:1/1; display:grid; justify-items:center; gap:3px; }
.data-management-chart strong { color:#1C1C1E; font-size:20px; font-weight:700; letter-spacing:-.04em; line-height:1; }
.data-management-chart span { color:#8E8E93; font-size:10px; line-height:1; }
.data-management-legend { display:grid; gap:7px; min-width:0; }
.data-management-stat { display:grid; grid-template-columns:17px minmax(0,1fr) auto; align-items:center; gap:7px; min-width:0; color:#6D6D72; font-size:11px; line-height:1.2; }
.data-management-stat-icon { width:13px; height:13px; }
.data-management-stat span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.data-management-stat b { color:#1C1C1E; font-size:11px; font-weight:650; }
.data-management-stat[data-data-stat="accounts"] .data-management-stat-icon { color:#0A84FF; }
.data-management-stat[data-data-stat="contacts"] .data-management-stat-icon { color:#34C759; }
.data-management-stat[data-data-stat="worldbooks"] .data-management-stat-icon { color:#FF9F0A; }
.data-management-stat[data-data-stat="appearance"] .data-management-stat-icon { color:#AF52DE; }
.data-management-stat[data-data-stat="system"] .data-management-stat-icon { color:#FF375F; }
.data-management-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.data-management-action { min-height:74px; display:flex; flex-direction:row; align-items:center; justify-content:center; gap:10px; padding:12px 10px; border:1px solid rgba(60,60,67,.12); border-radius:18px; color:#1C1C1E; background:#FFFFFF; font:600 14px/1.2 inherit; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.data-management-action:active { transform:scale(.975); opacity:.72; }
.data-management-action-icon { width:40px; height:40px; display:grid; place-items:center; border-radius:13px; color:#5856D6; background:rgba(88,86,214,.11); }
.data-management-action-glyph { width:21px; height:21px; display:block; fill:currentColor; }
.data-management-clear-action { width:100%; min-height:72px; display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center; gap:12px; margin-top:2px; padding:12px 15px; border:1px solid rgba(255,59,48,.22); border-radius:18px; color:#FF3B30; background:rgba(255,59,48,.075); font:inherit; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.data-management-clear-action:active { transform:scale(.985); opacity:.72; }
.data-management-clear-icon { width:40px; height:40px; display:grid; place-items:center; border-radius:13px; color:#FFFFFF; background:#FF3B30; }
.data-management-clear-glyph { width:18px; height:18px; display:block; fill:currentColor; }
.data-management-clear-action b { display:block; font-size:15px; line-height:1.25; }
.data-management-clear-action small { display:block; margin-top:3px; color:#B24A45; font-size:12px; line-height:1.28; }
.data-management-notice { min-height:18px; margin:0 6px; color:#8E8E93; font-size:12px; line-height:1.45; text-align:center; }
.data-management-notice[data-tone="success"] { color:#248A45; }
.data-management-notice[data-tone="error"] { color:#D83A34; }
.data-management-modal { position:absolute; z-index:40; inset:0; display:grid; place-items:center; padding:24px; background:rgba(0,0,0,.30); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.data-management-modal[hidden] { display:none; }
.data-management-dialog { width:min(100%,310px); overflow:hidden; border-radius:22px; color:#1C1C1E; background:#FFFFFF; box-shadow:0 18px 44px rgba(0,0,0,.19); }
.data-management-dialog h2 { margin:20px 20px 5px; font-size:17px; font-weight:650; letter-spacing:-.025em; text-align:center; }
.data-management-dialog > p { margin:0 20px 16px; color:#7C7C80; font-size:12px; line-height:1.45; text-align:center; }
.data-management-scope-list { display:grid; margin:0 15px 16px; overflow:hidden; border:1px solid rgba(60,60,67,.12); border-radius:14px; }
.data-management-scope-option { min-height:45px; display:grid; grid-template-columns:19px 17px minmax(0,1fr); align-items:center; gap:9px; padding:0 12px; border-bottom:1px solid rgba(60,60,67,.09); color:#303034; font-size:13px; }
.data-management-scope-option:last-child { border-bottom:0; }
.data-management-scope-option input { position:absolute; inline-size:1px; block-size:1px; opacity:0; pointer-events:none; }
.data-management-scope-check { width:16px; height:16px; display:grid; place-items:center; border:1px solid #C7C7CC; border-radius:50%; color:transparent; background:#FFFFFF; }
.data-management-scope-check::after { content:""; width:7px; height:4px; border-bottom:1.5px solid currentColor; border-left:1.5px solid currentColor; transform:translateY(-1px) rotate(-45deg); }
.data-management-scope-option input:checked + .data-management-scope-check { border-color:#0A84FF; color:#FFFFFF; background:#0A84FF; }
.data-management-scope-icon { width:14px; height:14px; color:#8E8E93; }
.data-management-dialog-actions { display:grid; grid-template-columns:1fr 1fr; border-top:1px solid rgba(60,60,67,.13); }
.data-management-dialog-actions button { min-height:49px; border:0; border-right:1px solid rgba(60,60,67,.13); color:#007AFF; background:#FFFFFF; font:500 15px/1 inherit; cursor:pointer; }
.data-management-dialog-actions button:last-child { border-right:0; }
.data-management-dialog-actions button:active { opacity:.56; }
.data-management-dialog-actions .is-primary { font-weight:650; }
.data-management-dialog-actions .is-destructive { color:#FF3B30; }
#MergedPhone.is-dark-mode .data-management-overview,#MergedPhone.is-dark-mode .data-management-action,#MergedPhone.is-dark-mode .data-management-dialog { color:#F5F5F7; border-color:#38383A; background:#1C1C1E; }
#MergedPhone.is-dark-mode .data-management-action { background:#1C1C1E; border-color:#38383A; }
#MergedPhone.is-dark-mode .data-management-clear-action { border-color:rgba(255,69,58,.34); color:#FF6961; background:rgba(255,69,58,.14); }
#MergedPhone.is-dark-mode .data-management-clear-action small { color:#FFAAA5; }
#MergedPhone.is-dark-mode .main-api-action-banner { color:#FFE9C2; border-color:rgba(255,159,10,.48); background:rgba(68,52,29,.98); box-shadow:0 14px 30px rgba(0,0,0,.38); }
#MergedPhone.is-dark-mode .main-api-action-copy span { color:#D8C8A8; }
#MergedPhone.is-dark-mode .main-api-action-dismiss { color:#E9C885; }
#MergedPhone.is-dark-mode .data-management-overview-head h1,#MergedPhone.is-dark-mode .data-management-chart strong,#MergedPhone.is-dark-mode .data-management-stat b { color:#F5F5F7; }
#MergedPhone.is-dark-mode .data-management-chart::before { background:#1C1C1E; }
#MergedPhone.is-dark-mode .data-management-action { border-color:#38383A; }
#MergedPhone.is-dark-mode .data-management-scope-list { border-color:#38383A; }
#MergedPhone.is-dark-mode .data-management-scope-option { color:#F5F5F7; border-color:#38383A; }
#MergedPhone.is-dark-mode .data-management-scope-check { border-color:#636366; background:#1C1C1E; }
#MergedPhone.is-dark-mode .data-management-dialog-actions { border-color:#38383A; }
#MergedPhone.is-dark-mode .data-management-dialog-actions button { border-color:#38383A; background:#1C1C1E; }
#MergedPhone.is-dark-mode .wechat-next-status-button { border-color:#3A3A3C; color:#D1D1D6; background:#2C2C2E; }
