@font-face {
  font-family: 'LXGW WenKai';
  src: url('https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont@1.1.0/style.css');
  font-display: swap;
}
#chat-ui-sakura-panel {
  --sakura-pink: #FFB7C5;
  --sakura-dark: #E8A2B5;
  --sakura-light: #FFF0F5;
  --sakura-accent: #FF69B4;
  --text-color: #5A4A4A;
  --border-color: #F8D7DA;
  --progress-bg: #FFE4E9;
  --progress-fill: #FF69B4;
  --success-color: #8BC34A;
  --danger-color: #F44336;
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, var(--sakura-light) 0%, #FFF8FB 100%);
  border: 2px solid var(--sakura-pink);
  border-radius: 16px;
  padding: 0;
  margin: 0 auto;
  max-width: 100%;
  box-shadow: 0 8px 32px rgba(255, 183, 197, 0.2);
  position: relative;
  overflow: hidden;
}
#chat-ui-sakura-panel::before,
#chat-ui-sakura-panel::after {
  content: '❀';
  position: absolute;
  font-size: 1.2em;
  color: var(--sakura-pink);
  opacity: 0.6;
  z-index: 1;
}
#chat-ui-sakura-panel::before {
  top: 10px;
  right: 15px;
}
#chat-ui-sakura-panel::after {
  bottom: 10px;
  left: 15px;
}
.hero-section {
  text-align: center;
  padding: 25px 20px;
  background: linear-gradient(135deg, var(--sakura-pink) 0%, var(--sakura-dark) 100%);
  color: white;
  border-radius: 14px 14px 0 0;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '❀ ❀ ❀';
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  font-size: 0.8em;
  opacity: 0.3;
  letter-spacing: 8px;
}
.hero-title {
  font-size: 1.5em;
  font-weight: 600;
  margin: 0;
  font-family: 'LXGW WenKai', '霞鹜文楷', 'Noto Sans SC', 'Microsoft YaHei', serif;
  color: #C74B72;
  text-shadow: 2px 2px 4px #F8E8EE, -1px -1px 2px #F8E8EE;
  animation: gentle-pulse 4s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
@keyframes gentle-pulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}
details {
  border-bottom: 1px solid var(--border-color);
  margin: 0;
  transition: background 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
}
details:last-child {
  border-bottom: none;
}
summary {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(255, 183, 197, 0.1), rgba(232, 162, 181, 0.1));
  cursor: pointer;
  font-weight: 600;
  color: #D17A99;
  font-size: 1.1em;
  text-align: center;
  list-style: none;
  transition: all 0.3s ease;
  position: relative;
  margin: 0;
  border-left: 3px solid transparent;
  font-family: 'Noto Sans SC', '思源黑体', 'Microsoft YaHei', sans-serif;
}
summary::-webkit-details-marker {
  display: none;
}
summary::before,
summary::after {
  content: '🌸';
  position: absolute;
  font-size: 1em;
  transition: transform 0.3s ease;
  opacity: 0.8;
}
summary::before {
  left: 20px;
}
summary::after {
  right: 20px;
}
details[open] summary {
  border-left: 3px solid #A63E6F;
  background: linear-gradient(135deg, rgba(255, 183, 197, 0.2), rgba(232, 162, 181, 0.2));
  color: #A63E6F;
}
summary:hover {
  background: linear-gradient(135deg, rgba(255, 183, 197, 0.3), rgba(232, 162, 181, 0.3));
  color: #C74B72;
}
summary:hover::before,
summary:hover::after {
  opacity: 1;
  transform: scale(1.2);
}
.details-content {
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--border-color);
}
.narrative-section {
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border-color);
}
.narrative-content {
  line-height: 1.5;
  margin: 0;
  color: var(--text-color);
  font-size: 0.95em;
  text-align: justify;
}
pre {
  background: var(--sakura-light);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 18px;
  margin: 0;
  overflow-x: auto;
  font-size: 0.9em;
  line-height: 1.5;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
  font-family: 'Consolas', 'Monaco', monospace;
}
code {
  font-family: 'Consolas', 'Monaco', monospace;
  color: var(--text-color);
  white-space: pre-wrap;
}
.progress-section {
  margin: 18px 0;
}
.progress-item {
  margin: 14px 0;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.95em;
  font-weight: 500;
  color: var(--text-color);
}
.progress-value {
  font-size: 0.85em;
  color: var(--sakura-accent);
  font-weight: 600;
}
.progress-bar {
  height: 10px;
  background: var(--progress-bg);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sakura-pink), var(--sakura-accent));
  border-radius: 5px;
  transition: width 0.5s ease;
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: sakura-progress 2s infinite;
}
@keyframes sakura-progress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.locked {
  opacity: 0.7;
}
.trauma-alert,
.trauma-normal {
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 0.9em;
}
.trauma-alert {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
}
.trauma-normal {
  background: rgba(139, 195, 74, 0.1);
  border: 1px solid var(--success-color);
  color: var(--success-color);
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}
.info-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 183, 197, 0.2);
  border-color: var(--sakura-pink);
}
.info-icon {
  font-size: 1.2em;
  color: var(--sakura-accent);
  min-width: 24px;
  text-align: center;
}
.info-content {
  flex: 1;
  font-size: 0.92em;
  color: var(--text-color);
  font-weight: 500;
}
.table-container {
  overflow-x: auto;
  margin: 18px 0;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}
.memory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
  background: white;
}
.memory-table th,
.memory-table td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
  word-break: break-word;
}
.memory-table th {
  background: linear-gradient(135deg, var(--sakura-pink), var(--sakura-dark));
  color: white;
  font-weight: 500;
  text-align: center;
}
.memory-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.6);
}
.memory-table tr:hover {
  background: rgba(255, 183, 197, 0.1);
}
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.option-btn {
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--sakura-pink), var(--sakura-dark));
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.92em;
  text-align: center;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(255, 183, 197, 0.3);
}
.option-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 183, 197, 0.4);
  background: linear-gradient(135deg, var(--sakura-accent), var(--sakura-dark));
}
@media (max-width: 600px) {
  #chat-ui-sakura-panel {
    margin: 10px;
    border-radius: 12px;
  }
  .hero-title {
    font-size: 1.3em;
  }
  .hero-section {
    padding: 20px 15px;
  }
  summary {
    padding: 14px 16px;
    font-size: 1em;
  }
  .details-content, .narrative-section {
    padding: 16px;
  }
  .info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .options-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .memory-table {
    font-size: 0.8em;
  }
  .memory-table th,
  .memory-table td {
    padding: 8px 10px;
  }
  .info-item {
    padding: 10px 12px;
  }
  .option-btn {
    padding: 10px 14px;
  }
  summary::before,
  summary::after {
    font-size: 0.9em;
  }
}