/* ============================================================
   许愿编程 · 主界面样式
   ============================================================ */

:root{
  --paper:      #FBFAF7;
  --card:       #FFFFFF;
  --ink:        #1B1A18;
  --ink-2:      #57534E;
  --ink-3:      #8C8780;
  --line:       #E8E4DC;
  --line-soft:  #F1EEE8;
  --accent:     #FF6A3D;
  --accent-2:   #FF3D77;
  --accent-soft:#FFF2EC;
  --mint:       #11946B;
  --radius:     18px;
  --shadow-sm:  0 1px 2px rgba(28,26,23,.05), 0 2px 8px rgba(28,26,23,.04);
  --shadow-md:  0 2px 6px rgba(28,26,23,.05), 0 12px 32px -8px rgba(28,26,23,.12);
  --shadow-lg:  0 4px 12px rgba(28,26,23,.06), 0 28px 60px -16px rgba(28,26,23,.18);
}

*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
[hidden]{ display:none !important; }
html,body{ margin:0; padding:0; }
body{
  background:var(--paper);
  color:var(--ink);
  font:15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
       "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  min-height:100vh;
}
button{ font-family:inherit; cursor:pointer; }
input,textarea{ font-family:inherit; }
::selection{ background:var(--accent-soft); color:var(--accent); }

/* ---------------- 顶栏 ---------------- */
.topbar{
  height:60px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 26px;
  position:sticky; top:0; z-index:40;
  background:rgba(251,250,247,.82);
  backdrop-filter:blur(14px) saturate(1.4);
  border-bottom:1px solid var(--line-soft);
}
.brand{
  display:flex; align-items:center; gap:8px;
  text-decoration:none; color:var(--ink);
}
.brand-mark{
  display:grid; place-items:center;
  width:26px; height:26px; border-radius:9px;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#fff; font-size:14px; line-height:1;
  box-shadow:0 2px 8px rgba(255,106,61,.32);
}
.brand-name{ font-weight:700; font-size:15.5px; letter-spacing:-.01em; }
.brand-en{ font-size:11.5px; color:var(--ink-3); letter-spacing:.06em; margin-top:2px; }
.topnav{ display:flex; gap:4px; }
.navlink{
  border:0; background:transparent; color:var(--ink-2);
  font-size:13.5px; padding:8px 12px; border-radius:10px;
  display:flex; align-items:center; gap:6px;
  transition:background .15s, color .15s;
}
.navlink:hover{ background:#fff; color:var(--ink); box-shadow:var(--shadow-sm); }
.badge{
  font-size:11px; min-width:18px; height:18px; padding:0 5px;
  display:grid; place-items:center;
  background:var(--accent-soft); color:var(--accent);
  border-radius:999px; font-weight:600;
}

/* ---------------- 视图切换 ---------------- */
.view{ animation:fadeUp .34s cubic-bezier(.22,.9,.3,1) both; }
.view[hidden]{ display:none; }
@keyframes fadeUp{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:none;} }

/* ---------------- 首页 ---------------- */
.hero{
  position:relative;
  max-width:760px; margin:0 auto;
  padding:54px 24px 0;
  text-align:center;
}
.glow{
  position:absolute; left:50%; top:-140px; transform:translateX(-50%);
  width:900px; height:440px; pointer-events:none; z-index:0;
  background:
    radial-gradient(44% 48% at 30% 46%, rgba(255,106,61,.18), transparent 58%),
    radial-gradient(40% 44% at 68% 40%, rgba(255,61,119,.14), transparent 58%),
    radial-gradient(48% 44% at 50% 72%, rgba(255,196,120,.16), transparent 58%);
  filter:blur(26px);
}
.hero > *:not(.glow){ position:relative; z-index:1; }
.eyebrow{
  display:inline-flex; align-items:center; gap:7px;
  font-size:12.5px; color:var(--ink-2);
  background:#fff; border:1px solid var(--line);
  padding:5px 12px 5px 10px; border-radius:999px;
  box-shadow:var(--shadow-sm);
  margin:0 0 22px;
}
.dot-live{
  width:6px; height:6px; border-radius:50%;
  background:var(--mint); box-shadow:0 0 0 3px rgba(17,148,107,.14);
}
.hero h1{
  margin:0 0 16px;
  font-size:clamp(30px, 4.6vw, 46px);
  line-height:1.24; letter-spacing:-.028em; font-weight:800;
}
.grad{
  background:linear-gradient(100deg, var(--accent) 8%, var(--accent-2) 62%, #B84DFF 100%);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent;
}
.lede{
  margin:0 auto 30px; max-width:560px;
  color:var(--ink-2); font-size:15px; line-height:1.75;
}

/* 输入区 */
.composer{
  background:#fff; border:1px solid var(--line);
  border-radius:20px; padding:6px 6px 6px 18px;
  box-shadow:var(--shadow-md);
  transition:box-shadow .2s, border-color .2s, transform .2s;
  text-align:left;
}
.composer:focus-within{
  border-color:#FFC9B6;
  box-shadow:0 0 0 4px rgba(255,106,61,.10), var(--shadow-lg);
}
.composer textarea{
  width:100%; border:0; outline:none; resize:none;
  padding:16px 4px 8px 0;
  font-size:16px; line-height:1.6; color:var(--ink);
  background:transparent;
  max-height:180px;
}
.composer textarea::placeholder{ color:#B4AFA7; }
.composer-foot{
  display:flex; align-items:center; justify-content:space-between;
  padding:2px 0 8px;
}
.kbd-hint{ font-size:11.5px; color:var(--ink-3); }
.btn-primary{
  border:0; border-radius:13px;
  padding:11px 20px;
  background:linear-gradient(135deg,var(--accent),#FF4F5E);
  color:#fff; font-size:14.5px; font-weight:600;
  display:inline-flex; align-items:center; gap:7px;
  box-shadow:0 4px 14px -2px rgba(255,90,70,.42);
  transition:transform .16s, box-shadow .2s, opacity .2s;
}
.btn-primary:hover{ transform:translateY(-1px); box-shadow:0 8px 20px -4px rgba(255,90,70,.5); }
.btn-primary:active{ transform:translateY(0) scale(.985); }
.btn-primary[disabled]{ opacity:.45; cursor:not-allowed; transform:none; box-shadow:none; }

/* 示例 */
.examples{
  display:flex; flex-wrap:wrap; gap:8px; justify-content:center;
  margin:20px 0 0;
}
.ex-chip{
  border:1px solid var(--line); background:#fff; color:var(--ink-2);
  font-size:12.5px; padding:7px 13px; border-radius:999px;
  transition:all .16s; box-shadow:var(--shadow-sm);
  display:inline-flex; align-items:center; gap:6px;
}
.ex-chip:hover{
  color:var(--accent); border-color:#FFD0C0; background:var(--accent-soft);
  transform:translateY(-1px);
}
.ex-chip span{ font-size:13px; }

/* 三步说明 */
.how{
  display:grid; grid-template-columns:repeat(3,1fr); gap:14px;
  max-width:880px; margin:58px auto 0; padding:0 24px;
}
.how-card{
  background:#fff; border:1px solid var(--line); border-radius:16px;
  padding:20px 20px 22px; text-align:left;
  box-shadow:var(--shadow-sm);
  transition:transform .2s, box-shadow .2s;
}
.how-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }
.how-num{
  font-size:11px; font-weight:700; letter-spacing:.1em;
  color:var(--accent); opacity:.75;
}
.how-card h3{ margin:8px 0 7px; font-size:15px; letter-spacing:-.01em; }
.how-card p{ margin:0; font-size:12.8px; line-height:1.7; color:var(--ink-3); }
.home-foot{
  text-align:center; font-size:11.5px; color:var(--ink-3);
  padding:44px 0 40px;
}

/* ---------------- 建造页 ---------------- */
.build-grid{
  display:grid;
  grid-template-columns:minmax(340px, 400px) 1fr;
  gap:16px;
  height:calc(100vh - 60px);
  max-width:1420px; margin:0 auto;
  padding:16px 20px 20px;
}
.pane{
  background:#fff; border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
  display:flex; flex-direction:column;
  min-height:0;
}

/* 对话栏 */
.chat-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:13px 16px; border-bottom:1px solid var(--line-soft);
  flex-shrink:0;
}
.chat-title{
  font-size:13.5px; font-weight:600; letter-spacing:-.01em;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  max-width:230px;
}
.ghost-btn{
  border:1px solid var(--line); background:#fff; color:var(--ink-2);
  border-radius:9px; padding:6px 11px; font-size:12.5px;
  transition:all .15s;
}
.ghost-btn:hover:not([disabled]){ border-color:#D8D3C9; color:var(--ink); background:#FAF9F6; }
.ghost-btn[disabled]{ opacity:.4; cursor:not-allowed; }
.ghost-btn.sm{ padding:5px 10px; font-size:12px; }
.solid-btn{
  border:0; background:var(--ink); color:#fff;
  border-radius:9px; padding:6px 12px; font-size:12.5px;
  transition:opacity .15s, transform .15s;
}
.solid-btn:hover:not([disabled]){ opacity:.86; }
.solid-btn[disabled]{ opacity:.35; cursor:not-allowed; }
.solid-btn.sm{ padding:5px 11px; font-size:12px; }

.chat-stream{
  flex:1; overflow-y:auto; padding:18px 16px 8px;
  display:flex; flex-direction:column; gap:14px;
  scroll-behavior:smooth;
}
.chat-stream::-webkit-scrollbar{ width:5px; }
.chat-stream::-webkit-scrollbar-thumb{ background:#E2DDD4; border-radius:99px; }

.msg{ display:flex; gap:9px; max-width:100%; animation:msgIn .3s cubic-bezier(.22,.9,.3,1) both; }
@keyframes msgIn{ from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:none;} }
.msg-avatar{
  width:24px; height:24px; border-radius:8px; flex-shrink:0;
  display:grid; place-items:center; font-size:12px;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#fff; margin-top:2px;
  box-shadow:0 2px 6px rgba(255,106,61,.3);
}
.msg-body{ min-width:0; }
.bubble{
  background:#F7F5F1; border-radius:4px 13px 13px 13px;
  padding:10px 13px; font-size:13.5px; line-height:1.65;
  color:var(--ink); word-break:break-word;
}
.bubble strong{ font-weight:650; }
.bubble .muted{ color:var(--ink-3); font-size:12.5px; }
.msg.user{ flex-direction:row-reverse; }
.msg.user .bubble{
  background:var(--ink); color:#F7F5F1;
  border-radius:13px 4px 13px 13px;
}
.msg.user .msg-avatar{ display:none; }

/* 选项 */
.options{ display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }
.opt{
  border:1px solid var(--line); background:#fff; color:var(--ink-2);
  border-radius:999px; padding:6px 13px; font-size:12.5px;
  transition:all .15s;
}
.opt:hover{ border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.opt.subtle{ color:var(--ink-3); border-style:dashed; }

/* 生成进度 */
.progress-card{
  background:#FBF9F5; border:1px solid var(--line-soft);
  border-radius:13px; padding:13px 14px; margin-top:8px;
  display:flex; flex-direction:column; gap:9px;
}
.step{
  display:flex; align-items:center; gap:9px;
  font-size:12.8px; color:var(--ink-3);
  transition:color .25s;
}
.step-ico{
  width:15px; height:15px; border-radius:50%; flex-shrink:0;
  border:1.5px solid #DDD8CE; position:relative;
  transition:all .25s;
}
.step.active{ color:var(--ink); }
.step.active .step-ico{ border-color:var(--accent); border-top-color:transparent; animation:spin .7s linear infinite; }
.step.done{ color:var(--ink-2); }
.step.done .step-ico{ background:var(--mint); border-color:var(--mint); }
.step.done .step-ico::after{
  content:""; position:absolute; left:4px; top:1.5px;
  width:4px; height:7px;
  border:solid #fff; border-width:0 1.5px 1.5px 0;
  transform:rotate(42deg);
}
@keyframes spin{ to{ transform:rotate(360deg);} }

/* 结果动作 */
.result-actions{ display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }

/* 输入区 */
.chat-input-wrap{
  border-top:1px solid var(--line-soft);
  padding:10px 12px 12px;
  display:flex; align-items:flex-end; gap:8px;
  flex-shrink:0;
  background:#fff;
}
.chat-input-wrap textarea{
  flex:1; border:1px solid var(--line); border-radius:12px;
  padding:9px 12px; font-size:13.5px; line-height:1.55;
  outline:none; resize:none; max-height:96px;
  transition:border-color .15s, box-shadow .15s;
  color:var(--ink);
}
.chat-input-wrap textarea:focus{
  border-color:#FFC9B6;
  box-shadow:0 0 0 3px rgba(255,106,61,.09);
}
.chat-input-wrap textarea::placeholder{ color:#B8B3AA; }
.send-btn{
  width:36px; height:36px; flex-shrink:0;
  border:0; border-radius:11px;
  background:linear-gradient(135deg,var(--accent),#FF4F5E);
  color:#fff; display:grid; place-items:center;
  box-shadow:0 3px 10px -2px rgba(255,90,70,.45);
  transition:transform .15s, opacity .15s;
}
.send-btn:hover{ transform:translateY(-1px); }
.send-btn:active{ transform:scale(.95); }

/* 预览栏 */
.preview-bar{
  display:flex; align-items:center; justify-content:space-between;
  padding:11px 14px; border-bottom:1px solid var(--line-soft);
  flex-shrink:0;
}
.pv-left{
  display:flex; align-items:center; gap:8px;
  font-size:12.5px; color:var(--ink-2); font-weight:500;
}
.pv-dot{
  width:7px; height:7px; border-radius:50%; background:#D9D4CB;
  transition:background .3s;
}
.pv-dot.live{ background:var(--mint); box-shadow:0 0 0 3px rgba(17,148,107,.13); }
.pv-actions{ display:flex; gap:6px; }

.preview-body{
  flex:1; min-height:0; position:relative;
  background-color:#F5F2EC;
  background-image:radial-gradient(#DFD9CE 1px, transparent 1px);
  background-size:16px 16px;
  display:grid; place-items:center;
  padding:18px;
  overflow:hidden;
}
.preview-placeholder{
  text-align:center; color:var(--ink-3);
}
.ph-phone{
  width:132px; height:246px; margin:0 auto 20px;
  border:2px dashed #DDD6C9; border-radius:22px;
  display:grid; place-items:center;
  background:rgba(255,255,255,.5);
}
.ph-spark{ font-size:26px; color:#D6CFC2; }
.preview-placeholder p{ margin:0 0 5px; font-size:13px; color:var(--ink-2); }
.preview-placeholder small{ font-size:11.5px; color:var(--ink-3); }

#pvFrame{
  width:390px; height:100%; max-height:100%;
  border:0; border-radius:16px;
  background:#fff;
  box-shadow:0 3px 10px rgba(28,26,23,.07), 0 24px 50px -14px rgba(28,26,23,.22);
  display:none;
  opacity:0;
  transition:opacity .35s;
}
#pvFrame.show{ display:block; opacity:1; }

/* ---------------- 抽屉 ---------------- */
.drawer-mask{
  position:fixed; inset:0; background:rgba(28,26,23,.26);
  z-index:60; animation:fadeIn .2s both;
  backdrop-filter:blur(2px);
}
@keyframes fadeIn{ from{opacity:0;} to{opacity:1;} }
.drawer{
  position:fixed; top:0; right:0; bottom:0; width:380px; max-width:88vw;
  background:#fff; z-index:61;
  box-shadow:-12px 0 40px rgba(28,26,23,.12);
  display:flex; flex-direction:column;
  animation:slideIn .26s cubic-bezier(.22,.9,.3,1) both;
}
@keyframes slideIn{ from{ transform:translateX(24px); opacity:0;} to{ transform:none; opacity:1;} }
.drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px; border-bottom:1px solid var(--line-soft);
}
.drawer-head h2{ margin:0; font-size:15px; letter-spacing:-.01em; }
.drawer-body{ flex:1; overflow-y:auto; padding:14px 16px 24px; }

.proj{
  display:flex; align-items:center; gap:11px;
  padding:12px; border:1px solid var(--line); border-radius:13px;
  margin-bottom:9px; transition:all .16s; cursor:pointer;
}
.proj:hover{ border-color:#DED8CC; background:#FBFAF7; transform:translateY(-1px); }
.proj-ico{
  width:34px; height:34px; border-radius:10px; flex-shrink:0;
  display:grid; place-items:center; font-size:15px;
  background:var(--accent-soft);
}
.proj-main{ min-width:0; flex:1; }
.proj-title{
  font-size:13.5px; font-weight:600; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis;
}
.proj-sub{ font-size:11.5px; color:var(--ink-3); margin-top:2px; }
.proj-del{
  border:0; background:transparent; color:#C9C3B8;
  font-size:16px; padding:4px 6px; border-radius:7px; line-height:1;
  opacity:0; transition:opacity .15s, color .15s, background .15s;
}
.proj:hover .proj-del{ opacity:1; }
.proj-del:hover{ color:#E0453C; background:#FDEEEC; }

.proj-share{
  border:1px solid var(--line); background:#fff; color:var(--ink-2);
  font-size:11.5px; font-family:inherit; padding:4px 9px; border-radius:8px;
  line-height:1.4; white-space:nowrap; cursor:pointer;
  transition:all .15s;
}
.proj-share:hover{ color:var(--accent); border-color:var(--accent); background:var(--accent-soft); }
.proj-share.on{ color:var(--accent); border-color:var(--accent); background:var(--accent-soft); }

/* ---------------- 收集面板 ---------------- */
.sheet-mask{
  position:fixed; inset:0; background:rgba(28,26,23,.32);
  z-index:70; animation:fadeIn .18s both; backdrop-filter:blur(2px);
}
.sheet{
  position:fixed; left:50%; top:50%; transform:translate(-50%,-50%);
  width:460px; max-width:92vw; max-height:84vh;
  background:#fff; border-radius:18px; z-index:71;
  box-shadow:0 24px 70px rgba(28,26,23,.22);
  display:flex; flex-direction:column;
  animation:popIn .22s cubic-bezier(.22,.9,.3,1) both;
}
@keyframes popIn{ from{ opacity:0; transform:translate(-50%,-48%) scale(.97);} to{ opacity:1; transform:translate(-50%,-50%) scale(1);} }
.sheet-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px;
  padding:18px 20px 14px; border-bottom:1px solid var(--line-soft);
}
.sheet-head h2{ margin:0; font-size:15px; letter-spacing:-.01em; }
.sheet-sub{ margin:5px 0 0; font-size:11.5px; color:var(--ink-3); line-height:1.6; }
.sheet-body{ padding:16px 20px 22px; overflow-y:auto; }

.sh-note{ font-size:12.5px; color:var(--ink-2); line-height:1.75; margin:0 0 14px; }
.sh-link{
  display:flex; gap:8px; align-items:center; margin-bottom:14px;
}
.sh-link input{
  flex:1; min-width:0; border:1px solid var(--line); border-radius:10px;
  padding:9px 11px; font-size:12.5px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  color:var(--ink); background:#FBFAF7; outline:none;
}
.sh-link input:focus{ border-color:var(--accent); background:#fff; }
.sh-row{ display:flex; gap:8px; flex-wrap:wrap; }
.sh-stat{
  display:flex; align-items:baseline; gap:6px; margin:2px 0 14px;
  font-size:12.5px; color:var(--ink-2);
}
.sh-stat b{ font-size:19px; color:var(--ink); letter-spacing:-.02em; }
.sh-hint{ font-size:11.5px; color:var(--ink-3); line-height:1.7; margin:14px 0 0; }
.sh-empty{ font-size:12.5px; color:var(--ink-3); text-align:center; padding:26px 0; }

.sh-results{ border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.sh-res{ padding:10px 12px; border-bottom:1px solid var(--line-soft); font-size:12.5px; }
.sh-res:last-child{ border-bottom:0; }
.sh-res-top{ display:flex; justify-content:space-between; gap:10px; color:var(--ink-3); font-size:11px; margin-bottom:5px; }
.sh-res-kv{ color:var(--ink-2); line-height:1.75; }
.sh-res-kv i{ color:var(--ink-3); font-style:normal; }

.drawer-empty{
  text-align:center; color:var(--ink-3); font-size:13px;
  padding:52px 20px; line-height:1.8;
}

/* ---------------- Toast ---------------- */
.toast{
  position:fixed; left:50%; bottom:28px; transform:translateX(-50%) translateY(8px);
  background:var(--ink); color:#fff; font-size:13px;
  padding:10px 18px; border-radius:11px; z-index:90;
  box-shadow:var(--shadow-md); opacity:0;
  transition:opacity .22s, transform .22s;
  pointer-events:none; max-width:80vw; text-align:center;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

/* ---------------- 响应式 ---------------- */
@media (max-width:900px){
  .build-grid{
    grid-template-columns:1fr;
    height:auto;
    padding:12px;
    gap:12px;
  }
  .chat-pane{ height:56vh; }
  .preview-pane{ height:74vh; }
  .how{ grid-template-columns:1fr; }
  .hero{ padding-top:44px; }
  .br-desk{ display:none; }
  #pvFrame{ width:100%; max-width:390px; }
  .topbar{ padding:0 16px; }
}
@media (max-width:520px){
  .brand-en{ display:none; }
  .hero h1{ font-size:27px; }
  .lede{ font-size:14px; }
  .composer{ border-radius:17px; padding-left:14px; }
  .examples{ gap:6px; }
  .ex-chip{ font-size:11.8px; padding:6px 11px; }
  .preview-body{ padding:12px; }
}

/* ============ 预览 / 结构 切换 ============ */
.pv-tabs{
  display:flex; gap:2px; background:#F2EFE9; border-radius:9px; padding:2px;
  margin:0 auto;
}
.pv-tab{
  border:0; background:transparent; color:var(--ink-3);
  font-size:11.5px; font-weight:600; font-family:inherit;
  padding:4px 11px; border-radius:7px; cursor:pointer; transition:all .15s;
}
.pv-tab.on{ background:#fff; color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.06); }

/* ============ 结构面板 ============ */
.pv-struct{
  position:absolute; inset:0; overflow-y:auto;
  background:#FCFBF8; padding:16px 18px 40px;
  animation:structIn .22s ease both;
}
@keyframes structIn{ from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:none;} }
.st-block{ margin-bottom:18px; }
.st-h{
  font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-3); margin-bottom:8px; display:flex; align-items:center; justify-content:space-between;
}
.st-h span{ font-weight:500; letter-spacing:0; text-transform:none; font-size:11px; }
.st-atoms{ display:flex; flex-wrap:wrap; gap:5px; }
.st-atom{
  font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;
  padding:3px 8px; border-radius:6px; background:#F1EEE8; color:var(--ink-2);
}
.st-atom b{ color:var(--accent); font-weight:700; }
.st-code{
  background:#F7F5F1; border:1px solid var(--line-soft); border-radius:11px;
  padding:11px 13px; font:11.5px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace;
  color:#4A4640; white-space:pre; overflow:auto; max-height:320px;
}
.st-key{ color:#B4471F; }
.st-str{ color:#1F7A4D; }
.st-num{ color:#2B5FA8; }
.st-null{ color:#9A948A; }
.st-ops{ display:flex; flex-direction:column; gap:6px; }
.st-op{
  font:11px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;
  color:var(--ink-2); padding:7px 9px; background:#F7F5F1; border-radius:8px;
  word-break:break-all;
}
.st-op i{ font-style:normal; color:var(--accent); font-weight:700; }
.st-note{ font-size:11.5px; color:var(--ink-3); line-height:1.7; }
.st-empty{ font-size:12px; color:var(--ink-3); text-align:center; padding:26px 0; line-height:1.9; }

/* ---------------- 账号 ---------------- */
.auth-entry{ color:var(--accent); }
.user-box{ display:flex; align-items:center; gap:8px; margin-left:4px; }
.user-mail{
  font-size:11.5px; color:var(--ink-2); max-width:150px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.composer-note{
  margin:12px 0 0; font-size:12px; color:var(--ink-3); text-align:center;
}

.auth-mask{
  position:fixed; inset:0; background:rgba(28,26,23,.34);
  z-index:80; animation:fadeIn .18s both; backdrop-filter:blur(2px);
}
.auth{
  position:fixed; left:50%; top:50%; transform:translate(-50%,-50%);
  width:400px; max-width:92vw; background:#fff; border-radius:20px; z-index:81;
  padding:26px 26px 20px;
  box-shadow:0 24px 80px rgba(28,26,23,.24);
  animation:popIn .22s cubic-bezier(.22,.9,.3,1) both;
}
.auth-x{
  position:absolute; right:12px; top:10px; border:0; background:transparent;
  color:#C9C3B8; font-size:20px; line-height:1; padding:6px 8px; border-radius:8px; cursor:pointer;
}
.auth-x:hover{ color:var(--ink); background:var(--soft); }
.auth-brand{
  font-size:12px; color:var(--ink-3); display:flex; align-items:center; gap:5px; margin-bottom:14px;
}
.auth-brand span{ color:var(--accent); }
.auth h2{ margin:0 0 6px; font-size:20px; letter-spacing:-.02em; }
.auth-sub{ margin:0 0 18px; font-size:12.5px; color:var(--ink-2); line-height:1.65; }
.auth-field{ display:block; margin-bottom:12px; }
.auth-field span{ display:block; font-size:11.5px; color:var(--ink-3); margin-bottom:5px; }
.auth-field input{
  width:100%; border:1px solid var(--line); border-radius:10px;
  padding:10px 12px; font-size:14px; font-family:inherit; color:var(--ink);
  background:#FBFAF7; outline:none; transition:border-color .15s, background .15s;
}
.auth-field input:focus{ border-color:var(--accent); background:#fff; }
.auth-err{
  margin:0 0 10px; font-size:12px; color:#C2402F;
  background:#FDF0EE; border-radius:8px; padding:8px 10px;
}
.auth-submit{ width:100%; margin-top:4px; padding:11px; font-size:14px; }
.auth-switch{ margin:16px 0 0; font-size:12.5px; color:var(--ink-2); text-align:center; }
.link-btn{
  border:0; background:transparent; color:var(--accent);
  font-size:12.5px; font-family:inherit; cursor:pointer; padding:0 2px;
}
.link-btn:hover{ text-decoration:underline; }
.auth-fine{ margin:10px 0 0; font-size:11px; color:var(--ink-3); text-align:center; }
.auth-forgot{ margin:12px 0 0; text-align:center; }
#authCodeField .auth-field{ margin-top:0; }

/* 恢复码展示框 */
.auth-code{ margin-top:4px; animation:popIn .22s cubic-bezier(.22,.9,.3,1) both; }
.auth-code-tip{ font-size:12.5px; color:var(--ink-2); line-height:1.65; margin:0 0 12px; }
.auth-code-tip strong{ color:var(--accent); }
.auth-code-val{
  display:block; width:100%; box-sizing:border-box;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:18px; letter-spacing:2px; text-align:center; color:var(--ink);
  background:#FBFAF7; border:1px dashed var(--line); border-radius:12px;
  padding:14px 10px; margin-bottom:12px; user-select:all; word-break:break-all;
}
.auth-code-actions{ display:flex; gap:10px; justify-content:flex-end; }
.auth-code-note{ margin:12px 0 0; font-size:11px; color:var(--ink-3); text-align:center; }
