/* 土豆快跑 v2 · 卡牌与道具 */

.side-actions--single { grid-template-columns: 1fr !important; }

.potato-stage {
  width: min(100%, 560px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.5vh, 13px);
}

.potato-timer {
  width: min(100%, 460px);
  height: 12px;
  padding: 2px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.potato-timer__bar {
  width: 100%;
  height: 100%;
  background: var(--mint);
  border-radius: 999px;
  transition: width 0.08s linear, background 0.2s linear;
}
.potato-timer__bar.is-warn { background: var(--orange-soft); }
.potato-timer__bar.is-danger { background: var(--cherry); }

.potato-card {
  width: min(100%, 430px);
  min-height: clamp(180px, 28vh, 250px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.8vw, 16px);
  padding: clamp(10px, 2vh, 20px);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 0 6px 0 var(--paper-deep), 0 8px 0 var(--ink), var(--shadow-card);
}
.potato-card.is-flip { animation: potatoFlip 0.32s var(--ease-bounce); }
@keyframes potatoFlip {
  0% { transform: rotateY(36deg) scale(0.94); opacity: 0.4; }
  100% { transform: rotateY(0) scale(1); opacity: 1; }
}
.potato-card-item {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 1;
  max-width: 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-warm);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 0 3px 0 var(--paper-deep), 0 4px 0 var(--ink);
}
.potato-card-item svg { width: 88%; height: 88%; }

.potato-prompt {
  margin: 0;
  font-family: var(--font-hand);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  text-align: center;
}
.potato-prompt b { color: var(--pumpkin-deep); }

.potato-props {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(5px, 1vw, 9px);
}
.potato-prop {
  aspect-ratio: 1;
  min-width: 0;
  padding: 3px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: 0 3px 0 var(--paper-deep), 0 4px 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--dur-fast), background var(--dur-fast);
}
.potato-prop svg { display: block; width: 100%; height: 100%; }
.potato-prop:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--paper-deep), 0 2px 0 var(--ink); }
.potato-prop.is-correct { background: var(--mint); }
.potato-prop.is-wrong { background: var(--cherry); }
.potato-prop:disabled { pointer-events: none; opacity: 0.72; }

.potato-feedback {
  min-height: 24px;
  margin: 0;
  font-family: var(--font-hand);
  font-size: var(--fs-md);
  color: var(--ink-soft);
  text-align: center;
}
.potato-feedback.is-ok { color: #3D7A56; }
.potato-feedback.is-no { color: #B84C4C; }

@media (min-width: 900px) {
  .screen--play .stage { justify-content: flex-start; padding-top: 32px; }
  .screen--play .stats { margin-top: 32px; }
}

@media (max-width: 859px) {
  .potato-stage { width: min(100%, 430px); gap: 8px; }
  .potato-card { width: min(100%, 360px); min-height: 170px; padding: 10px; gap: 8px; }
  .potato-timer { width: min(100%, 360px); }
  .potato-props { width: min(100%, 390px); gap: 5px; }
  .potato-card-item { border-width: 2px; }
  .potato-prompt { font-size: var(--fs-xs); }
}

@media (max-height: 560px) and (orientation: landscape) {
  .potato-stage { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .potato-card { width: min(40vw, 300px); min-height: 140px; }
  .potato-timer { width: min(42vw, 320px); }
  .potato-props { width: min(46vw, 380px); }
  .potato-prompt { width: 100%; }
}

/* 极窄屏：压缩纵向间距，给左下角版本号腾出一行 */
@media (max-width: 380px) {
  .screen--start { padding-bottom: 26px; }
  .app-version { left: 8px; bottom: 5px; font-size: 9px; padding: 1px 5px; }
  .setup { gap: 3px; }
  .setup__block { padding: 6px; gap: 4px; }
  .diff-list { gap: 5px; }
  .diff { min-height: 40px; padding: 4px 8px; }
  .diff__name small, .setup__label-note { display: none; }
  .app-title { font-size: clamp(26px, 8vw, 32px); }
  .btn--lg { min-height: 52px; }
  .hero__card { width: min(150px, 44vw); padding: 7px; }
  .hero__caption, .hero__float { display: none; }
  .subtitle { display: none; }
}

/* 极窄屏：难度卡进一步压缩 */
@media (max-width: 340px) {
  .diff { min-height: 40px; padding: 4px 8px; gap: 8px; }
  .diff__mini { width: 26px; height: 26px; border-radius: 7px; }
  .diff__name { font-size: var(--fs-sm); }
  .diff__best { font-size: 10px; }
}
