/* ============================================================
   double-commands.css — 连发两条特有样式
   双卡并排、and 徽章、身体/物品插画高亮、全屏放大
   小人姿势样式复用 simon-says.css
   ============================================================ */

/* ---------- 双卡区 ---------- */
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  margin-top: 6px;
  text-align: left;
}

.mcard {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--line);
  background: linear-gradient(180deg, #FFFDF8, #FFF7EC);
  box-shadow: 0 3px 0 #F3DDC7, 0 8px 18px rgba(199, 91, 31, .06);
}

.mcard[data-type="body"] {
  border-color: #F6C79C;
  background: linear-gradient(180deg, #FFF9F0, #FFF0DE);
}

.mcard[data-type="action"] {
  border-color: #BFE6E0;
  background: linear-gradient(180deg, #F7FDFC, #E8F7F4);
}

.mcard[data-type="object"] {
  border-color: #C7E9F2;
  background: linear-gradient(180deg, #F8FDFF, #EAF8FC);
}

.mtag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #FFB061, var(--pri));
  box-shadow: 0 2px 4px rgba(199, 91, 31, .18);
}

.mtag.tag-body {
  background: linear-gradient(180deg, #38B3A4, var(--teal));
  box-shadow: 0 2px 4px rgba(27, 143, 130, .18);
}

.mtag.tag-object {
  background: linear-gradient(180deg, #8FDCEC, #5CBBD3);
  box-shadow: 0 2px 4px rgba(92, 187, 211, .22);
}

/* ---------- 插画 ---------- */
.mini-art {
  width: 100%;
  height: 96px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mini-art svg {
  height: 100%;
  width: auto;
  max-width: 100%;
  overflow: visible;
  filter: drop-shadow(0 6px 8px rgba(199, 91, 31, .14));
}

/* 身体 / 物品：默认隐藏，只显示命中的组 */
.mini-art .art {
  opacity: 0;
  transform: scale(.94);
  transform-box: view-box;
  transform-origin: 100px 90px;
  transition: opacity .26s ease, transform .3s cubic-bezier(.34, 1.4, .64, 1);
}

.mini-art .art.is-on { opacity: 1; transform: none; }

.mcard[data-type="body"] .art.is-on {
  animation: partPulse 1.8s ease-in-out infinite;
}

@keyframes partPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(242, 153, 74, .45)); }
  50% {
    filter: drop-shadow(0 0 12px rgba(242, 153, 74, .9))
            drop-shadow(0 0 22px rgba(255, 201, 74, .35));
  }
}

/* 动作小人：姿势由 simon-says.css 负责，这里只管尺寸 */
.mini-art .mascot { height: 100%; width: auto; max-width: 100%; }

/* ---------- 文字 ---------- */
.men {
  font-size: clamp(14px, 3.6vw, 19px);
  line-height: 1.3;
  font-weight: 900;
  color: var(--ink);
  text-align: center;
  overflow-wrap: anywhere;
}

.men em {
  font-style: normal;
  color: var(--pri-d);
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .12em;
}

.mcard[data-type="body"] .men em { color: var(--teal); }
.mcard[data-type="object"] .men em { color: #1E86A6; }

.mzh {
  font-size: clamp(12px, 3vw, 14px);
  color: var(--mut);
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

/* ---------- and 徽章 ---------- */
.and-badge {
  align-self: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #FFD98A, #FFC94A);
  color: #8A4B1D;
  font-size: 13px;
  font-weight: 900;
  font-style: italic;
  box-shadow: 0 3px 0 #E2A92E, 0 6px 12px rgba(255, 201, 74, .3);
  flex: 0 0 auto;
}

/* ---------- 出题动画 ---------- */
.cmd-box.pop .mcard {
  animation: cardPop .45s cubic-bezier(.34, 1.56, .64, 1) both;
}

.cmd-box.pop .mcard:last-child { animation-delay: .1s; }

@keyframes cardPop {
  0% { opacity: 0; transform: translateY(10px) scale(.94); }
  60% { opacity: 1; transform: translateY(-2px) scale(1.02); }
  100% { opacity: 1; transform: none; }
}

/* ---------- 全屏 ---------- */
body.is-fullscreen .pair { gap: clamp(8px, 2vw, 22px); margin-top: 0; }

body.is-fullscreen .mcard {
  padding: clamp(10px, 1.8vh, 22px) clamp(8px, 1.4vw, 18px);
  border-radius: clamp(18px, 2.4vh, 30px);
  gap: clamp(4px, 1vh, 12px);
}

/* 竖屏全屏时卡片很窄：让插画盒保持近方形，避免 SVG 在过高的盒子里被缩小 */
body.is-fullscreen .mini-art {
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: clamp(130px, 26vh, 300px);
}
body.is-fullscreen .men { font-size: clamp(1.05rem, 3.8vw, 2.8rem); }
body.is-fullscreen .mzh { font-size: clamp(.9rem, 1.9vw, 1.5rem); }
body.is-fullscreen .mtag { font-size: clamp(11px, 1.6vh, 15px); }

body.is-fullscreen .and-badge {
  width: clamp(38px, 5vh, 64px);
  height: clamp(38px, 5vh, 64px);
  font-size: clamp(13px, 2vh, 20px);
}

/* ---------- 响应式 ---------- */
@media (min-width: 768px) {
  .mini-art { height: 128px; }
}

@media (max-width: 480px) {
  .pair { gap: 4px; }
  .mcard { padding: 8px 5px 10px; border-radius: 16px; }
  .mini-art { height: 86px; }
  .and-badge { width: 30px; height: 30px; font-size: 11px; }
  .mtag { font-size: 10px; padding: 3px 7px; }
}

@media (max-width: 360px) {
  .mini-art { height: 72px; }
  .men { font-size: 13px; }
  .mzh { font-size: 11px; }
  .and-badge { width: 26px; height: 26px; font-size: 10px; }
}

@media (max-height: 760px) {
  body.is-fullscreen .mini-art { max-height: clamp(90px, 20vh, 170px); }
}

@media (max-height: 560px) and (orientation: landscape) {
  .mini-art { height: 80px; }
  body.is-fullscreen .mini-art { height: 18vh; }
}

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  .mcard { animation: none !important; }
  .mini-art .art { transition: none; animation: none !important; }
  .mini-art .art.is-on { animation: none !important; }
  .cmd-box.pop .mcard { animation: none !important; }
}
