/* A full-screen environment, with a quiet, readable collector-card foreground. */
.result-meta-row { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0; width: 100%; }
.result-meta-row .result-identity-line { order: 0; }
.result-meta-row .result-identity-line .score { order: 1; }
.result-meta-row .type-badges { order: 1; margin-left: 0; }
.result-meta-row .type-badges, .result-meta-row .result-identity-line { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; margin: 0; white-space: nowrap; }
@media (orientation: portrait) {
  body[data-screen="result"] .shell { grid-template-rows: 68px minmax(0, 1fr); }
  body[data-screen="result"] .result-layout { grid-template-rows: minmax(0, 1fr) 280px; }
  body[data-screen="result"] .result-copy { grid-template-rows: 36px minmax(0, 1fr) 94px; gap: 8px; padding-bottom: 12px; }
  body[data-screen="result"] .result-tabs button { min-height: 36px; }
  body[data-screen="result"] .result-actions { grid-template-rows: repeat(2, 44px); gap: 6px; }
  body[data-screen="result"] .result-actions button { min-height: 44px; height: 44px; }
  /* Keep artwork in its own grid row; its upward overflow never reaches the title. */
  body[data-screen="result"] .pokemon-card__artwork { position: relative; min-height: 0; overflow: visible; }
  body[data-screen="result"] .pokemon-card__artwork img { height: calc(100% + 110px); scale: 1; max-width: 90vw; left: 50%; right: auto; top: auto; bottom: 12px; translate: -50% 0; object-position: center bottom; }
  body[data-screen="result"] .pokemon-card { grid-template-rows: 52px minmax(0, 1fr) 90px; }
  body[data-screen="result"] .pokemon-card__identity > p { display: none; }
  body[data-screen="result"] .pokemon-card__identity h3 { font-size: clamp(2.4rem, 5vw, 3.2rem); }
  body[data-screen="result"] .pokemon-card__identity { gap: 5px; align-content: start; padding-top: 10px; }
  .result-meta-row .result-identity-line strong { font-size: clamp(10px, 1.5vw, 13px); }
  .result-meta-row .result-identity-line .score { font-size: 11px; padding: 4px 6px; }
  .result-meta-row .type-badges .energy-badge { font-size: 10px; padding: 4px 6px; gap: 4px; }
  .result-meta-row .energy-badge svg { width: 14px; height: 14px; flex-basis: 14px; }
  body[data-screen="result"] .trait-list span, body[data-screen="result"] .trait-list strong { font-size: clamp(12px, 1.75vw, 16px); }
  body[data-screen="result"] .trait-list .trait-meter { height: 8px; }
  body[data-screen="result"] .result-tabs button { font-size: clamp(12px, 1.75vw, 16px); }
}
@media (orientation: portrait) and (max-height: 950px) {
  body[data-screen="result"] .result-layout { grid-template-rows: minmax(0, 1fr) 270px; }
  body[data-screen="result"] .pokemon-card__artwork img { height: calc(100% + 80px); }
  .result-meta-row { gap: 6px; }
  .result-meta-row .result-identity-line { gap: 4px; }
}
.type-badges .energy-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--energy-color); border: 1px solid color-mix(in srgb, var(--energy-color) 55%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--energy-color) 17%, #141323), #141323);
  box-shadow: inset 0 1px 0 #ffffff12, 0 2px 12px #0003;
  padding: 4px 10px; border-radius: 8px;
}
.energy-badge svg { width: 16px; height: 16px; flex: 0 0 16px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--energy-color) 30%, transparent)); }
.result-atmosphere { display: none; position: absolute; inset: 0; overflow: hidden; background: #100e20; pointer-events: none; }
body[data-screen="result"] .result-atmosphere { display: block; }
.result-atmosphere .element-scene__texture {
  width: max(100vw, 75dvh); height: auto; aspect-ratio: 3 / 4;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  filter: saturate(.85) brightness(.72);
}
.result-atmosphere .element-scene__veil {
  background: radial-gradient(ellipse at 50% 35%, transparent 12%, #100e2055 65%, #100e20bb 100%), linear-gradient(180deg, #100e2070, transparent 25%, #100e20c9 100%);
}
.result-atmosphere .element-scene__light { opacity: .45; }
.result-atmosphere .element-scene__particles i { opacity: .32; }
body[data-screen="result"] .backdrop__image,
body[data-screen="result"] .backdrop__veil { visibility: hidden; }
body[data-screen="result"] .topbar { background: #100e2033; border-color: #ffffff09; }
body[data-screen="result"] .pokemon-card__topline { z-index: 5; }
body[data-screen="result"] .result-brand { display: block; width: clamp(52px, 8vw, 72px); height: auto; object-fit: contain; filter: drop-shadow(0 2px 5px #0008); }
@media (orientation: portrait) {
  body[data-screen="result"] .result-layout { background: transparent; border-color: #ffffff15; box-shadow: 0 24px 64px #08061445; }
  body[data-screen="result"] .pokemon-card { background: transparent; }
  body[data-screen="result"] .pokemon-card > .element-scene,
  body[data-screen="result"] .pokemon-card .element-scene { opacity: .24; }
  body[data-screen="result"] .pokemon-card__identity { background: linear-gradient(transparent, #100e20ed 95%); }
  body[data-screen="result"] .result-copy { background: #100e20ed; }
}
@media (prefers-reduced-motion: no-preference) {
  body[data-screen="result"] .result-atmosphere .element-scene__particles i { animation: atmosphere-drift 14s ease-in-out var(--delay) infinite alternate; }
  body[data-screen="result"] .result-atmosphere .element-scene__light { animation: atmosphere-light 20s ease-in-out infinite alternate; }
}
@keyframes atmosphere-drift { from { transform: translate3d(0, 12px, 0); } to { transform: translate3d(16px, -42px, 0); } }
@keyframes atmosphere-light { from { transform: translateX(-3%); } to { transform: translateX(3%); } }
