/* ============================================================
   styles_3.css —— 原 styles.css 拆分 3/3
   对应原文件约第 1441-2247 行（层叠顺序需与 <link> 标签顺序保持一致）
   ============================================================ */



/* 弹窗头部 */
.igp-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #f2f2f2;
  flex-shrink: 0;
}
.igp-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}
.igp-modal-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: #b0b0b0;
  border-radius: 50%;
  transition: background 0.14s, color 0.14s;
}
.igp-modal-close:active { background: #f4f4f4; color: #1a1a1a; }

/* 弹窗主体 */
.igp-modal-body {
  padding: 16px 18px 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.igp-modal-body::-webkit-scrollbar { width: 4px; }
.igp-modal-body::-webkit-scrollbar-thumb { background: #e4e4e4; border-radius: 4px; }

/* “设为当前”开关行 */
.igp-active-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--mo-blue-light);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.igp-active-row-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mo-blue-dark);
  letter-spacing: 0.02em;
}

/* 表单分区 */
.igp-field { margin-bottom: 14px; }
.igp-field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #7a7a7a;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  text-transform: none;
}
.igp-input, .igp-textarea, .igp-select {
  width: 100%;
  border: 1px solid #ececec;
  background: #fafafa;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #2a2a2a;
  outline: none;
  transition: border-color 0.14s, background 0.14s;
  font-family: inherit;
}
.igp-input:focus, .igp-textarea:focus, .igp-select:focus {
  border-color: var(--mo-blue);
  background: #fff;
}
.igp-textarea { resize: vertical; height: 120px; line-height: 1.55; }
.igp-input-name { font-weight: 700; font-size: 14px; }

.igp-range-row { display: flex; align-items: center; gap: 10px; }
.igp-range-row input[type="range"] { flex: 1; accent-color: var(--mo-blue); }
.igp-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: #4a4a4a;
}
.igp-check input { accent-color: var(--mo-blue); width: 15px; height: 15px; }

/* 图生图区 */
.igp-img2img {
  border-top: 1px solid #f2f2f2;
  padding-top: 14px;
  margin-top: 4px;
}
.igp-img2img-label {
  font-size: 11px; font-weight: 700; color: var(--mo-blue-dark);
  letter-spacing: 0.05em; margin-bottom: 10px;
  padding-left: 8px; border-left: 2px solid var(--mo-blue);
}
.igp-img2img-preview {
  position: relative; width: 100%; height: 120px;
  background: #f2f2f2; border-radius: 12px; overflow: hidden;
  margin-bottom: 10px;
}
.igp-img2img-preview img { width: 100%; height: 100%; object-fit: contain; }
.igp-img2img-clear {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
}

/* Vibe Transfer 区（仅 NAI） */
.igp-vibes {
  border-top: 1px solid #f2f2f2;
  padding-top: 14px;
  margin-top: 4px;
}
.igp-vibe-item {
  display: flex;
  gap: 10px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
}
.igp-vibe-thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  background: #f0f0f0;
  object-fit: cover;
  flex-shrink: 0;
}
.igp-vibe-upload-btn {
  width: 56px; height: 56px;
  border-radius: 10px;
  border: 1px dashed #ccc;
  background: #f8f8f8;
  display: flex; align-items: center; justify-content: center;
  color: #b0b0b0; font-size: 18px;
  flex-shrink: 0; cursor: pointer;
  transition: border-color 0.14s, color 0.14s;
}
.igp-vibe-upload-btn:active { border-color: #999; color: #666; }
.igp-vibe-controls {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.igp-vibe-slider-row {
  display: flex; align-items: center; gap: 8px;
}
.igp-vibe-slider-label {
  font-size: 10px; font-weight: 600; color: #8a8a8a;
  width: 52px; flex-shrink: 0; text-align: right;
}
.igp-vibe-slider-row input[type="range"] {
  flex: 1; accent-color: var(--mo-blue); height: 16px;
}
.igp-vibe-slider-val {
  font-size: 10px; font-weight: 700; color: #4a4a4a;
  width: 32px; flex-shrink: 0; text-align: right;
}
.igp-vibe-remove {
  width: 24px; height: 24px; border-radius: 50%;
  background: #f0f0f0; color: #d05a5a;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; cursor: pointer;
  transition: background 0.14s;
}
.igp-vibe-remove:active { background: #f0dada; }
.igp-vibe-add {
  width: 100%;
  height: 40px;
  border: 1px dashed #d0d0d0;
  border-radius: 12px;
  background: #fafafa;
  color: #8a8a8a;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  gap: 4px;
  transition: border-color 0.14s, color 0.14s;
}
.igp-vibe-add:active { border-color: #999; color: #555; }

/* 弹窗底部按钮 */
.igp-modal-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #f2f2f2;
  flex-shrink: 0;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}
.igp-btn {
  flex: 1;
  height: 44px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 0.12s ease, opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.igp-btn:active { transform: scale(0.97); }
.igp-btn--ghost { background: #f3f3f3; color: #6a6a6a; }
.igp-btn--primary { background: #1a1a1a; color: #fff; flex: 1.4; }
.igp-btn--danger { background: #fff; color: #d05a5a; border: 1px solid #f0dada; display: flex; align-items: center; justify-content: center; gap: 5px; }
.igp-btn--danger svg { flex-shrink: 0; }

/* ===== API设置 整体 ins 简约微调 ===== */
#app-settings-screen .settings-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #b0b0b0;
  text-transform: uppercase;
}
#app-settings-screen .settings-ins-input {
  border: 1px solid #ececec;
  background: #fafafa;
  border-radius: 13px;
  transition: border-color 0.14s, background 0.14s;
}
#app-settings-screen .settings-ins-input:focus {
  border-color: var(--mo-blue);
  background: #fff;
}
#app-settings-screen .settings-ins-btn {
  transition: transform 0.12s ease, opacity 0.12s ease;
}
#app-settings-screen .settings-ins-btn:active { transform: scale(0.96); }

/* ==========================================================
   统一返回图标 & 应用英文名（与导演模拟器一致）
   导演模拟器标准：顶栏高 68px，padding 18px 16px 12px，
   返回按钮 38×38，英文标题距返回按钮 14px
   ========================================================== */

/* 统一所有返回箭头 SVG 的尺寸和描边宽度，与导演模拟器完全一致 */
svg:has(polyline[points="15 18 9 12 15 6"]) {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2 !important;
}

/* 统一顶栏布局：高度、内边距、间距（由 JS 添加 .unified-app-header 类） */
.unified-app-header {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 18px 16px 12px !important;
    min-height: 68px !important;
    height: auto !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

/* 统一返回按钮尺寸与位置：38×38，无负边距，左对齐 16px */
.unified-app-header > button:has(polyline[points="15 18 9 12 15 6"]) {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

/* 返回按钮旁的英文标题样式（与导演模拟器 .dir-app-title 一致：间距 14px） */
.app-eng-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
    color: #1a1a1a;
    margin-left: 14px;
    margin-right: auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
}

/* X 应用标签栏偏移修正（顶栏高度统一为 68px） */
#app-x .x-tabs {
    top: 68px !important;
}


/* ════════════════════════════════════════════
   WARDROBE – Minimalist grayscale redesign
   ════════════════════════════════════════════ */

/* Tab items: icon+label layout */
#dress-tabs .dress-tab-item {
    min-width: 48px;
    transition: color .15s, border-color .15s;
}
#dress-tabs .dress-tab-item svg {
    transition: opacity .15s;
}
#dress-tabs .dress-tab-item:not(.active) svg {
    opacity: .5;
}

/* Bottom bar – softer shadow, tighter radius */
#dress-bottom-bar {
    border-top: 1px solid #f0f0f0 !important;
    box-shadow: 0 -6px 20px rgba(0,0,0,.04) !important;
    border-radius: 24px 24px 0 0 !important;
}

/* Inventory grid items – subtle hover */
#dress-inventory > div {
    transition: transform .12s, box-shadow .12s;
}
#dress-inventory > div:active {
    transform: scale(.94);
}

/* Item name label at bottom of card */
#dress-inventory .absolute.bottom-0 {
    font-size: 9px;
    letter-spacing: .02em;
}

/* Edit panel sliders – full width accent */
#dress-edit-panel input[type=range] {
    height: 3px;
    border-radius: 2px;
}

/* Contact list – remove bg-gray-50 tint, cleaner */
#dress-contact-list {
    background: #fff !important;
}

/* Dialog bubble tail refinement */
#dress-dialog::after {
    border-width: 5px !important;
}

/* Wardrobe drawer handle pill */
#dress-bottom-bar > .absolute.-top-6 {
    background: #fff;
    border: 1px solid #f0f0f0;
    box-shadow: 0 -2px 8px rgba(0,0,0,.04);
}

/* ── 一起听歌：邀请卡片 ────────────────────────────────── */
.music-together-card {
    width: 200px;
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 12px 14px 6px 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    white-space: normal;
}
.music-together-card .mtc-cover {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #d4d4d4;
}
.music-together-card .mtc-note {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── 一起听歌：悬浮播放器进入/退出动画 ─────────────────── */
#chat-ltw-widget {
    transition: opacity 0.25s, transform 0.25s;
}
#chat-ltw-widget.ltw-hidden-anim {
    opacity: 0;
    transform: scale(0.85) translateY(10px);
    pointer-events: none;
}

/* pill 需要 position:relative 才能放 absolute 展开按钮 */
#chat-ltw-pill {
    position: relative;
}

/* ── 黑胶旋转 ─── */
@keyframes chatLtwVinylSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.ltw-vinyl-spin {
    animation: chatLtwVinylSpin 4s linear infinite;
}

/* ── 全屏播放页 safe-area 修复 ─── */
#chat-ltw-player-page {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}


/* ================================================================
   OFFLINE APP – BOTTOM NAVIGATION & MEET MAP  (added)
   ================================================================ */

/* --- Top bar --- */
.offline-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--mo-bg);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
}
.offline-topbar-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: #1a1a1a;
}

/* --- Panels --- */
.offline-panel {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}
.offline-panel.active {
    display: flex;
}
#offline-panel-contacts.offline-panel.active {
    overflow-y: auto;
    background: #ffffff;
}

/* --- Bottom nav bar --- */
.offline-bottom-nav {
    display: flex;
    flex-shrink: 0;
    height: 50px;
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom);
}
.offline-nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: #c4c1bc;
    font-weight: 400;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.18s ease;
    position: relative;
    user-select: none;
}
.offline-nav-item.active {
    color: #1a1a1a;
    font-weight: 600;
}
.offline-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 1.5px;
    background: #1a1a1a;
    border-radius: 0 0 2px 2px;
}

/* ================================================================
   MEET MAP
   ================================================================ */
#offline-meet-map {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
    background: #eeece5;
    /* subtle dot grid overlay */
    background-image: radial-gradient(circle, rgba(0,0,0,0.09) 1px, transparent 1px);
    background-size: 28px 28px;
}
#meet-tap-hint {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 12px;
    color: #bfbcb5;
    letter-spacing: 0.14em;
    line-height: 2.4;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#meet-tap-hint.hidden { opacity: 0; pointer-events: none; }

/* Pin */
.meet-pin {
    position: absolute;
    transform: translate(-50%, calc(-100% - 10px));
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 5;
    transition: left 0.28s cubic-bezier(0.34,1.56,0.64,1),
                top  0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.meet-pin-label {
    background: #1a1a1a;
    color: #ffffff;
    font-size: 10px;
    padding: 3px 9px;
    border-radius: 7px;
    white-space: nowrap;
    letter-spacing: 0.07em;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
    position: relative;
}
.meet-pin-label::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1a1a1a;
}
.meet-pin-head {
    width: 15px;
    height: 15px;
    background: #1a1a1a;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.28);
}
.meet-pin-tail {
    width: 2px;
    height: 11px;
    background: linear-gradient(to bottom, #1a1a1a, rgba(26,26,26,0.3));
    border-radius: 0 0 2px 2px;
}
.meet-pin-shadow {
    width: 7px;
    height: 3px;
    background: rgba(0,0,0,0.12);
    border-radius: 50%;
    filter: blur(2px);
}

/* Pulse ring */
.meet-pin-pulse {
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}
.meet-pin-pulse::before,
.meet-pin-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%) scale(0.4);
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(26,26,26,0.22);
    border-radius: 50%;
    animation: meet-pulse-ring 2.6s ease-out infinite;
}
.meet-pin-pulse::after { animation-delay: 1.3s; }
@keyframes meet-pulse-ring {
    0%   { transform: translate(-50%,-50%) scale(0.3); opacity: 0.85; }
    100% { transform: translate(-50%,-50%) scale(2.4); opacity: 0; }
}

/* Info bar */
.meet-info-bar {
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 13px 18px 12px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.meet-coords {
    font-size: 10px;
    color: #c4c0b9;
    letter-spacing: 0.16em;
    font-family: 'SF Mono', 'Menlo', 'Consolas', 'Courier New', monospace;
    min-height: 14px;
}
.meet-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.meet-place-input {
    flex: 1;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background: transparent;
    outline: none;
    font-size: 13px;
    color: #1a1a1a;
    padding: 5px 0;
    letter-spacing: 0.04em;
    transition: border-color 0.18s ease;
    font-family: -apple-system, 'PingFang SC', 'Noto Sans SC', sans-serif;
}
.meet-place-input::placeholder { color: #d0ccc6; }
.meet-place-input:focus { border-bottom-color: #1a1a1a; }
.meet-save-btn {
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 12px;
    letter-spacing: 0.08em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s;
    white-space: nowrap;
    font-family: -apple-system, 'PingFang SC', sans-serif;
}
.meet-save-btn:active { opacity: 0.6; }
.meet-clear-btn {
    background: none;
    border: none;
    font-size: 11px;
    color: #c8c4bd;
    letter-spacing: 0.09em;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, 'PingFang SC', sans-serif;
}
.meet-clear-btn:active { opacity: 0.5; }

/* ── 联系人设置面板 (contact-editor) 样式 ── */
/* 全面覆盖为简约黑白灰 ins 风 */

/* 主区域背景 */
#contact-editor { background: #f9f9f9 !important; }

/* 头部导航栏 */
#contact-editor .ed-topbar-cancel,
#contact-editor .ed-topbar-save {
  -webkit-tap-highlight-color: transparent;
}

/* wb-chip / style-chip 颜色系统 — 灰色调 */
#contact-editor .wb-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
}
#contact-editor .wb-chip[data-selected="true"] {
  background: #1a1a1a !important;
  color: #fff !important;
  border-color: #1a1a1a !important;
  font-weight: 600;
}
#contact-editor .wb-chip[data-selected="false"] {
  background: #fff !important;
  color: #bbb !important;
  border-color: #e8e8e8 !important;
  font-weight: 400;
}

/* input range 美化 */
#contact-editor input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: #e8e8e8;
  outline: none;
}
#contact-editor input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

/* checkbox 统一 */
#contact-editor input[type="checkbox"] {
  accent-color: #111 !important;
}

/* select 美化 */
#contact-editor select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 30px !important;
}

/* number input 去掉 spinner */
#contact-editor input[type="number"]::-webkit-outer-spin-button,
#contact-editor input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* ── API 顶栏配置显示 ── */
.topbar-api-info {
  font-size: 9.5px;
  color: #c0c0c0;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45vw;
  letter-spacing: 0.03em;
  margin-top: 1.5px;
}

#offline-chat-detail.theater-mode.theater-dark #chat-top-bar-offline .topbar-api-info {
  color: rgba(255,255,255,0.35) !important;
}
#offline-chat-detail.theater-mode.theater-light #chat-top-bar-offline .topbar-api-info {
  color: rgba(0,0,0,0.3) !important;
}

/* ── API 预设切换弹窗 ── */
.api-switch-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.api-switch-card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  width: 276px;
  max-width: 88vw;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06);
  animation: apiSwitchIn 0.18s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes apiSwitchIn {
  from { opacity: 0; transform: scale(0.93) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.api-switch-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #f0f0f0;
}

.api-switch-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.api-switch-subtitle {
  font-size: 10.5px;
  color: #b0b0b0;
  margin-top: 3px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.api-switch-close-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f2f2f2;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.15s;
}
.api-switch-close-btn:active { background: #e5e5e5; }

.api-switch-list {
  max-height: 52vh;
  overflow-y: auto;
  padding: 6px 0;
}

.api-switch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.api-switch-item:active,
.api-switch-item.is-active { background: #f7f7f7; }

.api-switch-item-info { flex: 1; min-width: 0; }

.api-switch-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.api-switch-item-model {
  font-size: 10.5px;
  color: #b0b0b0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.api-switch-item-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #1a1a1a;
}

/* ═══════════════════════════════════════════ */
/* ── 微信界面真实化样式 ──                    */
/* ═══════════════════════════════════════════ */

/* 微信顶栏标题居中（覆盖默认的 margin-right: auto） */
#app-wechat .unified-app-header .app-eng-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin-left: 0;
    margin-right: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0;
    color: #111;
}

/* 微信顶栏容器设为 relative 以支持标题绝对定位居中 */
#app-wechat .unified-app-header {
    position: relative;
}

/* ── 通讯录页字母分组标题 ── */
.contacts-letter-header {
    background: #f7f7f7;
    color: #888;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 16px;
    line-height: 20px;
}

/* ── 通讯录页右侧字母索引条 ── */
.contacts-alpha-index {
    position: fixed;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    z-index: 20;
    pointer-events: auto;
}

.contacts-alpha-item {
    font-size: 9px;
    color: #999;
    line-height: 14px;
    text-align: center;
    cursor: pointer;
    padding: 0 2px;
    user-select: none;
    -webkit-user-select: none;
}

.contacts-alpha-item.active {
    color: #07C160;
    font-weight: 700;
}

.contacts-alpha-item:active {
    color: #07C160;
    transform: scale(1.3);
}

/* ── 通讯录页搜索栏样式（匹配微信） ── */
#tab-contacts input#contacts-search-input {
    background: #f0f0f0 !important;
    border-radius: 8px !important;
    text-align: center;
    font-size: 13px;
}

#tab-contacts input#contacts-search-input:focus {
    text-align: left;
}
