﻿/* 捡手机：外层 UI（头栏 / 人设 / 输入 / 历史）
   注意：生成内容区的背景 #DCE6F1 与气泡配色（白 / #FFD100）不要动，只动外壳。 */
.pk-view{
  display:flex; flex-direction:column; height:100%;
  background:var(--bg);
  color:var(--ink);
}
.pk-head{
  display:flex; align-items:center; gap:8px;
  padding:var(--head-top) 12px 8px;
  flex:0 0 auto;
  background:transparent;
  border-bottom:none;
}
.pk-head h1{
  flex:1; margin:0; text-align:center; font-size:15.5px; font-weight:600;
  letter-spacing:.04em; color:var(--ink);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.pk-head .back-btn,
.pk-head .icon-btn{
  color:var(--gray-1); width:36px; height:36px;
  background:var(--fill); border-radius:50%;
  border:none; display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.pk-head .icon-btn:disabled{ opacity:.35; }
.pk-head .icon-btn svg, .pk-head .back-btn svg{ width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.pk-body{
  flex:1; min-height:0; overflow:auto;
  padding:2px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  display:flex; flex-direction:column; gap:10px;
}
.pk-cast{
  display:flex; align-items:center; justify-content:center; gap:8px;
  flex-wrap:wrap;
  padding:10px 12px;
  background:var(--fill);
  border:none; border-radius:18px;
  flex:0 0 auto;
}
.pk-chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:5px 14px 5px 5px;
  border-radius:999px;
  border:none;
  background:var(--bg);
  color:var(--ink); cursor:pointer;
  transition:transform .18s var(--spring);
  box-shadow:0 1px 2px rgba(0,0,0,.05);
}
.pk-chip:active{ transform:scale(.96); }
.pk-chip img{
  width:30px; height:30px; border-radius:50%; object-fit:cover;
  background:var(--hairline);
}
.pk-chip span{ font-size:13px; font-weight:600; max-width:100px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pk-cast-sep{ font-size:13px; color:var(--gray-2); }

/* 预览区：手机屏样式（内容背景与气泡配色保持不动） */
.pk-preview,
.pk-phone{
  position:relative;
  margin:0;
  width:100%;
  flex:1;
  min-height:260px;
  overflow:hidden;
  background:#DCE6F1;
  border:none;
  border-radius:22px;
  box-shadow:0 12px 32px -12px rgba(30,50,80,.25), inset 0 0 0 1px rgba(20,40,70,.06);
}
.pk-notch{ display:none !important; }
.pk-screen{
  min-height:220px; height:100%;
  background:#DCE6F1;
  position:relative;
}
.pk-screen.has-play{ cursor:default; }
.pk-placeholder{
  padding:60px 24px; text-align:center;
  font-size:14px; line-height:1.7; color:#8B9CB5;
}
.pk-frame{
  width:100%; height:100%;
  border:0; display:block; background:#DCE6F1;
  pointer-events:auto;
  touch-action:pan-y;
}
.pk-expand{
  position:absolute; right:12px; bottom:12px; z-index:2;
  height:34px; padding:0 14px; border:0; border-radius:999px;
  background:rgba(17,24,39,.78); color:#fff;
  font-size:13px; font-weight:600; cursor:pointer;
  box-shadow:0 4px 14px rgba(0,0,0,.18);
}
.pk-expand:active{ transform:scale(.97); }

/* 底部操作区：悬浮输入卡 */
.pk-bottom{
  background:var(--fill);
  border:none;
  border-radius:20px;
  padding:12px;
  display:flex; flex-direction:column; gap:10px;
  flex:0 0 auto;
  box-shadow:0 4px 16px -8px rgba(0,0,0,.12);
}
.pk-prompt{
  width:100%; min-height:72px; resize:vertical;
  border-radius:14px; border:none;
  background:var(--bg); color:var(--ink);
  padding:12px 14px; font:13.5px/1.6 var(--font-body);
  box-sizing:border-box;
}
.pk-prompt::placeholder{ color:var(--gray-3); }
.pk-prompt:focus{ outline:none; box-shadow:inset 0 0 0 1.5px var(--ink); }

.pk-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.pk-gen, .pk-cont, .pk-arch{
  flex:1; min-width:80px; height:46px; border:0; border-radius:14px;
  font-size:14.5px; font-weight:600; cursor:pointer;
  transition:transform .18s var(--spring), opacity .18s;
}
.pk-gen:active, .pk-cont:active, .pk-arch:active{ transform:scale(.97); }
.pk-gen{
  background:var(--ink); color:var(--on-ink);
  box-shadow:none;
}
.pk-gen.cancel{
  background:var(--danger);
  color:#fff;
  box-shadow:none;
}
.pk-cont{
  background:var(--bg); color:var(--ink);
  border:none;
}
.pk-cont.on{ background:var(--ink); color:var(--on-ink); border:none; }
.pk-arch{
  background:var(--bg); color:var(--gray-1);
}
.pk-gen:disabled, .pk-cont:disabled, .pk-arch:disabled{ opacity:.4; cursor:default; }

.pk-trunc-tip{
  font-size:12.5px; color:var(--tint); text-align:center;
}

/* 历史记录 */
.pk-hist-view .pk-hist-body{
  flex:1; min-height:0; overflow:auto; padding:14px 14px 20px;
}
.pk-hist-list{ display:flex; flex-direction:column; gap:10px; }
.pk-hist-card{
  border-radius:18px;
  border:none;
  background:var(--fill);
  box-shadow:none;
  overflow:hidden;
}
.pk-hist-card.on{ box-shadow:inset 0 0 0 1.5px var(--ink); }
.pk-hist-main{
  display:block; width:100%; text-align:left;
  padding:14px 16px; border:0; background:transparent; color:var(--ink); cursor:pointer;
}
.pk-hist-main b{ display:block; font-size:14.5px; margin-bottom:3px; font-weight:600; }
.pk-hist-main span{ display:block; font-size:12.5px; color:var(--gray-1); }
.pk-hist-main small{ display:block; font-size:11px; color:var(--gray-2); margin-top:4px; }
.pk-hist-acts{
  display:flex; gap:8px; padding:0 14px 14px;
}
.pk-hist-acts button{
  flex:1; height:36px; border-radius:999px; border:0;
  font-size:12.5px; font-weight:600; cursor:pointer;
  background:var(--bg); color:var(--ink);
}
.pk-hist-acts .pri{ background:var(--bg); color:var(--ink); }
.pk-hist-acts .danger{ background:transparent; color:var(--danger); box-shadow:inset 0 0 0 1px rgba(220,60,60,.3); }

.pk-empty{
  text-align:center; padding:60px 24px;
  color:var(--gray-2); font-size:13px; line-height:1.8;
}

/* 全屏预览 */
.pk-fs{
  position:fixed; inset:0; z-index:90;
  background:#DCE6F1; display:flex; flex-direction:column;
}
.pk-fs[hidden]{ display:none !important; }
.pk-fs-close{
  position:absolute; top:calc(16px + env(safe-area-inset-top, 0px)); left:16px;
  z-index:2; width:44px; height:44px; border:0; border-radius:50%;
  background:rgba(255,255,255,.9); color:#1F2937; cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
}
.pk-fs-frame{ flex:1; width:100%; border:0; background:#DCE6F1; }
html.pk-fs-lock{ overflow:hidden; }

/* 消息气泡 */
.msg-bubble.msg-pickup{
  background:#fff;
  color:#1F2937; border:1px solid #E5E7EB;
  padding:16px; min-width:180px;
  border-radius:16px;
  box-shadow:0 2px 8px rgba(0,0,0,.04);
}
.msg-pickup .pk-card-top b{ display:block; font-size:15px; margin-bottom:4px; font-weight:600; }
.msg-pickup .pk-card-top span{ font-size:12px; color:#6B7280; }
.msg-pickup .pk-card-foot{ margin-top:8px; font-size:12px; color:#9CA3AF; }

/* 深色主题：外壳跟随主题，生成内容区背景与气泡配色保持不动 */
html[data-theme="dark"] .msg-bubble.msg-pickup{
  background:#1F2937; color:#F9FAFB; border-color:#374151;
}
