/* Extracted from web/index.html in the second conservative CSS split. */
/* Global variables, page shell, shared cards/forms, menu, profile, and call UI. */
  :root{
    --screen-height: 100vh;
    --keyboard-offset: 0px;
    --ios-pwa-bottom-bleed: 0px;
    --ref-width: 941px;
    --ref-height: 1672px;
    --font-en: "Cormorant Garamond", Georgia, serif;
    --font-cn: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
    --wall-light: url("../../front-rain.jpg");
    --wall-harbor: url("../../front-rain.jpg");
    --wall-default: var(--wall-light);
    --menu-wall-light: url("../../front-rain.jpg");
    --menu-wall-harbor: url("../../front-rain.jpg");
    --menu-wall-default: var(--menu-wall-light);
    --avatar-default: url("../../avatar-sea.png");
    /* ── PEARL TIDE · 珍珠潮汐(default) ── */
    --bg: #F8FBF7;
    --header-bg: #F8FBF7;
    --hairline: rgba(119,151,128,.22);
    --text: #24382E;
    --text-soft: #5E7568;
    --text-faint: #8EA092;
    --bubble-ai-bg: rgba(240,246,238,.76);
    --bubble-ai-fg: #24382E;
    --bubble-ai-line: transparent;
    --bubble-human-bg: rgba(224,236,226,.78);
    --bubble-human-fg: #24382E;
    --bubble-human-line: transparent;
    --accent: #58765F;
    --send-bg: #365A43;
    --tick: #7F9A86;
    --accent-fg: #ffffff;
    --think-flourish: rgba(91, 124, 98, 0.46);
    --think-label: #6E846F;
    --think-body: #586E5F;
    --composer-bg: rgba(239,247,239,.92);
    --field-bg: rgba(248,251,247,.88);
    --field-line: rgba(139,166,144,.18);
    --shadow: 0 18px 46px rgba(62, 91, 70, 0.10);
    --soft-shadow: 0 14px 34px rgba(74, 102, 80, 0.08);
    --scrim: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.07) 30%, rgba(255,255,255,0.02) 68%, rgba(255,255,255,0.18));
    --header-h: clamp(56px, 10vw, 120px);
    --side-pad: clamp(16px, 4vw, 40px);
    --avatar-size: clamp(32px, 5vw, 48px);
    --bubble-radius: clamp(14px, 2vw, 20px);
    --composer-h: clamp(44px, 6vw, 72px);
    --motion-fast: 150ms;
    --motion-normal: 260ms;
    --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
    /* composer 占据的底部区域(含安全区/键盘):scroll 底 padding 与边缘渐隐共用同一来源,保持对齐 */
    --composer-zone: calc(var(--composer-h) + 16px + env(safe-area-inset-bottom) + var(--keyboard-offset));
    --edge-fade-top: clamp(24px, 5vw, 52px);
    --edge-fade-tail: clamp(16px, 3vw, 30px);
    /* profile / settings — frosted glass, blends into the wallpaper */
    --card-bg: rgba(244,248,250,.42);
    --card-line: rgba(150,168,182,.12);
    --card-shadow: 0 10px 28px rgba(70,92,108,.05);
    --seg-track: rgba(140,160,176,.11);
    --seg-thumb: rgba(255,255,255,.68);
    --seg-thumb-shadow: 0 2px 8px rgba(40,60,78,.08);
    --row-press: rgba(140,160,176,.09);
    --slider-track: rgba(143,162,176,.28);
    --slider-thumb: #5A7D61;
    --info-ring: rgba(139,166,144,.36);
    --status-dot: #5fbf8f;
    /* voice call (speaking overlay) */
    --call-glass-top: rgba(255,255,255,.46);
    --call-glass-bot: rgba(255,255,255,.20);
    --call-glass-edge: rgba(255,255,255,.58);
    --call-glass-hi: rgba(255,255,255,.72);
    --call-glass-glow: rgba(150,172,196,.20);
    --call-glass-shadow: 0 20px 50px rgba(74,93,108,.16);
    --call-scrim: rgba(64,82,102,.06);
    --call-hangup-bg: #cf8d92;
    --call-hangup-shadow: rgba(176,96,104,.34);
    --ui-font-scale: 1;
    --bubble-font-multiplier: 1;
  }
  /* ── HARBOR · 海港(通用开源主题 / Tidal Echo) ── 中性冷调,供 fork 使用;只覆盖带色相变量,其余继承 PEARL TIDE */
  :root[data-theme="harbor"]{
      --wall-default: var(--wall-harbor);
      --menu-wall-default: var(--menu-wall-harbor);
      --bg: #F4F2EF;
      --header-bg: #F4F2EF;
      --hairline: rgba(74,93,108,.20);
      --text: #36404B;
      --text-soft: #5E6B78;
      --text-faint: #9197A0;
      --bubble-ai-bg: #EAE6E4;
      --bubble-ai-fg: #36404B;
      --bubble-human-bg: #E1E0E3;
      --bubble-human-fg: #36404B;
      --accent: #4A5D6C;
      --send-bg: #4A5D6C;
      --tick: #7E8E9C;
      --accent-fg: #ffffff;
      --think-flourish: rgba(74, 93, 108, 0.48);
      --think-label: #5E6B78;
      --think-body: #4F5D6A;
      --composer-bg: #EFEBE8;
      --field-bg: rgba(244,242,239,.92);
      --slider-thumb: #4A5D6C;
      --status-dot: #6FA98C;
  }

  *{ box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body, #root{ width:100%; max-width:100%; min-height:100%; margin:0; padding:0; }
  html, body{ height:100%; overflow:hidden; overflow-x:hidden; overscroll-behavior:none; }
  body{ position: fixed; inset: 0; width: 100%; min-height: 100dvh; overflow-x:hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-cn);
    font-size: calc(clamp(14px, 1.45vw, 16px) * var(--ui-font-scale));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overscroll-behavior: none;
  }

  .app{
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    margin: 0;
    overflow: hidden;
    overflow-x:hidden;
  }
  @media (min-width: 641px){
    .app{
      width: min(100vw, var(--ref-width));
      margin: 0 auto;
    }
  }
  .wall{
    position:fixed;
    inset:0;
    width:100%;
    max-width:100%;
    height:var(--screen-height);
    z-index:0;
    background-color: var(--bg);
    background-image: var(--wall-default);
    background-size: cover; background-position: center;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
  .wall::after{
    content:""; position:absolute; inset:0; background: var(--scrim); pointer-events:none;
  }
  .topbar, .scroll, .composer{ position: relative; z-index: 1; }

  /* ── Header (floating frosted pill + corner avatar) ── */
  .topbar{
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    height: calc(var(--header-h) + env(safe-area-inset-top));
    padding: calc(env(safe-area-inset-top) + 8px) var(--side-pad) 10px;
    border-bottom: 1px solid var(--hairline);
    pointer-events: none;
  }
  .topbar > *{ pointer-events: auto; }
  .peerpill{
    display:flex; flex-direction:column; align-items:center; line-height:1.15;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 76px;
  }
  .peerpill .name{
    font-family: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
    font-size: calc(clamp(18px, 3vw, 28px) * var(--ui-font-scale));
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0;
    text-shadow: 0 1px 18px rgba(255,255,255,0.3);
  }
  .peerpill .status{
    font-family: var(--font-en), var(--font-cn);
    font-size: calc(clamp(12px, 1.8vw, 16px) * var(--ui-font-scale));
    color: var(--text-soft);
    margin-top: 4px;
    letter-spacing: 0;
  }
  .app[data-conn="reconnecting"] .peerpill .status{ color:#9a8061; }
  .peerpill .status.typing{
    color: #4f9fda;
    font-weight: 500;
    text-shadow: 0 0 16px rgba(79,159,218,.24);
    display: inline-flex; align-items: center;
  }
  .typing-dots{ display:inline-flex; align-items:center; gap:3px; margin-left:6px; }
  .typing-dots i{ width:4px; height:4px; border-radius:50%; background:currentColor; animation: typingDot 1.25s ease-in-out infinite; }
  .typing-dots i:nth-child(2){ animation-delay:.16s; }
  .typing-dots i:nth-child(3){ animation-delay:.32s; }
  @keyframes typingDot{ 0%,70%,100%{ transform:translateY(0); opacity:.4; } 35%{ transform:translateY(-3px); opacity:1; } }
  .backbtn{
    position:absolute; left: calc(var(--side-pad) + 4px); top: calc(env(safe-area-inset-top) + clamp(14px, 2.5vw, 36px));
    width:36px; height:36px; border-radius:50%; padding:0; flex:none; cursor:pointer;
    border: none; background: transparent;
    color: var(--text); display:grid; place-items:center;
    transition: transform .15s ease;
  }
  .backbtn:active{ transform: scale(.9); }
  .backbtn svg{ width:22px; height:22px; display:block; margin-left:-2px; }
  .header-actions{
    position:absolute;
    right: calc(var(--side-pad) - 2px);
    top: calc(env(safe-area-inset-top) + clamp(14px, 2.5vw, 36px));
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap: clamp(24px, 4vw, 42px);
    height:36px;
  }
  .topbtn{
    width:36px;
    height:36px;
    border:0;
    border-radius:50%;
    padding:0;
    background:transparent;
    color: var(--text);
    display:grid;
    place-items:center;
    cursor:pointer;
    transition: transform .15s ease;
  }
  .topbtn:active{ transform: scale(.9); }
  .topbtn svg{ width:24px; height:24px; display:block; }
  .topbtn.more svg{ width:22px; height:22px; }
  .avatar{
    position:absolute; right: calc(var(--side-pad) - 3px); top: calc(env(safe-area-inset-top) + clamp(14px, 2.5vw, 36px));
    width: var(--avatar-size); height: var(--avatar-size); border-radius:50%; padding:0; flex:none; cursor:pointer;
    border: none;
    background-image: var(--avatar-default);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(24,46,67,0.16);
  }
  .avatar:focus-visible,
  .backbtn:focus-visible,
  button:focus-visible,
  textarea:focus-visible,
  input:focus-visible{
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }


  /* ── Login ── */
  .login{
    position: fixed; inset:0; z-index: 50;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap: 22px; padding: 28px;
    padding-top: calc(28px + env(safe-area-inset-top));
    background-color: var(--bg);
    background-image: var(--wall-default);
    background-size: cover;
    background-position: center;
  }
  .login .orb{
    width:72px; height:72px; border-radius:50%;
    background-image: var(--avatar-default);
    background-size: cover;
    box-shadow: 0 20px 42px rgba(24,46,67,0.2);
    animation: breathe 4.5s ease-in-out infinite;
  }
  .login h1{ margin:0; font-size:34px; font-weight:500; letter-spacing:0; }
  .login .sub{ margin:-12px 0 0; color: var(--text-soft); font-size:16px; text-align:center; }
  .login form{ display:flex; flex-direction:column; gap:11px; width:100%; max-width:320px; }
  .login input{
    width:100%; padding: 14px 16px; font: inherit; color: var(--text);
    background: var(--field-bg); border:1px solid var(--field-line); border-radius:18px; outline:none;
    transition: border-color .2s ease;
    box-shadow: var(--soft-shadow);
  }
  .login input:focus{ border-color: var(--accent); }
  .login button{
    width:100%; padding: 14px; font: inherit; font-weight:600;
    background: var(--accent); color: var(--accent-fg); border:none; border-radius:18px; cursor:pointer;
  }
  .login button:active{ transform: scale(.99); }
  .login .err{ color:#c0533f; font-size:13px; min-height:16px; text-align:center; margin:0; }
  .hidden{ display:none !important; }
  .app.kb .composer{ padding-bottom: 8px; }

  /* ── Profile page (full-screen settings) ── */
  .profile-panel{
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    transform: translateX(100%);
    opacity: 0;
    transition: transform .34s var(--ease-soft), opacity .26s ease;
  }
  .profile-panel.open{ transform: none; opacity: 1; pointer-events: auto; }
  /* own wallpaper layer so the chat behind is fully covered, theme-matched */
  .profile-page{
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    background-image: var(--wall-default);
    background-size: cover;
    background-position: center;
    overflow: hidden;
  }
  .profile-page::before{
    content:""; position:absolute; inset:0; background: var(--scrim); pointer-events:none;
  }
  .profile-topbar{
    position: relative; z-index:1;
    flex: 0 0 auto;
    display:flex; align-items:center; gap:10px;
    height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) var(--side-pad) 0;
  }
  .profile-back{
    width:40px; height:40px; flex:none;
    border:0; border-radius:50%; padding:0; margin-left:-6px;
    background: transparent; color: var(--text);
    display:grid; place-items:center; cursor:pointer;
    transition: transform .15s ease;
  }
  .profile-back:active{ transform: scale(.9); }
  .profile-back svg{ width:24px; height:24px; display:block; }
  .profile-scroll{
    position: relative; z-index:1;
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 10px var(--side-pad) calc(30px + env(safe-area-inset-bottom));
    display:flex; flex-direction:column; gap:24px;
  }
  .profile-scroll::-webkit-scrollbar{ width:0; height:0; }

  /* identity */
  .profile-identity{
    display:grid;
    grid-template-columns: auto 1fr;
    gap:18px; align-items:center;
    padding: 4px 4px 16px;
  }
  .profile-avatar{
    width:78px; height:78px; border-radius:50%;
    border:0; padding:0; overflow:hidden;
    -webkit-appearance:none; appearance:none;
    background-color:transparent;
    background-image: var(--avatar-default);
    background-size:cover; background-position:center;
    box-shadow: 0 12px 28px rgba(24,46,67,0.16);
    cursor:pointer; transition: transform .15s ease;
  }
  .profile-avatar:active{ transform: scale(.96); }
  .profile-id-copy{ min-width:0; }
  .profile-name-row{ display:flex; align-items:center; gap:9px; margin:0 0 5px; }
  .profile-name-row h3,
  #profileNameInput{
    margin:0;
    font-family: var(--font-en), var(--font-cn);
    font-size:23px; font-weight:500; letter-spacing:0;
    color: var(--text); line-height:1.1;
  }
  #profileNameInput{
    width:6.6em; max-width:62%;
    border:0; border-radius:10px;
    background: var(--seg-track); outline:none;
    padding:3px 11px; margin:-3px 0;
  }
  .profile-name-edit{
    width:26px; height:26px; flex:none;
    border:0; border-radius:50%; padding:0;
    background:transparent; color: var(--text-soft);
    display:grid; place-items:center; cursor:pointer;
    transition: color .2s ease, transform .15s ease;
  }
  .profile-name-edit:active{ transform: scale(.88); }
  .profile-name-edit svg{ width:15px; height:15px; display:block; }
  .profile-handle{
    display:flex; align-items:center; gap:7px; margin:0 0 8px;
    color: var(--text-soft);
    font-family: var(--font-en), var(--font-cn); font-size:13.5px;
  }
  .profile-bio{ margin:0; color: var(--text-soft); font-size:13px; line-height:1.55; }

  /* setting card */
  .settings-card{
    background: var(--card-bg);
    border: 1px solid var(--card-line);
    border-radius:18px;
    box-shadow: var(--card-shadow);
    padding:15px 16px;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .settings-label{
    display:flex; align-items:center; gap:6px;
    color: var(--text-soft); font-size:12.5px;
    margin-bottom:11px; letter-spacing:.01em;
  }
  .info-i{
    width:14px; height:14px; flex:none; border-radius:50%;
    border:1px solid var(--info-ring); color: var(--text-faint);
    display:inline-grid; place-items:center;
    font-size:9px; font-style:normal; line-height:1;
    font-family: var(--font-en), var(--font-cn);
    cursor:help; user-select:none;
  }
  .push-hint{
    margin-top:9px; font-size:11.5px; line-height:1.55;
    color: var(--text-faint); letter-spacing:.01em;
  }
  .connector-grid{ display:flex; flex-direction:column; gap:10px; }
  .connector-field{ display:flex; flex-direction:column; gap:6px; }
  .connector-field label{
    color: var(--text-soft);
    font-size:11.5px;
    letter-spacing:.04em;
    text-transform:uppercase;
    font-family: var(--font-en), var(--font-cn);
  }
  .connector-field input,
  .connector-field textarea{
    width:100%;
    border:1px solid var(--field-line);
    border-radius:12px;
    background: var(--field-bg);
    color: var(--text);
    font: inherit;
    font-size:13px;
    line-height:1.45;
    outline:none;
    padding:10px 11px;
    box-shadow: none;
    resize: vertical;
  }
  .connector-field textarea{ min-height:74px; max-height:160px; }
  .connector-field input:focus,
  .connector-field textarea:focus{ border-color: var(--accent); }
  .connector-actions{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin-top:2px; }
  .connector-actions button{
    border:0;
    border-radius:12px;
    padding:10px 8px;
    background: var(--seg-track);
    color: var(--text);
    font: inherit;
    font-size:12.5px;
    cursor:pointer;
  }
  .connector-actions button.primary{
    background: var(--accent);
    color: var(--accent-fg);
  }
  .template-tools{
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:8px;
  }
  .template-tools select{
    grid-column:1 / -1;
    width:100%;
    border:1px solid var(--field-line);
    border-radius:12px;
    background: var(--field-bg);
    color: var(--text);
    font: inherit;
    font-size:13px;
    line-height:1.45;
    outline:none;
    padding:10px 11px;
  }
  .template-tools button{
    border:0;
    border-radius:12px;
    padding:10px 8px;
    background: var(--seg-track);
    color: var(--text);
    font: inherit;
    font-size:12.5px;
    cursor:pointer;
  }
  .template-tools button.primary{
    background: var(--accent);
    color: var(--accent-fg);
  }
  .template-tools button.danger{ color:#9b5c5c; }
  .connector-status{
    min-height:16px;
    color: var(--text-faint);
    font-size:11.5px;
    line-height:1.45;
  }

  /* segmented control */
  .segmented{
    display:grid; grid-auto-flow:column; grid-auto-columns:1fr;
    gap:3px; background: var(--seg-track);
    border-radius:13px; padding:3px;
  }
  .segmented button{
    border:0; background:transparent; color: var(--text-soft);
    border-radius:10px; padding:8px 3px;
    font: inherit; font-size: clamp(10.5px, 2.9vw, 12.5px);
    letter-spacing:0; white-space:nowrap; cursor:pointer;
    transition: background .22s ease, color .22s ease, box-shadow .22s ease;
  }
  .segmented button.active{
    background: var(--seg-thumb); color: var(--text);
    box-shadow: var(--seg-thumb-shadow); font-weight:500;
  }
  .model-picker{ display:flex; flex-direction:column; gap:9px; }
  .model-search{
    width:100%;
    border:1px solid var(--field-line);
    border-radius:12px;
    background: var(--field-bg);
    color: var(--text);
    font: inherit;
    font-size:13px;
    line-height:1.45;
    outline:none;
    padding:10px 11px;
  }
  .model-search:focus{ border-color: var(--accent); }
  .model-count{
    min-height:15px;
    color: var(--text-faint);
    font-size:11.5px;
    line-height:1.35;
  }
  .segmented.model-list{
    grid-auto-flow:unset;
    grid-auto-columns:unset;
    grid-template-columns:repeat(auto-fit, minmax(118px, 1fr));
    gap:8px;
    background:transparent;
    border-radius:13px;
    padding:0;
    max-height:260px;
    overflow:auto;
  }
  .segmented.model-list button{
    min-height:44px;
    border:1px solid var(--field-line);
    background: var(--field-bg);
    border-radius:12px;
    padding:9px 10px;
    white-space:normal;
    overflow:hidden;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    text-align:left;
    line-height:1.25;
    word-break:break-word;
  }
  .segmented.model-list button.active{
    border-color: transparent;
    background: var(--seg-thumb);
  }

  /* generation parameter sliders */
  .generation-grid{ display:flex; flex-direction:column; gap:14px; }
  .generation-row{ display:grid; grid-template-columns:1fr auto; gap:10px; align-items:start; }
  .generation-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:8px; }
  .generation-name{
    color: var(--text-soft);
    font-size:11.5px;
    letter-spacing:.04em;
    text-transform:uppercase;
    font-family: var(--font-en), var(--font-cn);
  }
  .generation-value{
    color: var(--text);
    font-size:12px;
    font-family: var(--font-en), var(--font-cn);
    white-space:nowrap;
  }
  .generation-reset{
    width:26px;
    height:26px;
    border:0;
    border-radius:50%;
    margin-top:17px;
    display:grid;
    place-items:center;
    background: var(--seg-track);
    color: var(--text-faint);
    font: inherit;
    font-size:16px;
    line-height:1;
    cursor:pointer;
  }
  .generation-reset:active{ transform: scale(.94); }
  .param-slider{
    -webkit-appearance:none; appearance:none;
    width:100%; height:4px; border-radius:999px;
    background: var(--slider-track);
    outline:none; cursor:pointer; margin:6px 0;
  }
  .param-slider::-webkit-slider-thumb{
    -webkit-appearance:none; appearance:none;
    width:21px; height:21px; border-radius:50%;
    background: var(--slider-thumb);
    border:2.5px solid var(--card-bg);
    box-shadow: 0 3px 10px rgba(24,46,67,.26); cursor:pointer;
  }
  .param-slider::-moz-range-thumb{
    width:21px; height:21px; border-radius:50%;
    background: var(--slider-thumb);
    border:2.5px solid var(--card-bg);
    box-shadow: 0 3px 10px rgba(24,46,67,.26); cursor:pointer;
  }
  .param-scale{
    display:flex; justify-content:space-between; margin-top:9px;
    color: var(--text-faint);
    font-family: var(--font-en), var(--font-cn); font-size:11.5px;
  }

  /* action rows */
  .action-row{
    display:flex; align-items:center; gap:13px;
    width:100%; text-align:left;
    background: var(--card-bg);
    border:1px solid var(--card-line);
    border-radius:16px; box-shadow: var(--card-shadow);
    padding:13px 16px; color: var(--text); font: inherit; cursor:pointer;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    transition: background .18s ease, transform .12s ease;
  }
  button.action-row:active{ background: var(--row-press); transform: scale(.992); }
  .action-icon{ width:21px; height:21px; flex:none; color: var(--accent); display:grid; place-items:center; }
  .action-icon svg{ width:19px; height:19px; display:block; }
  .action-name{ font-family: var(--font-en), var(--font-cn); font-size:14.5px; color: var(--text); flex:none; }
  .action-value{
    margin-left:auto; color: var(--text-soft); font-size:12.5px;
    text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .action-chevron{ flex:none; color: var(--text-faint); display:grid; place-items:center; margin-left:2px; }
  .action-chevron svg{ width:16px; height:16px; display:block; }
  .action-row.status{ cursor:default; }
  .action-row.status .status-main{ margin-left:auto; display:flex; flex-direction:column; align-items:flex-end; gap:2px; min-width:0; }
  .status-used{ color: var(--text); font-family: var(--font-en), var(--font-cn); font-size:13px; }
  .status-sid{ display:flex; align-items:center; gap:6px; color: var(--text-faint); font-size:11.5px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
  .status-copy{
    width:24px; height:24px; flex:none; border:0; border-radius:8px; padding:0;
    background:transparent; color: var(--text-soft);
    display:grid; place-items:center; cursor:pointer;
    transition: color .2s ease, transform .15s ease;
  }
  .status-copy:active{ transform: scale(.85); }
  .status-copy svg{ width:15px; height:15px; display:block; }

  /* toast */
  .toast{
    position: fixed; left:50%; bottom: calc(40px + env(safe-area-inset-bottom));
    transform: translate(-50%, 12px); z-index:300;
    background: rgba(20,34,48,.92); color:#eef5fb; font-size:14px;
    padding:10px 18px; border-radius:999px;
    box-shadow: 0 14px 34px rgba(0,0,0,.28);
    opacity:0; pointer-events:none;
    transition: opacity .24s ease, transform .24s ease;
  }
  .toast.show{ opacity:1; transform: translate(-50%, 0); }


  /* ── Menu (hub / home page · 从聊天页左箭头进入) ── */
  .menu-panel{
    position: fixed; inset: 0; z-index: 190;
    pointer-events: none;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform .38s var(--ease-soft), opacity .28s ease;
  }
  .menu-panel.open{ transform: none; opacity: 1; pointer-events: auto; }
  .menu-page{
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    background-color: var(--bg);
    background-image: var(--menu-wall-default);
    background-size: cover; background-position: center;
    overflow: hidden;
  }
  .menu-page::before{
    content:""; position:absolute; inset:0; background: var(--scrim); pointer-events:none;
  }
  .menu-scroll{
    position: relative; z-index: 1;
    flex: 1 1 auto; overflow-y: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    display: flex; flex-direction: column;
    padding: calc(env(safe-area-inset-top) + clamp(18px, 4vw, 30px)) clamp(26px, 7vw, 54px) calc(env(safe-area-inset-bottom) + clamp(20px, 5vw, 30px));
  }
  .menu-scroll::-webkit-scrollbar{ width:0; height:0; }

  /* header: 玻璃液态日夜 toggle(左) · PRIVATE SPACE(右) */
  .menu-head{
    flex: 0 0 auto;
    display:flex; align-items:flex-start; justify-content:space-between;
    margin-bottom: clamp(34px, 10vw, 68px);
  }
  /* (主题切换已移至设置页 #themeSeg;原菜单页玻璃 toggle 的 CSS 已随标记一并移除) */
  .menu-private{
    text-align:right; line-height:1.55;
    font-family: var(--font-en), var(--font-cn);
    font-size: clamp(9.5px, 2.5vw, 11px); letter-spacing:.24em;
    color: var(--text-soft); text-transform:uppercase;
  }
  .menu-private::after{
    content:""; display:block; margin-left:auto; margin-top:8px;
    width: clamp(20px, 5.5vw, 26px); height:1px; background: var(--text-faint); opacity:.6;
  }

  /* hero: app title · since · days */
  .menu-hero{ flex: 0 0 auto; margin-bottom: clamp(38px, 11vw, 72px); }
  .menu-title{
    font-family: "Pinyon Script", var(--font-en), cursive;
    font-weight: 400;
    font-size: clamp(46px, 15vw, 86px);
    line-height: 1.04;
    color: var(--text);
    margin: 0 0 clamp(16px, 4.4vw, 26px);
    letter-spacing: .005em;
    text-shadow: 0 2px 26px rgba(0,0,0,.16);
  }
  .menu-since{
    font-family: var(--font-en), var(--font-cn);
    font-size: clamp(11px, 2.9vw, 13.5px);
    letter-spacing:.14em; color: var(--text-soft);
    margin: 0 0 clamp(8px, 2.2vw, 12px);
  }
  .menu-days{
    display:flex; align-items:baseline; gap: clamp(8px, 2.6vw, 12px);
    font-family: var(--font-en), var(--font-cn); color: var(--text);
  }
  .menu-days .num{ font-size: clamp(30px, 8.4vw, 48px); font-weight:500; line-height:1; letter-spacing:.01em; }
  .menu-days .lab{ font-size: clamp(12px, 3.1vw, 15px); letter-spacing:.13em; color: var(--text-soft); }

  /* list */
  .menu-list{ flex: 0 0 auto; display:flex; flex-direction:column; }
  .menu-item{
    display:grid;
    grid-template-columns: clamp(22px, 6vw, 27px) auto 1fr auto;
    align-items:center; gap: clamp(12px, 3.4vw, 18px);
    width:100%; text-align:left;
    background:transparent; border:0;
    border-top:1px solid var(--hairline);
    padding: clamp(15px, 4.4vw, 21px) 2px;
    color: var(--text); font: inherit; cursor:pointer;
    transition: background .18s ease, transform .12s ease;
  }
  .menu-item:last-child{ border-bottom:1px solid var(--hairline); }
  .menu-item:active{ background: var(--row-press); transform: scale(.995); }
  .menu-ic{ display:grid; place-items:center; color: var(--text-soft); }
  .menu-ic svg{ width: clamp(19px, 5vw, 22px); height: clamp(19px, 5vw, 22px); display:block; }
  .menu-dot{ width:3px; height:3px; border-radius:50%; background: var(--text-faint); opacity:.5; }
  .menu-dot[data-state="online"]{ width:6px; height:6px; background: var(--status-dot); opacity:.95; box-shadow:0 0 0 4px rgba(95,191,143,.13); }
  .menu-dot[data-state="offline"]{ width:6px; height:6px; background:#c7877f; opacity:.9; box-shadow:0 0 0 4px rgba(199,135,127,.12); }
  .menu-dot[data-state="checking"]{ width:6px; height:6px; background: var(--text-faint); opacity:.75; animation: mcpPulse 1.2s ease-in-out infinite; }
  @keyframes mcpPulse{ 0%,100%{ transform:scale(.85); opacity:.45; } 50%{ transform:scale(1.08); opacity:.95; } }
  .menu-copy{ display:flex; flex-direction:column; min-width:0; }
  .menu-name{
    font-family: var(--font-en), var(--font-cn);
    font-size: clamp(18px, 5vw, 23px); font-weight:500; line-height:1.14;
    color: var(--text); margin-bottom:2px;
  }
  .menu-sub{
    font-family: var(--font-en), var(--font-cn);
    font-size: clamp(8.5px, 2.3vw, 10px); letter-spacing:.16em;
    text-transform:uppercase; color: var(--text-faint);
  }
  .menu-chev{ color: var(--text-faint); display:grid; place-items:center; }
  .menu-chev svg{ width:15px; height:15px; display:block; }

  /* footer */
  .menu-foot{
    flex: 1 1 auto;
    display:flex; align-items:flex-end; justify-content:center;
    text-align:center;
    padding-top: clamp(22px, 6vw, 40px);
    font-family: var(--font-en), var(--font-cn);
    font-size: clamp(10.5px, 2.7vw, 12.5px); font-style:italic;
    letter-spacing:.05em; color: var(--text-faint);
  }


  /* ── Voice call (speaking overlay · 假按键 / 纯 UI,后端以后接) ── */
  .call-overlay{
    position: fixed; inset: 0; z-index: 150;
    pointer-events: none;
  }
  .call-scrim{
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.25) 40%, rgba(255,255,255,.45) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
  }
  .call-overlay.open .call-scrim{ opacity: 1; }
  .call-sheet{
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center;
    justify-content: flex-start;
    padding: calc(env(safe-area-inset-top) + clamp(50px, 10vw, 84px)) var(--side-pad) calc(env(safe-area-inset-bottom) + 26px);
    text-align: center;
    background-color: var(--bg);
    background-image: var(--wall-default);
    background-size: cover; background-position: center;
    opacity: 0; pointer-events: none;
    transform: translateY(12px);
    transition: opacity .34s var(--ease-soft), transform .34s var(--ease-soft);
    overflow: hidden;
  }
  .call-overlay.open .call-sheet{ opacity: 1; pointer-events: auto; transform: translateY(0); }

  /* ── Avatar stage: 头像 + 两翼声纹 ── */
  .call-avatar-stage{
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    gap: clamp(8px, 2.2vw, 16px);
    margin-top: clamp(4px, 3vh, 30px);
    flex-shrink: 0;
  }
  .call-vu{
    --vu-level: 0;
    flex: 1 1 0; min-width: 0;
    height: clamp(70px, 17vw, 100px);
    display: flex; align-items: center;
    gap: clamp(2.5px, 0.8vw, 4px);
  }
  .call-vu-left{ flex-direction: row-reverse; }
  .call-vu i{
    flex: 0 0 auto;
    width: clamp(2px, 0.65vw, 3px);
    height: calc(100% * var(--bar, .4) * (0.46 + 0.54 * var(--vu-level)));
    min-height: 2px;
    border-radius: 99px;
    background: var(--accent);
    opacity: calc(var(--bar-op, .4) * (0.6 + 0.4 * var(--vu-level)));
    animation: callVuIdle var(--vu-dur, 1.6s) var(--ease-soft) infinite alternate;
    animation-delay: var(--vu-delay, 0s);
    will-change: transform, opacity;
  }
  @keyframes callVuIdle{ from{ transform: scaleY(.55); } to{ transform: scaleY(1); } }
  @media (prefers-reduced-motion: reduce){ .call-vu i{ animation: none; } }

  /* ── Avatar ring ── */
  .call-avatar-ring{
    --ring-level: 0;
    position: relative;
    width: clamp(128px, 37vw, 168px); height: clamp(128px, 37vw, 168px);
    border-radius: 50%;
    display: grid; place-items: center;
    flex: 0 0 auto;
    box-shadow:
      0 10px 34px rgba(40,60,78,.16),
      0 0 calc(16px + 34px * var(--ring-level)) calc(2px + 12px * var(--ring-level)) color-mix(in srgb, var(--accent) 30%, transparent);
    transition: box-shadow .14s ease;
  }
  .call-avatar-img{
    width: 100%; height: 100%;
    border-radius: 50%;
    background-image: var(--avatar-default);
    background-size: cover; background-position: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  }

  /* ── Name / status / timer ── */
  .call-name{
    margin-top: clamp(18px, 4vw, 28px);
    color: var(--text);
    font-family: var(--font-cn);
    font-size: clamp(27px, 7vw, 36px);
    font-weight: 500;
    line-height: 1.2;
  }
  .call-status{
    display: inline-flex; align-items: center; gap: 11px;
    color: var(--think-label);
    font-family: var(--font-en), var(--font-cn);
    font-size: clamp(13px, 1.8vw, 15.5px);
    letter-spacing: .16em;
    line-height: 1;
    margin-top: 8px;
  }
  .call-status .call-star{ color: var(--think-flourish); display: grid; place-items: center; }
  .call-status .call-star svg{ width: 16px; height: 16px; display: block; }
  .call-timer{
    font-family: var(--font-en), var(--font-cn);
    font-variant-numeric: tabular-nums;
    font-size: clamp(19px, 5vw, 25px);
    font-weight: 500;
    letter-spacing: .04em;
    line-height: 1;
    color: var(--text-soft);
    margin-top: 9px;
  }

  /* ── Quote (the AI's last spoken line) ── */
  .call-quote{
    flex: 1 1 auto;
    min-height: 0;                 /* 让 flex 能真正约束它,长文本不再撑破/盖住头像与字幕 */
    display: flex; align-items: center; justify-content: center;
    width: min(88vw, 400px);
    padding: clamp(8px, 2vw, 18px) clamp(8px, 2vw, 16px);
    overflow: hidden;              /* 兜底:绝不溢出到相邻区域 */
  }
  .call-quote-mark{
    color: var(--text-faint);
    font-family: var(--font-en);
    font-size: clamp(40px, 9.5vw, 56px);
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
    align-self: flex-start;
    opacity: .5;
  }
  .call-quote-mark:last-child{ align-self: flex-end; }
  .call-quote-text{
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;                 /* Firefox 隐藏滚动条 */
    color: var(--text);
    font-family: var(--font-cn);
    font-size: clamp(20px, 5.2vw, 27px);
    line-height: 1.52;
    text-align: center;
    padding: 0 clamp(6px, 1.5vw, 12px);
    overflow-wrap: break-word;
  }
  .call-quote-text::-webkit-scrollbar{ display: none; }   /* WebKit 隐藏滚动条 */
  /* 仅当文字真的溢出时(由 JS 加 .clip)才底部渐隐(顶部保持清晰,因为总是从头读起,
     渐隐只用来暗示"下面还有,全文在字幕条里") */
  .call-quote-text.clip{
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 22px), transparent 100%);
            mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 22px), transparent 100%);
  }
  .call-quote-text.hint{
    color: var(--text-soft);
    font-size: clamp(18px, 4.8vw, 24px);
  }
  .call-quote-text.lyric-mode{
    font-size: clamp(14px, 3.8vw, 19px);
    text-align: center;
  }
  .lyric-line{
    display: block;
    opacity: 0.28;
    transition: opacity 0.45s ease, transform 0.45s ease;
    transform: scale(0.96);
    padding: 3px 0;
  }
  .lyric-line.active{
    opacity: 1;
    transform: scale(1);
  }

  /* ── Transcript section ── */
  .call-transcript-section{
    width: min(92vw, 440px);
    display: flex; flex-direction: column; align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  .call-transcript-label{
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    color: var(--text-faint);
    font-family: var(--font-en), var(--font-cn);
    font-size: clamp(12px, 1.5vw, 13px);
    letter-spacing: .06em;
  }
  .call-transcript-cap{ display: inline-flex; align-items: center; gap: 7px; }
  .call-transcript-cap::before{
    content: ""; display: inline-block;
    width: 16px; height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cline x1='4' y1='9' x2='4' y2='15'/%3E%3Cline x1='9' y1='4.5' x2='9' y2='19.5'/%3E%3Cline x1='14' y1='7.5' x2='14' y2='16.5'/%3E%3Cline x1='19' y1='10.5' x2='19' y2='13.5'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cline x1='4' y1='9' x2='4' y2='15'/%3E%3Cline x1='9' y1='4.5' x2='9' y2='19.5'/%3E%3Cline x1='14' y1='7.5' x2='14' y2='16.5'/%3E%3Cline x1='19' y1='10.5' x2='19' y2='13.5'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  /* 「我在想 …」跳动点(引号区,贴心提示) */
  .call-dots{ display: inline-flex; align-items: center; gap: 4px; }
  .call-dots i{
    width: 4px; height: 4px; border-radius: 50%;
    background: currentColor;
    animation: callTypingDot 1.25s ease-in-out infinite;
  }
  .call-dots i:nth-child(2){ animation-delay: .16s; }
  .call-dots i:nth-child(3){ animation-delay: .32s; }
  @keyframes callTypingDot{ 0%,70%,100%{ transform: translateY(0); opacity:.4; } 35%{ transform: translateY(-3px); opacity:1; } }
  .call-dots-quote{ margin-left: 10px; vertical-align: middle; gap: 5px; }
  .call-dots-quote i{ width: 6px; height: 6px; }
  .call-transcript-bar{
    width: 100%;
    min-height: 2em;
    padding: clamp(11px, 2.2vw, 15px) clamp(18px, 4vw, 26px);
    border-radius: clamp(18px, 3.4vw, 24px);
    background: linear-gradient(157deg, var(--call-glass-top), var(--call-glass-bot));
    border: 1px solid var(--call-glass-edge);
    box-shadow: var(--call-glass-shadow), inset 0 1px 0 var(--call-glass-hi);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    backdrop-filter: blur(24px) saturate(1.6);
    color: var(--text);
    font-family: var(--font-cn);
    font-size: clamp(14.5px, 2vw, 16.5px);
    line-height: 1.6;
    text-align: center;
    overflow-wrap: break-word;
    max-height: clamp(72px, 16vh, 132px);   /* 长字幕也封顶,不再把控制键/挂断顶出屏外 */
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .call-transcript-bar::-webkit-scrollbar{ display: none; }
  .call-transcript-bar .caret{
    display: inline-block; width: 1px; height: 1.04em; margin-left: 2px;
    background: currentColor; opacity: .55;
    vertical-align: -0.14em;
    animation: callCaret 1s steps(1) infinite;
  }
  @keyframes callCaret{ 0%,49%{ opacity:.55; } 50%,100%{ opacity:0; } }

  /* ── Controls row ── */
  .call-controls{
    display: flex; align-items: flex-start; justify-content: center;
    gap: clamp(30px, 9vw, 50px);
    margin-top: clamp(22px, 4vw, 34px);
    flex-shrink: 0;
  }
  .call-ctrl-btn{
    display: flex; flex-direction: column; align-items: center; gap: 9px;
    border: 0; padding: 0; cursor: pointer;
    background: transparent;
    color: var(--text-soft);
    -webkit-tap-highlight-color: transparent;
  }
  .call-ctrl-btn > svg{
    width: clamp(58px, 14.5vw, 70px); height: clamp(58px, 14.5vw, 70px);
    padding: clamp(15px, 3.4vw, 19px);
    border-radius: 50%;
    background: linear-gradient(157deg, var(--call-glass-top), var(--call-glass-bot));
    border: 1px solid var(--call-glass-edge);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    backdrop-filter: blur(20px) saturate(1.6);
    box-shadow: 0 8px 22px rgba(40,60,78,.10), inset 0 1px 0 var(--call-glass-hi);
    transition: background .15s ease, transform .12s ease, color .15s ease;
  }
  .call-ctrl-btn:active > svg{ transform: scale(.92); }
  .call-ctrl-btn > span{
    font-family: var(--font-cn);
    font-size: clamp(12px, 1.6vw, 13.5px);
    color: var(--text-faint);
  }
  .call-ctrl-btn.active > svg{
    background: var(--accent);
    color: var(--accent-fg);
    border-color: transparent;
  }

  /* ── Hangup ── */
  .call-hangup{
    margin-top: clamp(20px, 4vw, 32px);
    width: clamp(64px, 15.5vw, 74px); height: clamp(64px, 15.5vw, 74px);
    border: 0; border-radius: 50%; padding: 0; cursor: pointer;
    background: var(--call-hangup-bg);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 10px 26px var(--call-hangup-shadow);
    transition: transform .15s ease, filter .2s ease;
    flex-shrink: 0;
  }
  .call-hangup:hover{ filter: brightness(1.05); }
  .call-hangup:active{ transform: scale(.92); }
  .call-hangup svg{ width: clamp(26px, 5.6vw, 31px); height: clamp(26px, 5.6vw, 31px); display: block; transform: rotate(135deg); }

  /* ── Minimize (top-left) ── */
  .call-minimize-top{
    position: absolute;
    top: calc(env(safe-area-inset-top) + clamp(10px, 2vw, 16px));
    left: clamp(10px, 2vw, 16px);
    width: 36px; height: 36px;
    border: 0; border-radius: 50%; padding: 0; cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--card-line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--text-soft);
    display: grid; place-items: center;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, transform .12s ease;
  }
  .call-minimize-top:active{ transform: scale(.9); }
  .call-minimize-top svg{ width: 18px; height: 18px; display: block; }

  /* ── Hide old wave (no longer visible) ── */
  .call-wave{ display: none; }

  /* ── Call mini-bar (WeChat-style green strip) ── */
  .call-mini{
    display: none;
    position: fixed;
    left: 0; right: 0;
    top: calc(var(--header-h) + env(safe-area-inset-top));
    height: 34px;
    background: var(--accent);
    color: var(--accent-fg);
    font-family: var(--font-cn);
    font-size: 13px;
    align-items: center; justify-content: center;
    gap: 8px;
    z-index: 152;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .2s ease;
  }
  .call-mini:active{ filter: brightness(.88); }
  .call-mini-dot{
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: callMiniPulse 1.4s ease-in-out infinite;
  }
  @keyframes callMiniPulse{
    0%,100%{ opacity: 1; }
    50%{ opacity: .35; }
  }
  .call-mini-timer{
    font-family: var(--font-en);
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
  }
  .call-overlay.open.minimized .call-scrim{ opacity: 0; pointer-events: none; }
  .call-overlay.open.minimized .call-sheet{ opacity: 0; pointer-events: none; transform: translateY(12px); }
  .call-overlay.open.minimized .call-mini{ display: flex; }
  .call-overlay.open.minimized{ pointer-events: none; }

  /* 来电:全屏(与通话中同一张画布,接听后无缝衔接,不再是顶部小卡片) */
  .incoming-call-overlay{ z-index: 151; }
  .incoming-call-overlay .call-scrim{ background: var(--call-scrim); }
  .incoming-call-overlay .call-sheet{
    justify-content: flex-start;
    gap: clamp(12px, 2.6vw, 20px);
  }
  /* caption 行(✦ incoming call ✦)——与 .call-status 同款横排 */
  .call-caption{
    display: inline-flex; align-items: center; gap: 11px;
    color: var(--think-label);
    font-family: var(--font-en), var(--font-cn);
    font-size: clamp(13px, 1.8vw, 15.5px);
    letter-spacing: .16em; line-height: 1;
    margin-top: clamp(2px, 2vh, 14px);
  }
  .call-caption .call-star{ color: var(--think-flourish); display: grid; place-items: center; }
  .call-caption .call-star svg{ width: 16px; height: 16px; display: block; }
  /* 来电大头像 + 呼吸光环 */
  .incoming-call-avatar{
    width: clamp(132px, 40vw, 184px); height: clamp(132px, 40vw, 184px);
    border-radius: 50%;
    background-image: var(--avatar-default);
    background-size: cover; background-position: center;
    box-shadow: 0 12px 38px rgba(40,60,78,.18), inset 0 0 0 1px rgba(255,255,255,.14);
    margin-top: clamp(10px, 4vh, 36px);
    animation: incomingPulse 2.4s var(--ease-soft) infinite;
  }
  @keyframes incomingPulse{
    0%   { box-shadow: 0 12px 38px rgba(40,60,78,.18), 0 0 0 0 color-mix(in srgb, var(--accent) 34%, transparent), inset 0 0 0 1px rgba(255,255,255,.14); }
    70%  { box-shadow: 0 12px 38px rgba(40,60,78,.18), 0 0 0 22px color-mix(in srgb, var(--accent) 0%, transparent), inset 0 0 0 1px rgba(255,255,255,.14); }
    100% { box-shadow: 0 12px 38px rgba(40,60,78,.18), 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent), inset 0 0 0 1px rgba(255,255,255,.14); }
  }
  @media (prefers-reduced-motion: reduce){ .incoming-call-avatar{ animation: none; } }
  /* 来电动作区:推到底部,拒接/接听左右分开(iOS 式) */
  .incoming-call-actions{
    margin-top: auto;
    margin-bottom: calc(env(safe-area-inset-bottom) + clamp(14px, 5vh, 52px));
    display: flex; align-items: flex-end; justify-content: center;
    gap: clamp(46px, 22vw, 108px);
    width: 100%;
  }
  .incoming-call-slot{ display: flex; flex-direction: column; align-items: center; gap: 11px; }
  .incoming-call-label{
    font-family: var(--font-cn);
    font-size: clamp(12px, 1.6vw, 13.5px);
    color: var(--text-faint);
  }
  .incoming-call-title{
    margin-top: clamp(4px, 2vw, 12px);
    color: var(--text);
    font-family: var(--font-cn);
    font-size: clamp(27px, 6.6vw, 36px);
    line-height: 1.2;
    font-weight: 500;
  }
  .incoming-call-text{
    width: min(80vw, 360px);
    min-height: 1.6em;
    color: var(--text-soft);
    font-family: var(--font-cn);
    font-size: clamp(14px, 1.9vw, 16px);
    line-height: 1.6;
    text-align: center;
    overflow-wrap: break-word;
  }
  .incoming-call-actions{
    display: flex; align-items: center; justify-content: center;
    gap: clamp(18px, 6vw, 34px);
    width: 100%;
  }
  .incoming-call-btn{
    width: clamp(62px, 15.5vw, 74px); height: clamp(62px, 15.5vw, 74px);
    border: 0; border-radius: 50%; padding: 0; cursor: pointer;
    color: #fff;
    display: grid; place-items: center;
    transition: transform .15s ease, filter .2s ease;
  }
  .incoming-call-btn:hover{ filter: brightness(1.05); }
  .incoming-call-btn:active{ transform: scale(.92); }
  .incoming-call-btn svg{ width: clamp(26px, 6vw, 30px); height: clamp(26px, 6vw, 30px); display: block; }
  .incoming-call-btn.accept{
    background: #5aa77a;
    box-shadow: 0 10px 26px rgba(69,132,96,.34);
  }
  .incoming-call-btn.decline{
    background: var(--call-hangup-bg);
    box-shadow: 0 10px 26px var(--call-hangup-shadow);
  }
  .incoming-call-btn.decline svg{ transform: rotate(135deg); }
  .topbtn.call.active{ color: var(--accent); }


