/* 文游模拟器（小红书：云朵）- 设计师级移动端竖版 UI */

:root{
  --primary-color:#ff7eb3;
  --secondary-color:#8e44ad;
  --accent-color:#ffbe76;
  --bg-card: rgba(255,255,255,.86);
  --bg-card-strong: rgba(255,255,255,.94);
  --shadow-strong: 0 18px 60px rgba(0,0,0,.35);
  --shadow-soft: 0 10px 24px rgba(0,0,0,.10);
}

html, body{
  height: 100%;
  height: 100vh;
  height: 100dvh; /* 动态视口高度，适配移动端浏览器地址栏 */
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

body{
  font-family:'Noto Sans SC', system-ui, -apple-system, 'Microsoft YaHei', '微软雅黑', sans-serif;
  /* 整体基底为温暖米色，营造"羊皮纸"感觉 */
  background-color:#f5e9d6;
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0;
  overflow:hidden;
  /* 确保移动端不会出现横向滚动 */
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* 幻想风羊皮纸 + 地图网格纹理（纯 CSS 渐变，无外链图片） */
  background-image:
    /* 角落光晕，营造老纸褪色感 */
    radial-gradient(140% 160% at 0% 0%, rgba(255,255,255,0.95), rgba(245,233,214,0.9), rgba(210,185,150,0.95)),
    radial-gradient(140% 160% at 100% 100%, rgba(255,245,225,0.9), rgba(230,205,170,0.95), rgba(190,160,120,0.98)),
    /* 轻微的竖向阴影，模拟折痕 */
    linear-gradient(90deg, rgba(180,150,110,0.22) 0, transparent 12%, transparent 88%, rgba(120,90,60,0.24) 100%),
    /* 地图网格：横线 */
    linear-gradient(#e0cfb3 1px, transparent 1px),
    /* 地图网格：竖线 */
    linear-gradient(90deg, #e0cfb3 1px, transparent 1px);
  background-size:
    140% 140%,
    140% 140%,
    100% 100%,
    42px 42px,
    42px 42px;
  background-position:
    center center,
    center center,
    center center,
    0 0,
    0 0;
  background-attachment: fixed;
}

/* 移动端容器强制竖版（PC 也居中展示） */
#app-container{
  width:100%;
  max-width:480px;
  height:100%;
  height: 100vh;
  height: 100dvh; /* 动态视口高度，适配移动端浏览器地址栏 */
  max-height:100vh;
  max-height:100dvh;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92));
  position:relative;
  overflow:hidden;
  box-shadow: var(--shadow-strong);
  display:flex;
  flex-direction:column;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.35);
}

/* 主页底部输入区布局优化（确保小屏手机发送按钮不被挤出） */
#input-area .input-row{
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#input-area #user-input{
  flex: 1 1 auto;
  min-width: 0; /* 允许在超窄屏下压缩输入框宽度，避免横向溢出 */
}

#send-btn{
  flex: 0 0 auto; /* 按钮保持固定宽度，始终完整显示 */
}

/* 移动端全屏适配 */
@media (max-height: 860px){
  #app-container{ 
    border-radius: 0; 
    max-height: 100vh;
    max-height: 100dvh;
    height: 100vh;
    height: 100dvh;
  }
}

/* 小屏幕设备适配 */
@media (max-width: 480px) {
  #app-container {
    max-width: 100%;
    border-radius: 0;
  }
}

/* 超小屏幕设备适配（确保内容不被裁剪） */
@media (max-height: 600px) {
  #app-container {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
  }
  
  .tab-content {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
  
  #input-area {
    padding: 8px;
  }
  
  /* 顶部栏在小屏幕上可能需要调整 */
  .absolute.top-0 {
    height: 48px !important;
  }
  
  #game-log {
    padding-top: 52px !important;
  }
}

/* 确保所有固定定位元素在移动端正确显示 */
@media (orientation: portrait) {
  html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  #app-container {
    width: 100%;
    max-width: 100%;
  }
  
  /* 极小竖屏下进一步收窄输入框，避免与发送按钮重叠或被裁切 */
  @media (max-width: 360px) {
    #input-area #user-input{
      max-width: 70%;
    }
  }
  
  /* 确保底部导航栏始终可见 */
  .absolute.bottom-0 {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
  
  /* 确保输入区域正确适配 */
  #input-area {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* 确保顶部栏正确显示 */
  .absolute.top-0 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
  }
}

/* 滚动条美化 */
::-webkit-scrollbar{ width:6px; height:6px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{ background:rgba(0,0,0,.18); border-radius:999px; }

/* 动画 */
.fade-in{ animation:fadeIn .22s ease-in-out; }
@keyframes fadeIn{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}
.animate-scale-in{ animation:scaleIn .18s ease-out; }
@keyframes scaleIn{
  from{ transform:scale(.98); opacity:0; }
  to{ transform:scale(1); opacity:1; }
}
.animate-spin-slow{ animation: spin 5s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }
@keyframes emojiBreathe{
  0%,100%{ transform:scale(1); }
  50%{ transform:scale(1.15); }
}
.emoji-breathe{
  animation:emojiBreathe 2.6s ease-in-out infinite;
  transform-origin:center center;
}

/* 动漫卡片风玻璃面板 */
.glass-panel{
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: var(--shadow-soft);
}
.anime-card{
  background: radial-gradient(120% 120% at 20% 10%, rgba(255,126,179,.20), transparent 60%),
              radial-gradient(120% 120% at 90% 30%, rgba(255,190,118,.20), transparent 60%),
              linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.88));
  border: 1px solid rgba(255,126,179,.25);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(255,126,179,.10), 0 10px 30px rgba(0,0,0,.08);
}
.player-stat-text-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,233,244,.95), rgba(255,243,249,.95));
  color: #c02677;
  border: 1px solid rgba(255,126,179,.35);
  box-shadow: 0 6px 14px rgba(255,126,179,.14);
  font-weight: 600;
  letter-spacing: .2px;
}
.player-stat-input{
  border: 1px solid rgba(255,182,213,.9);
  background: linear-gradient(180deg, rgba(255,248,252,.98), rgba(255,239,248,.98));
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.player-stat-input:focus{
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255,126,179,.22), 0 8px 18px rgba(255,126,179,.10);
  background: rgba(255,255,255,.98);
}
.rpg-card{
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border: 2px solid #ffdec8;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* 底部导航激活态 */
.nav-item.active{
  color: var(--primary-color);
  transform: scale(1.06);
}

/* Tab 显隐 */
.tab-content{ 
  display:none; 
  height:100%; 
  height: 100vh;
  height: 100dvh;
  overflow-y:auto; 
  padding-bottom: 70px;
  padding-bottom: calc(70px + env(safe-area-inset-bottom)); /* 考虑安全区域 */
  box-sizing: border-box;
}
.tab-content.active{ display:block; }

/* 主题色快捷类（由 JS 同步） */
.text-primary{ color: var(--primary-color) !important; }
.bg-primary{ background-color: var(--primary-color) !important; }
.border-primary{ border-color: var(--primary-color) !important; }

/* 避免弹窗溢出竖版容器 */
.modal-shell{
  position:absolute;
  inset:0;
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 100;
  overflow: hidden;
}
.modal-card{
  width:100%;
  max-width: calc(100% - 28px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px); /* 动态视口高度 */
  max-height: calc(100% - 28px);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 18px;
  background: var(--bg-card-strong);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--shadow-strong);
  position: relative;
}

/* iOS 输入避免遮挡（配合 JS） */
.kb-safe{
  padding-bottom: env(safe-area-inset-bottom);
}

/* 移动端安全区域支持 */
@supports (padding: max(0px)) {
  #app-container {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  
  /* 底部导航栏安全区域 */
  .bottom-nav-safe {
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
}

/* --- 竖版沉浸式地图 --- */
.map-shell{
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255,126,179,.14), transparent 60%),
    radial-gradient(120% 120% at 90% 10%, rgba(255,190,118,.16), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.65));
  box-shadow: var(--shadow-soft);
}

.map-rail{
  max-height: 520px;
  overflow-y: auto;
  padding: 16px 14px 18px;
}

.map-row{
  display:flex;
  align-items: stretch;
  gap: 12px;
  padding: 10px 6px;
}

.map-line-col{
  width: 26px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  flex-shrink:0;
  position: relative;
}

.map-dot{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  border: 2px solid rgba(255,255,255,.95);
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  margin-top: 4px;
}

.map-dot.current{
  background: var(--primary-color);
  box-shadow: 0 10px 22px rgba(255,126,179,.26);
}

.map-stem{
  width: 2px;
  flex: 1;
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.04));
  border-radius: 999px;
}

.map-card{
  flex: 1;
  min-width: 0;
  border-radius: 18px;
  padding: 12px 12px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,126,179,.18);
  box-shadow: 0 10px 24px rgba(0,0,0,.07);
}

.map-card.tracked{
  border-color: rgba(142, 68, 173, .35);
  box-shadow: 0 14px 34px rgba(142, 68, 173, .16), 0 10px 24px rgba(0,0,0,.07);
}

.map-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top: 8px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 999px;
  background: rgba(0,0,0,.05);
  color: rgba(0,0,0,.65);
  border: 1px solid rgba(0,0,0,.06);
}

.badge.primary{
  background: rgba(255,126,179,.14);
  border-color: rgba(255,126,179,.22);
  color: rgba(142, 68, 173, .9);
}

.badge.ok{
  background: rgba(46, 204, 113, .14);
  border-color: rgba(46, 204, 113, .22);
  color: rgba(39, 174, 96, .95);
}

.badge.mute{
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.08);
  color: rgba(0,0,0,.45);
}

.badge.danger{
  background: rgba(231, 76, 60, .12);
  border-color: rgba(231, 76, 60, .20);
  color: rgba(192, 57, 43, .95);
}

.map-actions{
  display:flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-mini{
  font-size: 12px;
  border-radius: 999px;
  padding: 7px 10px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 20px rgba(0,0,0,.05);
}

.btn-mini.primary{
  background: var(--primary-color);
  border-color: rgba(255,126,179,.25);
  color: #fff;
}

.btn-mini:active{
  transform: scale(.98);
}

.btn-mini:disabled{
  opacity: .45;
  filter: grayscale(.2);
  cursor: not-allowed;
  box-shadow: none;
}

/* --- AI 剧情卡片与 HTML 选项 --- */
.story-block{
  width:100%;
}
.story-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:6px;
}
.story-tag{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  font-size:11px;
  border-radius:999px;
  background:rgba(255,126,179,.18);
  color:#c0396b;
}
.story-subtag{
  font-size:10px;
  color:rgba(0,0,0,.45);
}
.story-main{
  font-size:13px;
  line-height:1.7;
  color:#374151;
  padding:8px 10px;
  border-radius:14px;
  background:rgba(255,255,255,.92);
  box-shadow:0 8px 20px rgba(0,0,0,.04);
}
.story-bubble{
  font-size:13px;
  line-height:1.7;
  color:#374151;
  padding:10px 12px;
  border-radius:18px;
  background:linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,240,246,.96));
  box-shadow:0 10px 26px rgba(0,0,0,.06);
}
.story-theme-paper .story-main{
  background:linear-gradient(180deg, rgba(255,252,245,.96), rgba(255,245,235,.96));
}
.story-theme-stage .story-main{
  background:radial-gradient(120% 140% at 10% 0%, rgba(255,255,255,.98), rgba(255,228,240,.96)),
            radial-gradient(120% 160% at 90% 120%, rgba(255,230,200,.80), rgba(255,255,255,.96));
}

.ai-choice-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px dashed var(--primary-color);
  background:rgba(255,255,255,.95);
  font-size:12px;
  color:#c0396b;
  cursor:pointer;
  transition:all .15s ease-out;
}
.ai-choice-chip:hover{
  background:var(--primary-color);
  color:#fff;
  border-style:solid;
  transform:translateY(-1px);
  box-shadow:0 6px 12px rgba(255,126,179,.45);
}
.ai-choice-dot{
  width:6px;
  height:6px;
  border-radius:999px;
  background:currentColor;
}
.ai-choice-clickable{
  cursor:pointer;
}

/* --- 时间轴人物动态履历 --- */
.timeline-topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(244,114,182,.28);
  background:linear-gradient(135deg, rgba(255,247,252,.95), rgba(255,236,245,.92));
  box-shadow:0 14px 30px rgba(236,72,153,.16);
}
.timeline-topbar-title-wrap{
  min-width:0;
}
.timeline-topbar-title{
  margin:0;
  font-size:18px;
  font-weight:700;
  color:#831843;
  letter-spacing:.4px;
}
.timeline-topbar-subtitle{
  margin:4px 0 0;
  font-size:11px;
  line-height:1.45;
  color:#9d174d;
}
.timeline-topbar-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.timeline-icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:999px;
  border:1px solid rgba(244,114,182,.42);
  color:#be185d;
  background:linear-gradient(135deg, rgba(255,241,247,.98), rgba(255,224,238,.95));
  box-shadow:0 10px 20px rgba(244,114,182,.18);
  transition:transform .24s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .24s cubic-bezier(0.4, 0, 0.2, 1), opacity .24s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline-icon-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 24px rgba(244,114,182,.28);
}
.timeline-icon-btn:active{
  transform:scale(.98);
}
.timeline-icon-btn:disabled{
  opacity:.68;
  cursor:not-allowed;
}
.timeline-icon-btn-danger{
  border-color:rgba(251,113,133,.45);
  color:#be123c;
  background:linear-gradient(135deg, rgba(255,245,247,.96), rgba(255,226,233,.94));
}
.timeline-filter-row{
  display:flex;
  align-items:center;
  gap:8px;
  overflow-x:auto;
  white-space:nowrap;
  padding:2px 1px 3px;
}
.timeline-filter-chip{
  border:1px solid rgba(244,114,182,.28);
  background:rgba(255,255,255,.9);
  color:#9d174d;
  border-radius:999px;
  padding:6px 11px;
  font-size:11px;
  font-weight:600;
  flex-shrink:0;
  transition:all .24s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline-filter-chip:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(244,114,182,.22);
}
.timeline-filter-chip:active{
  transform:scale(.96);
}
.timeline-filter-chip.active{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg, #f472b6, #a855f7);
  box-shadow:0 10px 20px rgba(168,85,247,.24);
}
.timeline-log-container{
  border:1px solid rgba(255,126,179,.26);
  border-radius:18px;
  min-height:280px;
  max-height:calc(100dvh - 220px);
  overflow-y:auto;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,173,214,.18), transparent 60%),
    radial-gradient(120% 120% at 100% 10%, rgba(251,207,232,.2), transparent 62%),
    linear-gradient(180deg, #fff8fc 0%, #fff1f8 100%);
  box-shadow:0 14px 30px rgba(190,24,93,.12), inset 0 1px 0 rgba(255,255,255,.8);
  padding:12px;
}
.timeline-list{
  position:relative;
  padding-left:18px;
}
.timeline-list::before{
  content:'';
  position:absolute;
  left:6px;
  top:6px;
  bottom:6px;
  width:2px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(244,114,182,.65), rgba(251,113,133,.2));
}
.timeline-card{
  position:relative;
  margin:0 0 14px 0;
  padding:12px 12px 12px 16px;
  border-radius:16px;
  border:1px solid rgba(244,114,182,.28);
  background:linear-gradient(160deg, rgba(255,255,255,.86), rgba(255,237,246,.78));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:0 8px 20px rgba(236,72,153,.12);
  opacity:0;
  transform:translateY(8px);
  animation:timelineCardIn .26s ease forwards;
}
.timeline-card:last-child{
  margin-bottom:0;
}
.timeline-card::before{
  content:'';
  position:absolute;
  left:-16px;
  top:16px;
  width:10px;
  height:10px;
  border-radius:999px;
  background:#f472b6;
  box-shadow:0 0 0 4px rgba(244,114,182,.22), 0 0 12px rgba(244,114,182,.45);
  animation:timelinePulse 2.4s ease-in-out infinite;
}
.timeline-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.timeline-card-time{
  font-size:11px;
  font-weight:600;
  color:#9d174d;
}
.timeline-card-delete{
  border:1px solid rgba(251,113,133,.35);
  background:rgba(255,255,255,.8);
  color:#be123c;
  border-radius:999px;
  font-size:11px;
  padding:3px 8px;
  transition:transform .2s cubic-bezier(0.4, 0, 0.2, 1), background .2s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline-card-delete:active{
  transform:scale(.96);
}
.timeline-card-delete:hover{
  background:rgba(255,228,235,.9);
}
.timeline-related{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:8px;
}
.timeline-related-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  border-radius:999px;
  padding:2px 8px;
  font-size:11px;
  color:#9d174d;
  background:rgba(251,207,232,.5);
  border:1px solid rgba(244,114,182,.22);
}
.timeline-card-text{
  font-size:12px;
  line-height:1.8;
  color:#4b5563;
  word-break:break-word;
}
.timeline-star{
  color:#db2777;
  font-weight:700;
  text-shadow:0 0 8px rgba(244,114,182,.35);
}
.timeline-empty{
  border:1px dashed rgba(244,114,182,.45);
  border-radius:14px;
  padding:20px 12px;
  text-align:center;
  color:#9d174d;
  background:rgba(255,255,255,.7);
}
.timeline-empty i{
  font-size:24px;
  margin-bottom:8px;
}
.timeline-empty p{
  margin:0;
  font-size:12px;
  line-height:1.65;
}
@keyframes timelinePulse{
  0%,100%{ box-shadow:0 0 0 4px rgba(244,114,182,.22), 0 0 12px rgba(244,114,182,.45); }
  50%{ box-shadow:0 0 0 5px rgba(244,114,182,.26), 0 0 16px rgba(244,114,182,.58); }
}
@keyframes timelineCardIn{
  to{ opacity:1; transform:translateY(0); }
}
@media (max-width: 420px){
  .timeline-topbar{
    flex-direction:column;
    align-items:stretch;
  }
  .timeline-topbar-actions{
    width:100%;
    justify-content:flex-end;
  }
}

/* --- 新版履历时间轴（少女心精致风格） --- */
.resume-topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(244,114,182,.28);
  background:linear-gradient(135deg, rgba(255,247,252,.96), rgba(241,228,255,.92));
  box-shadow:0 14px 30px rgba(236,72,153,.16);
}
.resume-topbar-title-wrap{ min-width:0; }
.resume-topbar-title{
  margin:0;
  font-size:18px;
  font-weight:700;
  color:#831843;
  letter-spacing:.4px;
}
.resume-topbar-subtitle{
  margin:4px 0 0;
  font-size:11px;
  line-height:1.45;
  color:#9d174d;
}
.resume-topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.resume-icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid rgba(244,114,182,.42);
  color:#be185d;
  background:linear-gradient(135deg, rgba(255,241,247,.98), rgba(236,227,255,.95));
  box-shadow:0 10px 20px rgba(244,114,182,.18);
  transition:transform .24s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .24s cubic-bezier(0.4, 0, 0.2, 1), opacity .24s cubic-bezier(0.4, 0, 0.2, 1);
}
.resume-icon-btn:hover{ transform:translateY(-1px); box-shadow:0 14px 24px rgba(244,114,182,.28); }
.resume-icon-btn:active{ transform:scale(.96); }
.resume-icon-btn:disabled{ opacity:.68; cursor:not-allowed; }
.resume-icon-btn-danger{
  border-color:rgba(251,113,133,.45);
  color:#be123c;
  background:linear-gradient(135deg, rgba(255,245,247,.96), rgba(255,226,233,.94));
}
.resume-icon-btn-danger:hover{
  box-shadow:0 14px 24px rgba(251,113,133,.24);
}
.resume-filter-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(244,114,182,.2);
}
.resume-filter-label{ font-size:12px; color:#9d174d; font-weight:600; }
.resume-filter-select{
  flex:1;
  min-width:0;
  border:1px solid rgba(244,114,182,.35);
  background:#fff;
  color:#831843;
  font-size:12px;
  border-radius:999px;
  padding:7px 12px;
  outline:none;
}
.resume-filter-select:focus{
  border-color:rgba(219,39,119,.6);
  box-shadow:0 0 0 3px rgba(244,114,182,.16);
}
.resume-timeline-container{
  border:1px solid rgba(255,126,179,.26);
  border-radius:18px;
  min-height:280px;
  max-height:calc(100dvh - 250px);
  overflow-y:auto;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,173,214,.18), transparent 60%),
    radial-gradient(120% 120% at 100% 10%, rgba(233,213,255,.22), transparent 62%),
    linear-gradient(180deg, #fff8fc 0%, #fff1f8 100%);
  box-shadow:0 14px 30px rgba(190,24,93,.12), inset 0 1px 0 rgba(255,255,255,.8);
  padding:12px;
  scroll-behavior:smooth;
}
.resume-timeline-list{ position:relative; padding-left:18px; }
.resume-timeline-list::before{
  content:'';
  position:absolute;
  left:6px;
  top:6px;
  bottom:6px;
  width:2px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(244,114,182,.65), rgba(168,85,247,.2));
}
.resume-card{
  position:relative;
  margin:0 0 14px 0;
  padding:12px 12px 12px 16px;
  border-radius:18px;
  border:1px solid rgba(244,114,182,.28);
  background:linear-gradient(160deg, rgba(255,255,255,.86), rgba(255,237,246,.78));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:0 8px 20px rgba(236,72,153,.12);
  animation:timelineCardIn .26s ease forwards;
}
.resume-card::before{
  content:'';
  position:absolute;
  left:-16px;
  top:16px;
  width:10px;
  height:10px;
  border-radius:999px;
  background:#f472b6;
  box-shadow:0 0 0 4px rgba(244,114,182,.22), 0 0 12px rgba(244,114,182,.45);
  animation:timelinePulse 2.4s ease-in-out infinite;
}
.resume-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.resume-card-time{ font-size:11px; font-weight:600; color:#9d174d; }
.resume-card-delete{
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(251,113,133,.35);
  background:rgba(255,255,255,.9);
  color:#be123c;
  transition:transform .2s ease, background .2s ease;
}
.resume-card-delete:hover{ background:rgba(255,228,235,.9); }
.resume-card-delete:active{ transform:scale(.92); }
.resume-card-edit{
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(244,114,182,.45);
  background:rgba(255,255,255,.92);
  color:#be185d;
  transition:transform .2s ease, background .2s ease, opacity .2s ease;
}
.resume-card-edit:hover{ background:rgba(255,241,247,.96); }
.resume-card-edit:active{ transform:scale(.92); }
.resume-card-text{
  font-size:12px;
  line-height:1.7;
  color:#4b5563;
  word-break:break-word;
  margin-top:6px;
}
.resume-star-name{
  color:#db2777;
  font-weight:700;
  text-shadow:0 0 8px rgba(244,114,182,.35);
}
.resume-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:10px;
}
.resume-badge{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  border:1px solid transparent;
}
.resume-badge-up{
  color:#166534;
  background:rgba(220,252,231,.78);
  border-color:rgba(134,239,172,.6);
}
.resume-badge-down{
  color:#9f1239;
  background:rgba(255,228,230,.82);
  border-color:rgba(251,113,133,.5);
}
.resume-badge-neutral{
  color:#6b7280;
  background:rgba(243,244,246,.9);
  border-color:rgba(209,213,219,.65);
}
.resume-empty{
  border:1px dashed rgba(244,114,182,.45);
  border-radius:14px;
  padding:20px 12px;
  text-align:center;
  color:#9d174d;
  background:rgba(255,255,255,.7);
}
.resume-empty i{ font-size:24px; margin-bottom:8px; }
.resume-empty p{ margin:0; font-size:12px; line-height:1.65; }

/* --- 游戏主题弹窗样式 --- */
.game-dialog-card{
  width: 100%;
  max-width: 360px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,245,250,.96));
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25), 0 10px 30px rgba(255,126,179,.15);
  border: 1px solid rgba(255,126,179,.2);
  position: relative;
  overflow: hidden;
}

.game-dialog-card::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), #ffbe76, var(--primary-color));
  border-radius: 20px 20px 0 0;
}

.game-dialog-header{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.game-dialog-header i{
  font-size: 28px;
  flex-shrink: 0;
}

.game-dialog-title{
  font-size: 18px;
  font-weight: bold;
  color: #374151;
  margin: 0;
}

.game-dialog-message{
  font-size: 14px;
  line-height: 1.7;
  color: #4b5563;
  margin-bottom: 20px;
  word-break: break-word;
}

.game-dialog-actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.game-dialog-btn{
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}

.game-dialog-btn-primary{
  background: linear-gradient(135deg, var(--primary-color), #ff6ba3);
  color: white;
  box-shadow: 0 4px 12px rgba(255,126,179,.35);
}

.game-dialog-btn-primary:hover{
  background: linear-gradient(135deg, #ff6ba3, var(--primary-color));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255,126,179,.45);
}

.game-dialog-btn-primary:active{
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255,126,179,.3);
}

.game-dialog-btn-secondary{
  background: rgba(0,0,0,.05);
  color: #4b5563;
  border: 1px solid rgba(0,0,0,.1);
}

.game-dialog-btn-secondary:hover{
  background: rgba(0,0,0,.08);
  transform: translateY(-1px);
}

.game-dialog-btn-secondary:active{
  transform: translateY(0);
}

/* --- NPC 私聊界面（微信风格） --- */
.npc-chat-card{
  max-width: 480px;
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 0;
}

.npc-chat-header{
  flex-shrink: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: linear-gradient(90deg, rgba(255,255,255,.98), rgba(255,245,250,.96));
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.npc-chat-back-btn{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  cursor: pointer;
}

.npc-chat-back-btn i{
  font-size: 14px;
}

.npc-chat-manage-btn{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(255,126,179,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  cursor: pointer;
}

.npc-chat-manage-btn i{
  font-size: 14px;
}

.npc-chat-manage-bar{
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(0,0,0,.04);
}

.npc-chat-manage-chip{
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.9);
  cursor: pointer;
}

.npc-chat-manage-chip-danger{
  border-color: rgba(239,68,68,.4);
  background: rgba(254,226,226,.8);
  color: #b91c1c;
}

.npc-chat-body{
  flex: 1;
  padding: 10px 10px 12px;
  overflow-y: auto;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,126,179,.10), transparent 60%),
    radial-gradient(120% 120% at 100% 0%, rgba(255,190,118,.12), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,245,250,.94));
}

.npc-chat-row{
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 10px;
}

.npc-chat-row.player{
  flex-direction: row-reverse;
}

.npc-chat-avatar{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
}

.npc-chat-content{
  max-width: 75%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.npc-chat-row.player .npc-chat-content{
  align-items: flex-end;
}

.npc-chat-name{
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 2px;
}

.npc-chat-bubble{
  font-size: 14px;
  line-height: 1.7;
  padding: 8px 10px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  word-break: break-word;
}

.npc-chat-row.npc .npc-chat-bubble{
  background: #f3f4f6;
  border-radius: 16px 16px 16px 4px;
  color: #111827;
}

.npc-chat-row.player .npc-chat-bubble{
  background: linear-gradient(135deg, var(--primary-color), #ff9ac5);
  border-radius: 16px 16px 4px 16px;
  color: #ffffff;
}

.npc-chat-meta{
  font-size: 10px;
  color: #9ca3af;
  margin-top: 2px;
}

.npc-chat-select{
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.npc-chat-input{
  flex-shrink: 0;
  padding: 6px 10px 10px;
  background: rgba(255,255,255,.97);
  border-top: 1px solid rgba(0,0,0,.06);
}

.npc-chat-input-inner{
  display: flex;
  align-items: center;
  gap: 8px;
}

.npc-chat-input-field{
  flex: 1;
  border: none;
  outline: none;
  border-radius: 999px;
  background: #f3f4f6;
  padding: 8px 12px;
  font-size: 14px;
}

.npc-chat-send-btn{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--primary-color), #ff9ac5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(255,126,179,.45);
  cursor: pointer;
}

.npc-chat-send-btn:active{
  transform: scale(.97);
  box-shadow: 0 3px 10px rgba(255,126,179,.35);
}

.npc-chat-tip{
  text-align: right;
}

@media (max-width: 480px){
  .npc-chat-card{
    border-radius: 0;
  }
}

/* --- 人物关系网卡片与时间线 --- */
.relation-graph{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:4px 2px 6px;
}

.relation-node-card{
  flex:1 1 calc(50% - 6px);
  min-width:0;
  border-radius:14px;
  padding:10px 10px 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,240,247,.96));
  border:1px solid rgba(255,126,179,.35);
  box-shadow:0 8px 18px rgba(0,0,0,.06);
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.relation-node-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(255,126,179,.45);
  border-color:rgba(142,68,173,.55);
}

.relation-node-header{
  display:flex;
  align-items:center;
  gap:8px;
}

.relation-node-avatar{
  width:32px;
  height:32px;
  border-radius:999px;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(255,126,179,.5);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

.relation-node-avatar-inner{
  width:26px;
  height:26px;
  border-radius:999px;
  background:linear-gradient(135deg, var(--primary-color), #ff9ac5);
  color:#fff;
  font-size:16px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.relation-node-main{
  min-width:0;
}

.relation-node-name{
  font-size:13px;
  font-weight:600;
  color:#374151;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.relation-node-tags{
  margin-top:2px;
}

.relation-type-badge{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  font-size:10px;
  border-radius:999px;
  background:rgba(255,126,179,.18);
  color:#c0396b;
  border:1px solid rgba(255,126,179,.4);
}

.relation-node-arrow{
  margin-top:6px;
}

.relation-arrow-line{
  position:relative;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(255,126,179,.1), rgba(142,68,173,.8));
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

.relation-arrow-line::after{
  content:'';
  position:absolute;
  right:-2px;
  width:6px;
  height:6px;
  border-top:2px solid rgba(142,68,173,.9);
  border-right:2px solid rgba(142,68,173,.9);
  transform:rotate(45deg);
  background:transparent;
}

.relation-arrow-label{
  position:relative;
  right:2px;
  padding:0 4px;
  font-size:9px;
  color:#6b7280;
  background:rgba(255,255,255,.9);
  border-radius:999px;
}

.relation-node-metrics{
  display:flex;
  justify-content:space-between;
  margin-top:6px;
}

.relation-metric-mini{
  text-align:center;
  flex:1;
}

.relation-metric-mini-label{
  display:block;
  font-size:9px;
  color:#9ca3af;
}

.relation-metric-mini-value{
  display:block;
  font-size:11px;
  font-weight:600;
  color:#4b5563;
}

.relation-node-bar-row{
  display:flex;
  gap:4px;
  margin-top:6px;
}

.relation-node-bar{
  flex:1;
  height:4px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.9);
}

.relation-node-bar-fill{
  height:100%;
  border-radius:999px;
}

.relation-node-bar-intimacy .relation-node-bar-fill{
  background:linear-gradient(90deg, rgba(59,130,246,.35), rgba(37,99,235,.9));
}

.relation-node-bar-favor .relation-node-bar-fill{
  background:linear-gradient(90deg, rgba(255,126,179,.35), rgba(255,126,179,.95));
}

.relation-node-bar-trust .relation-node-bar-fill{
  background:linear-gradient(90deg, rgba(34,197,94,.35), rgba(22,163,74,.95));
}

.relation-detail-card{
  margin-top:4px;
}

.relation-detail-card-inner{
  border-radius:16px;
  padding:12px 12px 10px;
  background:linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,240,248,.98));
  border:1px solid rgba(255,126,179,.4);
  box-shadow:0 10px 28px rgba(0,0,0,.08);
}

.relation-detail-header{
  padding:10px 10px;
  border-radius:12px;
  background:linear-gradient(135deg, rgba(255,126,179,.85), rgba(142,68,173,.9));
  color:#fff;
  margin-bottom:10px;
}

.relation-detail-title{
  font-size:14px;
  font-weight:700;
}

.relation-detail-sub{
  margin-top:4px;
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  font-size:11px;
}

.relation-badge-main{
  padding:2px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.6);
}

.relation-badge-sub{
  padding:2px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.35);
}

.relation-detail-section{
  margin-top:8px;
}

.relation-detail-metrics{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.relation-metric{
  display:flex;
  align-items:center;
  gap:8px;
}

.relation-metric-label{
  width:52px;
  font-size:11px;
  color:#6b7280;
  flex-shrink:0;
}

.relation-metric-bar{
  flex:1;
  height:6px;
  border-radius:999px;
  background:rgba(255,255,255,.9);
  overflow:hidden;
  border:1px solid rgba(0,0,0,.04);
}

.relation-metric-bar-fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(59,130,246,.4), rgba(37,99,235,.95));
}

.relation-metric-bar-favor{
  background:linear-gradient(90deg, rgba(255,126,179,.4), rgba(255,126,179,.95));
}

.relation-metric-bar-trust{
  background:linear-gradient(90deg, rgba(34,197,94,.4), rgba(22,163,74,.95));
}

.relation-metric-value{
  font-size:11px;
  color:#4b5563;
  min-width:70px;
  text-align:right;
}

.relation-section-title{
  font-size:12px;
  font-weight:600;
  color:#c0396b;
  margin-bottom:4px;
}

.relation-timeline{
  max-height:180px;
  overflow-y:auto;
  padding-left:6px;
  margin-left:4px;
  border-left:1px solid rgba(148,163,184,.5);
}

.relation-timeline-empty{
  font-size:11px;
  color:#9ca3af;
  padding:2px 0;
}

.relation-timeline-item{
  position:relative;
  padding-left:10px;
  margin-bottom:8px;
}

.relation-timeline-dot{
  position:absolute;
  left:-7px;
  top:4px;
  width:8px;
  height:8px;
  border-radius:999px;
  background:var(--primary-color);
  box-shadow:0 0 0 4px rgba(255,126,179,.22);
}

.relation-timeline-content{
  font-size:11px;
  color:#4b5563;
}

.relation-timeline-time{
  font-weight:600;
  color:#111827;
  margin-bottom:2px;
}

.relation-timeline-event{
  line-height:1.4;
  margin-bottom:2px;
}

.relation-timeline-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:#9ca3af;
}

.relation-detail-actions{
  margin-top:10px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

.relation-btn{
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  border:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  transition:all .15s ease;
}

.relation-btn-primary{
  background:linear-gradient(135deg, var(--primary-color), #ff9ac5);
  color:#fff;
  box-shadow:0 4px 14px rgba(255,126,179,.45);
}

.relation-btn-primary:active{
  transform:scale(.97);
  box-shadow:0 2px 10px rgba(255,126,179,.35);
}

.relation-btn-secondary{
  background:rgba(0,0,0,.04);
  color:#4b5563;
  border:1px solid rgba(0,0,0,.06);
}

.relation-btn-secondary:active{
  transform:scale(.97);
}

@media (max-width: 420px){
  .relation-node-card{
    flex:1 1 100%;
  }
}

/* --- NPC 背包与资产弹窗 --- */
.npc-backpack-mini-btn{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  color:#c02677;
  border:1px solid rgba(255,126,179,.35);
  background:linear-gradient(135deg, rgba(255,245,250,.98), rgba(255,233,244,.98));
  box-shadow:0 6px 14px rgba(255,126,179,.14);
}
.npc-backpack-mini-icon{
  font-size:12px;
}
.npc-inventory-modal-card{
  background:
    radial-gradient(120% 120% at 15% 0%, rgba(255,126,179,.14), transparent 55%),
    radial-gradient(120% 120% at 100% 15%, rgba(255,190,118,.14), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,245,250,.96));
}
.npc-inv-refresh-btn{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:11px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,126,179,.35);
  background:linear-gradient(135deg, rgba(255,126,179,.16), rgba(255,190,118,.18));
  color:#be185d;
}
.npc-inv-refresh-btn:disabled{
  opacity:.6;
  cursor:not-allowed;
}
.npc-panel-section{
  border:1px solid rgba(255,126,179,.2);
  border-radius:14px;
  padding:10px;
  background:rgba(255,255,255,.86);
}
.npc-panel-title-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}
.npc-panel-title{
  font-size:13px;
  font-weight:700;
  color:#be185d;
}
.npc-panel-tip{
  font-size:10px;
  color:#9ca3af;
}
.npc-inv-items-host{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
}
.npc-item-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  width:100%;
}
.npc-item-chip{
  border:1px solid rgba(255,126,179,.3);
  border-radius:12px;
  padding:8px 6px;
  background:linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,240,248,.95));
  text-align:left;
  transition:transform .18s ease, box-shadow .18s ease;
}
.npc-item-chip:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 20px rgba(255,126,179,.2);
}
.npc-item-chip:hover .npc-item-chip-icon{
  animation:emojiBreathe 1.6s ease-in-out infinite;
}
.npc-item-chip-icon{
  width:22px;
  height:22px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,126,179,.2);
  color:#be185d;
  font-size:14px;
  font-weight:700;
}
.npc-item-chip-name{
  display:block;
  margin-top:4px;
  font-size:12px;
  color:#374151;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.npc-item-chip-count{
  font-size:10px;
  color:#9ca3af;
}
.npc-item-chip--edit{
  position:relative;
  border-color:rgba(239,68,68,.4);
  box-shadow:0 0 0 1px rgba(239,68,68,.4);
}
.npc-item-chip-delete{
  position:absolute;
  top:4px;
  right:4px;
  width:20px;
  height:20px;
  border-radius:999px;
  border:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(239,68,68,.72);
  color:#fff;
  font-size:10px;
  cursor:pointer;
  z-index:2;
  transition:transform .15s ease, background .15s ease;
}
.npc-item-chip-delete:active{
  transform:scale(.92);
}
.npc-inv-add-form{
  width:100%;
  grid-column:1 / -1;
  margin-top:2px;
  padding:12px;
  border-radius:14px;
  border:1px dashed rgba(255,126,179,.45);
  background:linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,240,248,.95));
  box-sizing:border-box;
}
.npc-inv-add-title{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:700;
  color:#be185d;
  margin-bottom:10px;
}
.npc-inv-add-field{
  margin-bottom:8px;
}
.npc-inv-add-field--inline{
  display:flex;
  gap:8px;
  align-items:flex-end;
}
.npc-inv-add-field-col{
  flex:0 0 72px;
  min-width:0;
}
.npc-inv-add-field-col--grow{
  flex:1 1 auto;
}
.npc-inv-add-label{
  display:block;
  font-size:11px;
  font-weight:600;
  color:#9d174d;
  margin-bottom:4px;
}
.npc-inv-add-input{
  display:block;
  width:100%;
  box-sizing:border-box;
  min-width:0;
  font-size:12px;
  padding:8px 10px;
  border-radius:12px;
  -webkit-user-select:text;
  user-select:text;
  touch-action:manipulation;
}
.npc-inv-add-textarea{
  resize:vertical;
  min-height:64px;
  line-height:1.5;
}
.npc-inv-add-count{
  text-align:center;
}
.npc-inv-add-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
}
.npc-inv-add-hint{
  font-size:11px;
  color:#dc2626;
}
.npc-inv-add-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 14px;
  border-radius:999px;
  border:1px solid rgba(255,126,179,.35);
  background:linear-gradient(135deg, #ff7eb3, #ffb76e);
  color:#fff;
  font-size:12px;
  font-weight:600;
  box-shadow:0 6px 14px rgba(255,126,179,.22);
  transition:transform .15s ease, box-shadow .15s ease;
}
.npc-inv-add-btn:active{
  transform:scale(.97);
}
.npc-finance-card{
  border:1px solid rgba(255,126,179,.22);
  border-radius:12px;
  background:rgba(255,255,255,.92);
  overflow:hidden;
}
.npc-finance-summary{
  list-style:none;
  cursor:pointer;
  padding:8px 10px;
  font-size:12px;
  font-weight:700;
  color:#be185d;
  background:rgba(255,126,179,.08);
}
.npc-finance-summary::-webkit-details-marker{ display:none; }
.npc-finance-content{
  padding:8px 10px;
}
.npc-finance-row{
  font-size:12px;
  line-height:1.6;
  color:#374151;
  margin-bottom:6px;
}
.npc-fashion-card{
  border:1px solid rgba(255,126,179,.2);
  border-radius:12px;
  padding:8px 10px;
  background:rgba(255,255,255,.92);
}
.npc-fashion-title{
  font-size:12px;
  font-weight:700;
  color:#be185d;
  margin-bottom:4px;
}
.npc-fashion-row{
  font-size:12px;
  color:#374151;
  line-height:1.6;
}
.npc-fashion-comment{
  border:1px dashed rgba(255,126,179,.4);
  border-radius:12px;
  padding:8px 10px;
  font-size:12px;
  color:#9d174d;
  background:rgba(255,240,248,.7);
}
.npc-item-modal-mask{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  border-radius:inherit;
}
.npc-item-modal-card{
  width:100%;
  max-width:380px;
  border-radius:20px;
  border:1px solid rgba(255,126,179,.35);
  background:linear-gradient(135deg, rgba(255,255,255,0.98), rgba(255,240,248,0.95));
  box-shadow:0 20px 40px rgba(255,126,179,0.15), 0 10px 20px rgba(0,0,0,.10);
  padding:14px;
  overflow:hidden;
}
.npc-item-meta-line{
  margin-bottom:8px;
  font-size:12px;
  color:#374151;
}
#npc-item-modal-body{
  max-height:none !important;
  overflow:visible !important;
}
.npc-item-hero{
  text-align:center;
  margin-bottom:10px;
}
.npc-item-hero-icon{
  font-size:38px;
  line-height:1;
}
.npc-item-hero-name{
  margin-top:6px;
  font-size:16px;
  font-weight:700;
  background:linear-gradient(90deg, #db2777, #a855f7);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.npc-item-info-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-bottom:10px;
}
.npc-item-info-chip{
  border-radius:12px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(255,126,179,.25);
  padding:8px;
}
.npc-item-info-label{
  display:block;
  font-size:11px;
  color:#9ca3af;
}
.npc-item-info-value{
  display:block;
  margin-top:2px;
  font-size:13px;
  color:#374151;
  word-break:break-word;
}
.npc-item-desc-box{
  border-radius:14px;
  background:rgba(255,255,255,.85);
  border:1px solid rgba(255,126,179,.22);
  padding:10px;
  margin-bottom:10px;
}
.npc-item-desc-title{
  font-size:12px;
  color:#be185d;
  margin-bottom:6px;
}
.npc-item-desc-text{
  font-size:13px;
  color:#374151;
  line-height:1.6;
  white-space:pre-wrap;
  word-break:break-word;
}
.npc-item-comment-box{
  border-radius:14px;
  background:rgba(255,232,244,.72);
  border:1px dashed rgba(219,39,119,.4);
  padding:10px;
}
.npc-item-comment-title{
  font-size:12px;
  font-weight:700;
  color:#be185d;
  margin-bottom:6px;
}
.npc-item-comment-text{
  font-size:13px;
  line-height:1.6;
  color:#7f1d1d;
  white-space:pre-wrap;
  word-break:break-word;
}

.peep-entry-btn{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  border:1px solid rgba(244,114,182,.4);
  color:#be185d;
  background:linear-gradient(135deg, rgba(255,241,247,.95), rgba(255,224,238,.95));
  box-shadow:0 8px 18px rgba(244,114,182,.18);
  transition:transform .24s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .24s cubic-bezier(0.4, 0, 0.2, 1);
}
.peep-entry-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 22px rgba(244,114,182,.26);
}
.peep-entry-btn:active{
  transform:scale(.98);
}
.peep-modal-card{
  border-radius:24px;
  border:1px solid rgba(244,114,182,.35);
  padding:0;
  overflow:hidden;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,173,214,.28), transparent 60%),
    radial-gradient(120% 120% at 100% 0%, rgba(251,207,232,.25), transparent 62%),
    linear-gradient(180deg, #fff7fb 0%, #ffeef8 100%);
  box-shadow:0 24px 50px rgba(190,24,93,.24), 0 10px 24px rgba(15,23,42,.2);
}
.peep-modal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(244,114,182,.2);
}
.peep-modal-title{
  font-size:15px;
  font-weight:700;
  color:#9d174d;
}
.peep-modal-subtitle{
  margin-top:2px;
  font-size:11px;
  color:#be185d;
}
.peep-modal-header-actions{
  display:flex;
  gap:8px;
}
.peep-icon-btn{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(244,114,182,.45);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, #fff, #ffe1f1);
  color:#be185d;
  transition:all .24s cubic-bezier(0.4, 0, 0.2, 1);
}
.peep-icon-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(244,114,182,.28);
}
.peep-icon-btn:disabled{
  opacity:.6;
  cursor:not-allowed;
}
.peep-icon-btn-close{
  color:#6b7280;
  border-color:rgba(156,163,175,.4);
  background:#fff;
}
.peep-viewport{
  position:relative;
  height:min(72vh, 560px);
  overflow:hidden;
}
.peep-view{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  transform:translateX(16px);
  transition:transform .34s cubic-bezier(0.4, 0, 0.2, 1), opacity .34s cubic-bezier(0.4, 0, 0.2, 1);
}
.peep-view-active{
  opacity:1;
  pointer-events:auto;
  transform:translateX(0);
}
.peep-view-left{
  transform:translateX(-16px);
}
.peep-view-right{
  transform:translateX(16px);
}
.peep-scroll{
  height:100%;
  overflow-y:auto;
  padding:12px;
}
.peep-loading-card,
.peep-error-card{
  border:1px solid rgba(244,114,182,.32);
  border-radius:14px;
  background:rgba(255,255,255,.72);
  padding:12px;
  color:#831843;
  font-size:12px;
  line-height:1.65;
}
.peep-loading-card{
  display:flex;
  align-items:center;
  gap:8px;
}
.peep-loading-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#ec4899;
  box-shadow:14px 0 0 #f472b6, 28px 0 0 #f9a8d4;
  animation:peepDots 1.2s infinite ease-in-out;
}
@keyframes peepDots{
  0%{ transform:translateX(0); opacity:.65; }
  50%{ transform:translateX(4px); opacity:1; }
  100%{ transform:translateX(0); opacity:.65; }
}
.peep-detail-back-btn{
  margin:10px 0 2px;
  width:100%;
  border:0;
  border-radius:12px;
  padding:10px 12px;
  font-size:13px;
  font-weight:700;
  color:#fff;
  background:linear-gradient(135deg, #ec4899, #f973b5);
  box-shadow:0 10px 20px rgba(236,72,153,.32);
  transition:transform .24s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .24s cubic-bezier(0.4, 0, 0.2, 1);
}
.peep-detail-back-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 24px rgba(236,72,153,.38);
}
.peep-detail-back-btn:active{
  transform:scale(.985);
}
