/*
 * [INPUT]: index.html 与 app.js 的语义类名，base.css 的主题变量。
 * [OUTPUT]: 交互示意区的输入输出面板、类型标签和运行状态。
 * [POS]: dist 样式模块 playground，由 styles.css 按依赖顺序加载。
 * [PROTOCOL]: 变更时更新此头部，然后检查 CLAUDE.md
 */
.playground {
  border: 1px solid #34402b;
  border-radius: 9px;
  background: #0d110d;
  overflow: hidden;
}
.playground-toolbar {
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  padding: 14px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.scenario-tabs {
  display: flex;
  gap: 6px;
}
.scenario-tabs button {
  background: transparent;
  color: #99a38f;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 8px 17px;
  font-size: 0.875rem;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
.scenario-tabs button:hover {
  color: var(--ink);
  background: #1d2518;
}
.scenario-tabs button[aria-pressed="true"] {
  color: #d2f6a8;
  border-color: #435633;
  background: #202d16;
}
.demo-badge {
  font-size: 11px;
  color: #89977d;
  white-space: nowrap;
}
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 145px 1fr;
  min-height: 404px;
  padding: 28px 28px 24px;
  gap: 25px;
}
.panel-label {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font: 10px var(--mono);
  letter-spacing: 1px;
  color: #a3b18f;
}
.panel-label > span:last-child {
  letter-spacing: 0;
  color: #69785c;
}
.message-card {
  margin-top: 23px;
  background: #141a12;
  border: 1px solid #2e3826;
  border-radius: 6px;
  padding: 19px;
}
.message-sender {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #b5c2a6;
  gap: 10px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  background: #2a3620;
  border-radius: 5px;
  color: #b9ce9f;
  font: 11px var(--mono);
}
.message-type {
  margin-left: auto;
  color: #617352;
  font: 9px var(--mono);
}
.message-card p {
  font-size: 1rem;
  color: #ccd3c6;
  line-height: 1.9;
  margin: 17px 0 0;
  min-height: 80px;
}
.questions {
  margin-top: 25px;
}
.questions .panel-label {
  font-size: 9px;
}
.questions .panel-label > span {
  font-size: 10px;
}
#question-list {
  margin-top: 12px;
}
#question-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font: 11px var(--mono);
  color: #c3cdb9;
}
#question-list > div > span {
  color: #8e9e7f;
  background: #1a2315;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 10px;
}
.demo-engine {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 10px;
}
.mini-core {
  display: grid;
  place-content: center;
  position: relative;
  width: 67px;
  height: 67px;
  background: radial-gradient(circle, #354828, #152012);
  border: 1px solid #78965a;
  border-radius: 17px;
  font: 500 44px var(--display);
  box-shadow: 0 0 40px #a5ff4210;
  letter-spacing: -5px;
  display: block;
  text-align: center;
  line-height: 67px;
}
.mini-core span {
  color: var(--accent);
}
.mini-core:before,
.mini-core:after {
  content: "";
  position: absolute;
  height: 1px;
  width: 35px;
  background: #415731;
  top: 33px;
}
.mini-core:before {
  right: 100%;
}
.mini-core:after {
  left: 100%;
}
.engine-label {
  font: 9px var(--mono);
  letter-spacing: 3px;
  color: #b5c6a3;
  margin-top: 14px;
}
.process-steps {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 25px;
  gap: 7px;
  font-size: 10px;
  color: #59654e;
}
.process-steps i {
  height: 8px;
  width: 1px;
  background: #34462a;
}
.process-steps .active {
  color: #bcd29f;
}
.demo-output {
  min-width: 0;
}
.result-top {
  margin-top: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #9ab180;
  font: 10px var(--mono);
}
#copy-result {
  border: 0;
  color: #98a78a;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  padding: 4px 0 4px 14px;
}
#copy-result:hover {
  color: var(--accent);
}
.result-code {
  font: 13px/1.75 var(--mono);
  color: #718363;
  white-space: pre;
  overflow-x: auto;
  padding: 0 0 2px;
  margin: 9px 0 10px;
  transition: opacity 0.25s;
  min-height: 250px;
}
.json-key {
  color: #a8b69b;
}
.json-string {
  color: #c1ff72;
}
.json-value {
  color: #d4cba1;
}
.result-summary {
  border-top: 1px solid #2e3d24;
  color: #acbf98;
  font-size: 0.875rem;
  padding-top: 12px;
  line-height: 1.7;
}
.demo-footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 26px;
}
.demo-footer > p {
  margin: 0;
  font-size: 11px;
  color: #798c68;
}
.info-mark {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border: 1px solid #617351;
  border-radius: 50%;
  margin-right: 7px;
  font-size: 9px;
}
.demo-footer .button {
  font-size: 12px;
  padding: 11px 18px;
  gap: 20px;
  min-width: 159px;
}
.play-icon {
  font-size: 9px;
}
.button:disabled {
  cursor: wait;
  transform: none;
  opacity: 0.65;
}
.is-running .result-code,
.is-running .result-summary {
  opacity: 0.15;
}
.is-running .mini-core {
  animation: core-pulse 0.65s ease-in-out infinite alternate;
}
.is-running .mini-core:after {
  background: var(--accent);
  box-shadow: 0 0 8px #c1ff72;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.no-script {
  padding: 20px;
  color: var(--accent);
}
@keyframes core-pulse {
  from {
    box-shadow: 0 0 20px #a5ff4210;
  }
  to {
    box-shadow: 0 0 40px #a5ff4240;
    border-color: #c1ff72;
  }
}
