/* Mobile/PWA Tarot: status-bar-aligned header and stable card geometry. */
@media (max-width:820px), (display-mode:standalone) and (max-width:1024px) and (orientation:landscape) and (hover:none) and (pointer:coarse) {
  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-header {
    grid-template-columns: 1fr;
    place-items: center;
    border-bottom-color: rgba(114, 62, 91, .1);
    background: linear-gradient(115deg, #ffe9ef, #f7e6f0 55%, #f0e8f4);
    color: #211a20;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-header > strong {
    position: absolute;
    left: 54px;
    bottom: 20px;
    z-index: 1;
    color: #211a20;
    text-align: left;
    white-space: nowrap;
    transform: none;
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-header .mobile-ai-back {
    left: 6px;
    bottom: 6px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 15px;
    background: transparent;
    color: #746b72;
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-header .mobile-ai-back:active {
    background: #f2eef1;
    color: #b52e5d;
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-history {
    position: static;
    height: 32px;
    padding: 0 9px;
    border-color: rgba(114, 62, 91, .14);
    background: rgba(255, 255, 255, .52);
    color: #654e5d;
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-header-actions {
    position: absolute;
    right: 8px;
    bottom: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-new {
    height: 32px;
    padding: 0 9px;
    border: 1px solid rgba(177, 73, 116, .18);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(247, 229, 239, .88));
    color: #a92e5b;
    font-family: inherit;
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-new span {
    margin-right: 2px;
    color: #c98a35;
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-new:active,
  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-history:active {
    transform: scale(.97);
  }

  #mobile-lite .mobile-tarot-new-confirm {
    display: grid;
    gap: 8px;
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-card {
    aspect-ratio: 971 / 1619;
    border-radius: 16px;
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-card-inner,
  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-card-face {
    border-radius: inherit;
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-card-face {
    border: 0;
    background: #0a0714;
    box-shadow: 0 20px 44px rgba(0, 0, 0, .32), 0 0 0 1px rgba(236, 190, 96, .25);
    transform: translateZ(0);
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-card-face.front {
    transform: rotateY(180deg) translateZ(0);
  }

  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-card-face img {
    border-radius: inherit;
    object-fit: contain;
  }
}

@media (max-width: 360px) {
  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-new,
  #mobile-lite .mobile-ai-page.is-tarot .mobile-tarot-history {
    padding-inline: 7px;
    font-size: 9px;
  }
}
