/* The waiting ball gently rocks even on this kiosk's reduced-motion setting. */
.screen--entered .pokeball {
  transform-origin: 50% 85%;
  animation: waiting-ball-rock 1.65s ease-in-out infinite !important;
}
[data-phase="opening"] .pokeball,
[data-phase="revealed"] .pokeball { animation: none !important; }
@keyframes waiting-ball-rock {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-8px) rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .screen--entered .pokeball { animation-name: waiting-ball-gentle !important; }
  [data-phase="opening"] .pokeball, [data-phase="revealed"] .pokeball { animation: none !important; }
}
@keyframes waiting-ball-gentle {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
@media (orientation: portrait) {
  .screen[data-screen="result"] { padding: 90px 20px 16px; overflow: hidden; }
  .result-layout {
    width: min(66%, 520px); height: 100%; overflow: visible;
    grid-template-rows: minmax(0, 1fr) clamp(300px, 25dvh, 330px);
    border-radius: 28px;
  }
  .result-visual { overflow: visible; }
  .pokemon-card { overflow: visible; }
  .element-scene { border-radius: 28px 28px 0 0; }
  .pokemon-card__artwork img {
    max-width: none; width: calc(100% + 220px); height: calc(100% - 38px);
    left: -110px; right: auto; top: -78px; bottom: auto;
    margin: 0; object-fit: contain;
    filter: drop-shadow(0 26px 16px #08071299) drop-shadow(0 0 28px color-mix(in srgb, var(--pokemon-accent) 22%, transparent));
  }
  .pokemon-card__topline { position: relative; padding: 12px 15px 0; align-items: start; z-index: 1; }
  .result-kicker { font-size: .48rem; letter-spacing: .12em; visibility: hidden; }
  .result-brand { width: 42px; height: 38px; }
  .pokemon-card__identity { padding-left: 10px; padding-right: 10px; background: linear-gradient(transparent, #100e20 95%); }
  .pokemon-card__identity h3 { font-size: clamp(2.7rem, 6.6vw, 4.1rem); }
  .result-copy {
    border-radius: 0 0 28px 28px; padding: 0 22px 16px;
    display: grid; grid-template-rows: 46px minmax(0, 1fr) 112px;
    gap: 10px; min-height: 0;
  }
  .result-copy::before { display: none; }
  .result-panels { align-items: stretch; min-height: 0; }
  .result-panel[data-result-panel="traits"] { height: 100%; min-height: 0; }
  .result-panel .trait-list { height: 100%; grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 3px; }
  .result-panel .trait-list div { min-height: 0; }
  .result-tabs { margin: 0; }
  .result-tabs button { min-height: 46px; }
  .trait-list div { grid-template-columns: minmax(90px, .9fr) 28px minmax(70px, 1.5fr); grid-template-rows: minmax(0, 1fr); align-items: center; gap: 8px; }
  .trait-list .trait-meter { grid-column: 3; height: 5px; }
  .result-actions { grid-template-columns: 1fr; grid-template-rows: repeat(2, 52px); gap: 8px; margin: 0; position: static; }
  .result-actions .primary-button { grid-row: 1; }
  .result-actions .primary-button, .result-actions .secondary-button { padding: 0 9px; font-size: .69rem; min-height: 52px; height: 52px; }
}
@media (orientation: portrait) and (max-height: 950px) {
  .screen[data-screen="result"] { padding-top: 65px; }
  .result-layout { width: min(68%, 440px); grid-template-rows: minmax(0, 1fr) 280px; }
  .pokemon-card__artwork img { top: -58px; height: calc(100% - 24px); width: calc(100% + 160px); left: -80px; }
  .pokemon-card__identity h3 { font-size: 2.4rem; }
  .result-copy { padding: 0 14px 12px; grid-template-rows: 36px minmax(0, 1fr) 100px; gap: 8px; }
  .result-panel .trait-list { gap: 3px 20px; }
  .result-tabs { margin-bottom: 0; }
  .result-tabs button { min-height: 36px; }
  .result-actions { grid-template-rows: repeat(2, 46px); }
  .result-actions .primary-button, .result-actions .secondary-button { font-size: .59rem; min-height: 46px; height: 46px; }
}
