@media (max-width: 560px) {
  .mobile-art-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.72);
  }

  .mobile-art-modal[hidden] {
    display: none;
  }

  .mobile-art-modal-panel {
    width: min(100%, 420px);
    max-height: calc(100vh - 36px);
    display: grid;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 14px;
    background: #111;
    color: #fff;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.4);
  }

  .mobile-art-modal-panel button {
    justify-self: end;
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 900;
  }

  .mobile-art-modal-panel h2 {
    margin: 0;
    font-size: 1.25rem;
  }

  .mobile-art-preview {
    display: grid;
    gap: 12px;
    overflow-y: auto;
    border-radius: 14px;
    background: var(--paper, #f7f0df);
    color: var(--ink, #171717);
  }

  .mobile-art-preview img {
    width: 100%;
    max-height: 34vh;
    object-fit: cover;
  }

  .mobile-art-intro,
  .mobile-art-challenges { padding: 0 12px 12px; }
  .mobile-art-intro h3,
  .mobile-art-challenges h3 { margin: 0 0 8px; font-size: 1rem; }
  .mobile-art-intro p { margin: 0; line-height: 1.55; }
  .mobile-art-challenges ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .mobile-art-challenges li {
    display: grid;
    gap: 3px;
    padding: 10px 11px;
    border: 1px solid var(--line, #d8d2c7);
    border-radius: 10px;
    background: #fff;
  }
  .mobile-art-challenges li strong { color: #72501f; }
  .mobile-art-challenges li span { font-size: .9rem; line-height: 1.45; }
  }

  .mobile-card-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    align-items: end;
    background: rgba(17, 17, 17, 0.42);
  }

  .mobile-card-modal-panel {
    max-height: 82vh;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 12px;
    border-radius: 20px 20px 0 0;
    padding: 16px;
    background: var(--paper);
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.22);
  }

  .mobile-card-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
  }

  .mobile-card-modal-head h2 {
    margin: 0;
  }

  .mobile-card-modal-head button,
  .mobile-card-modal-actions button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-weight: 900;
  }

  .mobile-card-modal-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .mobile-card-modal-list {
    overflow: auto;
    display: grid;
    gap: 14px;
    padding-bottom: 8px;
  }

  .mobile-rarity-group {
    display: grid;
    gap: 8px;
  }

  .mobile-rarity-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--mobile-accent), white 58%);
    border-radius: 11px;
    padding: 8px 10px;
    background: color-mix(in srgb, var(--mobile-accent), white 90%);
    color: color-mix(in srgb, var(--mobile-accent), black 32%);
  }

  .mobile-rarity-head span {
    font-size: 0.76rem;
    font-weight: 900;
  }

  .mobile-rarity-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-card-choice {
    display: grid;
    min-width: 0;
    grid-template-columns: 24px 30px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 900;
  }

  .mobile-card-choice input {
    width: 20px;
    height: 20px;
    accent-color: var(--teal);
  }

  .mobile-card-choice .token-thumb,
  .mobile-card-choice .token-symbol {
    width: 30px;
    height: 30px;
  }

  .mobile-card-choice > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
