/* Agent B 游戏包样式：只在 .pack-b 根作用域内生效，不覆盖全局。 */

.pack-b {
  --ink: #24233a;
  --cream: #fff8e8;
  --pink: #ffb8c9;
  --purple: #bfc3ff;
  --yellow: #ffe26f;
  --mint: #aee8df;
  box-sizing: border-box;
  color: var(--ink);
  background: var(--cream);
  border-radius: 24px;
  padding: 20px;
  max-width: 640px;
  margin: 0 auto;
  font-family: 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
  line-height: 1.5;
}

.pack-b *,
.pack-b *::before,
.pack-b *::after {
  box-sizing: border-box;
}

.pack-b a {
  color: inherit;
  text-decoration: none;
}

/* —— 头部 —— */
.pb-head {
  position: relative;
  padding: 4px 0 18px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 18px;
}
.pb-head small {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}
.pb-head h1 {
  margin: 8px 0 0;
  font-size: clamp(26px, 6vw, 40px);
  font-weight: 900;
  line-height: 1.25;
}
.pb-back {
  display: inline-block;
  margin-bottom: 10px;
  padding: 8px 14px;
  min-height: 44px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
}

/* —— 文案 —— */
.pb-desc {
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 16px;
}
.pb-meta {
  font-size: 14px;
  margin: 12px 0;
}
.pb-notice {
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 14px;
}
.pb-error {
  color: #b00020;
  font-weight: 700;
  font-size: 14px;
  min-height: 20px;
  margin: 12px 0 0;
}

/* —— 表单 —— */
.pb-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 16px;
}
.pb-field input,
.pb-field select {
  min-height: 48px;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 16px;
  width: 100%;
}
.pb-field input:focus-visible,
.pb-field select:focus-visible {
  outline: 3px solid #7755de;
  outline-offset: 2px;
}

/* —— 舞台 / 词卡 —— */
.pb-stage {
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: 4px 5px 0 var(--ink);
  padding: 24px 18px;
  text-align: center;
  margin: 0 0 16px;
}
.pb-word {
  font-size: clamp(30px, 8vw, 52px);
  font-weight: 900;
  margin: 8px 0;
  line-height: 1.2;
}
.pb-hidden {
  opacity: 0.45;
  letter-spacing: 2px;
}
.pb-banned {
  font-size: 15px;
  margin: 10px 0 0;
}
.pb-banned b {
  display: inline-block;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 2px 10px;
  margin: 2px;
}
.pb-clock {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 900;
  text-align: center;
  margin: 0 0 12px;
  font-variant-numeric: tabular-nums;
}

/* —— 按钮 —— */
.pb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}
.pb-btn {
  flex: 1 1 auto;
  min-width: 120px;
  min-height: 48px;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 4px 0 var(--ink);
  font: 800 16px/1.2 inherit;
  font-family: inherit;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.12s;
}
.pb-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 2px 0 var(--ink);
}
.pb-btn:focus-visible {
  outline: 3px solid #7755de;
  outline-offset: 3px;
}
.pb-btn.pb-primary {
  background: var(--ink);
  color: #fff;
}
.pb-btn.pb-good {
  background: var(--mint);
}
.pb-btn.pb-bad {
  background: var(--pink);
}
.pb-btn.pb-ghost {
  background: transparent;
  box-shadow: none;
}

/* —— 抓手指触控区 —— */
.pb-touch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: var(--purple);
  box-shadow: 5px 6px 0 var(--ink);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  margin: 0 0 16px;
  cursor: pointer;
}
.pb-touch-label {
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 900;
  text-align: center;
  padding: 12px;
  pointer-events: none;
}
.pb-touch-marker { position:absolute; transform:translate(-50%,-140%); border:2px solid #24233a; border-radius:50%; width:44px; height:44px; display:grid; place-items:center; background:#fff8e8; color:#24233a; font-weight:800; pointer-events:none; z-index:2; }
.pb-touch-active {
  background: var(--yellow);
}
.pb-touch-armed {
  background: var(--pink);
}
.pb-touch-signal {
  background: #ff5f6d;
  color: #fff;
  outline: 5px solid #ffe26f;
}
@keyframes pb-blink {
  to { visibility: hidden; }
}

/* —— 窄屏适配 —— */
@media (max-width: 380px) {
  .pack-b {
    padding: 14px;
    border-radius: 18px;
  }
  .pb-btn {
    min-width: 100%;
    min-height: 48px;
  }
  .pb-touch {
    min-height: 200px;
  }
  .pb-stage {
    padding: 18px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pb-btn,
  .pb-touch-signal {
    transition: none;
    animation: none;
  }
}
